CAN works, then don't!
My CAN connection is all fine and dandy on start-up, but after a while it fades with only a few connections, only to die. Anyone experienced this or have an idea for trouble shooting?
Restarting the Pi restarts the CAN connection. Restarting SignalK server doesn't.
4 Replies
I've had this happen on CAN HATs that are dying.
I recommend opening a shell and trying "candump can0".
That will tell you if the interface itself is still up and receiving data.
Then try "dmesg | grep can" to see if you're getting any errors. When this happened to me I was getting SPI bus errors on the interface, which was a sign the HAT was bad.
You can also try "sudo ifconfig can0 down" and then "sudo ifconfig can0 up". That might help but isn't a permanent fix.
So I went throught these steps and on the first candump I got nothing. After shutting it down and turning it up, the connection was once again active. Then I wanted it to die slowly as in the past, but it didn't happen while I was in the boat. This is what I got after the last dmesg:
Try "ifconfig can0" and see if you are getting RX or TX errors.
Hi was wondering if still occures ? I have the same situation when migrating to a configuration where I use N2k , the CAN interface dies after a while. sometimes it dies after 15 minutes, sometimes 3..4 hours. In the server log of SK I see; Oct 06 10:19:59 socketcan stopped, retrying...
Oct 06 10:20:01 socketcan stopped, retrying...
Oct 06 10:20:03 socketcan stopped, retrying...
Oct 06 10:20:05 socketcan stopped, retrying...
when I do "Ifconfig can0 up" it starts up again log showing: Oct 06 11:19:56 (node:574) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 N2KAnalyzerOut listeners added to [Function]. Use emitter.setMaxListeners() to increase limit (Use
node --trace-warnings ...
to show where the warning was created) . When down "ifconfig can0" shows: can0: flags=129<UP,NOARP> mtu 16
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 10000 (UNSPEC)
RX packets 475042 bytes 3799864 (3.6 MiB)
RX errors 0 dropped 3637 overruns 0 frame 0
TX packets 5001 bytes 39898 (38.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
When up "ifconfig can0" shows: 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 10000 (UNSPEC)
RX packets 2279231 bytes 18224310 (17.3 MiB)
RX errors 23 dropped 6448 overruns 0 frame 23
TX packets 13331 bytes 106353 (103.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
The warning about memory leak ...