In the User Manual section, we learned about the simple use of YY3588 can. In this section, we introduce the use of can to usb module for sending and receiving.
rk3588 chip does not support canfd
The specific module is subject to the reader's use
$ ifconfig -a
can0: flags=128<NOARP> mtu 16
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 71
......
# Shut down CAN:
$ ip link set can0 down
# Set bit rate to 500KHz:
$ ip link set can0 type can bitrate 500000
# Print can0 information:
$ ip -details -statistics link show can0
# Start CAN:
$ ip link set can0 up
$ candump can0
2. Send from PC
# Send standard frame, data frame
$ cansend can0 123#DEADBEEF
# Send standard frame, remote frame (demonstration module does not support remote frame, no demonstration here)
$ cansend can0 123#R
# Send extended frame, data frame
$ cansend can0 00000123#12345678
# Send extended frame, remote frame
$ cansend can0 00000123#R
2. PC side receiving