For the complete documentation index, see llms.txt. This page is also available as Markdown.

Reset Used DevNonces

For LoRaWAN devices using OTAA, a DevNonce is included each time the device sends a join request. The network server keeps track of previously used DevNonces to prevent them from being reused.

In some situations, particularly during development, device resets, firmware changes, or when replacing hardware, a device may attempt to reuse a DevNonce that the network server has already seen. This can cause the join request to be rejected with errors such as:

  • DevNonce already used

  • DevNonce is too small

  • Similar nonce or OTAA join errors

Datacake now provides an option to reset the stored DevNonce records for a device directly from the device configuration in the Danger Zone Tab:

Resetting the DevNonce

Open the affected device in Datacake and navigate to:

Configuration → Danger Zone

Under Reset Used DevNonces, click Reset DevNonces.

This clears the record of DevNonces that the network server has previously received from this device, allowing it to attempt an OTAA join again using a nonce that may previously have been rejected.

After resetting the DevNonces, restart or rejoin the LoRaWAN device so that it sends a new join request.

When should I use this?

A DevNonce reset can be useful when:

  • A device repeatedly fails to join after being reset or reprogrammed.

  • Firmware changes cause the device's DevNonce counter to restart.

  • A device has lost its locally stored nonce information.

  • Debug logs show that an OTAA join is being rejected because the DevNonce has already been used.

If the device continues to encounter the same problem after a reset, the underlying firmware should be checked. The recommended LoRaWAN behavior is for the device to maintain and increment its DevNonce rather than repeatedly starting from the same value. The Things Stack specifically recommends avoiding DevNonce reuse; its nonce-reset functionality is primarily intended for situations such as development and troubleshooting.

Technical background

Datacake's reset functionality corresponds to the Reset Join Nonces functionality provided by The Things Network.

At The Things Stack level, this can be enabled using the resets-join-nonces option for an end device. The Things Network documentation and community guidance note that enabling this allows previously used DevNonces to be accepted again.

Datacake exposes this functionality directly in the UI, so there is no need to configure or use The Things Stack CLI manually.

Last updated

Was this helpful?