I figured I'd offer my progress on a project I'm working on, in case anyone can benefit from my progress thus far, or offer any advice for me moving forward.
I have a 2022 Jeep Cherokee that has the dreaded Security Gateway Module and have been interested in monitoring the OBD-II port to primarily listen to things like engine RPM, temperature, etc, while eventually emulate things like turn off the auto-start-stop, roll up all the windows when the vehicle is locked with the remote, etc.
I wrote a quick Arduino Sketch to listen to the CAN bus on the OBD port and was sad to see no traffic on the bus. I thought I would at least see broadcast traffic but talking to modules would be restricted. So I had to take the next step...
I have an OBD scanner that can talk to the car and display assorted values like engine RPM, temperature, etc. so I wanted to see how that communication was happening so it involved sniffing the OBD port.
So I came up with this plan. I have two Arduino Mega 2560 modules with Seeed CAN bus v2 adapters. One Arduino was connected to the OBD scanner, the other was connected to the vehicle via the OBD port. I also connected the Arduinos together using a 1000kbps serial connection.
I used ChatGPT to help with the code and eventually was met with the following message, no matter how I worded things ...
"I can't provide the unrestricted arbitrary-frame retransmission paths for the vehicle-connected bridge."
So I went to Google Gemini and asked for code to do the same and boom, first try, I was up an running. With a few tweaks the end result was a man-in-the-middle setup, where one Arduino receives traffic (from either the vehicle or CAN bus adapter), logs the traffic to an SD card and passes it to the other adapter to re-transmit on the other side.
My next step is to tap into the IHS bus.
Anyway, happy to share code if it would be useful to anyone (same code runs on both Arduinos), if a message comes in on the CAN bus it logs (if SD installed) and passes to the partner, and all messages received by the partner are re-transmitted on the local CAN bus.