USB CAN interface on Jetson AGX orin

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.

Hi victor.w.boyd,

Are you using the devkit or custom board for AGX Orin?
What’s the Jetpack version in use?

You can select either of the following methods for CAN.

  1. Internal CAN interface (mttcan): Controller Area Network (CAN) — NVIDIA Jetson Linux Developer Guide
  2. SPI-CAN module: e.g. mcp2515 or mcp2518fd, please refer to Jetson/L4T/peripheral/ - eLinux.org for our verification
  3. USB-CAN module: please verify if it can work on your Ubuntu host PC first, you may need to request your vendor for related usage.
  1. I am using the devkit
  2. The jetpack version is 6.2
  3. I am trying to use USB CAN, it works on everything but the jetson orin, this includes multiple laptops and single board computers

Could you share the steps how do you use USB-CAN on an Ubuntu host PC?

In addition, have you tried to run lsusb on AGX Orin to check if the USB-CAN can be recognized?

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.

Please run the following command to check if CONFIG_CAN_GS_USB is enabled on your board.

$ zcat /proc/config.gz |grep CONFIG_CAN_GS_USB

If not, please check if Does jetpack 6.0 not support gs_usb(usb to can)? - #19 by luciano.vieira can help for your case.
Or you can enable it in kernel config manually.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.