Jetson Nano | Waveshare CAN-Bus Shield

Hi! I’ve successfully flashed my Jetson Nano with BalenaOS. I’ve also sent and successfully read CAN packets through the guide on this site:

The thing is, they seem to communicate through SPI with their custom python file rather than using socketcan, so theres no device if i run ip a s. I need for candump & cansend etc to work with can-utils package. What would be the best way forward here? I had no issues doing this on a raspberry pi but the the jetson nano doesn’t work with a config.txt boot file as I’m used to haha.

running modprobe on CAN and then setting it up gives:

root@f6fda3e:~# ip link set can0 up type can bitrate 500000
ip: either "dev" is duplicate, or "type" is garbage

the device is there though as i can run

root@f6fda3e:~# ls /dev/spidev*
/dev/spidev0.0  /dev/spidev0.1  /dev/spidev1.0  /dev/spidev1.1

I’ve activated support access if any of you would like to help out here :blush: uuid f6fda3e8ff0ee7713284edd823421313

Edit: Changed to Project Help rather than Product Support.

Not sure if i could follow this as the root files differs on the BalenaOS?

Hi, so the CAN shield hardware works as expected in a balenaOS container if you use the python examples, the ones which communicate with the shield via the /dev/spidev node. Is my understanding correct?

If so, are you able to get the shield working using can sockets in Nvidia Ubuntu? I recommend first checking if sending and receiving data works as expected in the reference setup offered by NVidia Jetpack 4.6.3 so that the setup can then be replicated in balenaOS. From the forums post you linked it seems you may have to patch the device-tree to use the mcp25x driver for spi0 instead of spidev.

1 Like