ANROT CAN J1939 DBC Parsing Tutorial
Explains ANROT CAN J1939 29-bit extended frames, PGN / Source Address, DBC import, and IMU, attitude, GNSS / INS signal decoding.
- j1939
- can
- dbc
- tutorial
CAN J1939 DBC Parsing Tutorial
Protocol Support
| Protocol / frame | Support | Scope of this tutorial |
|---|---|---|
| SAE J1939 / CAN DBC | Supported | The DBC describes CAN PGN / SPN signals for J1939 tools. |
ANROT UART binary (0x91, 0x62, 0x63) | Not applicable | These are UART binary frames, not J1939 frames. |
| CANopen | Not applicable | Use the CANopen tutorial instead. |
This page explains how to use J1939.dbc to decode CAN J1939 output from ANROT devices. The DBC can be imported into CANdb++, CANalyzer, PCAN-View, or other CAN tools with DBC support. It converts raw CAN frames into physical values such as latitude, longitude, velocity, acceleration, angular velocity, attitude angles, and quaternion values.
The DBC only describes data decoding. It does not include device control, parameter setup, or output-mode switching commands. To configure output mode, Node ID, baud rate, or CANopen TPDO behavior, use the matching configuration document and CANopen tutorial.
Download
J1939 Frame Structure
J1939 uses 29-bit extended CAN frames. The ANROT J1939 DBC stores message IDs in DBC extended-frame notation, so the decimal BO_ ID in the DBC includes the extended flag. The actual 29-bit CAN ID seen on the bus is the lower 29 bits.
Example: PGN65332_FF34_Accel
| Item | Value |
|---|---|
DBC BO_ ID | 2365535240 |
| DBC hexadecimal ID | 0x8CFF3408 |
| Actual 29-bit CAN ID | 0x0CFF3408 |
| Priority | 3 |
| PGN | 0xFF34 |
| Source Address | 0x08 |
The leading extended flag in 0x8CFF3408 is part of the DBC format. The actual CAN bus frame ID is 0x0CFF3408. If your CAN tool loads the DBC correctly, this conversion is usually handled automatically. If you compare raw logs or match IDs in code, account for this difference.
DBC Workflow
- Confirm that the CAN adapter supports 29-bit extended frames.
- Set the CAN baud rate to match the device output setting.
- Import
J1939.dbcinto the CAN analysis tool. - Start receiving CAN frames and confirm that extended IDs such as
0x0CFFxxxxare visible. - Read physical values by signal name, such as
Acc_X,Gyr_Z,Roll, orLatitude.
Message Overview
The DBC is modeled with Source Address 0x08. If the device Source Address changes, the final byte of the actual CAN ID changes as well. In that case, the CAN tool may need a node / ID adjustment, or you may need to save a separate DBC for that source address.
| DBC message | Actual 29-bit CAN ID | PGN | Main data |
|---|---|---|---|
PGN65296_FF10_LonLat | 0x0CFF1008 | 0xFF10 | Latitude, Longitude |
PGN65300_FF14_AltUnduDiffAge | 0x0CFF1408 | 0xFF14 | Altitude, Undulation, Differential Age |
PGN65304_FF18_StatusSats | 0x0CFF1808 | 0xFF18 | GNSS / INS status and satellite count |
PGN65318_FF26_Velocity | 0x0CFF2608 | 0xFF26 | East / North / Up velocity, Ground Speed |
PGN65327_FF2F_Time | 0x0CFF2F08 | 0xFF2F | UTC time |
PGN65332_FF34_Accel | 0x0CFF3408 | 0xFF34 | X / Y / Z acceleration |
PGN65335_FF37_Gyro | 0x0CFF3708 | 0xFF37 | X / Y / Z angular velocity |
PGN65338_FF3A_Mag | 0x0CFF3A08 | 0xFF3A | X / Y / Z magnetic field |
PGN65341_FF3D_RollPitch | 0x0CFF3D08 | 0xFF3D | Roll, Pitch |
PGN65345_FF41_YawDual | 0x0CFF4108 | 0xFF41 | Yaw 0-360, Yaw -180-180 |
PGN65347_FF43_TempPressure | 0x0CFF4308 | 0xFF43 | Temperature, Pressure |
PGN65350_FF46_Quaternion | 0x0CFF4608 | 0xFF46 | Quaternion W / X / Y / Z |
PGN65354_FF4A_Inclinometer | 0x0CFF4A08 | 0xFF4A | Inclinometer X / Y |
Signals and Scaling
All multi-byte signals are decoded as little-endian values. Scale and offset are already defined in the DBC. After the CAN analysis tool loads the DBC, it should convert raw values into physical values automatically.
GNSS / INS Position and Status
| PGN | Signal | Type | Scale | Unit |
|---|---|---|---|---|
0xFF10 | Latitude | signed 32-bit | 1e-7 | deg |
0xFF10 | Longitude | signed 32-bit | 1e-7 | deg |
0xFF14 | Altitude | signed 32-bit | 0.01 | m |
0xFF14 | Undulation | signed 16-bit | 0.01 | m |
0xFF14 | Diff_Age | signed 16-bit | 0.01 | s |
0xFF18 | GNSS_Pos_Quality | unsigned 8-bit | 1 | - |
0xFF18 | GNSS_Heading_Quality | unsigned 8-bit | 1 | - |
0xFF18 | Sat_Pos_Count | unsigned 8-bit | 1 | - |
0xFF18 | Sat_Heading_Count | unsigned 8-bit | 1 | - |
0xFF18 | INS_Status | unsigned 8-bit | 1 | - |
Velocity and Time
| PGN | Signal | Type | Scale | Unit |
|---|---|---|---|---|
0xFF26 | Vel_East | signed 16-bit | 0.01 | m/s |
0xFF26 | Vel_North | signed 16-bit | 0.01 | m/s |
0xFF26 | Vel_Up | signed 16-bit | 0.01 | m/s |
0xFF26 | Ground_Speed | signed 16-bit | 0.01 | m/s |
0xFF2F | UTC_Year / UTC_Month / UTC_Day | unsigned 8-bit | 1 | - |
0xFF2F | UTC_Hour / UTC_Minute / UTC_Second | unsigned 8-bit | 1 | - |
0xFF2F | UTC_Millisecond | unsigned 16-bit | 1 | ms |
IMU and Attitude
| PGN | Signal | Type | Scale | Unit |
|---|---|---|---|---|
0xFF34 | Acc_X / Acc_Y / Acc_Z | signed 16-bit | 0.00048828 | G |
0xFF37 | Gyr_X / Gyr_Y / Gyr_Z | signed 16-bit | 0.061035 | deg/s |
0xFF3A | Mag_X / Mag_Y / Mag_Z | signed 16-bit | 0.030517 | uT |
0xFF3D | Roll / Pitch | signed 32-bit | 0.001 | deg |
0xFF41 | Yaw_360 | unsigned 32-bit | 0.001 | deg |
0xFF41 | Yaw_pm180 | signed 32-bit | 0.001 | deg |
0xFF43 | Temperature | signed 16-bit | 0.01 | degC |
0xFF43 | Pressure | signed 32-bit | 0.01 | Pa |
0xFF46 | Quat_W / Quat_X / Quat_Y / Quat_Z | signed 16-bit | 0.0001 | - |
0xFF4A | Incli_X / Incli_Y | signed 32-bit | 0.001 | deg |
Manual Decoding Example
If you decode the data in code instead of using a DBC-aware tool, use this formula:
physical value = raw value * scale + offset
For Acc_X in PGN65332_FF34_Accel, bytes 0-1 are a signed 16-bit little-endian value, and the scale is 0.00048828 G. If the raw bytes are 00 08, the little-endian raw value is 0x0800 = 2048:
2048 * 0.00048828 = 0.99999744 G
So Acc_X is approximately 1.0 G.
Difference from the CANopen DBC
| Item | J1939 DBC | CANopen DBC |
|---|---|---|
| CAN frame | 29-bit extended frame | 11-bit standard frame |
| Main identifier | PGN + Source Address | TPDO frame ID + Node ID |
| Purpose | IMU, attitude, INS / GNSS data decoding | CANopen TPDO data decoding |
| Control / setup | Not included | Not included in the DBC; use SDO / NMT for setup |
| Common ID example | 0x0CFF3408 | 0x188 |
If the tool does not show decoded physical values, first confirm that the imported file is the J1939 DBC and that the CAN log contains extended frames. Treating a J1939 extended frame as a standard CAN frame will usually produce no match.
Troubleshooting
| Symptom | Check first |
|---|---|
| No frames are received | CAN baud rate, wiring, termination resistor, and whether CAN J1939 output is enabled on the device |
| Frames are received but the DBC does not decode them | 29-bit extended frame setting, DBC import status, and whether Source Address is still 0x08 |
| Only some signals have no value | The PGN may not be enabled, or the current product / setting may not include that data |
| Physical values look incorrect | Endian, signed / unsigned setting, scale, and whether the tool is using raw ID instead of DBC extended ID |
| Decoding stops after Source Address changes | The DBC is modeled with SA 0x08; adjust the tool ID mapping or generate a new DBC |