STM32 's Can---error management Analysis Cow blog
http://blog.csdn.net/flydream0/article/details/8161418
Implementation of can bus in embedded Linux driver program
Http://www.21ic.com/app/embed/200911/49216.htm
Socke can set baud rate
Find one of the methods using the IP command, BusyBox produced by the IP does not seem to support the Socketcan settings, you have to download the Iproute2 source code to build their own. Get the IP command and copy it to the bin directory of your system.
IP link Set can0 type can bitrate 250000
Set the baud rate of CNA0 to 250K, before the setup needs to CAN0 off, IP set can0 down
It's ready to be taped,!!!!!!!!!!!!.
The Linux can bus socket interface test is used to explain why upgrading from a character device to a socket device
Http://blog.chinaunix.net/uid-26119896-id-3452315.html
Http://www.cnblogs.com/zym0805/p/4345175.html
DMESG | grep can
[Email protected]_mfgtools_nogpu:~# DMESG | grep can
can-3v3:3300 MV
Flexcan 2090000.can:device Registered (reg_base=a0968000, irq=142)
Flexcan 2094000.can:device Registered (reg_base=a0970000, irq=143)
Can:controller Area Network Core (Rev. 20120528 Abi 9)
Can:raw Protocol (Rev 20120528)
Can:broadcast Manager Protocol (Rev 20120528 T)
Can:netlink Gateway (Rev. 20130117) Max_hops=1
Can-3v3:disabling
Ifconfig-a
Can0 Link Encap:unspec HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
Noarp mtu:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
interrupt:142
Can1 Link Encap:unspec HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
Noarp mtu:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
interrupt:143
Ip-details Link Show Can0
[Email protected]_mfgtools_nogpu:~# ip-details Link show can0
2:can0: <NOARP,ECHO> MTU qdisc noop State down mode default group default Qlen 10
Link/can promiscuity 0
Can state STOPPED (berr-counter TX 0 Rx 0) restart-ms 0
Bitrate 0 Sample-point 0.000
TQ 0 prop-seg 0 phase-seg1 0 phase-seg2 0 SJW 0
FLEXCAN:TSEG1 4..16 tseg2 2..8 sjw 1..4 BRP 1..256 brp-inc 1
Clock 30000000
Ip-details link Show can0//view ifconfig can0 down//Turn off IP link set can0 up type can//open./candump can0//Accept data./cans End can0-e 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88//Send data
Linux CANbus Debug Notes