UIO-4033 CAN2.0:CAN1、CAN2
From ESS-WIKI
Revision as of 04:43, 20 December 2024 by Xingxing.li (talk | contribs)
Send and Receive Data
Mode of connection:
Send and Receive Data
Taking can1 as receiver and can2 as sender:
# #---- Can1 as receiver ----# # # ip link set can1 down # ip link set can1 type can bitrate 1000000 dbitrate 2000000 fd on # ip link set can1 up # candump can1 & # #---- Can2 as sender ----# # # ip link set can2 down # ip link set can2 type can bitrate 1000000 dbitrate 2000000 fd on # ip link set can2 up # cansend can2 123##155 # #----If no error, the receiver will receive the following data----# # can1 123 [01] 55
See more details of the usage of “candump” and “cansend” :
# candump --help # cansend --help
Note:
1. Receiver should run before sender.
2. The “bitrate” and “dbbitrate” should be the same for sender and receiver