I am trying to communicate with a vehicle control unit (VCU) over can. I have figured out the commands (index, data and frequency) and can verify the functionality through PCanView on Windows
. Now I am using Nvidia Xavier system with python-can
library to send the same commands, and I can verify the commands with candump
. However when I power the vehicle engine on while sending these commands, the canbus freezes (this is when the VCU starts expecting the can commands I am sending, it goes into fault state if it doesn't receive the data it expects)
I have successfully used python-can in the past to talk to other can devices and I am confident about the correctness of the code itself. Hardware connection is fine too, because I can receive non-VCU messages from the vehicle. I can also receive VCU messages after I restart the canbus.
What could be causing the bus to freeze? And is there a way to prevent it? (By setting some config in the socket-can layer itself?)
Please note that restarting the bus will not fix the problem as the vehicle cannot recover once it goes into fault without a restart.
Any help will be appreciated!