Page 1 of 1
ESP32 CAN Decoder
Posted: Wed Oct 16, 2024 10:59 am
by LucanUK
This could be quite interesting for me, I had setup a ESP32 as a CAN bus reader & controller hooked into the Convenience Bus, and was able to read and send via it (could open and close windows, lock and unlock my car and a few basic things) but never moved forward with the project much... be nice to get back into it
Re: ESP32 CAN Decoder
Posted: Wed Oct 16, 2024 3:01 pm
by jeff
Oh that would be pretty neat! I suppose this would be the starting point for building an internet-connected vehicle via OBD?
Re: ESP32 CAN Decoder
Posted: Wed Oct 16, 2024 3:39 pm
by LucanUK
That was the general plan.. the ability to provide some of the newer automation on older cars. The problem I had was identifying the right codes.. I was basically doing trial and error.. capture, do action, stop capture.. filter known background noise from the bus and then replay back chucks at a time to replicate the action.. but it was soooo time consuming sometimes to move forward..
If I feed the app captured data will it analyze and then ID the specific ID's and chucks of data? which then I can replay back to the CAN Bus?
Attached a Youtube Video from back in 2021 of my doing a test (The ESP is only attached via USB for power as all commands are been sent over Wifi) https://www.youtube.com/watch?v=shjXxwZmx8k
Re: ESP32 CAN Decoder
Posted: Wed Oct 16, 2024 4:24 pm
by jeff
Super cool video! That must have felt like an "a-ha" moment when you got it working!
Sidecar's OBD scanner works via BTLE/WiFi OBD scanning dongles, which don't always have the best ability to monitor the CAN bus. Right now, the app's focus is primarily on monitoring read-only parameters, but I do have plans to build out some tooling for discovering, proposing, and testing new parameters on vehicles so that they can be contributed more easily to the repos at http://github.com/electricsidecar/. The GitHub account integration in Sidecar is for exactly this purpose
When you were monitoring the CAN bus, I'm assuming you weren't using any form of an ELM327 interface right? Just straight CAN bus monitoring?
Re: ESP32 CAN Decoder
Posted: Wed Oct 16, 2024 6:27 pm
by LucanUK
It defo was a A-ha moment when it worked! Yeah this was 2 wires straight onto the High & Low Convenience pins on the CAN Gateway after the OBD port.
- IMG_4545.jpg (780.73 KiB) Viewed 1895 times
yeah, when I said the App, I meant your CANDecoder App Wonder if that will make the tracing easier for me..
As for SideCar, I have a few questions, and maybe bugs to log from the last few days, just need to find the right place for them (think these are possible Wireless car play/Apple Maps issues, more than car specific issues)
Re: ESP32 CAN Decoder
Posted: Wed Oct 16, 2024 6:49 pm
by jeff
LucanUK wrote: ↑Wed Oct 16, 2024 6:27 pm
yeah, when I said the App, I meant your CANDecoder App Wonder if that will make the tracing easier for me..
Ah! Perhaps CANDecoder currently supports CAN TP-Frame decoding of 11-bit and 29-bit CAN frames. If the cars you're testing on use a different protocol then I can look into adding it to the app's supported protocols
LucanUK wrote: ↑Wed Oct 16, 2024 6:27 pm
As for SideCar, I have a few questions, and maybe bugs to log from the last few days, just need to find the right place for them (think these are possible Wireless car play/Apple Maps issues, more than car specific issues)
Please do share! The Sidecar forum is where we're tracking all feature/bug discussions: viewforum.php?f=12