Decode active diagnostic trouble codes from a fleet truck's J1939 DM1 broadcast message including SPN, FMI, and occurrence count
domain: csselectronics.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
Listen for PGN 65226 (0xFECA, DM1) broadcast every 1 second or on a DTC state change
Parse the first 2 bytes as lamp status (protect/amber/red/malfunction indicator lamp plus flash bits)
For each subsequent 4-byte DTC block, combine the 16-bit SPN-low bytes with the 3-bit SPN-high segment to reconstruct the full 19-bit SPN
Extract the 5-bit Failure Mode Identifier (FMI) and 7-bit Occurrence Count (OC), noting OC caps at 126 with 127 meaning 'not available'
Detect whether the message fits a single 8-byte frame (0-1 active DTCs) or requires J1939 Transport Protocol reassembly (2+ active DTCs) before parsing DTC blocks
Known gotchas
DM1 length is variable — a decoder built only against the single-frame case will silently drop DTCs once a truck has 2+ simultaneously active codes and the message becomes multi-frame
DM2 (previously-active DTCs) uses the identical block structure but must be explicitly requested via PGN 59904 — it is not broadcast like DM1
Proprietary SPNs occupy the 516096-524287 range and are commonly paired with FMI 31 ('condition exists, no matching standard FMI'); don't assume every DTC maps to a standardized Digital Annex SPN
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?