Is there a standard way to use usb over can on a jetson agx orin? I have seen plenty of people ask about this with mixed success, many people give up and just use a can tranceiver over spi as seen here. This is not good for a lot of people as usb to can is a quick, reliable, and easy way to quickly get started developing and for some it is even better to go to production with this set up.
If there was a standard setup somewhere in the documentation on how to get usb to can working it would save a lot of people a lot of time and make the product easier to work with.
To get a USB to CAN interface working on an Ubuntu host PC, the first thing you need to do is install the can-utils package. You can install it by running:
sudo apt-get install can-utils
Once that’s done, plug in the USB-to-CAN adapter, and check if it’s recognized with the lsusb command. If it shows up, you can bring up the CAN interface with the following command:
ip link set <interface name ie. can0> up type can bitrate <bitrate_of_your_choice>
Now for the Orin
Yes it can see the device when lsusb is ran, it just does not turn it into a can interface automatically like on other systems. I suspect this has to do with some settings relating to the Orin’s onboard mttcan interfaces. can0 and can1 are set up to work with mttcan out of the box where as the USB to CAN interface is using socketcan since that is the most common type on linux systems. I’ve also seen a few forum discussions mention the gs_usb kernel package but I am not very solid in my understanding as to why that causes an issue.