tortillla
tortillla

Reputation: 31

cansend command doesn't send a frame from can0 to can1

I need to send a frame from can0 to can1 and vice versa. So, first I log candump output to a file like this: candump can1 -n 1 > /tmp/CANDUMP & Then I send the frame: cansend can0 128#00FF00FF00FF00FF

It only works if I send a frame from can1 to can1 or can0 to can0... Wonder why?

Upvotes: 1

Views: 2733

Answers (1)

Sanjay Varghese
Sanjay Varghese

Reputation: 31

It only works if I send a frame from can1 to can1 or can0 to can0... Wonder why?

cansend command takes 2 arguments. The first one is can-device ID, here the device is on which you want to send the data which means cansend can0 will publish the data on the canbus 0 on your system.

If you want to send data from can0 to can1 you can physically connect them to the same bus.

Upvotes: 1

Related Questions