grimlockrocks / pi-bluetooth-obd

Connect Raspberry Pi with Bluetooth OBD adapter and collect real-time car data.
89 stars 15 forks source link
raspberrypi

pi-bluetooth-obd

Connect Raspberry Pi with Bluetooth OBD adapter and collect real-time car data.

Requirements:

Step 1 - Install Softwares

Step 2 - Connect OBD Adapater via Bluetooth

bluetoothctl
help <-- see all the commands
show
power on
pairable on
agent on <-- used for persisting pairing code
default-agent
scan on <-- find OBDII and its MAC address
pair <mac_address> <-- enter pin 1234
trust <mac_address> <-- this will allow Pi to automatically pair with the device next time
scan off
quit

Step 3 - Connect Car with Screen (Optional)

screen /dev/rfcomm0
atz
atl1
ath1
atsp0 <-- use protocol auto, available protocols: 1, 2, 3, 4, 5, 6, 7, 8, 9, A
0100 <-- mode 01, pid 00, supported pids

If successfully connected to the car, 0100 will return something instead of "UNABLE TO CONNECT" or "CAN ERROR" or "BUS INIT: ...ERROR".

Step 4 - Connect Car with Python OBD

Step 5 - Upload Car Data to AWS Dynamo DB (Optional)

Step 6 - Create an Alexa Skill (Optional)