An ABP (activation by personalisation) device does not join. Its address (DevAddr) and its two session keys are set in the device, and it sends with them from its first frame. Use ABP only when the device cannot do OTAA: OTAA is safer and easier to recover. This page explains how to register an ABP device and how to deal with its frame counters.
ABP is supported for LoRaWAN 1.0.x (1.0.2, 1.0.3, 1.0.4). You need the permission to add, edit and delete LoRaWAN devices.
What you need
| Value | Format |
|---|---|
| DevEUI | 16 hexadecimal digits |
| JoinEUI | 16 hexadecimal digits (not used to join; 0000000000000000 is fine) |
| DevAddr | 8 hexadecimal digits, as set in the device |
| NwkSKey (network session key) | 32 hexadecimal digits |
| AppSKey (application session key) | 32 hexadecimal digits |
The DevAddr must belong to this network
Every LoRaWAN network has a NetID, and the first bits of a DevAddr name the network. Hermetry’s gateways are told the network’s NetID and drop frames whose DevAddr belongs to another network, so Hermetry refuses such an address up front.
If the address does not fit, Hermetry answers This DevAddr does not belong to this network. Use an address with the network’s NetID prefix. (devaddr_not_in_netid) and the error’s details name the network’s NetID. With the NetID 000000, the DevAddr must lie between 00000000 and 01FFFFFF. If your device came with an address outside the range, set a new DevAddr in the device.
A DevAddr can be used by only one live device in your organisation. A second device with the same address is refused: Another device of this tenant already uses this DevAddr. (devaddr_taken).
Add the device
- Open Devices and select New device.
- Choose LoRaWAN device.
- Set Activation to ABP (address and session keys set in the device). The form shows a note about frame counters and the ABP fields.
- Fill in Name, DevEUI, JoinEUI (AppEUI), DevAddr, NwkSKey (network session key) and AppSKey (application session key), then LoRaWAN version and Class.
- Select Add device.
The drawer says The device was added. Its uplinks are heard from its first frame.
Warning
The session keys are stored encrypted and never shown again. Keep them in a safe place.
Frame counters
Each uplink carries a frame counter. The network server accepts only a counter that moves forward (by at most 16,384 at a time). A repeat is accepted only as the retransmission of the last confirmed uplink. This blocks replayed frames.
For an ABP device this matters:
- The counters start at 0 when you add the device.
- Many ABP devices start their counter at 0 again when they restart or their battery is changed. Their next frames then look like old frames and are dropped, shown in the frames log as Replayed frame or Frame counter jumped.
- Hermetry never re-syncs a counter by itself. You decide.
Reset counters after a device restart
- Make sure the device really restarted its counters (for example, it was re-flashed or its battery was changed).
- Open the device’s LoRaWAN tab and select Reset counters.
- Confirm Reset the frame counters: “Use it only after the device restarted its counters. Until the device sends again, a recorded old frame of it could be accepted once. The reset is recorded in the audit log.”
The next uplink counter is accepted from 0 and the downlink counter starts at 0. The tab shows Counters last reset. The audit entry iot_lorawan.device.counters_reset records the counters that were replaced.
An ABP device has no Reset session button: it cannot join, so ending its session would cut it off. Hermetry refuses it with An ABP device does not join: its session cannot be reset. Reset its counters, or give it new session keys.
Radio settings of an ABP device
Because an ABP device never joins, nobody has told it the profile’s settings. It starts with the LoRaWAN 1.0.x defaults of EU868: RX1 delay 1 second, RX1 data-rate offset 0, RX2 at 869.525 MHz and DR0, and the three default channels only. The network server plans downlinks for these values and asks the device, with MAC commands, to move to the profile’s RX1 delay (5 seconds by default). Until the device confirms, downlinks use what the device really has.
A counter reset puts these radio values back to the defaults too.
Replace the session keys
On the LoRaWAN tab under Keys, enter the DevAddr (pre-filled with the current one), New NwkSKey and New AppSKey, then select Replace keys. Confirm: “A new session starts with counters at 0. Set the same address and keys in the device, or it stops being heard.” All three values go together; Hermetry refuses a partial change with A new ABP session needs the DevAddr, the NwkSKey and the AppSKey together.
Through the API
POST /tenant/<tenantId>/api/iot/lorawan/devices
Content-Type: application/json
{
"activation": "ABP",
"name": "Meter 12",
"devEui": "1122334455667712",
"devAddr": "0100A3F1",
"nwkSKey": "<32 hex digits>",
"appSKey": "<32 hex digits>",
"macVersion": "1.0.3",
"class": "A"
}
An ABP body with an appKey, or an OTAA body with session keys, is refused. Reset the counters with DELETE /tenant/<tenantId>/api/iot/lorawan/devices/<deviceId>/counters.

