Wanted: SavvyCAN HowTo

May I ask why this should be the best version?
Are there any other version/branch?

I wrote the initial version but Sergio was nice enough to flesh out the messages better so instead of just getting the number of each PID that is supported you can get a textual description of each PID. So, Iā€™d use that one. I never merged his changes back in.

1 Like

Very clear. Thank you.

Hi Collin
Iā€™ve dowloaded ODB2Scan and Iā€™ve compiled it but there are some errors
in includeā€¦
Iā€™ve dowloaded libs like iso-tp.h and mcp_can.h from
GitHub but compilation crasches with these errors

ā€œArduino:1.8.5 (Windows 10), Scheda:ā€œMacchina M2ā€
OBD2Scan:18: error: no matching function for call to ā€˜IsoTp::IsoTp(CANRaw*)ā€™
IsoTp isotp0(&Can0);ā€

Iā€™m not sure to have dowloaded the right librariesā€¦

Can you suggest me what and where find the right libraries.?

Thanks



Yeah now runs well Iā€™ll test it

'm always sorry!
Iā€™ve compiled OBD2Scan and uploaded it to M2.
Iā€™ve connected M2 to ODB2 port of my Mercedes GLC car (X253)
A 16GB sd was inserrted. But nothing happens.
Then Iā€™ve also connected the PC to the USB port of M2 but I receive no message via serial monitor.
Nothing makes me understand if the program runs
Do I have to give a start command?
I tried to start the program with the reset button but nothing happens.
At the end Iā€™ve opened the sd card with PC but it is empty.
What can I do to understand if the program is working?
Thanks

Sergioā€™s sketch provides a lot of output so you should be seeing something. The easiest way to ensure that you see the output is to flash the sketch to the M2 while youā€™ve got the Serial Monitor (in the Arduino IDE) open. Then as soon as the sketch is flashed youā€™ll be able to see the results on the serial monitor. It might have some trouble finding the proper CAN bus speed for your car. Some vehicles do not transmit any data until you ask them something. In that case the bus has no traffic and the auto speed detector will come up blank. It will try to guess a proper rate if it couldnā€™t auto detect but it might be wrong.

The reset button on the M2 is deceptive. Thereā€™s a little issue with the serial output from the processor on board. On that chip the USB is built in and so when you push reset it resets the USB as well. But, your PC side doesnā€™t reset so what happens is that the serial port disappears on the PC side and then comes back but the PC is still connected to the phantom port and so you end up not looking at the proper serial port and you see nothing. You really donā€™t want to push the reset button except in very specific circumstances. Your best bet is physically unplugging / plugging back in or recompiling and reuploading the sketch in order to force a reset. The sketch itself has a 4 second wait before it starts operating so if youā€™re quick you can plug in and bring up the serial console before it starts to output anything. Itā€™s easier to just compile again and upload and then 4 seconds after the upload you should get text on the serial monitor.

I want to add this information:
Iā€™ve flashed M2 with M2RET from DOS.
When I insert the M2 into Car ODB2 connector the led light on
With savvycan I can sniff the data traffic of the canbus
I have identified some addresses that change when I press the windows command
and when I open and close the roof, but I cannot understand and find
what is the signal that changes when I open and close the doors with the remote of key this seems to remain hidden. For this reason I would like to use OBD2Scan.
Surely something remains hidden for speed or for some code.
I will try your suggestion to change the speed parameters.
Perhaps savvyCan should help me to discover the right speed to discover data.

Ciao

Hello Collin,
I am experiencing the same issue that Merlot_Prosecco was in regards to the no matching function error when compiling the obd2scan sketch. I have downloaded and re downloaded all of the library files you posted below to no avail. I have successfully used M2RET but unfortunately my ECU does not seem to be displaying everything without the device sending a query to it in order to find out more info "RPM and some other engine/transmission parameters. Any assistance you could provide me with would be appreciated.
-Daniel

Itā€™s important to have all up to date libraries. Recently some libraries changed. You need the iso-tp library from my repo (https://github.com/collin80/iso-tp) as well as the CAN libraries from my repos: