Skip to content
LoRaWAN example application for Mbed OS using the ATECC608A-MAHTN-T secure element
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
media Initial commit Jan 30, 2019
.gitignore
.mbedignore Initial commit Jan 30, 2019
Cayenne-LPP.lib
DummySensor.h Initial commit Jan 30, 2019
Jenkinsfile
LICENSE
README.md
lora_radio_helper.h Initial commit Jan 30, 2019
main.cpp
mbed-cryptoauthlib.lib
mbed-lora-radio-drv.lib
mbed-os.lib
mbed_app.json
mbedtls_lora_config.h Initial commit Jan 30, 2019
trace_helper.cpp
trace_helper.h

README.md

Example LoRaWAN application with the ATECC608A-MAHTN-T

This is an Mbed OS LoRaWAN example application that uses the Microchip ATECC608A-MAHTN-T secure element for all cryptographic operations. The ATECC608A-MAHTN-T contains a secure identity, root keys compatible with LoRaWan 1.0.x and 1.1, and a crypto accelerator.

With the ATECC608A-MAHTN-T, you'll receive a file from Microchip. This file contains the unique identifiers for the ATECC608As and is cryptographically signed. Upload this file to the The Things Industries Join Server to claim the devices.

More information can be found in this blog post: Introducing hardware crypto for LoRaWAN.

Requirements

You'll need the following hardware:

Connect the CryptoAuthentication UDFN Socket Kit to the I2C_SDA and I2C_SCL pins on your development board. Connect the LoRa radio shield to the main SPI bus. If you use different pins, update mbed_app.json with the right configuration.

On the SAML21 Xplained Pro development board, connect the LoRa radio to EXT1, and the CryptoAuthentication UDFN Socket Kit to EXT3.

SAML21 Xplained Pro with LoRa radio and secure element

Getting started

This application can be built using Mbed CLI or the Mbed Online Compiler.

Importing the project

Mbed CLI

  1. Connect your development board to your computer.

  2. Import the application:

    $ mbed import https://github.com/armmbed/mbed-os-example-lorawan-atecc608a
    

Online Compiler

  1. Connect your development board to your computer.
  2. Open the Online Compiler.
  3. Click Import > Import from URL.
  4. Enter https://github.com/armmbed/mbed-os-example-lorawan-atecc608a

Setting credentials

You need to set your application EUI if you're using LoRaWAN 1.0.x. To set this EUIs, open main.cpp, and look for APP_EUI.

Setting the channel plan

This application is configured to use the EU868 channel plan. To override this, see Selecting a PHY in the official LoRaWAN example application.

Note that if you're using an 8-channel gateway in the US, you also need to set your frequency sub band. For instance, for The Things Network public network in the US, add:

            "lora.fsb-mask": "{0xFF00, 0x0000, 0x0000, 0x0000, 0x0002}",

Setting the LoRaWAN version

This application works with LoRaWAN 1.0.2, 1.0.3 and 1.1.1. To set the version, open mbed_app.json and override lora.version. The values supported are:

  • 0 - LoRaWAN 1.0.2
  • 1 - LoRaWAN 1.0.3
  • 10 - LoRaWAN 1.1.1

Compiling

You're now ready to compile and flash the application.

Mbed CLI

  1. Compile and flash the application:

    $ mbed compile -m auto -t GCC_ARM -f
    

Online Compiler

  1. Click Compile.
  2. A file downloads, drag-and-drop this file to your development board (it mounts as a USB mass storage device).

Seeing debug information

Attach a serial monitor on baud rate 115,200 to see debug information. For more information see Serial communication in the Mbed OS documentation.

Documentation

Full documentation of the application can be found in the offical Mbed OS LoRaWAN example and in the Mbed OS documentation, under LoRaWAN APIs and LoRaWAN architecture.

You can’t perform that action at this time.