19

I'm trying to understand the three magic LoRaWAN IDs from the LoRaWAN 1.2 specification. My understanding is:

  • DevEUI is like a MAC address
  • AppKey is like a public key (roughly...)
  • AppEUI is like a port number

Now I'm having problem understanding who is responsible for creating these IDs:

  • DevEUI can be generated from the LoRa chip internal ID registers (I'm using Murata's type ABZ chip)
  • AppKey: should it be unique for each end node? Should I choose a random one or ask one from the LoRaWAN provider (e.g. Objenious)?
  • AppEUI: should be common to each end node (I guess it should)? Should I choose a random one or ask one from the LoRaWAN provider?

3 Answers 3

14

The DevEUI is an ID in the IEEE EUI64 address space used to identify a device. It is supplied by the device manufacturer. A deprecated algorithm exists to convert 48bit MAC addresses to EUI64. For MAC addresses with 6 bytes (e.g. 01 02 03 04 05 06) put ff fe in the middle (e.g. 01 02 03 ff fe 04 05 06). This algorithm has been deprecated as it may lead to collisions with other DevEUIs. During over the air activation a DevAddr is assigned to the device. This DevAddr is used in the LoRaWAN protocol afterwards. The DevEUI is sent unencrypted.

The JoinEUI (formerly called AppEUI) is a global application ID in the IEEE EUI64 address space identifying the join server during the over the air activation. For non-private networks it corresponds to a subdomain of joineuis.lora-alliance.org. This server name is used to find the IP address of the join server via DNS. This is described in LoRaWAN™ Back-End Interfaces v1.0.

AppKey is the encryption key used for messages during every over the air activation. After the activation the AppSKey is used. A listener knowing the AppKey can derive the AppSKey. So you want to keep the AppKey secret. Which side of the communication channel creates it is not important. You simply want to be sure that it is random.

5
  • Thanks. Who is generating the JoinEUI/AppEUI? Is it me or the LoRaWAN network provider? I heard I should ask for a kind of OUI range to IEEE for that...
    – Matthieu
    Jan 9, 2019 at 22:52
  • 1
    As the JoinEUI identifies the join server it can only be provided by the owner of the join server.
    – Xypron
    Jan 10, 2019 at 0:15
  • Ok, that's clear. So I should register to IEEE for the DevEUI or use the ID from the LoRa chip manufacturer?
    – Matthieu
    Jan 10, 2019 at 8:24
  • 1
    As the DevEui is not relevant for encryption and the one supplied by the manufacturer is globally unique I would stay with that one.
    – Xypron
    Jan 11, 2019 at 18:41
  • thanks for confirming that. As I now have enough rep to upvote, +1 from me :)
    – Matthieu
    Jan 14, 2019 at 10:03
8

The DevEUI is a global end device ID in IEEE EUI64 address space that uniquely identifies the end device.

The user can derive their own DevEUI

The AppKey is an AES128 root key specific to the end device. Whenever an end device joins a network via over the air activation(OAT), the AppKey is used to derive the session keys NwkSKey and AppSKey specific for that end device to encrypt and verify network communication and application data.

The AppKey should be unique for each device.The user can derive their own AppKey

The AppEUI is a global application ID in IEEE EUI64 address space that uniquely identifies the entity able to process the JoinReq frame. The AppEUI is stored in the end-device before the activation procedure is executed

The AppEUI can be different for each device or it can also be same for all device. It also depends on what kind of application server you are using.
For example in loraserver.io you can have unique AppKey,AppEUI and DevEUI but in TheThingsNetwork you can register many devices for one application or AppEUI. But note that AppKey and DevEUI should always be unique for each end node.

screenshot of Device overview in TheThingNetwork

1
  • I understand that the join server provides the AppEUI and that the end node device includes this in the join request. But if I buy a off the shelf LoRa device, how do I get the AppEUI into that device? Oct 17, 2019 at 8:59
0

You get the AppEUI into your LoRa device by including it in the sketch you upload into the device (eg murata or arduino with lora etc.)

2
  • Sure, but who tells you what to use as an AppEUI?
    – Matthieu
    Sep 27, 2022 at 13:38
  • The entity managing the join server has to setup the AppEUI in that server and provide it to you.
    – Xypron
    Jan 27 at 18:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.