Validate dev-nonce error, but it persists

Hello,

I encountered a problem, the first time I set up my nodes, it worked fine. But I had to delete it and set it up again. But I had a “validate dev-nonce error”. After some researches on this forum, I found that deleting the row linked to my device in the table “device_activation” of the chirpstack_ns db would be a solution. But in my case, the error persists.

Have you guys got any thoughts?

During joining, the device is supposed to generate a unique nonce value, to prevent MITM replay attacks. This nonce cannot be reused. Perhaps your device is reusing nonces? If it happens by chance (i.e. the nonce is random), then it should succeed during subsequent attempts. If it always happens, perhaps you need to examine whether the device is actually not compliant with LoRaWAN in this area.

Thank you for your answer, but I found where was my problem. I am programming on an ESP32 with LoRaWAN, and, in order to save power, I was changing the MCU Frequency following the tasks of the ESP32. But, as a part of the devnonce is randomly generated, when the MCU frequency changes, it would change somthing in the random nonce (like the lenght maybe) that create the problem. The way to fix it is very simple, just keep a constant MCU Frequency.