3. Me
Grew up & Studied in England
Offered job in LA doing random Linux stuff
Which ended up being print drivers for 6 years
Now I work at a research
nonprofit in Santa Monica
Mostly simulation and modeling
Really, this slide is so I have
somewhere to put this pic --->
4. OBDGPSLogger Genesis
Late 2009, I bought a car with an OBDII port
That's mighty tempting
Idealist requirements:
Linux, OSX. Windows maybe
Log data
No GUI. RasberryPi, SheevaPlug...
Log GPS as well as OBDII
Make pretty pictures
7. OBDGPSLogger, Still...
Reads only Mode $01 PIDs
Magically just works
Except I haven't patched in support for current gpsd
Google Earth output
There's a live version, too
Simple analysis stuff
Works with my bike...
8. ELM327 and OBDII
Originally invented at Elm Electronics,
http://elmelectronics.com/obdic.html#ELM327
Most of the high-quality manufacturers implement
their own chip firmware
The ELM327 datasheet taught me most of what I
know
9. ELM327 and OBDII, AT commands
Standard text-based serial protocol
I use PuTTY on Windows, screen(1) on Linux
ELM327 commands might look suspiciously
familiar to older members of the audience
ATZ for reset
ATE0/1 to turn echo on or off
Scantool.net have an additional “ST” command
set
10. ELM327 and OBDII, Getting Data
In short:
> 01 0D
41 0D 1F
>
“Show me mode $01, PID $0D” [vehicle speed]
41 => 0x40 | 0x01
0x40 = success, 0x01 = requested mode
0D => requested PID
11. OBDSim Genesis
Got bored of walking out to car with my laptop
Went looking for ELM327 & OBDII simulator
Idealist requirements:
Command-line
OBDGPSLogger log playback
Actually honors ELM327 commands
Multiple ECUs
Multi protocol support
13. OBDSim Supported AT commands
ATAT{0,1,2} – Adaptive timing Cvdddd – Calibrate battery voltage
ATD{0,1} – Display data bytes RV – Request battery voltage
ATL{0,1} – Linefeed ATD – Reset defaults
ATH{0,1} – Headers ATDP – Describe protocol
ATS{0,1} – Space separators ATDPN – Describe protocol by number
ATE{0,1} – Command echo ATI – Request device version id
ATSP[A]{0-9,A-C} – Set protocol ATZ – Reset device
ATST{n} – Set timeout ATWS – Warm start reset
@1, @2, @3 – Device identifier stuff EXIT – Exit OBDSim
14. OBDSim Demo
Launch on Linux, use “-c” to attach screen(1):
obdsim -c
ATZ, total reset
ATE{0,1}, ATS{0,1}, ATL{0,1}
As a developer, you'll turn them all off
For keyboard experimenting, turn them all on
ATI, @1, @2 for identifying device
Couple simple data requests [010D vss, 010C rpm]
ATH1, ATSP7 [CAN 29-bit 500], ATSP1 [J1850]