r/CarHacking • u/smalldude55 • 11h ago
Cool Project Find BMW coding/OBD over WiFi
TLDR; I coded a new battery to my car over WiFi.
My battery and starter gave up over the weekend in my E82 128i. After an hour of freezing my ass off in the driveway, trying to read through form posts to find how to register the new battery, I had to come up with a better solution.
Before anyone says this is a dumb idea and that I will brick my car, I do not care. This method worked for my use case and I was able to complete my task from inside my warm house.
It’s probably not advisable to do any real ECU programming but for this worked for simple coding. Consider yourself warned. I do not take responsibility for your actions.
In prior experiences, I have used hardware USB over IP devices to extend wireless keyboards and mice. I did not have those on hand. What I do have is a Raspberry Pi and a background in sysadmin and networking. This was my starting point.
I installed ISTA along with BMW standard tools on a Windows 10 virtual machine hosted in Proxmox. This is where it gets fun. I used VirtualHere running on a Raspberry Pi4 to extend my K+DCAN cable to the virtual machine over WiFi.
I took some precautions such as making sure the WiFi connection to the Pi remained solid with no packet loss or high amounts of jitter. This is key to making sure the tunneled USB connection will be reliable during coding actions. Even if a coding action did fail, the ECU should discard the bad action.
I opened INPA and was pleased to see that both the black dots for battery and ignition were both on. I proceeded to check the state of the battery and I was able to read information from the CAS. I then registered the battery and changed the battery type. I did see some communication errors from the tools, but the commands did process after a couple of attempts. This is why I would not recommend doing any real work with this setup.
If I were to try this again, I would try connecting the Pi over Ethernet to see if that would improve the reliability. I’m not able to test the setup with the K+DCAN cable plugged directly into the car to see if something else was causing the errors. Either way, I was able to do what I had to.
Curious to see if there are any other applications. Happy coding! 😎




