CubeCell-Arduino icon indicating copy to clipboard operation
CubeCell-Arduino copied to clipboard

Questions: JOIN nonce how is it generated?

Open OstertagM opened this issue 6 years ago • 2 comments

I have a question: How is the join nonce generated? Is it a being “new” after reset and not a value that was previously used or just inkremented?

OstertagM avatar Dec 30 '19 20:12 OstertagM

This document may make sense to you: http://www.techplayon.com/lora-device-activation-call-flow-join-procedure-using-otaa-and-abp/

The join nonce will be new after reset.

Heltec-Aaron-Lee avatar Mar 06 '20 10:03 Heltec-Aaron-Lee

The DevNonce is a counter starting from 0 when the device is initially powered up and incremented with every Join-request by End Device. A DevNonce value shall never be reused for a given AppEUI value. If the End Device can be power-cycled then DevNonce shall be persistent (stored in a non-volatile memory). Resetting DevNonce without changing AppEUI will cause the Network Server to discard the Join-requests of the device For each end-device, the Network Server keeps track of the last DevNonce value used by the end-device, and ignores Join-requests if DevNonce is not incremented.

How to be sure that this is unique and generated once? That was the question! So that could case the join problems. Where can get this value and information what was used in past for this AppEUI? Is there any access to the DevNonce variable? I would like to store this external and compare this old ones to avoid above.

OstertagM avatar Mar 06 '20 11:03 OstertagM