Login into device

check for can0 node

[email protected]:~# ifconfig

search for

can0: flags=193<UP,RUNNING,NOARP> mtu 16 metric 1
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 10 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 73

if not enabled

[email protected]:~# ip link set can0 up type can bitrate 125000

at default bitrate 125 kbit/s and 250 kbit/s for J1939

CAN can be tested using 2 ways

  1. device to device
  2. device to Host PC

1. connect both devices over CAN

on device A run following

[email protected]:~# cansend can0 500#DEADBEEF

on device B run following command

$ candump can0

2. Test CAN with host PC connect device can bus to PC USB port and run this following

[email protected]:~# cansend can0 500#DEADBEEF

check PC terminal weather data is received. The received data must be

Frame ID: 0500, Data: ef be ad de