shigeki Posted August 4, 2018 Share Posted August 4, 2018 Hi all, I'm interested in running canbus on Banana Pi (A20). I have problem with setup canbus. Some info about system: ARMBIAN 5.38 stable Debian GNU/Linux 9 (stretch) 4.14.18-sunxi in armbian-config -> System -> Hardware only "can" is enable and MCP2551 transreciver is connected to can rx/tx banana pinout. lsmod | grep can: root@bananapi:~# lsmod | grep can can_bcm 24576 0 can_raw 20480 1 can 20480 2 can_raw,can_bcm sun4i_can 16384 0 can_dev 20480 1 sun4i_can Next setup interface: ip link set can0 type can bitrate 125000 restart-ms 100 triple-sampling on loopback on ip link set up can0 cangen seems to working well, but there is no info from candump: root@bananapi:~# ip -details -statistics link show can0 4: can0: <NOARP,UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10 link/can promiscuity 0 can <LOOPBACK,TRIPLE-SAMPLING> state BUS-OFF (berr-counter tx 207 rx 0) restart-ms 100 bitrate 125000 sample-point 0.875 tq 500 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1 sun4i_can: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1 clock 24000000 re-started bus-errors arbit-lost error-warn error-pass bus-off 1398 1796 0 1399 1 1399 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 RX: bytes packets errors dropped overrun mcast 47248 5906 1796 0 0 0 TX: bytes packets errors dropped carrier collsns 0 0 0 6 0 0 dmesg: [ 11.943534] sun4i_can 1c2bc00.can: device registered (base=f14bac00, irq=50) [ 918.999564] can: controller area network core (rev 20170425 abi 9) [ 919.016080] can: raw protocol (rev 20170425) [ 1257.584974] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready ifconfig: root@bananapi:~# ifconfig can0 can0: flags=193<UP,RUNNING,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 8936 bytes 71488 (69.8 KiB) RX errors 2669 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 6 overruns 0 carrier 6 collisions 0 device interrupt 50 I have play with arduino sender and reciver, both working ok, reciver recive msg candum nothing recive. Wiring: Link to comment Share on other sites More sharing options...
Recommended Posts