H all,
I want to use the One+ to log the complete CAN-Data from the OBD2 Pins 6/14. About 800 messages/second.
But - the CAN-Transceiver in the ONE+ is connected to the STM32, not the ESP32. Therefore, I cannot use the standard ESP32-CAN-libraries (Twai/Can.h). Is there any library to access the CAN-Bus connected to the STM32 via the UART-Communication from the ESP32?
(I'm running FreeRTOS on the ONE+)
Best,
Sebastian
CAN-Bus access from ESP32 (One+)
Re: CAN-Bus access from ESP32 (One+)
ESP32 is not automotive level and we found it could cause various issues when accessing a real vehicle's CAN bus.
Re: CAN-Bus access from ESP32 (One+)
Thanks. I was convinced that there must be a deliberate thought behind it.
I just need to send a single message to the CAN-Bus, is there any best practice on how to do this? (Background Info: I need to collect odometer readings for a fleet tracking application; the dongle works fine for Tesla & Polestar 2 with the sniffer library, but for another model I need to send a trigger message to receive the response).
I just need to send a single message to the CAN-Bus, is there any best practice on how to do this? (Background Info: I need to collect odometer readings for a fleet tracking application; the dongle works fine for Tesla & Polestar 2 with the sniffer library, but for another model I need to send a trigger message to receive the response).
Re: CAN-Bus access from ESP32 (One+)
What's the specific message like to be sent?
Re: CAN-Bus access from ESP32 (One+)
Thanks for the quick reply. Something like this:
268#0010000000000000
That's for example the command to physically close the doors of my Tesla; a very "visual" test. No authentication needed beforehand.
268#0010000000000000
That's for example the command to physically close the doors of my Tesla; a very "visual" test. No authentication needed beforehand.
Re: CAN-Bus access from ESP32 (One+)
Any idea how to accomplish this? It could even be with a sequence of AT-commands, whatever works to send a CAN-Message.
It would also help to set the vehicle into diagnostic code.
I had great success using the One+ to collect the odometer and VIN from my Polestar and the Tesla by just using the sniffer sample, for the Mercedes EQA others I would need to send a message, like
cansend can0 7E0#021A905555555555
on linux.
It would also help to set the vehicle into diagnostic code.
I had great success using the One+ to collect the odometer and VIN from my Polestar and the Tesla by just using the sniffer sample, for the Mercedes EQA others I would need to send a message, like
cansend can0 7E0#021A905555555555
on linux.
Re: CAN-Bus access from ESP32 (One+)
We are looking into this. The Tesla message seems to be ISO11898 and is currently not supported.
Re: CAN-Bus access from ESP32 (One+)
Thanks for looking into this. It will help me a lot in my project. My customer just placed an initial order of another 10 dongles just to try. My prototype "hack" is to solder a TTL converter to the external pins and then back to 6/14 of the OBD2-Port - to send the command via the ESP32 internal can. But it does not feel right. The rest of the hardware / software stack is so nice, and the 16MB H-Version really makes a difference.
Re: CAN-Bus access from ESP32 (One+)
To send 7E0#021A905555555555
Code: Select all
obd.setHeaderID(0x7E0);
obd.dataMode = 0x1A;
int value = obd.readPID(0x90);
Re: CAN-Bus access from ESP32 (One+)
Awesome! Thank you!