adamtheone / canDrive

Tools for hacking your car
https://www.youtube.com/playlist?list=PLNiFaO8hU1z0o_6DSxk-jcVAM3UCUR-pY
MIT License
544 stars 147 forks source link

The CAN driver sends wrongs data on the vanbus. #48

Open IMAY2009 opened 2 months ago

IMAY2009 commented 2 months ago

I am using two identical boards. The only difference is the mcp2515 driver on the Arduino.
The sniffer tool receives the data from any source (CAR or the second board), after saving the session or playing back the very same session outputs wrong data via CAN BUS. All data fields are empty except D1 with wrong data.

Although the terminal shows the correct data in the buffer, the actual canbus frames are missing or wrong!

If the session is saved with this version and send out with previous version, the output data is still wrong!

adamtheone commented 2 months ago

Not sure if I got the last parts, but try to narrow down the problem by printing out some intermediate variables, or emulating a serial terminal, etc.

IMAY2009 commented 2 months ago

That is exactly what I tested. Scanning 2019 VOLVO S60 CAN BUS at 500kbps. It's the comfort CAN BUS. door, seat climate control ECUS and CEM. I have identical second board. The second board is loaded with "https://github.com/autowp/arduino-canhacker" using canhacker software. Serial working in 115200 rate I connected both board to the same CAN network and started to capture at the same time. The sniffer is missing (do not appear) many message IDs and the messages while they are captured with other board (CanHacker).

IMAY2009 commented 2 months ago

I did further testing today. My goal is catching the message sent by CEM to CCM to turn on and off the rear seat cooling vents. I captured all messages while turning on the rear seat vents left and then right. Then I played back all the messages. It triggered unrelated things like child lock, front massage seat menu, front left seat memory position 1 and middle seat release which I do not have. At this point it is certain that something is wrong with the capturing can messages, the values or the message ID or both.