在Lora Basics™调制解调器内新的和功能增强的Lorawan®堆栈的可用性之后,Semtech已决定将Loramac节点转换为维护模式(仍然支持关键的错误修复程序)。
LORA BASICS™调制解调器是实现新Lorawan功能(IE Relay,CSMA)的平台,并将支持Lora Alliance引入的未来改进(例如Lorawan 1.2)。虽然以前引入了Loramac节点堆栈过渡到维护模式,Semtech建议客户使用Lora Basics™调制解调器进行新设计。
该项目的目的是展示最终设备洛万堆栈实现的示例。
该项目有2个主动分支。
| 分支 | L2规格 | RP规格 | 标签/里程碑 | 班级 | 评论 |
|---|---|---|---|---|---|
| 1.0.4 / 1.1.0 + fcntdwn errata | 2-1.0.3 | v4.7.0 | a/b/c | Lorawan L2 1.0.4-发布 | |
| 掌握 | 1.0.4 / 1.1.0 + fcntdwn errata | 2-1.0.3 | v4.7.0 | a/b/c | Lorawan L2 1.0.4 / 1.1.0 |
| v5.0.0分支 | 1.0.4 / 1.1.0 + fcntdwn errata | 2-1.0.3 | M 5.0.0 | a/b/c | Lorawan L2 1.0.4 / 1.1.0-增加了对LR -FHSS调制的支持 |
该项目完全实现了ClassA,ClassB和ClassC终端设备类,并且还提供SX1272/73,SX1276/77/78/79,SX1261/2和LR1110无线电驱动程序。
对于当前支持的平台示例应用程序。
Loramac/Fuota-Test-01 :Fuota测试方案01端设备示例应用程序。 (基于提供的应用程序公共软件包)
loramac/odecit-uplink-lpp :classa/b/c终端设备示例应用程序。定期使用Cayenne LPP协议上链接框架。 (基于提供的应用程序公共软件包)
ping-pong :点到点RF链接示例应用程序。
RX-SENSI :示例应用程序,可用于使用RF发生器测量无线电灵敏度级别。
TX-CW :示例应用程序以显示如何生成RF连续波传输。
注意:每个Lorawan应用程序示例(Loramac/*)包括实现Lora-Alliance; Lorawan认证协议。
注意: Lorawan堆栈API文档可以在以下网址找到:http://stackforce.github.io/loramac-doc/
该项目目前为以下平台提供支持。
该项目可以使用与当前支持的项目不同的MCU移植到其他平台。
移植指南文档提供了有关如何将项目移植到其他平台的指南。
Namote72
Nucleolxxx-发现套件
SKIM880B,SKIM980A,SKIM881AXL
SAMR34
请遵循开发环境文件提供的说明。
从github克隆存储库
$ git clone https://github.com/lora-net/loramac-node.git loramac-nodeLoramac节点项目包含必须初始化的git子模块
$ cd loramac-node
$ git submodule update --init该项目目前支持3个不同的安全元素soft-se , lr1110-se和atecc608a-tnglora-se实现。
为了用lorawan euis或/and/and aes128键个性化MCU二进制文件,必须遵循Soft-SE,LR1110-SE和ATECC608A-TNGLORA-SE提供的说明
Soft-SE是安全元素的纯软件仿真。这意味着一切都位于主机MCU记忆中。 DevEUI , JoinEUI和AES128 keys可以通过专用的API存储在非易失性内存上。
为了更新最终设备身份( DevEUI , JoinEUI和AES128 keys ),必须更新位于./src/peripherals/soft-se/ Directory下的位于./src/peripherals/soft-se/目录下的se-identity.h文件。
注意:在此项目的先前版本中,这是在每个提供的示例目录下的Commissioning.h文件中完成的。
LR1110-SE抽象实施处理与LR1110无线电加密引擎所需的所有交换。
所有LR1110无线电芯片都是从工厂中预先提供的,以便与Lora Cloud Device Join Service一起使用。
如果使用其他连接服务器,则可以通过按照LR1110用户手册的“13。LR1110PROFISIONIT”的说明来更新DevEUI , Pin , JoinEUI和AES128 keys 。
当编译选项SECURE_ELEMENT_PRE_PROVISIONED设置为LR1110-SE ON ,将使用工厂提供的数据( DevEUI , JoinEUI和AES128 keys )。
当编译选项SECURE_ELEMENT_PRE_PROVISIONED设置为OFF LR1110-SE时,必须按照LR1110用户手册的“13。LR1110配置”中所述的一种方法来提供。可以通过编辑位于./src/peripherals/lr1110-se/ Directory中的se-identity.h文件来更改DevEUI , Pin和JoinEUI 。
ATECC608A-TNGLORA-SE抽象实现将处理与ATECC608A-TNGLORA和ATECC608B-TNGLORA安全元素的所有所需交易所。
此安全性元素始终是预处理的,其内容无法更改。
具有LR1110MB1DIS MBED SHIELD和使用LR1110预处理的安全元素的Nucleol476平台的周期性uplink-lpp示例
$ mkdir build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Release
-DTOOLCHAIN_PREFIX= " <replace by toolchain path> "
-DCMAKE_TOOLCHAIN_FILE= " ../cmake/toolchain-arm-none-eabi.cmake "
-DAPPLICATION= " LoRaMac "
-DSUB_PROJECT= " periodic-uplink-lpp "
-DCLASSB_ENABLED= " ON "
-DACTIVE_REGION= " LORAMAC_REGION_EU868 "
-DREGION_EU868= " ON "
-DREGION_US915= " OFF "
-DREGION_CN779= " OFF "
-DREGION_EU433= " OFF "
-DREGION_AU915= " OFF "
-DREGION_AS923= " OFF "
-DREGION_CN470= " OFF "
-DREGION_KR920= " OFF "
-DREGION_IN865= " OFF "
-DREGION_RU864= " OFF "
-DBOARD= " NucleoL476 "
-DMBED_RADIO_SHIELD= " LR1110MB1XXS "
-DSECURE_ELEMENT= " LR1110_SE "
-DSECURE_ELEMENT_PRE_PROVISIONED= " ON "
-DUSE_RADIO_DEBUG= " ON " ..
$ make使用lora调制核酚476平台的ping-pong示例,使用LR1110MB1DIS MBED SHIELD
$ mkdir build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Release
-DTOOLCHAIN_PREFIX= " <replace by toolchain path> "
-DCMAKE_TOOLCHAIN_FILE= " ../cmake/toolchain-arm-none-eabi.cmake "
-DAPPLICATION= " ping-pong "
-DMODULATION: " LORA "
-DREGION_EU868= " ON "
-DREGION_US915= " OFF "
-DREGION_CN779= " OFF "
-DREGION_EU433= " OFF "
-DREGION_AU915= " OFF "
-DREGION_AS923= " OFF "
-DREGION_CN470= " OFF "
-DREGION_KR920= " OFF "
-DREGION_IN865= " OFF "
-DREGION_RU864= " OFF "
-DBOARD= " NucleoL476 "
-DMBED_RADIO_SHIELD= " LR1110MB1XXS "
-DUSE_RADIO_DEBUG= " ON " ..
$ make具有LR1110MB1DIS MBED SHIELD和使用LR1110预处理的安全元素的Nucleol476平台的周期性uplink-lpp示例
// Place your settings in this file to overwrite default and user settings.
{
"cmake.configureSettings" : {
// In case your GNU ARM-Toolchain is not installed under the default
// path:
// Windows : No default path. Specify the path where the
// toolchain is installed. i.e:
// "C:/PROGRA~2/GNUTOO~1/92019-~1".
// Linux : /usr
// OSX : /usr/local
// It is required to uncomment and to fill the following line.
"TOOLCHAIN_PREFIX" : " /path/to/toolchain " ,
// In case your OpenOCD is not installed under the default path:
// Windows : C:/openocd/bin/openocd.exe
// Linux : /usr/bin/openocd
// OSX : /usr/local/bin/openocd
// Please uncomment the following line and fill it accordingly.
//"OPENOCD_BIN":"C:/openocd/bin/openocd.exe",
// Specifies the path to the CMAKE toolchain file.
"CMAKE_TOOLCHAIN_FILE" : " cmake/toolchain-arm-none-eabi.cmake " ,
// Determines the application. You can choose between:
// LoRaMac (Default), ping-pong, rx-sensi, tx-cw.
"APPLICATION" : " LoRaMac " ,
// Select LoRaMac sub project. You can choose between:
// periodic-uplink-lpp, fuota-test-01.
"SUB_PROJECT" : " periodic-uplink-lpp " ,
// Switch for Class B support of LoRaMac:
"CLASSB_ENABLED" : " ON " ,
// Select the active region for which the stack will be initialized.
// You can choose between:
// LORAMAC_REGION_EU868, LORAMAC_REGION_US915, ..
"ACTIVE_REGION" : " LORAMAC_REGION_EU868 " ,
// Select the type of modulation, applicable to the ping-pong or
// rx-sensi applications. You can choose between:
// LORA or FSK
"MODULATION" : " LORA " ,
// Target board, the following boards are supported:
// NAMote72, NucleoL073 (Default), NucleoL152, NucleoL476, SAMR34, SKiM880B, SKiM980A, SKiM881AXL, B-L072Z-LRWAN1.
"BOARD" : " NucleoL476 " ,
// MBED Radio shield selection. (Applies only to Nucleo platforms)
// The following shields are supported:
// SX1272MB2DAS, SX1276MB1LAS, SX1276MB1MAS, SX1261MBXBAS(Default), SX1262MBXCAS, SX1262MBXDAS, LR1110MB1XXS.
"MBED_RADIO_SHIELD" : " LR1110MB1XXS " ,
// Secure element type selection the following are supported
// SOFT_SE(Default), LR1110_SE, ATECC608A_TNGLORA_SE
"SECURE_ELEMENT" : " LR1110_SE " ,
// Secure element is pre-provisioned
"SECURE_ELEMENT_PRE_PROVISIONED" : " ON " ,
// Region support activation, Select the ones you want to support.
// By default only REGION_EU868 support is enabled.
"REGION_EU868" : " ON " ,
"REGION_US915" : " OFF " ,
"REGION_CN779" : " OFF " ,
"REGION_EU433" : " OFF " ,
"REGION_AU915" : " OFF " ,
"REGION_AS923" : " OFF " ,
"REGION_CN470" : " OFF " ,
"REGION_KR920" : " OFF " ,
"REGION_IN865" : " OFF " ,
"REGION_RU864" : " OFF " ,
"USE_RADIO_DEBUG" : " ON "
}
}

./build/src/apps/LoRaMac/下提供使用lora调制核酚476平台的ping-pong示例,使用LR1110MB1DIS MBED SHIELD
// Place your settings in this file to overwrite default and user settings.
{
"cmake.configureSettings" : {
// In case your GNU ARM-Toolchain is not installed under the default
// path:
// Windows : No default path. Specify the path where the
// toolchain is installed. i.e:
// "C:/PROGRA~2/GNUTOO~1/92019-~1".
// Linux : /usr
// OSX : /usr/local
// It is required to uncomment and to fill the following line.
"TOOLCHAIN_PREFIX" : " /path/to/toolchain " ,
// In case your OpenOCD is not installed under the default path:
// Windows : C:/openocd/bin/openocd.exe
// Linux : /usr/bin/openocd
// OSX : /usr/local/bin/openocd
// Please uncomment the following line and fill it accordingly.
//"OPENOCD_BIN":"C:/openocd/bin/openocd.exe",
// Specifies the path to the CMAKE toolchain file.
"CMAKE_TOOLCHAIN_FILE" : " cmake/toolchain-arm-none-eabi.cmake " ,
// Determines the application. You can choose between:
// LoRaMac (Default), ping-pong, rx-sensi, tx-cw.
"APPLICATION" : " ping-pong " ,
// Select LoRaMac sub project. You can choose between:
// periodic-uplink-lpp, fuota-test-01.
"SUB_PROJECT" : " periodic-uplink-lpp " ,
// Switch for Class B support of LoRaMac:
"CLASSB_ENABLED" : " ON " ,
// Select the active region for which the stack will be initialized.
// You can choose between:
// LORAMAC_REGION_EU868, LORAMAC_REGION_US915, ..
"ACTIVE_REGION" : " LORAMAC_REGION_EU868 " ,
// Select the type of modulation, applicable to the ping-pong or
// rx-sensi applications. You can choose between:
// LORA or FSK
"MODULATION" : " LORA " ,
// Target board, the following boards are supported:
// NAMote72, NucleoL073 (Default), NucleoL152, NucleoL476, SAMR34, SKiM880B, SKiM980A, SKiM881AXL, B-L072Z-LRWAN1.
"BOARD" : " NucleoL476 " ,
// MBED Radio shield selection. (Applies only to Nucleo platforms)
// The following shields are supported:
// SX1272MB2DAS, SX1276MB1LAS, SX1276MB1MAS, SX1261MBXBAS(Default), SX1262MBXCAS, SX1262MBXDAS, LR1110MB1XXS.
"MBED_RADIO_SHIELD" : " SX1261MBXBAS " ,
// Secure element type selection the following are supported
// SOFT_SE(Default), LR1110_SE, ATECC608A_TNGLORA_SE
"SECURE_ELEMENT" : " SOFT_SE " ,
// Secure element is pre-provisioned
"SECURE_ELEMENT_PRE_PROVISIONED" : " ON " ,
// Region support activation, Select the ones you want to support.
// By default only REGION_EU868 support is enabled.
"REGION_EU868" : " ON " ,
"REGION_US915" : " OFF " ,
"REGION_CN779" : " OFF " ,
"REGION_EU433" : " OFF " ,
"REGION_AU915" : " OFF " ,
"REGION_AS923" : " OFF " ,
"REGION_CN470" : " OFF " ,
"REGION_KR920" : " OFF " ,
"REGION_IN865" : " OFF " ,
"REGION_RU864" : " OFF " ,
"USE_RADIO_DEBUG" : " ON "
}
}

./build/src/apps/ping-pong/下可用periodic-uplink-lpp和fuota-test-01示例允许通过串行接口重置NVM存储。
为了重置NVM内容,必须在串行终端上击中ESC + N键盘键。
串行终端将显示ESC + N键盘密钥后的以下内容。重置端设备后,将使用干净的NVM。
ESC + N
NVM factory reset succeed
PLEASE RESET THE END-DEVICE