Skip to Content

LoRaWAN node won't join: 6 checks, in order

Short answer: when a LoRaWAN node keeps sending join requests and never gets a join accept, check the activation mode, the keys and their byte order, the frequency plan, the gateway, the counters and the timing, in this order.

Download the checklist (PDF, 2 pages)

Descarga la lista de comprobación (PDF, 2 páginas)

These checks apply to any LoRaWAN node or PLC, on any network server (The Things Stack, ChirpStack or others). If the radio link itself is weak, start with the LoRa lesson on range in the field.

Six checks, in this order

CheckWhat to doGood result
1. ActivationUse OTAA when you can: node and server agree new session keys at every join. With ABP the session keys are fixed in the device and nothing is negotiated.The device is registered in the server with the same activation mode as the node.
2. KeysDevEUI, JoinEUI (AppEUI in older versions) and AppKey must be identical in the node and in the server, in the byte order your library expects (MSB or LSB).The server receives the join request with no MIC error.
3. RegionNode, gateway and server on the same frequency plan, for example EU868 in Europe or US915 in North America. In US915 a gateway often listens to one sub-band of 8 channels: the node has to use the same one.Same plan and same sub-band at every point.
4. GatewayCheck that the gateway is connected to the server and that its events show traffic from your node. If the server never sees the join request, the cause is before it: radio, coverage or gateway.The join request appears in the gateway and server events.
5. CountersIn LoRaWAN 1.0.4 and 1.1 the DevNonce is a counter that has to keep increasing, also after a power cycle: store it in non-volatile memory. In ABP, do not reset the frame counters: the server can drop the uplinks.No "DevNonce has already been used" or "DevNonce is too small" errors.
6. TimingSpace join retries with a growing, random delay and respect the duty cycle of your region (often 1 % in Europe). If the gateway is far, start with a higher spreading factor; ADR adjusts it after the join.Join accepted, then uplinks with ADR.

What the server log tells you

  • MIC mismatch: different AppKey, or keys in the wrong byte order.
  • "DevNonce has already been used" or "too small": the DevNonce is not kept after a reset.
  • No join request in the log: radio, coverage or a gateway that does not forward the uplinks.
  • Join accept sent, node still joining: the accept arrives late (slow gateway backhaul) or the node does not hear it (coverage).
  • ABP uplinks dropped: frame counters reset in the device.

MSB or LSB

The same DevEUI can be written in two orders: 70B3D57ED005A1F2 (MSB) or F2A105D07ED5B370 (LSB). Some libraries expect the EUIs in LSB and the AppKey in MSB; others take everything in MSB. Check the example of your library and copy the keys from the server console in the format it asks for.

Example: the same keys in two byte orders

In the Arduino LMIC library (MCCI), DevEUI and JoinEUI go least significant byte first and the AppKey goes as the console shows it, as the comments of its OTAA example say. Other libraries can expect another order: check their documentation. The values below are examples, not real keys.

// Arduino LMIC (MCCI): the console shows DevEUI 70B3D57ED0012345 (MSB).
// LMIC wants DevEUI and JoinEUI (AppEUI) LSB first: the same bytes, reversed.
static const u1_t PROGMEM DEVEUI[8] = { 0x45, 0x23, 0x01, 0xD0, 0x7E, 0xD5, 0xB3, 0x70 };
void os_getDevEui(u1_t* buf) { memcpy_P(buf, DEVEUI, 8); }

// JoinEUI 0000000000000001 (MSB) becomes:
static const u1_t PROGMEM APPEUI[8] = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
void os_getArtEui(u1_t* buf) { memcpy_P(buf, APPEUI, 8); }

// AppKey is copied as the console shows it (MSB), not reversed.
static const u1_t PROGMEM APPKEY[16] = {
  0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6,
  0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C };
void os_getDevKey(u1_t* buf) { memcpy_P(buf, APPKEY, 16); }

Next steps

Sources

LoRa Alliance: TS001-1.0.4 LoRaWAN L2 1.0.4, RP002 Regional Parameters and LoRaWAN 1.0.x Join Synch Issues Remedies. The Things Stack documentation: troubleshooting devices, ABP vs OTAA and best practices.

¿Tu nodo LoRaWAN envía join requests y nunca recibe el join accept? Revisa activación, claves y orden de bytes, plan de frecuencias, gateway, contadores y tiempos.

Commenting is not enabled on this course.