Setting up CAN device

Please provide the following info (tick the boxes after creating this topic):
Software Version
DRIVE OS 6.0.10.0
DRIVE OS 6.0.8.1
DRIVE OS 6.0.6
DRIVE OS 6.0.5
DRIVE OS 6.0.4 (rev. 1)
DRIVE OS 6.0.4 SDK
other

Target Operating System
Linux
QNX
other

Hardware Platform
DRIVE AGX Orin Developer Kit (940-63710-0010-300)
DRIVE AGX Orin Developer Kit (940-63710-0010-200)
DRIVE AGX Orin Developer Kit (940-63710-0010-100)
DRIVE AGX Orin Developer Kit (940-63710-0010-D00)
DRIVE AGX Orin Developer Kit (940-63710-0010-C00)
DRIVE AGX Orin Developer Kit (not sure its number)
other

SDK Manager Version
2.1.0
other

Host Machine Version
native Ubuntu Linux 20.04 Host installed with SDK Manager
native Ubuntu Linux 20.04 Host installed with DRIVE OS Docker Containers
native Ubuntu Linux 18.04 Host installed with DRIVE OS Docker Containers
other

Hello Nvidia!

Iā€™m following up on my previous post made a while ago: How to gather CAN data using external CAN sensor


Now I finally have the H2A vehicle harness connected to my VBOX 3iSL using the P3 DB9 connector (since that has SMCU_CAN signals as explained in the mechanical and installation guide documentation).

To add some context about what the VBOX does, it is currently set up to send GPS/CAN data out through its serial port.

I checked the VBOX to make sure it was sending signals correctly (which it was), and I ran the following sample to try and see the output on the terminal:


sudo ip link set can0 type can bitrate 500000
sudo ip link set can0 up

ifconfig -a (to confirm that can0 was up and running)

./sample_canbus_logger --driver=can.socket --params=device=can0


The final result only showed this output, with no CAN messages coming into the terminal:

user@tegra-ubuntu:/usr/local/driveworks/bin$ sudo ./sample_canbus_logger --driver=can.socket --params=device=can0
Program Arguments:
ā€“driver=can.socket
ā€“filter=
ā€“hwtime=1
ā€“offscreen=0
ā€“params=device=can0
ā€“profiling=1
ā€“send_i_understand_implications=0
ā€“send_id=6FF
ā€“send_size=8

[29-10-2024 13:29:20] Platform: Detected Drive Orin P3710
[29-10-2024 13:29:20] TimeSource: monotonic epoch time offset is 1730216012399566
[29-10-2024 13:29:20] TimeSourceVibranteLinux: detect valid PTP interface mgbe2_0
[29-10-2024 13:29:20] TimeSource Nvpss : PTP ioctl returned error. Synchronized time will not be available from this timesource.
[29-10-2024 13:29:20] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to mgbe2_0
[29-10-2024 13:29:20] PTP Time is available from Eth Driver
[29-10-2024 13:29:20] Adding variable DW_Base:DW_Version
[29-10-2024 13:29:20] Added variable DW_Base:DW_Version
[29-10-2024 13:29:20] Platform: number of GPU devices detected 1
[29-10-2024 13:29:20] Platform: currently selected GPU device 0, Resource Data Dir: trt_08_05_10_03, Arch: ga10b
[29-10-2024 13:29:20] Platform: currently selected GPU device integrated ID 0
[29-10-2024 13:29:20] CUDLAEngine:getDLACount: CUDLA version is = 1003000
[29-10-2024 13:29:20] CUDLAEngine:getDLACount: Number of DLA devices = 2
[29-10-2024 13:29:20] Context::mountResourceCandidateDataPath resource FAILED to mount from ā€˜./resourcesā€™: VirtualFileSystem: Failed to mount ā€˜./resources/resources.pakā€™
[29-10-2024 13:29:20] Context::mountResourceCandidateDataPath resource FAILED to mount from ā€˜/usr/local/driveworks-5.10/bin/dataā€™: VirtualFileSystem: Failed to mount ā€˜/usr/local/driveworks-5.10/bin/data/resources.pakā€™
[29-10-2024 13:29:20] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks-5.10/bin/ā€¦/data
[29-10-2024 13:29:20] Context::mountResourceCandidateDataPath resource FAILED to mount from ā€˜/usr/local/driveworks-5.10/bin/ā€¦/dataā€™: VirtualFileSystem: Failed to mount ā€˜/usr/local/driveworks-5.10/bin/ā€¦/data/resources.pakā€™
[29-10-2024 13:29:20] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks-5.10/data
[29-10-2024 13:29:20] Context::mountResourceCandidateDataPath resource FAILED to mount from ā€˜/usr/local/driveworks-5.10/dataā€™: VirtualFileSystem: Failed to mount ā€˜/usr/local/driveworks-5.10/data/resources.pakā€™
[29-10-2024 13:29:20] Context::findResourcesPackageInPathWalk: Could not find ./resources/resources.pak in upto 7 parent directories from /usr/local/driveworks-5.10/bin/ā€¦/lib/libdw_base.so.5.10
[29-10-2024 13:29:20] Context::findResourcesPackageInPathWalk: Could not find ./resources/resources.pak in upto 7 parent directories from /usr/local/driveworks-5.10/targets/aarch64-Linux/lib/libdw_base.so.5.10
[29-10-2024 13:29:20] SDK: No resources(.pak) mounted, some modules will not function properly
[29-10-2024 13:29:20] egl::Display: found 1 EGL devices
[29-10-2024 13:29:20] egl::Display: use drm device: drm-nvdc
[29-10-2024 13:29:20] TimeSource: monotonic epoch time offset is 1730216012399566
[29-10-2024 13:29:20] TimeSourceVibranteLinux: detect valid PTP interface mgbe2_0
[29-10-2024 13:29:20] TimeSource Nvpss : PTP ioctl returned error. Synchronized time will not be available from this timesource.
[29-10-2024 13:29:20] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to mgbe2_0
[29-10-2024 13:29:20] PTP Time is available from Eth Driver
[29-10-2024 13:29:20] Initialize DriveWorks SDK v5.10.87
[29-10-2024 13:29:20] Release build with GNU 9.3.0 from buildbrain-branch-0-g9a5b4670e12 against Drive PDK v6.0.6.0
[29-10-2024 13:29:20] SensorFactory::createSensor() ā†’ time.nvpps, nvpps-device=/dev/nvpps0
[29-10-2024 13:29:21] TimeSensor: failed to set NVPPS parameters. Error: Invalid argument
[29-10-2024 13:29:21] This platform does not support NVPPS GPIO mode. Fallback to timer mode
[29-10-2024 13:29:21] TimeSensor: initialized with no UTC time reference.
[29-10-2024 13:29:21] SensorFactory::createSensor() ā†’ can.socket, device=can0
[29-10-2024 13:29:21] EndpointNVPPS: started on /dev/nvpps0
[29-10-2024 13:29:21] CANSocket: use SW based timestamps for can0
[29-10-2024 13:29:21] CANSocket: started can0


Am I missing some setup steps somewhere (ie. do I need to use can.aurix instead, and would that work with my Vbox)? Or do I have the wrong harness?

Thank you

Also, I ran ā€œifconfig -aā€ after running the sample, and no packets were received

And when I run candump can0 on one terminal then cansend can0 220#50 on a separate one, nothing appears in the candump window and then my software terminal emulator Tera Term returns this output constantly:

133.161378] mttcan c320000.mttcan can1: Stuff Error Detected
** 15 printk messages dropped **
[22133.161796] mttcan c310000.mttcan can0: Stuff Error Detected
** 15 printk messages dropped **
[22133.162228] mttcan c310000.mttcan can0: Stuff Error Detected
** 16 printk messages dropped **
[22133.162673] mttcan c320000.mttcan can1: Stuff Error Detected
** 15 printk messages dropped **
[22133.163096] mttcan c310000.mttcan can: Stuff Error Detected
** 1897 printk messages dropped **
[22133.213422] mttcan c320000.mttcan can1: Stuff Error Detected
** 15 printk messages dropped **
[22133.213835] mttcan c320000.mttcan can1: Stuff Error Detected
** 15 printk messages dropped **
[22133.214251] mttcan c320000.mttcan can1: Stuff Error Detected
** 16 printk messages dropped **

I havenā€™t made any modifications to c310000 nor c320000 if that explains anything about this error

aurix.can is not supported.

Could you please share the connection pictures to check with engineering team.

I cannot share pictures, but I can explain how itā€™s all set up.

This is the sensor device that I have already set up and sending signals through the circled connection shown above. Using Vector CANalyzer, I know that as long as the VBOX is powered on, itā€™s constantly sending the desired signals through that connector.

On the Orin side, Iā€™ve set up the can0 interface as follows:

sudo ip link set can0 type can bitrate 500000
sudo ip link set can0 up
ifconfig -a (to confirm that can0 is UP,RUNNING)
candump can0

Note: I have also tried running these commands with can1 instead of can0, same result


As far as I understand, so long as this connector is hooked up to one of the harness breakouts and I run these commands, I should see some data appear on the terminal while ā€œcandump can0ā€ is actively listening. I have tried connecting all 9 breakout connections, P1 up to P9, on the H2A harness to the connector above and nothing showed up on that terminal.

Ok, so some good news. I tried running recorder-tui without having my VBOX connected via the H2A harness (P3) this time and it gave me an error saying that can.socket couldnā€™t be found, whereas before it ran but just didnā€™t save any data. This likely means that my error is related to the c3X0000.mttcan error output shown above, maybe some settings related to it have to be adjusted for the data to be captured properly.

Very important question:

Do the screenshots below essentially mean that only harness H1B is capable of SocketCAN connections that would allow me to connect my VBOX to either can0 or can1 interfaces? This came from Drive OS 6.0.10, and the documentation for Drive OS 6.0.6 doesnā€™t have this information at all. Harness H2A, which is the one I currently have based on your suggestion, doesnā€™t mention any capability with Orin Can1 and Orin Can0 like harness H1B does.

From harness H1B

Dear @adas_1,
My apologies for confusion and delay. H1 is needed to test socket CAN0/CAN1. I edited the typo in previous topic.

Did you check Enabling CAN Driver for Nvidia Drive AGX Orin which has details on CAN testing steps/connections our QA verified internally.

The only steps I was really able to test was setting and pulling can0/can1 up and then running candump while I had connectors P1-P9 connected to my VBOX, which I now understand is pointless since the H2 harness is incapable of Socketcan connections. Also, whenever I tried running ā€œcansend can0 220#50ā€ while connected or even disconnected from the VBOX, it gave me the error I described earlier:

133.161378] mttcan c320000.mttcan can1: Stuff Error Detected
** 15 printk messages dropped **
[22133.161796] mttcan c310000.mttcan can0: Stuff Error Detected
** 15 printk messages dropped **
[22133.162228] mttcan c310000.mttcan can0: Stuff Error Detected
** 16 printk messages dropped **
[22133.162673] mttcan c320000.mttcan can1: Stuff Error Detected
** 15 printk messages dropped **
[22133.163096] mttcan c310000.mttcan can: Stuff Error Detected
** 1897 printk messages dropped **
[22133.213422] mttcan c320000.mttcan can1: Stuff Error Detected
** 15 printk messages dropped **
[22133.213835] mttcan c320000.mttcan can1: Stuff Error Detected
** 15 printk messages dropped **
[22133.214251] mttcan c320000.mttcan can1: Stuff Error Detected
** 16 printk messages dropped **

Do you think this error would go away if I had the CAN loopback connections made properly and/or if I had harness H1B connected to my VBOX instead of the H2A harness?

Also, most importantly, can you help me with getting Arrow to process and ship my order for the H1B harness that I purchased last Friday asap? The case number is 39458563

Did you hear any update from arrow on this?

Yes. I believe this error should not occur. My previous CAN test was on a QA setup with PeakCAN. Details are shared in the topic I donā€™t see any issue and I could sent/receive CAN data.

I am not familiar with VBOX, Is it like you connected it to host to verify if you see any data on CAN analyzer and then connected circled connection interface to target?

Hello Siva,

A couple updates:

  1. The H1 harness arrived

  2. The MTTCAN error only shows up on my virtual laptop terminal as soon as I set up the second of the two can interfaces. So if can0 is currently up, no errors occur, but as soon as I enable can1, the error appears until I turn off both interfaces.

  3. Yes, we connected that same connector to a CANalyzer, saw that it was sending data, then tried connecting that connector to P11, then nothing would show up whenever I ran candump can0 or can1. The sample_canbus_logger also gave no output.

Iā€™ll check the PeakCan setup you mentioned shortly.

Hereā€™s a better depiction of the current setup:

I have tried using both H2A (P3) and H1B (P11) harnesses connected to the VBOX in the configuration seen above.


In addition to the ā€œmttcan.310000ā€ error I see on my virtual laptop terminal whenever I set both interfaces ā€œupā€, I begin to see this info when I run ifconfig -a:

canX <UP,RUNNING,NOARP>
RX packets: some number bytes: some number (X bytes)
RX errors: same number as RX packets dropped 0 overruns 0 frame 0
TX packets: 0 bytes 0 (0 bytes)
TX errors: 0 dropped 0 overruns 0 carrier 0 collisions 0

I also havenā€™t made any modifications to either harness when running these tests as I donā€™t think I need the loopback configuration to capture the VBOX data. And to clarify about the CANalyzer, Iā€™m not using it in the current setup, I just used it to confirm that the VBOX was sending data. Would I need to have one connected at all times to make this data capture work?

Hi,
Do you connect Orin CAN0, CAN1 and VBOX on same CAN bus?
Do you have 120ohm terminal resistors on both far end?

Dear @adas_1 ,
As Jim indicated in picture, check connecting
CAN_L(Db9 pins 1,2) of can0 and can1 from p11 and VBOX CAN_L
CAN_H(Db9 pins 7,8) of can0 and can1 from p11 and VBOX CAN_H.

Hello again,

I managed to get it to send data to the Orin via PeakCAN USB adapter. It turns out I didnā€™t need the harnesses for this VBOX device.

Thank you for all your help!

1 Like

Dear @adas_1 ,
Could you please share the connection details that worked for your case using VBOX. It may helps others in community.

Sure! I connected the circled connection in the first picture at the top to the PeakCAN USB IPEH-002021 adapter with a male-male DB9 termination resistor adapter in between the two connectors. Once I plugged in the USB-A end into the Orin and set up the CAN interface, the light on the PeakCAN adapter would start blinking, then candump and recorder-tui would capture the data.

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