OBDII Adapter Software

From HaFrWiki
Jump to: navigation, search

Modern cars can be monitored using a dongle (OBDii Adapter). The problem is to know what the different data is meaning.

Introduction

Toe be able to talk to your car you need a OBDii Adapter and a laptop. The focus here is solutions for OSX and iOS platforms.

The basic steps to connect to your car are:

  1. Buy an OBDii dongle and hook it up your car.
  2. Connect your laptop to the WiFi Network created bu the dongle.
  3. Open a telnet session from your laptop to the dongle. On OSX open a Terminal window and type
    $ telnet 192.168.0.10 35000
    It may take some time before a connection is established, but the response is something like:
Trying 192.168.0.10
Connected to 192.168.0.10.
Escape character is '^]'.


Examples

Assuming:

  • Telnet connection is established
  • The OBDii Adapter is an ELM327.

Do:

# Initializes the OBDII adapter
$ ATZ<enter>
ATZ
ELM327 v2.1

# Selects canbus protocol # 6 (ISO 15765-4 CAN 11 bit ID, 500 kbaud)
>ATSP6
ATSP6
OK

# Enables display of headers in responses
>ATH1<enter>
ATH1
OK

# Enables flow control for communication with device with address number 761 
# (which happens to be the "Hey, I want to talk to you" address for BMU ECU)
>ATFCSH761<enter>
ATSH761
OK

# Defines the flow control string (300000)
>ATFCSD300000<enter>
ATFCSD300000
OK

# And mode (1)
>ATFCSM1<enter>
ATFCSM1
OK

# And tell the dongle that the next non-AT command is targeted to device with address number 761
>ATSH761<enter>
ATSH761
OK

Now eneter mode (21) and pid (01)

> 2101<enter>
2101
762 10 37 61 01 82 83 0F 8B 
762 21 24 0F 88 03 0C 6E 52 
762 22 03 4D 1C 01 99 00 00 
762 23 00 00 00 01 00 01 30 
762 24 0F 0F 01 54 00 CC 9C 
762 25 FE 00 03 0F 88 86 8B 
762 26 64 00 00 00 00 00 00 
762 27 00 00 0F 8A 00 02 00

Now you have what you want:

  • 762 is the "talk back to you" address of the BMU ECU
  • On line 5 of the output there is standing 01 54 which is the hexadecimal value for the maximum battery charge or battery health in Ah. In the case 340 Ah.

In depth the given response has the following format, not all characters are actual data, some are control characters. Below reprints the response, replacing the control characters with XX and sequentially number the actual data bytes:

XXX XX XX XX XX 00 01 02 03
XXX XX 04 05 06 07 08 09 10
XXX XX 11 12 13 14 15 16 17
XXX XX 18 19 20 21 22 23 24
XXX XX 25 26 27 28 29 30 31
XXX XX 32 33 34 35 36 37 38
Item/Desc Health Actual Charge SOC %
Request Address 761 761 761
Response Address 762 762 762
Mode + PID 2101 2101 2101
Relevant Data Items 27,28 28,29 0
Value Data Items 01 54 00 CC
Formula Total / 10 Total / 10 Total / 2 - 5

Or a bit shorter:
Parameter;Units;Request Adress;Response Address;Mode+PID;Relevant Data Byte(s);FormulaSOC;%;761;762;2101;0;Total / 2 - 5
Batt Health (how much charge can the battery contain);Ah;761;762;2101;27+28;Total / 10
Current Charge (how much charge does the battery current contain);Ah;761;762;2101;29+30;Total / 10
Charge Current (how much is going into or out of the battery);A;761;762;2101;14+15;Total - 1
Battery Total Voltage;V;761;762;2101;8+9;Total / 10

See also

top

Reference

top