"Wireless Made Easy!" - Microchip LoRaWAN Stack Opened for SAM R34 IC and WLR089U0 Module running on Microchip Studio IDE
Devices: | ATSAMR34 | WLR089U0
THE SOFTWARE ARE PROVIDED "AS IS" AND GIVE A PATH FOR SELF-SUPPORT AND SELF-MAINTENANCE.
This repository contains unsupported example code intended to help accelerate client product development. It is not validated for production nor audited for security best-practices.
Note that while this repository is unsupported, Microchip welcome community contributions, and all pull-requests will be considered for inclusion into the repository.
Interact with peers in the community at LoRa Forum.
- SAMR34/35 and WLR089U Landing page
- SAMR34 Device page
- SAMR34 Xplained Pro Evaluation Kit
- WLR089U0 Module page
- WLR089U0 Module Xplained Pro Evaluation Kit
- Microchip Studio 7.0 IDE
Clone/Download the current repo to get the package.
- Introduction
- Hardware Platforms
- Software Requirements
- LoRaWAN Certification Test Tool
- Package Overview
- Sample Applications
The Microchip LoRaWAN™ Stack (MLS) provides a solution for the LoRaWAN end-device that is used for Internet of Things (IoT) applications.
LoRa® is a wireless modulation technique designed to allow low-power end-devices to communicate over long range and at low data rates.
LoRaWAN is a wireless networking protocol which operates over LoRa communication layer and acts as Medium Access Control (MAC) layer.
LoRaWAN specification and its development is overseen by LoRa Alliance™. The specification is meant for secure communication of end-devices and ensures inter-operability within the LoRa network.
Microchip LoRaWAN Stack is Opened for SAM R34 IC and WLR089U0 Module where MAC and Radio layers are both provided as source code for self-support and self-maintenance.
MLS v1_0_P_6 release is pre-tested against LoRaWAN 1.0.4 Class A using official LoRa Alliance Test Tool (LCTT).
- Purchase the SAM R34 Xplained Pro Evaluation Kit
- Purchase the WLR089U0 Xplained Pro Evaluation Kit
-
Purchase a LoRa Gateway
-
If using a Join Server with security solution for LoRaWAN, a pre-provisioned ATECC608 secure element is required. Purchase the Trust&GO secure element ATECC608B-TNGLORA for TTI Join Server or the ATECC608B-TNGACT for Actility Join Server and the CryptoAuthentication Socket Kit
Note: The following Atmel Studio tools needs to be uninstalled before installation of Microchip Studio 7.0.2542 version. Otherwise, you may face error while loading the projects.
- Atmel Driver Files
- Atmel LibUSB0 Driver(x64)
- Atmel Segger USB Drivers(501e)
- Atmel WinUSB
- A LoRa Network Server access
The LoRa Alliance® has developed a LoRaWAN® Certification Test Tool (LCTT) for all LoRa Alliance® device manufacturers to pre-test their devices before sending them to the Authorised Test Houses (ATHs) for formal LoRaWAN® Certification testing.
The LoRaWAN® certification tests for end node functionality, in other words it tests that node’s LoRaWAN protocol stack and application are compliant with the LoRaWAN specification.
Checkout the LoRa Alliance for more details.
The present software has been PRE-TESTED against the LoRaWAN® L2 Specification 1.0.4 (Class A only) for the following regions:
- EU863-870
- US902-928
- LCTT version: LCTT v3.1.0_D1 | GUI v1.10.0
- Gateway(s) used for EU campaign (OTAA, ABP): Picocell GW and Semtech GW (Picocell GW for all tests except SF12 steps)
- Gateway(s) used for NA campaign (OTAA, ABP): Picocell GW
- SAMR34 Xplained Pro Rev 4
- WLR089U0 Xplained Pro Rev A/01
- All testing have been done in Application mode using the LoRaWAN Mote Application since the LoRaWAN 1.0.4 test specification elaborated and standardised the command communication between the test Network Server and the test End Device.
For reference, checkout the folder
MLS_SDK_1_0_P_6_Release/LCTT_TestReports
and get access to the test reports.
The Microchip LoRaWAN Stack contains:
- A Microchip Studio 7.0 project, which provides a reference application
- The LoRaWAN stack components in a source code
- Drivers, software timer, PDS, PMM and radio drivers for the LoRaWAN stack
- The facility to support dynamic regional band switching within the supported bands
The package also contains the Migration Guide which provide all the information requested to migrate the MLS LoRaWAN applications implemented on MLS_SDK_1_0_P_5 available in SAM platforms (SAMR34, WLR) to MLS_SDK_1_0_P_6. The improvements and bugfixes are listed as well as the MLS API changes.
MLS provides APIs for following software modules:
- LoRaWAN MAC Layer (MAC)
- LoRaWAN Radio Layer (TAL)
- Persistent Data Server (PDS)
- Power Manager Module (PMM)
- Hardware Abstraction Layer (HAL)
The APIs and the stack attributes are described in the SAM R34-R35 Microchip LoRaWAN Stack Software API Reference Manual.
The following table provides the directory structure of the LoRaWAN stack code base (src/ASF/thirdparty/wireless/lorawan
).
Directory | Description |
---|---|
/hal |
Contains the implementation for the radio hardware interface, timers, etc |
/mac |
Contains the headers and sources of the LoRaWAN MAC layer specification independent of regional parameters |
/pmm |
Contains the Power Management Module (PMM) |
/regparams |
Contains the implementation of the MAC layer functionality specific to the regional bands |
/sal |
Contains the Security Abstraction Layer (SAL) |
/services |
Contains modules scuh as software timer, PDS and AES |
/sys |
Contains system modules such as task manager, power management and initialization |
/tal |
Contains transceiver related headers and sources, drivers for supported transceivers |
Application | Target | Location |
---|---|---|
EndDevice_Demo | SAMR34 Xplained Pro | MLS_SDK_1_0_P_6_Release/Enddevice_Demo/enddevice_demo_src_multiband_samr34_xpro |
EndDevice_Demo | WLR089U0 Xplained Pro | MLS_SDK_1_0_P_6_Release/Enddevice_Demo/enddevice_demo_src_multiband_wlr089_xpro |
The EndDevice_Demo application provides configuration for the application in src/config/conf_app.h
where it is possible to configure the following parameters:
- Sub band number
- Activation methods (OTAA or ABP)
- Type of transmission (confirmed or unconfirmed message)
- Application port number (Fport 1-255)
- Device Class (A or C)
- Type of join Nonce (incremental or random)
- Join parameters (OTAA or ABP)
- Multicast parameters
- Sleep duration in milliseconds
- Periodic timer duration in milliseconds (used for periodic transmission option)
Note #1: In SAM R34 project, the macro
EDBG_EUI_READ=1
is set by default in the symbols definition. This configuration can be use with SAM R34 Xplained Pro evaluation kit in order to use the EDBG EUI as DEVEUI key for Over-The-Air Join process. With a custom board which embed the SAM R34 IC, disable the macroEDBG_EUI_READ=0
and fill your own DEVEUI key in the definition ofDEMO_DEVICE_EUI
located in the filesrc/config/conf_app.h
.
Note #2: In WLR089U0 project, the macro
MODULE_EUI_READ=1
is set by default in the symbols definition. This configuration can be use either with WLR089U0 Xplained Pro evaluation kit or with custom board.
Checkout the SAM R34 MLS Getting Started Guide to get details on the application configuration and how to flash and run the project.
Application | Target | Location |
---|---|---|
EndDevice_Demo_ecc608 | SAMR34 Xplained Pro | MLS_SDK_1_0_P_6_Release/Enddevice_Demo/enddevice_demo_src_multiband_ecc608_samr34_xpro |
EndDevice_Demo_ecc608 | WLR089U0 Xplained Pro | MLS_SDK_1_0_P_6_Release/Enddevice_Demo/enddevice_demo_src_multiband_ecc608_wlr089_xpro |
Use the present software and refer to the following resources to get more details :
- Develop with the SAM R34 LoRa SiP and WLR089U0 Module with Microchip LoRaWAN stack on TTI join server
- Secure Authentication with SAMR34 & ATECC608 and The Things Industries’s Join Server
Application | Target | Location |
---|---|---|
Parser | SAMR34 Xplained Pro | RN Command Parser |
Parser | WLR089U0 Xplained Pro | RN Command Parser |
Checkout the instructions and get the latest software from the RN Command Parser repository.
Application | Target | Location |
---|---|---|
Parser_ECC608 | SAMR34 Xplained Pro | RN Command Parser + ATECC608B_TNG |
Parser_ECC608 | WLR089U0 Xplained Pro | RN Command Parser + ATECC608B_TNG |
Checkout the instructions and get the latest software from the RN Command Parser repository.