OBD-II
OBD2 Scanner User Guide
Overview
The OBD2 Scanner module provides comprehensive vehicle diagnostics and data acquisition through the On-Board Diagnostics II (OBD2) protocol. This guide covers configuration, operation, and troubleshooting.
Table of Contents
Quick Start
Prerequisites
- Vehicle with OBD2 port (1996+ vehicles in most regions)
- CAN bus connection to vehicle OBD2 port
- OBD2 adapter cable or direct CAN connection
Basic Setup
Enable OBD2 on CAN Bus
- Navigate to CAN Bus settings
- Enable OBD2 scanner on desired CAN bus (typically
can0) - Set request interval (recommended: 100-200ms for standard polling)
Configure Service 0x01 (Current Data)
- Enable Service ID:
1(0x01) - Enable PID Discovery for automatic detection
- Add PIDs you want to monitor (see Standard PIDs)
- Enable Service ID:
Test Connection
- Check OBD2 Service Status channel
- Should show “Connected” when receiving data
- Check OBD2 Poll Rate to verify polling frequency
Configuration
CAN Bus Settings
CAN Bus: can0
โโโ OBD2 Enabled: Yes
โโโ Request Interval: 100ms (adjustable 50-1000ms)
โโโ Services:
โโโ Service 0x01 (Show Current Data)Service Configuration
Each OBD2 service (0x01, 0x09, 0x22, etc.) can be independently configured:
| Setting | Description | Default | Notes |
|---|---|---|---|
| Enabled | Enable this service | No | Must be enabled to poll |
| Service ID | OBD2 service number | - | 0x01 = Current Data, 0x09 = Vehicle Info |
| PID Width | Bytes per PID | 1 for 0x01 2 for others | Auto-detected |
| Batch PID Requests | Send multiple PIDs per request | No | Only for Service 0x01 |
| PID Discovery | Auto-detect supported PIDs | Yes | Recommended for compatibility |
| TX Address | CAN transmit ID | 0x7E0 (physical) 0x7DF (broadcast) | Physical for multi-PID |
| RX Address Start | Response CAN ID range start | 0x7E8 | Standard OBD2 |
| RX Address End | Response CAN ID range end | 0x7EF | Supports multiple ECUs |
PID Configuration
For each PID you want to monitor:
| Setting | Description | Example |
|---|---|---|
| Enabled | Poll this PID | Yes |
| PID | Parameter ID | 0x0C = Engine RPM |
| Channel ID | Output channel | 60100 (custom channel) |
| Byte Count | Data bytes for this PID | 2 for RPM |
| Description | Human-readable name | “Engine RPM” |
| Decode Formula | Math expression to convert raw data | (A*256+B)/4 |
Status Monitoring
Status Channels
Monitor OBD2 system health through these channels:
Global Status
| Channel | Description | Values |
|---|---|---|
| OBD2 Poll Rate | Complete polls per second | 0-100 Hz |
| OBD2 Response Rate | Success percentage | 0-100% |
Per-Service Status (Service 1-8)
| Channel | Description | Values |
|---|---|---|
| OBD2 Service N Status | Connection status | Disabled, Connected, No Response, PID Not Supported, Response Error |
| OBD2 Service N Response Code | Last error code | 0 = OK, 0x11 = Not Supported, 0x12 = Invalid, 0x31 = Out of Range |
| OBD2 Service N Supported PIDs 0x00-0xE0 | Bitmap of supported PIDs | Bitfield (32-bit) |
Status Values
Disabled = 0 // Service not enabled
Connected = 1 // Receiving valid data
No Response = 2 // Not receiving responses (timeout after 5x poll interval)
PID Not Supported = 3 // ECU reports PID not supported
Response Error = 4 // Other communication errorSupported Services
Service 0x01: Show Current Data
Real-time engine and vehicle parameters.
Configuration:
- PID Width: 1 byte
- Supports batch requests (up to 6 PIDs per request)
- Supports PID discovery (recommended)
Common Use: Engine RPM, coolant temp, throttle position, vehicle speed
Service 0x09: Vehicle Information
Static vehicle identification data.
Configuration:
- PID Width: 2 bytes
- Single PID per request (no batching)
- Discovery optional
Common Use: VIN, calibration IDs, ECU name
Service 0x22: Read Data By Identifier (UDS)
Manufacturer-specific extended data.
Configuration:
- PID Width: 2 bytes
- Single PID per request
- Discovery not typically supported
Common Use: Custom manufacturer parameters, advanced diagnostics
Advanced Features
Multi-PID Polling (Batch Requests)
Request multiple PIDs in a single CAN message for faster polling.
Benefits:
- Higher effective poll rate
- Reduced CAN bus traffic
- Lower latency
Limitations:
- Only Service 0x01 supports this (per SAE J1979)
- Maximum 6 PIDs per request
- Must use physical addressing (0x7E0) not broadcast (0x7DF)
- Some ECUs may not support this feature
Configuration:
Service 0x01:
โโโ Batch PID Requests: Yes
โโโ TX Address: 0x7E0 (physical addressing required)
โโโ PIDs: [0x0C, 0x0D, 0x05, 0x0F, 0x10, 0x11]Expected Poll Rate:
- 6 PIDs with 100ms interval = ~10 Hz per PID
- Without batching = ~1.6 Hz per PID
PID Discovery
Automatically detect which PIDs your vehicle supports.
How It Works:
- System queries PID 0x00 (supported PIDs 0x01-0x20)
- System queries PID 0x20 (supported PIDs 0x21-0x40)
- Continues for PID ranges: 0x40, 0x60, 0x80, 0xA0, 0xC0
- Only polls PIDs that are marked as supported
- Falls back to polling all configured PIDs if discovery fails
Benefits:
- Faster polling (skips unsupported PIDs)
- Better compatibility
- Automatic adaptation to vehicle capabilities
Retry Logic:
- 3 retry attempts if discovery times out
- 2-second timeout per attempt
- Falls back to polling mode if all retries fail
Custom Decode Formulas
Convert raw PID data to engineering units using mathematical expressions.
Formula Variables:
A= First data byte (0-255)B= Second data byte (0-255)C= Third data byte (0-255)D= Fourth data byte (0-255)EtoH= Additional bytes if needed
Examples:
// Engine RPM (PID 0x0C, 2 bytes)
(A*256 + B) / 4
// Coolant Temperature (PID 0x05, 1 byte)
A - 40
// Throttle Position (PID 0x11, 1 byte)
A * 100 / 255
// Fuel Pressure (PID 0x0A, 1 byte, result in kPa)
A * 3
// Intake Air Temperature (PID 0x0F, 1 byte, result in ยฐC)
A - 40
// MAF Sensor (PID 0x10, 2 bytes, result in g/s)
(A*256 + B) / 100
// O2 Sensor Voltage (PID 0x14, 2 bytes)
A / 200 // Voltage (V)
// B = Short term fuel trim (%)
// Vehicle Speed (PID 0x0D, 1 byte, result in km/h)
A
// Runtime since engine start (PID 0x1F, 2 bytes, result in seconds)
A*256 + B
// Fuel Tank Level (PID 0x2F, 1 byte, result in %)
A * 100 / 255Standard PIDs
Service 0x01 Common PIDs
| PID | Description | Bytes | Formula | Unit |
|---|---|---|---|---|
| 0x00 | Supported PIDs 01-20 | 4 | - | Bitmap |
| 0x04 | Calculated Load | 1 | A*100/255 | % |
| 0x05 | Coolant Temp | 1 | A-40 | ยฐC |
| 0x0A | Fuel Pressure | 1 | A*3 | kPa |
| 0x0B | Intake Manifold Pressure | 1 | A | kPa |
| 0x0C | Engine RPM | 2 | (A*256+B)/4 | RPM |
| 0x0D | Vehicle Speed | 1 | A | km/h |
| 0x0E | Timing Advance | 1 | (A-128)/2 | ยฐ |
| 0x0F | Intake Air Temp | 1 | A-40 | ยฐC |
| 0x10 | MAF Air Flow | 2 | (A*256+B)/100 | g/s |
| 0x11 | Throttle Position | 1 | A*100/255 | % |
| 0x1F | Runtime Since Start | 2 | A*256+B | seconds |
| 0x20 | Supported PIDs 21-40 | 4 | - | Bitmap |
| 0x2F | Fuel Tank Level | 1 | A*100/255 | % |
| 0x33 | Barometric Pressure | 1 | A | kPa |
| 0x40 | Supported PIDs 41-60 | 4 | - | Bitmap |
| 0x42 | Control Module Voltage | 2 | (A*256+B)/1000 | V |
| 0x46 | Ambient Air Temp | 1 | A-40 | ยฐC |
| 0x5C | Engine Oil Temp | 1 | A-40 | ยฐC |
| 0x60 | Supported PIDs 61-80 | 4 | - | Bitmap |
Service 0x09 Common PIDs
| PID | Description | Bytes | Notes |
|---|---|---|---|
| 0x00 | Supported PIDs | 4 | Bitmap |
| 0x02 | Vehicle Identification Number (VIN) | 17 | ASCII string |
| 0x04 | Calibration ID | Variable | ASCII string |
| 0x0A | ECU Name | Variable | ASCII string |
Troubleshooting
Connection Issues
“No Response” Status
Symptoms: Status shows “No Response” or never connects
Causes:
- Vehicle not in RUN or ENGINE ON mode
- Incorrect CAN bus connection
- Wrong CAN bitrate (should be 500 kbps for OBD2)
- CAN termination issues
Solutions:
- Verify vehicle ignition is ON
- Check physical CAN bus wiring (CAN-H and CAN-L)
- Confirm CAN bitrate:
500 kbpsor1 Mbps - Check CAN termination (120ฮฉ between CAN-H and CAN-L)
- Try both physical (0x7E0) and broadcast (0x7DF) request addresses
“PID Not Supported” Status
Symptoms: Status shows “PID Not Supported” with error code 0x11 or 0x12
Causes:
- Vehicle doesn’t support the requested PID
- Service not available on this vehicle/ECU
- PID configuration error
Solutions:
- Enable PID Discovery to auto-detect supported PIDs
- Check vehicle OBD2 compliance level
- Try Service 0x01 PIDs first (universal)
- Verify PID byte count matches specification
- Some vehicles only support basic PIDs (0x00-0x20)
Low Poll Rate
Symptoms: OBD2 Poll Rate < 1 Hz, data updates slowly
Causes:
- Too many PIDs configured
- Request interval too high
- Multi-PID batching disabled
Solutions:
- Reduce number of active PIDs
- Decrease request interval (minimum 50ms recommended)
- Enable Batch PID Requests (Service 0x01 only)
- Use physical addressing (0x7E0) for faster responses
- Check OBD2 Response Rate - should be >80%
Low Response Rate
Symptoms: OBD2 Response Rate < 80%, intermittent data
Causes:
- CAN bus errors or noise
- ECU busy with other operations
- Too short request interval
- Poor connection quality
Solutions:
- Increase request interval (try 200ms)
- Check CAN bus wiring quality
- Verify CAN termination
- Monitor CAN bus load (should be <70%)
- Check for CAN errors in bus statistics
Data Issues
Incorrect Values
Symptoms: Channel values don’t match expected ranges
Causes:
- Wrong decode formula
- Incorrect byte count
- Byte order mismatch
Solutions:
- Verify formula against OBD2 specification
- Check byte count matches PID definition
- Test with known PIDs first (RPM, Speed)
- Compare with other scan tools
- Check formula syntax (use
A,B,C,Dfor bytes)
Flickering/Unstable Values
Symptoms: Values jump erratically between readings
Causes:
- Poll rate too high causing data race
- Formula error causing invalid calculations
- CAN bus errors corrupting data
Solutions:
- Increase poll interval
- Verify formula produces valid output
- Check CAN bus quality
- Monitor OBD2 Response Rate for drops
Discovery Issues
Discovery Never Completes
Symptoms: Service stuck in “Disabled” state, never reaches “Connected”
Causes:
- Discovery timeout (vehicle doesn’t respond to PID 0x00)
- Vehicle doesn’t support discovery
- Wrong service configuration
Solutions:
- Wait for 3 retry attempts (6+ seconds)
- Disable PID Discovery to skip auto-detection
- Manually configure known PIDs
- Check logs for timeout messages
- Some vehicles require specific timing
Discovery Detects No PIDs
Symptoms: Discovery completes but no PIDs are polled
Causes:
- Vehicle returned empty bitmap
- No configured PIDs match supported PIDs
- Discovery misinterpretation
Solutions:
- Manually configure common PIDs (0x0C, 0x0D, 0x05)
- Disable discovery and poll all configured PIDs
- Try Service 0x01 PIDs 0x00-0x20 first
- Check Supported PIDs bitmap channels for values
Performance Optimization
Maximizing Poll Rate
Goal: Achieve 10+ Hz poll rate for critical parameters
Strategy:
- Enable Batch PID Requests (Service 0x01)
- Use physical addressing (0x7E0)
- Request only essential PIDs (6 maximum per batch)
- Set request interval to 100ms
- Ensure vehicle supports multi-PID requests
Expected Results:
- 6 PIDs @ 100ms interval = ~10 Hz per PID
- Total CAN messages = ~10/second
- Response rate should be >90%
Minimizing CAN Bus Load
Goal: Reduce CAN bandwidth usage
Strategy:
- Increase request interval (200-500ms)
- Disable unused PIDs
- Use batch requests to consolidate messages
- Prioritize essential parameters
CAN Load Calculation:
Single PID request = 1 frame (~10 bytes @ 500kbps = ~200ยตs)
Response = 1-8 frames depending on data size
Total per poll = 2-9 frames
Example: 10 PIDs @ 100ms interval
= 10 requests/second ร 2 frames avg = 20 frames/sec
= ~4 kbps out of 500 kbps = <1% bus loadBalancing Multiple Services
Scenario: Monitor Service 0x01 (current data) and Service 0x09 (VIN)
Strategy:
Service 0x01:
โโโ Request Interval: 100ms
โโโ PIDs: High-frequency data (RPM, Speed, Throttle)
โโโ Batch Requests: Yes
Service 0x09:
โโโ Request Interval: 1000ms (slower)
โโโ PIDs: Static data (VIN, Calibration ID)
โโโ Batch Requests: NoExamples
Example 1: Basic Engine Monitoring
Monitor essential engine parameters.
Configuration:
Service 0x01:
- Enabled: Yes
- PID Discovery: Yes
- Batch PID Requests: Yes
- Request Interval: 100ms
- TX Address: 0x7E0
PIDs:
PID 0x0C (Engine RPM):
- Channel ID: 60100
- Byte Count: 2
- Formula: (A*256+B)/4
PID 0x0D (Vehicle Speed):
- Channel ID: 60101
- Byte Count: 1
- Formula: A
PID 0x05 (Coolant Temp):
- Channel ID: 60102
- Byte Count: 1
- Formula: A-40
PID 0x11 (Throttle Position):
- Channel ID: 60103
- Byte Count: 1
- Formula: A*100/255Expected Results:
- Poll Rate: ~10 Hz
- Response Rate: >90%
- 4 parameters updated 10 times per second
Example 2: Performance Logging
High-speed data acquisition for track use.
Configuration:
Service 0x01:
- Request Interval: 50ms (20 Hz)
- Batch PID Requests: Yes
- TX Address: 0x7E0
PIDs (6 max per batch):
- 0x0C: Engine RPM
- 0x0D: Vehicle Speed
- 0x10: MAF Air Flow
- 0x11: Throttle Position
- 0x0F: Intake Air Temp
- 0x0B: Intake Manifold PressureExpected Results:
- Poll Rate: 20 Hz
- 6 channels @ 20 Hz = 120 samples/second total
- CAN load: ~2%
Example 3: Diagnostic Scan
Complete vehicle parameter survey.
Configuration:
Service 0x01:
- PID Discovery: Yes
- Request Interval: 200ms
- Batch PID Requests: No (for maximum compatibility)
- TX Address: 0x7DF (broadcast)
PIDs: All supported PIDs (auto-detected via discovery)
Service 0x09:
- Request Interval: 5000ms
- PIDs: 0x02 (VIN), 0x04 (Calibration ID)Expected Results:
- Automatic detection of 20-40 supported PIDs
- Poll rate: 2-5 Hz depending on PID count
- VIN and calibration data refreshed every 5 seconds
Example 4: Manufacturer-Specific (UDS)
Access extended manufacturer parameters.
Configuration:
Service 0x22 (UDS):
- PID Width: 2
- PID Discovery: No
- Batch PID Requests: No
- TX Address: 0x7E0
PIDs (manufacturer-specific examples):
PID 0xF190:
- Description: "Boost Pressure"
- Channel ID: 60200
- Byte Count: 2
- Formula: (A*256+B)/100
PID 0xF191:
- Description: "Fuel Rail Pressure"
- Channel ID: 60201
- Byte Count: 2
- Formula: (A*256+B)*10Note: Manufacturer PIDs vary by make/model. Consult manufacturer documentation.
Technical Reference
CAN Message Format
OBD2 Request (Single PID):
ID: 0x7DF (broadcast) or 0x7E0 (physical)
Data: [0x02, 0x01, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00]
โ โ โ
โ โ โโ PID (0x0C = RPM)
โ โโโโโโโโ Service (0x01)
โโโโโโโโโโโโโโ Length (2 bytes)OBD2 Request (Multi-PID):
ID: 0x7E0 (physical addressing required)
Data: [0x04, 0x01, 0x0C, 0x0D, 0x05, 0x00, 0x00, 0x00]
โ โ โ โ โ
โ โ โ โ โโ PID 3 (0x05 = Coolant Temp)
โ โ โ โโโโโโโโ PID 2 (0x0D = Speed)
โ โ โโโโโโโโโโโโโโ PID 1 (0x0C = RPM)
โ โโโโโโโโโโโโโโโโโโโโ Service (0x01)
โโโโโโโโโโโโโโโโโโโโโโโโโโ Length (4 bytes)OBD2 Response:
ID: 0x7E8 (or 0x7E9-0x7EF for multiple ECUs)
Data: [0x04, 0x41, 0x0C, 0x1A, 0xF8, 0x00, 0x00, 0x00]
โ โ โ โ โ
โ โ โ โโโโโโโดโ Data bytes (0x1AF8 = 6904 โ RPM = 1726)
โ โ โโโโโโโโโโโโโโ PID echo (0x0C)
โ โโโโโโโโโโโโโโโโโโโโ Response mode (0x41 = 0x01 + 0x40)
โโโโโโโโโโโโโโโโโโโโโโโโโโ Length (4 bytes)ISO-TP Multi-Frame
For responses >7 bytes, ISO-TP (ISO 15765-2) is used:
First Frame:
[0x10, 0x14, 0x49, 0x02, 0x01, ...]
โ โ โโโโโโโโโโโโโโโโโโโโ Start of data
โ โโโโโโโโโโโโโโโโโโโโโโโโโโ Total length (0x14 = 20 bytes)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Frame type (0x1 = First Frame)Consecutive Frames:
[0x21, data, data, data, ...]
โ
โโ Sequence number (0x21 = frame 1, 0x22 = frame 2, etc.)Negative Response Codes
| Code | Description | Meaning |
|---|---|---|
| 0x11 | Service Not Supported | ECU doesn’t support this service |
| 0x12 | Sub-Function Not Supported | PID not supported |
| 0x13 | Incorrect Message Length | Wrong data size |
| 0x31 | Request Out Of Range | PID out of valid range |
| 0x33 | Security Access Denied | Requires authentication |
| 0x78 | Response Pending | ECU busy, will respond later |
Safety and Compliance
Legal Considerations
Regional Compliance: OBD2 is mandated for vehicles sold in:
- USA: 1996+
- EU: 2001+ (gasoline), 2004+ (diesel)
- Australia: 2006+
- Other regions vary
Emissions Testing: Tampering with OBD2 data may violate emissions regulations
Warranty: Check vehicle warranty terms regarding aftermarket scanning
Best Practices
- Non-Intrusive: Read-only monitoring doesn’t affect vehicle operation
- Passive Scanning: This module only reads data, never writes
- Standard Compliant: Follows SAE J1979 and ISO 15765-2 specifications
- ECU Protection: Respects timeouts and retry limits to avoid ECU overload
Limitations
- Manufacturer-Specific Data: Some parameters require proprietary protocols
- Real-Time Constraints: Not suitable for safety-critical applications
- CAN Bus Priority: OBD2 messages are low priority; critical vehicle systems take precedence
- ECU Availability: Some ECUs may be busy and unable to respond immediately
Glossary
| Term | Definition |
|---|---|
| ECU | Electronic Control Unit - vehicle computer that manages engine/systems |
| PID | Parameter ID - specific data point (e.g., RPM, temperature) |
| ISO-TP | ISO 15765-2 Transport Protocol - multi-frame message handling |
| SAE J1979 | Standard defining OBD2 diagnostic protocols |
| UDS | Unified Diagnostic Services (ISO 14229) - extended diagnostics |
| DTC | Diagnostic Trouble Code - stored fault code |
| Freeze Frame | Snapshot of parameters when fault occurred |
| Bitmap | 32-bit field where each bit indicates support for a PID |
| Multi-PID | Requesting multiple parameters in single message |
| Physical Addressing | Direct ECU communication (0x7E0) vs broadcast (0x7DF) |
Additional Resources
Standards Documents
- SAE J1979: OBD2 Diagnostic Test Modes
- ISO 15765-2: Diagnostic communication over CAN
- ISO 14229-1: Unified Diagnostic Services (UDS)
- SAE J2012: Diagnostic Trouble Code Definitions
Tools and Validation
- Use OBD2 scan tool to verify vehicle responses
- Compare results with known-good scanner
- Monitor CAN bus with analyzer to debug issues
- Test with multiple vehicles for compatibility
Support
For additional help:
- Check system logs for detailed error messages
- Review CAN bus statistics for communication issues
- Verify configuration against examples in this guide
- Test with minimal configuration first (basic PIDs)
Revision History
| Version | Date | Changes |
|---|---|---|
| 1.0 | 2025 | Initial release |