Possibility of Jetson Xavier supporting actuators with SAE J1939 CAN 2.0 B network?

I am new to the Jetson Xavier platform and am using two actuators that conform to CAN BUS J1939 as per ISO-11898 Standard CAN 2.0B. I am aware that JetSon Xavier CAN controllers support CAN 2.0 A and CAN FD messages. I am wondering if and how it is possible to set up the Kernel for transmitting messages.

Hi ali4,

Xavier supports both CAN 2.0A and 2.0 B. You do not have to do any kernel changes. You can use 29 bit ID in cangen/cansend commands for transaction.
Let me know if you have further questions.


Thank you @shgarg for your response. Additionally, I am wondering how can I run code scripts for sending and receiving CAN messages between the CAN controllers and the actuators, after enabling the CAN drivers on Jetson Xavier. Do I need to utilize the SocketCAN APIs or can I directly use cangen and cansend commands? I am a bit lost on this part and would appreciate a help on setting this up.

Hi ali,
You can use cansend/cangen/candump commands directly.
They internally call SocketCAN APIs only.
Try and let me know.


@shgarg I did try this today for a quick loopback testing, and it worked. Does Xavier provide a library of J1939 CAN frame work in C++ or C for sending and receiving messages via the CAN bus? Or Do you I need to clone one from available github repositories?

Also, any guidance on the integration of the framework with ros node would be appreciated as I am trying to figure out how I can send command signals to my actuators through a ROS node.

I’ve seen nothing from nVidia. Any Linux package that can interface to SocketCAN should work well “out of the box”. We’ve ported some proprietary stuff over pretty easily. You can also just debug your package with Ubuntu desktop on a PC - just buy a USB CAN adapter like a Kvaser - Ubuntu provides socketCAN drivers builtin. Just use ifconfig can0 … to set your speed and other params.

Just for clarification, do you not need a CAN controller even when connecting the USB CAN adapter between actuators and the PC? I was wondering if I could just utilize the can controllers from Xavier and use those to monitor CAN traffic on a third-party software like from kvaser or PCAN. Or can i just directly connect my desktop to my actuators through the can connector?

I meant that if you wish to develop on Ubuntu x86 with CAN, you can add a USB adapter like Kvaser to give you the SocketCAN interface, and the same code should run with the “real” CAN adapter on the Xavier. Caution that the CAN tx and rx lines on the Xavier may be purposed as GPIO lines. You’re likely going to need a DTS change to make the CAN pins. Look in the forum - someone else did this as well.

Here you go…


Yes, CAN is verified on Xavier.

And the software configuration is different than that of TX2.

There is a catch here.

At present (In case of Xavier) the pinmux which is packaged for Xavier on public releases, configures the CAN I/O pins to have GPIO functionality.

This is to comply with Raspi 40-pin standard.

In this case CAN functionalities are disabled on the pins.

To have the pins configured as CAN (SFIO) functionalities, either of these can be followed.

There is a separate pinmux configuration to be used in flashing.
Pinmux name: $TEGRA_TOP/ hardware/nvidia/platform/t19x/galen/bct/pinmux/tegra19x-mb1-pinmux-p2888-slvs-0000-a00-p2822-0000-a00.cfg

corresponding register values can be overwritten after the system boots.
Reg Val
0x0c303000 = 0x0000c400;
0x0c303008 = 0x0000c458;
0x0c303010 = 0x0000c400;
0x0c303018 = 0x0000c458;
Any reg read/write tool can be used to overwrite.
However in 2nd case, the register configurations will not be persistent across reboots.

Please let us know if you need any further information.

Thanks & Regards,