> For the complete documentation index, see [llms.txt](https://docs.datacake.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datacake.de/device/configuration/reset-used-devnonces.md).

# 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:<br>

<figure><img src="https://2221155863-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LNA8_b8wmabHgJ0QXoJ%2Fuploads%2FqPndNjYn8dWm2MHFcCPC%2FScreenshot%202026-09-10%20at%2009.16.02.png?alt=media&amp;token=8af5d7b1-d96d-4ad8-97f8-c2a7bc087d34" alt=""><figcaption></figcaption></figure>

### 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.

{% hint style="warning" %}
Resetting DevNonces should generally only be used as a troubleshooting or development measure. LoRaWAN devices should normally maintain their DevNonce correctly and avoid reusing previous values.
{% endhint %}

<figure><img src="https://2221155863-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LNA8_b8wmabHgJ0QXoJ%2Fuploads%2FprsQvMlurM9CzkkMaWlw%2FScreenshot%202026-09-10%20at%2009.21.06.png?alt=media&amp;token=eec10418-b714-4d7a-91cf-4860880f63dd" alt=""><figcaption></figcaption></figure>

### 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.

{% hint style="warning" %}
Resetting the stored DevNonces does not change the DevNonce generated by the physical device. It only resets the network server's record of the nonces that have already been used. If the device continually resets its DevNonce counter, the issue should ultimately be corrected in the device firmware.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.datacake.de/device/configuration/reset-used-devnonces.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
