Onboarding Devices via QR-Code

Hi everyone,

I have a question regarding the onboarding process of an end-devices into ttn.
Often LoraWan devices( from the LoraWan-Alliance) have a QR-Code on them to simplfy the onboarding process.

Taken from here: https://lora-alliance.org/wp-content/uploads/2020/11/TR005_LoRaWAN_Device_Identification_QR_Codes.pdf

The QR-Code has at least the following information hidden inside:
JoinEUI (AppEUI),

So my Questions:
Isn’t the AppKey also required to register an EndDevice? From where do i get the AppKey if it is not stored inside the QR-Code? What am I missing?

Thank you,
Best regards
Marco, Dani

The AppKey is a large random number used for the encryption - both ends need to know it, but it’s not something that has to be generated by the manufacturer, so can be left to the stack to do when the device is provisioned.

As far as I know the QR code for on boarding relies on the manufacturer storing the combination of the DevEUI, JoinEUI and AppKey (and for LoRaWAN 1.1 NwkKey) on a globally available Join Server. This join server will be used during the join process to generate the session keys. The QR code can also have an OwnerToken which allows ‘claiming’ the device (proof of ownership).

By not having to manually enter the EUIs and keys mistakes should be prevented and because the keys don’t need to be shared in a readable format the process is more secure. (However it now depends on the owner of the Join Server providing the required functionality)

Thank you for replying. @descartes @kersing

However i’m still confused. My current understanding is that a device can only connect to ttn when the device is already registered on there and further the device needs to know the AppEUI,DeviceEUI and AppKey to be able to connect. So i have to “hardcode” these three AppEui,DevEui and AppKey into into flashmemory of the device. Any better solution is appreciated :slight_smile:

So how is the device able to connect to the ttn if it doesn’t know the AppKey in advance?

So you are saying the AppKey should also be included in the QR-Code? (according to the link i provided it isn’t)

Thanks for your help and your patience :slight_smile:

Please read again as I said nothing like that. The key(s) are stored on a Join server the manufacturer chooses. That server might be controlled by TTN or by another party. During join the information on that server will be used.

Sorry misread your first sentence. Thank you again for answering.