I tried to do as indicated in this instruction, but it is outdated and does not produce results on new linux kernels. What I have to do to make the can interface work?
Board: custom board am3359 (almost like beaglebone black)
Target: linux kernel 4.14 , debian 9.9
Target: linux kernel 5.6.4 , debian 10 - same result
Problem: Can-bus working just listen-only-mode
listen-only mode is ok, messages comes:
1 2 3 4 5 6 7 | sudo ifconfig can0 down
sudo ip link set can0 type can bitrate 125000 listen-only on
sudo ifconfig can0 up
candump -cae can0,0:0, #FFFFFFFF
can0 1FE4F1DC [8] 01 64 00 00 00 00 00 00 '.d......'
can0 1FE4F1DC [8] 01 64 00 00 00 00 00 00 '.d......'
can0 1FE4F1DC [8] 01 64 00 00 00 00 00 00 '.d......' |
normal mode bus crashes:
1 2 3 4 5 6 | sudo ip link set can0 type can bitrate 125000
sudo ifconfig can0 up
[13210.377469] c_can_platform 481cc000.can can0: setting BTR=1c0b BRPE=0000
[13210.391464] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready
cansend can0 123 #DEADBEAF
[13220.749607] c_can_platform 481cc000.can can0: bus-off |
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/9673987a-f2a0-4a5f-8b48-d34a2aae61d9%40googlegroups.com.
I have the impression that your network is set up for J1939 or CANOpen (CAN 2.0B)when you send a message to a short address (CAN 2.0A) it doesn't get acknowledged, and this might crash your bus, as the BB will try to send it till the message is acknowledged..Try to send a message to a 29bit address, or add a second can interface that will acknowledge your messages. (CAN1 on the BB).I'm a bit stuck on moving over to J1939, as that requires at least kernel 5.4, which results in boot issues due the overlay approach as applied in the Beaglebone OS
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAOCHtYjJ4TpHSSmA9R0uL7YRYO3j8KPwv%3Dk74UB%3DCBJs8CTiJA%40mail.gmail.com.
debian@bone:~$ cansend can0 1F334455#1122334455667788[ 273.654439] can: raw protocol (rev 20170425)[ 273.670296] c_can_platform 481cc000.can can0: bus-offdebian@bone:~$ sudo ifconfigcan0: flags=129<UP,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 3 bytes 24 (24.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 47...
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/1a0b4dcf-2f7e-46a1-8083-43336085c415%40googlegroups.com.