About me‎ > ‎

Android OBD scanner hack

This is a real hack!!

Disclaimer: Please note that the communication protocol that is the end result of this hack is readily available on the ELM327 data sheet. I have just consolidated them. Hence, I have not undone any secret code. My intention is only to let other engineers/ hobbyists (like me) know what goes on between the phone and BT (bluetooth) OBD adapter. No hard feelings please.
Also note that entire ELM327 implement a huge protocol, I have only scratched it superficially. My work is only meant for hobby purpose, not for pro usage.

Purpose of the hack...

If you wanted to know what is going on between any of these android applications and the bluetooth OBD adapters, then, this hack is for you...

I was in a long plan to make my own OBD II scanner, and earlier did communicate with my Hyundai i10 car using home build boards. Please refer to my webpages for more details.

Please note that my home made OBD II scanner was built from scratch on dsPIC33 device, and does not have any connection with the more popular ELM327. Over a period of time, I was able to integrate graphical LCD, SD card, keypad, load switch, but one point was still missing -- connection with my Android phone.


I was already aware of bluetooth OBD adapter which have ELM327 on the back end and that could communicate with android applications such as: -

  1. fun2drive
  2. Torque Lite
Both these applications are free and ready to use, provided that you have purchased and connected the bluetooth adapter on your car's OBD II plug.
But, I was not willing to go ahead and purchase one of those bluetooth OBD adapter for reasons: -
  1. I need to purchase them from US/ China, and the shipping charges are higher than the cost of the adapter. Further, customs clearance and other hassles. I could not find adapter available in India.
  2. These adapter serve the food on platter and I did not like that. I needed to know, whats cooking inside.
  3. Having built my own OBD scanner, I could not buy the bluetooth adapters which will do the plumbing task between my car and android phone. Instead, I can take the matter in my own hands and do the plumbing myself.


Finally, decided that I will purchase any locally available bluetooth serial-modules (not the bluetooth OBD adapter) from local market and integrate that with my own OBD scanner board, and with a littler know how of the protocol, I can connect my home built OBD scanner to android phone.

Outcome is the Simulator...

To understand the protocol between Android phone and bluetooth OBD adapter, I did some hacking of the conversation and later, came up with my simulator. This is required because, writing code directly on the BT serial module and then expecting it to communicate with my phone will be a a heck of task with infinite trials. Implementing the simulator is way easier and saves time. Also, it is easier to debug protocol on PC than on microcontroller. The features and usefulness of the simulator are: -

  1. Uses my Computer's bluetooth as serial port and communicates from android application (Torque-lite or fun2drive).
  2. Written in Python.
  3. Writing the python code, I understood all protocol happening between phone and BT OBD adapter, and this is what I need to implement later on my BT serial module.
  4. Easy to understand the protocol and hence anybody can use this to implement on any microcontroller they find as their favorite.
  5. Using simulator, your android application will work fantastic without spending a single penny (or paise, as in India). Once satisfied, you can implement on your own BT module.

How did I decode the protocol and wrote the Python script (simulator)

I am not the first guy to make a simulator, in-fact, there are gurus, who have written the "OBDSIM". In fact, I used the OBDSIM to communicate with my phone and used a serial spy to decode the protocol. I believe, OBDSIM is more versatile and feature rich, but I used its few features.

Demo/ Video

I did not capture any screen, as it is difficult on my phone, hence video is what I have for you.

Python script for testing "Torque" or "fun2drive" android apps

Debraj Deb,
Mar 24, 2013, 8:30 AM
Debraj Deb,
Mar 24, 2013, 8:31 AM