0

I am trying to connect a CANopen motor driver to Ubuntu to control the driver. I used the CANopenNode package and then I connected the two drivers and connected a two 120 ohms resistors at both ends of the bus and I am using a Nvidia AGX Xavier as a controller and I made sure of using the correct pins, but when I using the package this error pops up when I initialize the first node(driver):

./canopend[9886]: (CO_CANerror_rxMsgError) Socket error msg ID: 0x20000004, Data[0..7]: 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00 (can0)
./canopend[9886]: CAN Interface "can0" reached Tx Warning Level
./canopend[9886]: (CO_CANerror_rxMsgError) Socket error msg ID: 0x20000004, Data[0..7]: 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00 (can0)
./canopend[9886]: CAN Interface "can0" changed state to "Tx Passive"
./canopend[9886]: (CO_CANerror_rxMsgError) Socket error msg ID: 0x20000040, Data[0..7]: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 (can0)
./canopend[9886]: CAN Interface "can0" changed to "Bus Off". Switching to Listen Only mode...
./canopend[9886]: (CO_CANerrorSetListenOnly) can0 Set Listen Only

I opened an issue on the package but I am asking if anyone can help me.

  • Since you're already getting support on the official github, some of this support may be redundant, but your question may be good for SO anyway. In any case, to second the other forum, try the `candump` command; see if you can even setup CAN on ubuntu enough that you can `cansend` and `candump` data on your wire; if the wire or baud is messed up, that won't work. – JWCS Jul 07 '21 at 14:22
  • @JWCS candump doesn't show any data being sent and I am sure the wiring and the baudrates are OK, so what could be causing this error? – Amr ehab Jul 08 '21 at 07:13
  • That likely means the setup of your can is wrong. Like, have you [setup your can device on linux](https://www.elinux.org/Bringing_CAN_interface_up)? Ex ` $ sudo ip link set can0 type can bitrate 125000` `$ sudo ip link set up can0`? Or, for my device, I often use the other can-utils tool, ` $ sudo slcand -o -s8 -t hw -S 3000000 /dev/ttyUSB0` `$ sudo ip link set up slcan0`. You can check these are setup with `ifconfig`; the device should be there. If it's there, and you candump / cansend on it, then the issue also shouldn't be in the wiring; that's a fully setup canbus. If you can't... wiring? – JWCS Jul 09 '21 at 05:35
  • I setup the device and can see it using ifconfig but when I cansend I can't see anything on candump. – Amr ehab Jul 10 '21 at 07:35

0 Answers0