PortDock

CAN Frame Decoder (J1939, CANopen)

Decode candump lines, ID DLC data hex or raw bits: standard/extended ID, DLC, data, bit stuffing and CRC15, plus J1939 PGN/addresses and CANopen COB-ID/SDO.

candump «can0 18FEF100#0011…» · «can0 123 [2] 11 22» · «ID DLC data» hex «601 8 40 18 10 01 00 00 00 00» · raw bits «0 0010010…» (from SOF, 0 = dominant).

Examples

Everything is decoded in your browser; nothing you paste is sent anywhere. J1939 and CANopen results are candidates that hold only if the bus really uses that protocol.

DLC and data length

DLCClassic CANCAN FD
000
111
222
333
444
555
666
777
888
9812
10816
11820
12824
13832
14848
15864

In classic CAN, DLC 9–15 still means 8 data bytes. In CAN FD, 9 and above mean 12, 16, 20, 24, 32, 48 and 64 bytes. This decoder shows CAN FD by length only; raw bit streams are decoded for classic CAN only.

Raw bit streams — bit stuffing and CRC15

  • From SOF to the end of the CRC sequence, after five equal bits the transmitter inserts one bit of the opposite value (a stuff bit). The decoder removes them before splitting the fields and lists where they were. Six equal bits is a stuff error.
  • CRC15 is computed over SOF, arbitration, control and data fields (stuff bits removed) with polynomial 0x4599 (x¹⁵+x¹⁴+x¹⁰+x⁸+x⁷+x⁴+x³+1), initial value 0, and compared with the received CRC.
  • If present, the CRC delimiter (1), ACK slot (0 if anyone received it), ACK delimiter (1) and EOF (seven 1s) are shown too. When copying from a logic analyser, write bus levels (dominant = 0).

J1939 — splitting the 29-bit ID

  • 29 bits = priority 3 · EDP 1 · DP 1 · PF (PDU format) 8 · PS (PDU specific) 8 · SA (source address) 8.
  • If PF is below 240 (0xF0) it is PDU1: PS is the destination address (DA) and the low 8 bits of the PGN are 0. Example: 0x18EA00F9 → PGN 59904 (0xEA00, Request), DA 0x00, SA 0xF9.
  • If PF is 240 or more it is PDU2: PS is the group extension and part of the PGN; the message goes to everyone (255). Example: 0x18FEF100 → priority 6, PGN 65265 (0xFEF1, CCVS1), SA 0x00.
  • PGN = EDP, DP, PF and (for PDU2) PS. Values are little-endian; a top byte of 0xFE means error, 0xFF means not available.

PGNs this decoder names

PGNHexAcronymName
593920xE800ACKMAcknowledgment
599040xEA00RQSTRequest
601600xEB00TP.DTTransport Protocol — Data Transfer
604160xEC00TP.CMTransport Protocol — Connection Management
609280xEE00ACAddress Claimed
611840xEF00PropAProprietary A
614410xF001EBC1Electronic Brake Controller 1
614420xF002ETC1Electronic Transmission Controller 1
614430xF003EEC2Electronic Engine Controller 2 (accelerator pedal)
614440xF004EEC1Electronic Engine Controller 1 (engine speed, torque)
614450xF005ETC2Electronic Transmission Controller 2 (gear)
652170xFEC1VDHRHigh Resolution Vehicle Distance
652260xFECADM1Active Diagnostic Trouble Codes (DM1)
652270xFECBDM2Previously Active Diagnostic Trouble Codes (DM2)
652280xFECCDM3Diagnostic Data Clear (DM3)
652420xFEDASOFTSoftware Identification
652480xFEE0VDVehicle Distance
652530xFEE5HOURSEngine Hours, Revolutions
652540xFEE6TDTime/Date
652570xFEE9LFCFuel Consumption (Liquid)
652590xFEEBCIComponent Identification
652600xFEECVIVehicle Identification
652620xFEEEET1Engine Temperature 1
652630xFEEFEFL/P1Engine Fluid Level/Pressure 1
652650xFEF1CCVS1Cruise Control/Vehicle Speed 1
652660xFEF2LFE1Fuel Economy (Liquid)
652690xFEF5AMBAmbient Conditions
652700xFEF6IC1Intake/Exhaust Conditions 1
652710xFEF7VEP1Vehicle Electrical Power 1
652720xFEF8TRF1Transmission Fluids 1
652760xFEFCDDDash Display

SPNs decoded to values (only those with publicly checked scaling)

SPNPGNNameByteScaleOffset
51361444Actual engine percent torque31 %/bit-125 %
19061444Engine speed4–50.125 rpm/bit0 rpm
9161443Accelerator pedal position 120.4 %/bit0 %
11065262Engine coolant temperature11 °C/bit-40 °C
10065263Engine oil pressure44 kPa/bit0 kPa
24765253Engine total hours of operation1–40.05 h/bit0 h

CANopen — predefined COB-IDs (CiA 301)

COB-IDFunction
0x000NMT command (data: command, node ID — 0 = all)
0x080SYNC
0x081–0x0FFEMCY (error code 2 bytes, error register 1001h, 5 manufacturer bytes)
0x100TIME
0x181– / 0x281– / 0x381– / 0x481–TPDO1–4 (device → bus)
0x201– / 0x301– / 0x401– / 0x501–RPDO1–4 (bus → device)
0x581–0x5FFSDO response (server → client)
0x601–0x67FSDO request (client → server)
0x701–0x77FNMT error control: heartbeat, boot-up (00 boot-up, 04 stopped, 05 operational, 7F pre-operational)
0x7E4, 0x7E5LSS (CiA 305)

SDO command byte

  • The top 3 bits are the command: request 1 = initiate download (write), 2 = initiate upload (read), 0 and 3 = segments, 4 = abort (0x80), 5 and 6 = block transfer.
  • With expedited (e = 1) and size indicated (s = 1), n (bits 3–2) is the number of bytes without data: writes 0x2F, 0x2B, 0x27, 0x23 = 1, 2, 3, 4 bytes; read responses 0x4F, 0x4B, 0x47, 0x43 = 1, 2, 3, 4 bytes.
  • Bytes 1–2 = index (little-endian), 3 = sub-index, 4–7 = data or abort code. A successful write is answered with 0x60; a read request is 0x40.

FAQ

Is a 3-digit candump ID standard and an 8-digit one extended?

Yes. can-utils prints standard IDs as 3 hex digits and extended IDs as 8. For the «ID DLC data» form you can force the length with the ID length field.

Is every extended ID J1939?

No. Other protocols use 29-bit IDs too (NMEA 2000 and ISOBUS build on J1939; others are vendor formats). The J1939 breakdown only holds if the bus is J1939.

An SPN shows as not available

That byte is 0xFF (not available) or 0xFE (error). The sending ECU may not support it, or there may be a sensor fault. For SPNs not listed, check the start byte and scale in J1939-71 or the vendor document.

Can I work out CAN bit rate and sample point here?

Bit timing is in the CAN Bit Timing Calculator.

For bit rate, sample point and TQ, use the CAN Bit Timing Calculator. For UART, SPI and I2C: UART Waveform Drawer · SPI Mode Helper · I2C Tools

Sources