Hi @lakindu, two tips that should resolve this problem;
- Make sure your device is registered as a LoRaWAN v1.1 device, as that is the version used by RadioLib. When you do that, you will also see a NwkKey appear. The key you used is not a valid OTAA key - it’s a key that is only used in a single session.
- The DevNonce error is because the newer versions of LoRaWAN require persistence, i.e. when the device restarts or is reflashed, it should still remember the Nonces. As the way persistence is handled varies greatly between platforms, these examples are not handled within RadioLib, but rather in the repository RadioLib-persistence, linked from the LoRaWAN examples folder in RadioLib.
And then a few more tips:
- You have asked many quite different questions over the last couple of weeks. I recommend sticking to one device/setup for a while and learn the basics on LW and the details on the stack (e.g. RadioLib) on that one device first.
- Please read all of the Learn section that is linked from the top of the page. Things like the Keys are explained there.
- Whenever asking specific questions, please include the code used. Makes it easier to find problems for us, less guesswork.