CAN bus testing tools and commands
- 
 Test toolsCanutils is a commonly used CAN communication testing toolkit that includes five independent programs: canconfig, candump, canecho, cansend, and cansequence. The functions of these programs are briefly described as follows: - 
canconfig 
 The parameters used to configure the CAN bus interface mainly include baud rate and mode.
- 
candump 
 Receive data from the CAN bus interface and print it in hexadecimal format to standard output, or output it to a specified file.
- 
canecho 
 Resend all data received from the CAN bus interface to the CAN bus interface.
- 
cansend 
 Send the specified data to the specified CAN bus interface.
- 
cansequence 
 Automatically repeat the increment number to the specified CAN bus interface, or specify the receive mode and verify the received increment number.
- 
ip 
 Configuration of CAN baud rate, functions, etc.
 Common commands- Query current network devices:
 ifconfig -a- CAN start:
 ip link set can0 down %(#000000)[//Close CAN] ip link set can0 type can bitrate 500000 %(#000000)[//Set bit rate of 500KHz:] ip -details -statistics link show can0 %(#4d845e)[//Print can0 information:] ip -details -statistics link show can0 %(#538864)[//Start CAN:]- CAN sending:
 Send (standard frame, data frame, ID: 123, date: DEADBEEF): cansend can0 123#DEADBEEFSending (standard frame, remote frame, ID: 123): cansend can0 123#RSend (extended frame, data frame, ID: 0000123, date: DEADBEEF): cansend can0 00000123#12345678Sending (extended frame, remote frame, ID: 0000123): cansend can0 00000123#R- CAN reception:
 Start printing and wait for reception: candump can0
-