Reputation: 101
I'm using raspberry PI with MCP2515 + the canbus-utils.
My raspberry pi is working on battery - so when I switch on the car&power up the PI - everything is working.
But when I switch off the car, then try to switch on after 1 hour I get no replay from the canbus-utils, and I need to restart the can service.
Any idea why?
Does the canbus-utils has some kind of TImeout? that can be change\ignore?
Upvotes: 0
Views: 1301
Reputation: 118
When the PI is the only member on the bus the controller switch to bus_off state, because nobody is acknowledging the messages send and the message will otherwise be send indefinitely, to protect for bus overload of the retransmissions.
Also there was a version of the kernel a couple of months ago wich not recovered from some error condition. The latest version of the kernel has this fixed.
use sudo rpi-update to get the latest kernel.
Also at the initialisation script of your CAN bus add the following
ip link set can0 type can restart-ms 100
Upvotes: 2