在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