Environment
- Jetson TX2
- JetPack 3.1
- Auvidea J120-IMU
- J120 firmware (kernel and patches) v1.5
Setup
Using native CAN
$ sudo modprobe can
$ sudo modprobe can_raw
$ sudo modprobe mttcan
$ sudo ip link set up can0 type can bitrate 1000000 loopback on
$ ifconfig
can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:16 (16.0 B) TX bytes:0 (0.0 B)
Interrupt:171
Setup virtual can and check sending message.
$ sudo modprobe vcan
$ sudo ip link add dev vcan0 type vcan
$ ifconfig
vcan0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Install can-utils.
$ sudo apt-get install can-utils
$ cansend vcan0 123#45
Open new terminal for receiving message.
$ candump vcan0
vcan0 123 [1] 45