adamtheone / canDrive

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

Can't send data to car/can module #28

Closed kostamilorava closed 2 years ago

kostamilorava commented 2 years ago

Hello, Friends.

First, thanks for greatest information on whole internet, you guys rock!

Lost 3 days and nights and it makes me crazy. Can't figure out what is the exact issue.

So, I have Arduino Pro Mini with MCP2515 and ESP32. They are connected to each other and communicate with can projects - CANReciever and CANSender without problems. Each of units can send and receive data using these projects.

When I want to use cansniffer (your project), received packets are normally displayed but as soon as I send data to serial, ESP32 restarts and says:

Stack smashing protect failure!

Guru Meditation Error: Core  1 panic'ed (Unhandled debug exception)
Debug exception reason: BREAK instr 
Core 1 register dump:
PC      : 0x400803c0  PS      : 0x00060336  A0      : 0x00000000  A1      : 0x00000004  
A2      : 0x00000000  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x800d0eec  
A6      : 0x3ffb1f00  A7      : 0x3ffb1f30  A8      : 0x00000000  A9      : 0x00000004  
A10     : 0x00000000  A11     : 0x00000000  A12     : 0xff000000  A13     : 0x800d0f30  
A14     : 0x3ffb1f20  A15     : 0x3ffbfe48  SAR     : 0xe9729774  EXCCAUSE: 0x00000001  
EXCVADDR: 0xffffffe0  LBEG    : 0x00000000  LEND    : 0x3ffb1f37  LCOUNT  : 0x00000000  

ELF file SHA256: 0000000000000000

Backtrace: 0x400803c0:0x00000004

Rebooting...

When I try to send packets with Arduino Pro Mini, there is a dead silence.

Tried various things - 440,00,00,40008011010F0F0F for example does not work...

I think the issue is in parsing serial data that I am sending to ESP32/arduino.

Same issue is with car, esp32 restarts and pro mini has dead silence, but I can read can bus data there as well.

Any suggestions?

kostamilorava commented 2 years ago

It was baud rate problem. On 921600 it just works.