I’m pretty limited in this area but I have LPMS-CANAL2 IMU sensor (9-Axis Waterproof IMU LPMS-AL2 Series - LP-RESEARCH) that has CAN bus communication interface. I am going to read the IMU data stream using Jetson Xavier. I got a CAN transceiver (Amazon.com) and I did the hardware setup based on (GitHub - hmxf/can_xavier: CAN Bus Drive Script) and passed the test CAN0 controller(loopback test) based on that website and I also got CAN0 when run ‘ifconfig’. BUT, I can get results only in the loopback test mode not in the normal mode (I do not know why!).
Anyway, My Sensor has 4 wires (GND, VCC, and CAN+ and CAN-). GND and VCC are connected to external DC voltage supplier. I think CAN+ and CAN- are connected to CAN-H and CAN-L of the transceiver respectively. But how do I know my sensor is connecting or communicating with the Xavier? Is there any IP or ID address that can get in the terminal to make sure that my sensor is connected to the Xavier. I would appreciate if you can help me soon. Thanks so much.
Thanks Ramin for your reply. I actually did but I am not seeing anything. Is it possible that the bitrate that I setup is not compatible with the sensor? I used this ‘sudo ip link set can0 type can bitrate 1000000’
Here is what I found in the user manual of the sensor
“The CAN message uses standard 11 bits identifier and 8 bytes of data.
The default connection baud rate is 125Kbit/s.”
Also here is a copy of quick user manual of the sensor (https://www.lp-research.com/wp-content/uploads/2017/11/LpmsCanal2QuickStartGuide20171027.pdf)
As far as I know, Jetson has two CAN bus terminals CAN0 and CAN1. Is it possible to use only one CAN bus (CAN0) with multiple sensor entries? For example, assume I have two IMUs and I am going to connect them to CAN0 only. I think the hardware setup would be as follows
All the IMUs Rx are connected to Jetson Rx and similarly all the IMU Tx are connected to Jetson Tx.
But how can I assign a specific ID to each IMU CAN? For example, when I run “candump can0”, how to see what data come from which sensor?
You can join as many sensors as you want to one can port (CAN0), but everyone (read and send) on CAN0 has to have the same baudrate.
Regarding CAN id of devices, unless you can have access directly to the IMU firmware somehow to set it, this information is usually set by default by the manufacturer (should include in the device manual or info on their webpage). Some device may automatically claim a different address if the default address is already claimed on the bus, but best is to read the sensor manual to know this information.
i followed this topic and the github readme referred earlier, but i got no success on loading the can drivers.
i got the following error:
insmod: ERROR: could not insert module /lib/modules/4.9.108-tegra/kernel/drivers/net/can/can-dev.ko: Invalid module format
nvidia@jetson-0423418010460:~$ sudo modprobe can
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.9.108-kastner/modules.dep.bin'
modprobe: FATAL: Module can not found in directory /lib/modules/4.9.108-kastner
can you please give me some hints?
Linux jetson-0423418010460 4.9.108-kastner #3 SMP PREEMPT Thu Jul 11 15:22:26 CEST 2019 aarch64 aarch64 aarch64 GNU/Linux
I bumped into this question while trying to figure out how to connect Custom IMU to Driveworks. I am trying to connect the IMU_CAN interface and run ./sample_can_interpreter using a real CAN device.
My problem is I am using slcand and not able to configure it right. The transceiver I am using is CANalyst-ii which is USB-CAN. Usb connecting to the host. This device doesn’t have documentation to work with linux but from other online resources (mainly this link: CANalyst II - dankwiki, the wiki of nick black) I got to the point where I can see slcan0 when in ifconfig.
When i do candump slcan0, i see the cursor blinking and not printing anything. I am prety sure CAN IMU is sending out data. Because I am able to do the candump can0 in my raspberrypi (using pyCAN board there). Maybe this is a bit rate issue. CAN device baudrate is 250000.
I used following commands to get this far,
I am trying to enable can on Xavier , CAN on Xavier send data and received by another can controller ,but when the other controller send me nothing recieved by the CAN on Xavier .
Could any one help?