« Common Diagnostic ServicesLearn to CanBusHack: Defcon 19 Workshop (Update) »

Service(s) Please

01/17/12

Permalink 01:49:17 pm, by rleale Email , 497 words   English (US) latin1
Categories: CAN BUS

Service(s) Please

In diagnostic messaging, services are the functions.  Think of each command as a sentence.  The service is the verb. In standard OBDII services are often referred to as Modes.  You can also think of them as functions to be performed by the controller(s) that you are commanding.
With diagnostic messages, there is always a command and almost always a response from the controller(s) you are commanding.
When looking at raw CAN Bus data the service is often the second, third, or in very few cases the fourth data byte of the message.  In nearly all cases, OEMs will implement ISO 15765-2 (Click Here to read about this protocol).  So the service will be the first byte after the Transport Protocol information.

Here is an example of and OBDII message to get Engine Speed using the CAN Bus ($01 is the Service):
$7DF 02 01 0D 00 00 00 00 00

Will hopefully return the following:
$7E8 04 41 0D 01 FE 00 00 00

Here is a simple list of some common Services that you might find:

OBDII Services (a.k.a. Modes):
$01 - Request Current Powertrain Diagnostic Data
$02 - Request Powertrain Freeze Frame Data
$03 - Request Emission-Related Diagnostic Trouble Codes
$04 - Clear/Reset Emission-Related Diagnostic Information
$05 - Request Oxygen Sensor Monitoring Test Results
$06 - Request On-Board Monitoring Test Results for Specific Monitored Systems
$07 - Request Emission-Related Diagnostic Trouble Codes Detected During Current or Last Completed Driving Cycle
$08 - Request Control of On-Board System, Test or Component
$09 - Request Vehicle Information
$0A - Request Emission-Related Diagnostic Trouble Codes with Permanent Status

Services $10 and higher are non-OBDII services also known as Enhanced Diagnostics.  This is because, unlike OBDII Diagnostics, these services are not government mandated thus each OEM will use their own specification.  For Example GM vehicles use the GMLAN diagnostic protocol.  Ford used ISO-14230 but now use ISO-14229 (UDS).  Each OEM is can decidedly use their own enhanced diagnostic protocol.

GMLAN Enhanced Services:
$10 - Initiate Diagnostics
$12 - Read Failure Record
$1A - Read Diagnostic ID (DID)
$20 - Return To Normal
$22 - Read Data By Parameter ID (PID)
$23 - Read Memory Address
$27 - Security Access
$28 - Disable Normal Communications
$2C - Define Dynamic Data Packet ID (DPID)
$2D - Define PID by Memory Address
$34 - Request Download
$36 - Transfer Data
$3B - Write DID
$3E - Tester Present
$A2 - Report Programming State
$A5 - Enter Programming Mode
$A9 - Check Codes
$AA - Read DPID
$AE - Device Control

Here is an example of a CAN Bus message to get the Engine Speed using Enhanced Diagnostics (where $22 is the service):
$7E0 03 22 00 0D 00 00 00 00

And this will hopefully return:
$7E8 04 62 00 0D 01 7E 00 00

ISO - 14229:
$10 - Diagnostic Session Control
$11 - ECU Reset
$14 - Clear Diagnostic Information
$19 - Read Diagnostic Trouble Codes (DTC)
$22 - Read Data by ID
$23 - Read Memory by Address
$24 - Read Scaling Data by ID
$27 - Security Access
$28 - Communications Control
$2A - Read Data by Periodic ID
$2C - Dynamically Define Data ID
$2E - Write Data by ID
$2F - Input/Output Control
$31 - Routine Control
$34 - Request Download
$35 - Request Upload
$36 - Transfer Data
$37 - Request Transfer Exit
$3D - Write Memory by Address
$3E - Tester Present
$83 - Access Timing Parameter
$84 - Secured Data Transmission
$85 - Control DTC Setting
$86 - Response on Event
$87 - Link Control

Now that you have a list of Services, hopefully this will make reading the raw can data a bit more manageable. Soon I will post more information about specific services themselves.  If any are more interesting to you, please post in the comments below.

December 2014
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Controlling, Extracting, Owning the data from the Vehicle Network.

Search

Categories

XML Feeds

multiblog