Every J1939 frame ends with a one-byte source address: 00 for the engine, 03 for the transmission, and so on. Those addresses are not wired into the bus. Each ECU has to claim one when it starts, and two ECUs must never use the same one. SAE J1939-81 defines how, and you need to know it the moment you add a logger, a display, or a test tool that transmits.

The Address Claimed message

An ECU claims an address by sending Address Claimed, PGN 60928 (0xEE00), from the address it wants, to everyone:

Example
18EEFF00  [8]  40 E2 61 24 00 00 00 90
  • 18 is priority 6.
  • EE is the PDU Format of PGN 60928.
  • FF is the destination: all ECUs.
  • 00 is the address being claimed.

The 8 data bytes are the ECU's NAME, a 64-bit number that is unique on the network.

After it sends the claim, the ECU waits about 250 ms for objections before it relies on the address.

The 64-bit NAME

The NAME describes what the device is and who made it. It is sent low byte first:

BitsFieldSizeMeaning
0–20Identity number21 bitsUnique number set by the manufacturer, often a serial number
21–31Manufacturer code11 bitsAssigned by SAE to each manufacturer
32–34ECU instance3 bitsWhich ECU, when one function uses several
35–39Function instance5 bitsWhich instance of the same function
40–47Function8 bitsWhat the device does, such as engine or transmission
48Reserved1 bit
49–55Vehicle system7 bitsThe system the device belongs to
56–59Vehicle system instance4 bitsWhich instance of that system
60–62Industry group3 bits0 global, 1 on-highway, 2 agriculture and forestry, 3 construction, 4 marine, 5 industrial
63Arbitrary address capable1 bit1 if the ECU can pick another address by itself

Decoding the example bytes 40 E2 61 24 00 00 00 90:

Python
def decode_name(data: bytes) -> dict:
    name = int.from_bytes(data[:8], "little")
    return {
        "identity_number": name & 0x1FFFFF,
        "manufacturer_code": (name >> 21) & 0x7FF,
        "ecu_instance": (name >> 32) & 0x7,
        "function_instance": (name >> 35) & 0x1F,
        "function": (name >> 40) & 0xFF,
        "vehicle_system": (name >> 49) & 0x7F,
        "vehicle_system_instance": (name >> 56) & 0xF,
        "industry_group": (name >> 60) & 0x7,
        "arbitrary_address_capable": bool(name >> 63),
    }


print(decode_name(bytes.fromhex("40E2612400000090")))
Example
{'identity_number': 123456, 'manufacturer_code': 291, 'ecu_instance': 0,
'function_instance': 0, 'function': 0, 'vehicle_system': 0,
'vehicle_system_instance': 0, 'industry_group': 1,
'arbitrary_address_capable': True}

So this is an on-highway device (industry group 1), identity number 123456, that can move to another address if it has to.

Many forum threads get the bit numbering wrong. Treat the 8 bytes as one little-endian 64-bit integer, as above, and the fields fall out cleanly.

When two ECUs want the same address

Suppose a display and a gateway both claim address 0x28:

Example
18EEFF28  [8]  <NAME of display>
18EEFF28  [8]  <NAME of gateway>

Each ECU compares the other NAME with its own as a 64-bit number. The lower NAME wins and keeps the address. The loser then does one of two things:

  • If it is arbitrary address capable (bit 63 = 1), it claims a different free address.
  • If it is not, it sends a Cannot Claim Address message: the same PGN 60928, but from the null address 0xFE. Then it stops sending normal messages.
Example
18EEFFFE  [8]  <NAME of loser>      Cannot Claim Address

Because bit 63 is the highest bit of the NAME, an arbitrary-address-capable device has a higher NAME, and so loses to an otherwise identical device with a fixed address.

Finding out who is on the bus

Any ECU can ask every other ECU to repeat its claim. It sends the Request PGN 59904 (0xEA00) with the PGN it wants, 60928, in the data:

Terminal
cansend can0 18EAFFFE#00EE00
  • EA is the Request PGN, FF asks everyone, and FE is the null address. A device may send this request before it has claimed an address.
  • 00 EE 00 is PGN 60928, low byte first.

Every ECU answers with its Address Claimed message, so a short candump afterwards lists all the addresses in use and the NAME behind each one:

Terminal
candump -L can0,00EE0000:00FF0000

The filter keeps frames whose PDU Format is EE.

Only do this on a bus you are allowed to transmit on. The request is harmless, but anything you send reaches every ECU.

Address claiming on Linux

Since Linux 5.4, the kernel has a J1939 stack with CAN_J1939 sockets. It handles address claiming and the transport protocol for your application.

The can-utils package includes j1939acd, an address claim daemon that claims and defends an address for a NAME. This example, from the kernel developers' own test notes, gives it a set of candidate addresses with -r and the NAME 1122334455667788:

Terminal
j1939acd -r 100,80-120 1122334455667788 vcan0

On a virtual vcan0 bus, you can run it next to candump vcan0 and watch the Address Claimed frames appear. For Python, the can-j1939 package implements address claiming on top of python-can.

Common problems

  • A new device makes another ECU disappear. Both claimed the same address and your device had the lower NAME. Give your device a fixed address that is not used on that vehicle, or make it arbitrary address capable with a higher NAME.
  • Your tool sends but nothing answers. It never claimed an address, or it lost the claim and went quiet. Check for Cannot Claim Address frames from FE.
  • Addresses change between power cycles. Arbitrary-address-capable ECUs can end up with different addresses each start. Identify devices by NAME, not by address.
  • NAME fields look random. You decoded the bytes big-endian. NAME is little-endian.

Frequently asked questions

What is PGN 60928 in J1939?

It is Address Claimed. An ECU sends it from the address it wants, with its 64-bit NAME as data, to claim that address on the network.

What happens if two J1939 devices use the same address?

The one with the lower NAME keeps it. The other moves to another address if it is arbitrary address capable, or sends Cannot Claim Address from address 254 and stops transmitting.

What does address 254 mean in J1939?

254 (0xFE) is the null address. An ECU that has no valid address uses it for Cannot Claim Address messages and for requests sent before it has claimed one.

References