Skip to content

OBD2 simulator on Raspberry Pi using Bluetooth

Start off by cloning the below repo

python
git clone git@github.com:DevinNorgarb/obdsim-arm64.git

Here is the README

python
OBDII/GPS Logging Tool
What?

Your car has lots of interesting things it can tell you from the
on-board computer while it's running. obdgpslogger is a small tool
to grab data from an OBDII device and log it to an sqlite database.
If you enable it [on by default, and a large part of this project's
point], then your gps position is also logged to the same database.

What are the other requirements?

Install gpsd first if you want gps support.
The GUI component requires FLTK and fluid.

How do I build this?

mkdir build
cd build
cmake .. # or ccmake .. to edit options
make
make install


And how do I run it?

obdgui # GUI for launching and getting live feedback from other tools
obdgpslogger [-s serialport] [-d sqlite database] # Actual logger
obd2kml [-d sqlite database] [-o output file] # Convert to Google Earth

More specific information is availble in --help or man pages

The below commands are what is needed to compile the firmware.

bash
cd obdsim
bash
mkdir build
python
cd build
bash
cmake .. # or ccmake .. to edit options (TAKE NOTE)
php
make
bash
sudo make install

I had an issue with gpsd breaking the build due to some syntax error. If you also have the same issue run ccmake .. from the build directory and ensure your config looks similar to this:

Ensure OBD_DISABLE_GPSD is set to ON.

You can then proceed with the installation.

If you are wanting to use Bluetooth to connect your mobile phone to, so that you can use Torque, you will need to enable a few more settings.

Please replace the "DC:A6:32:F6:EA:E8" with your own mac address when running the below command.

bash
sudo hciconfig

This should return your device bluetooth mac address, with the output being similar to this:

Then run:

bash
sudo rfcomm bind 0 Y0:UR:0W:NM:AC 1

and finally:

bash
sudo sdptool add SP

Now you can actually run the compiled software with bluetooth enabled by running:

bash
obdsim -b

Personal notes