I am trying to send CAN data recorded using candump of can-utils on the vehicle’s CAN bus using canplayer through PX2. This sometimes works while sometimes terminates the CAN communication.
Example: I recorded the data for turning the indicator on and then off. After replaying it the first time using canplayer, the entire communication stopped with no error displayed. Nothing was received using candump after this. Restarting the system, I could send the data using canplayer. This did turn on /off the indicators as expected. I could do it 2 times. The third time I replayed the file using canplayer, the communication stopped again (nothing received using candump) and I had to again restart the system.
Am I missing something here? Has anyone faced a similar issue? I have not terminated the CAN cable connected to PX2 as it is short (~50cm). Nonetheless, could this be the issue?
Dear ana9017,
Please refer to below my experiments. Thanks.
$ sudo apt-get install can-utils
Step 1. Connected PCAN to can-5 port.
- can-5 → can0 on Tegra A
- can-6 → can1 on Tegra B
- can-1 → channel A on Aurix
- can-2 → channel B on Aurix
- can-3 → channel C on Aurix
- can-4 → channel D on Aurix
Step2. Enable can0 on Tegra A.
$sudo ip link set can0 type can bitrate 500000
$sudo ip link set can0 up
Step3. Run candump
$sudo candump can0
For DriveWorks, could you please re-try below following steps?
- In recorder-config.json file, please find “can” and change “params”: “”, → “params”: “device=can0”.
- $sudo ip link set can0 type can bitrate 500000
- $sudo ip link set can0 up
- $sudo ./recorder-qt
I hope these help. Thanks.
Hi SteveNV,
I am unable to find the recorder-config.json file. Also, does the recorder-qt allow writing data as well or just recording?
I am currently using canplayer of can-utils for this.
Also to update, I figured out that possibly my node was going in a bus-off state. Setting recovery from this has solved the problem of the disconnection in communication.
I am using the following now to enable can0 and also set recovery from bus-off:
$ sudo ip link set can0 type can bitrate 500000 restart-ms 10
However, now there is a new issue: PX2 itself crashes after sending a few canplayer commands.
Any recommendations on how to solve this?
Dear ana9017,
Please can find recorder-config.json file in /usr/local/driveworks/toos.
The tool is for just recording.
Could you please let me know your new issue in detail? Thanks.
So, I have been trying to send some CAN messages on the CAN bus of the vehicle, using can-utils on PX2. As the vehicle is sending data with same IDs as well, it results in bus-off condition of my node on PX2.
As I mentioned before, I was able to recover my node using the following command:
$ sudo ip link set can0 type can bitrate 500000 restart-ms 10
However, now when I keep on sending the data, my node does recover from a bus-off, but the system (PX2) freezes for a while and then restarts. Is there some way of testing what exactly is freezing/restarting the system?
Thanks for your help!
Dear ana9017,
Did you update DPX2 SDK to Beta3 and Aurix FW?
If yes, could you please file a bug for this symptom? Thanks.
Hi SteveNV,
On my px2, when I use command ip link, I can only see can0 and can1, can not see can2~5. How can I set up these four aurix can? Thanks very much!
Dear yxiang,
Could you please refer to EB-DrivePX_Software_User_Guide_DPX2_P2379 for your topic?
The doc is in DPX2-P2379-EB-V4.02.04_release.zip on you host PC. Thanks.
Hi SteveNV,
I have followed the aurixcan setup guide DRIVEPX2 EASYCAN SETUP GUIDE - FAQ - NVIDIA Developer Forums ,but it does not work, when run ./sample_canbus_logger --driver=can.aurix --params=ip=10.42.0.146,bus=a, no message return. About the guide I have a small question, in note 2 it said “EASYCAN Testing (connect your device to a CAN interface, for example, CAN1/CANa)”, how to connect the can interface?
If the aurixcan is set succeed, we can see can2~5? Is it right?
Hi SteveNV,
When I run ./sample_canbus_logger --driver=can.aurix --params=ip=10.42.0.146,bus=a, no error message and also no date message. How can I simulately test sending message and then test if aurixcan can receive message?
Thanks very much.
Dear yxiang,
Could you please let me know if have completed both setups below?
- DRIVE PX2 TIME SYNC GUIDE
- DRIVEPX2 EASYCAN SETUP GUIDE
Yes, I have completed both of them. Now the problem is that I do not know to test the Aurixcan communication.
If I use the default config file, how can I simulately test sending message and then test if aurixcan can receive message?
For example one message
MsgId : 0x140
CtrlId : EC_CAN_BUS_E
FrmTyp : CAN_ID_STANDARD
DestId : TEGRA_DEVICE_A
DestSwc : SWC_ID_CANDATA
in the config file like this. How can I simulately test sending message?
Thanks very much