LoRaWAN DevEUI,AppEUI和AppKey

时间:2019-01-08 17:39:06

标签: id lora lorawan

我正在尝试从LoRaWAN 1.2 specification了解三个神奇的LoRaWAN ID。我的理解是:

  • DevEUI就像一个MAC地址
  • AppKey就像一个公钥(大概...)
  • AppEUI就像一个端口号

现在我在理解负责创建这些ID时遇到问题:

  • DevEUI可以从LoRa芯片内部ID寄存器生成(我正在使用Murata的ABZ型芯片)
  • AppKey:每个终端节点是否应该唯一?我应该从LoRaWAN提供商(例如Objenious)中随机选择还是要问一个?
  • AppEUI:每个端节点都应该公用(我想应该是)?我应该随机选择一个,还是向LoRaWAN提供商询问?

2 个答案:

答案 0 :(得分:2)

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 EUI64. For MAC address with 6 bytes (e.g. 01 02 03 04 05 06) put ff fe or 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 AppKey secret. Which side of the communication channel creates it is not important. You simply want to be sure that it is random.

答案 1 :(得分:2)

DevEUI 是IEEE EUI64地址空间中的全局终端设备ID,用于唯一标识终端设备。

  

用户可以导出自己的DevEUI

AppKey 是特定于终端设备的AES128根密钥。每当终端设备通过空中激活(OAT)加入网络时, AppKey 用于导出特定于该终端设备的会话密钥NwkSKeyAppSKey进行加密并验证网络通信和应用程序数据。

  

每个设备的AppKey应该唯一。用户可以派生自己的AppKey

AppEUI 是IEEE EUI64地址空间中的全局应用程序ID,用于唯一标识能够处理JoinReq帧的实体。 AppEUI 在执行激活过程之前已存储在终端设备中

  

每个设备的AppEUI可以不同,也可以对于所有设备相同。这也取决于您使用的是哪种类型的应用服务器。
  例如,在 loraserver.io 中,您可以拥有唯一的AppKey,AppEUI和DevEUI,但是在 TheThingsNetwork 中,您可以为一个应用程序或AppEUI注册许多设备。但是请注意,AppKey和DevEUI对于每个终端节点应该始终是唯一的。

screenshot of Device overview in TheThingNetwork