State: decoding verified on CSS Electronics' CANedge truck logs against cantools and python-can-j1939. The transport protocol, address claims and DM1 with DTCs are modelled against python-can-j1939 as a peer. No real J1939 ECU. The SAE documents were not read.
When a database is a J1939 database
- DBC: the database says so (
ProtocolType"J1939") and its messages are parameter groups:VFrameFormatJ1939PG, as CANdb++ writes them, or the older form with the globalJ1939PGNattribute. Start one with the SAE J1939 template of New CAN Database... (see Templates, exchange and C code). - ARXML: a
J-1939-CLUSTER. Each ECU's address is theTP-ADDRESSof itsJ-1939-TP-NODE, its NAME theNODE-NAMEof itsJ-1939-NM-NODE, and the groups the transport protocol sends come fromJ-1939-TP-CONNECTION. A cluster without address claiming gives no NAMEs, said in Problems. 11-bit frames stay plain CAN frames.
Decode and reassemble
- A 29-bit frame decodes by its parameter group number (PDU1 and PDU2, data page, extended data page) whatever its priority, source and destination.
- The trace editor and the CAN Bus panel's Trace show PGN, SA, DA and Pri columns; the filter language has
pgn,sa,daandpriority; the trace statistics count per PGN and source. - The transport protocol (BAM, and RTS/CTS with TP.DT, abort reasons named) and ISO 11783's extended transport protocol (ETP) are reassembled live and in traces. The frame that completes a transfer decodes as the group it carried; an aborted or incomplete transfer is reported with its reason, never decoded.
The CAN Bus trace of a truck network with PGN, source and destination address and priority, BAM transfers and a DM1 reassembled at its last packet.
The J1939 Network view
In the Diagnostics panel, shown when a channel carries J1939:
- each node with its address, its NAME with every field decoded and the parameter groups it sends;
- NAMEs that lost an address or could not claim one;
- DM1 and DM2 with lamps and DTCs (SPN, FMI, occurrence count), named by the database's
SPNattributes and FMI value table; - failed transfers.
From a tester address you give (J1939 Tester Address):
- Request a Parameter Group... per node or from all nodes (PGN 59904), with the acknowledgement named;
- Request Address Claims from the null address;
- Clear Active DTCs (DM11), Clear Previously Active DTCs (DM3), Request Previously Active DTCs (DM2).
Requests on a real bus are confirmed; clearing DTCs is confirmed every time, on a virtual bus too.
The J1939 Network view with address claims, node identities and active DM1 trouble codes.
J1939 nodes in the simulation
The rest-bus simulation runs J1939 nodes. A node with a NAME (the NmJ1939 node attributes, or the ARXML NM node):
- claims its
NmStationAddressat the start and sends nothing else for 250 ms; - stops when a lower NAME claims its address;
- sends groups of 9 to 1785 bytes by BAM or, to one node, by RTS/CTS;
- answers requests for its address claim and the groups it sends, and a request for any other group with a negative acknowledgement.
The Simulation view shows how each claim stands. A node without a NAME sends from its address without claiming it.
From an agent
j1939Network, j1939Request, j1939ClearDtcs (confirmed before they send on a real bus, a clear always) and traceJ1939Network.
Not verified: no vendor log carries the transport protocol or a DTC, so TP, ETP and multi-packet DM1 rest on python-can-j1939 and unit tests; ETP on unit tests only. J1939 on CAN FD in ARXML is read as plain CAN FD. Per-PGN statistics are in the J1939 Network view only.