When the Rubber Hits the Road: Make Your Computer Talk to Your Car
-
Upload
laaos -
Category
Automotive
-
view
811 -
download
2
description
Transcript of When the Rubber Hits the Road: Make Your Computer Talk to Your Car
When the Rubber Hits the Road:Making Your Computer Talk to Your Car
Gary “Chunky Ks” Briggs<[email protected]>
Slides Overview
Me
OBDGPSLogger
ELM327 and OBDII
OBDSim
Demo
MeGrew 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 havesomewhere to put this pic --->
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
OBDGPSLogger Now
http://icculus.org/obdgpslogger
“It does exactly what it says on the tin. It logs OBDII and GPS data on Linux, OSX and others”
Mostly C, bits of C++
Open Source
Logs to SQLite
Hokey GUI
OBDGPSLogger in Google Earth
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...
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
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
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
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
OBDSim Now
http://icculus.org/obdgpslogger/obdsim.html
Pluggable data generators
Works with all OBDII tools I've tried
In the same source as OBDGPSLogger
Has way more users than OBDGPSLogger
Native Windows [MSYS] using com0com
OBDSim Supported AT commands
ATAT{0,1,2} – Adaptive timing
ATD{0,1} – Display data bytes
ATL{0,1} – Linefeed
ATH{0,1} – Headers
ATS{0,1} – Space separators
ATE{0,1} – Command echo
ATSP[A]{0-9,A-C} – Set protocol
ATST{n} – Set timeout
@1, @2, @3 – Device identifier stuff
Cvdddd – Calibrate battery voltage
RV – Request battery voltage
ATD – Reset defaults
ATDP – Describe protocol
ATDPN – Describe protocol by number
ATI – Request device version id
ATZ – Reset device
ATWS – Warm start reset
EXIT – Exit OBDSim
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]
That's all, Folks