/Seeed-LoRa-E5

LoRaWAN end node built from scratch using CubeMX for WLE5x in the LoRa-E5

Primary LanguageCOtherNOASSERTION

Seeed-LoRa-E5

LoRaWAN end node built from scratch using STM32CubeIDE/CubeMX for the LoRa-E5 WLE5x

UPDATE 9 May 2023: you are invited to test the FW1.3 branch, which is the result of letting STM32CubeIDE update to V1.3 FW. I haven't tested it yet but I expect it will work. If you do test it, please let me know and I'll merge it to master.

UPDATE 14 July 2022: I reviewed the V1.2FM merge, enabled LoRaWAN 1.0.4 support (including NV storage of devNonce) and tested in Class A, turning the red LED on and off. I apologize for the flurry of updates in master; future updates will be done properly in a branch.

NOTE: I did a quick merge of STM32WLxx V1.2 firmware support. Basic testing shows it works correctly but please let me know if you encounter any issues.

If you're looking for an RAK3172 version of this, have a look at https://github.com/danak6jq/RAK3172

Note: the project defaults to disabling SWD/probe pins and enabling low-power mode. For development with an ST/Link, I recommend enabling the debugger and disabling low-power mode.

image

This assumes a general familiarity with STM32CubeIDE and LoRaWAN concepts.

If you haven't used STM32CubeIDE before, I suggest doing a couple of smaller projects using ST Nucleo boards to familiarize yourself.

From the Seeed-Studio repo: Before starting

image

  • Before erasing the Seeed factory AT firmware, get the Device EUI. Connect a USB-C cable to the LoRa-E5, and send AT command AT+ID=DevEui to get your Device EUI:

image

  • Do not lose this Device EUI; it is unique for each LoRaWAN device. If you manage to lose the Device EUI, you are able to retrieve it by scanning the QR code on the LoRa-E5 chip using a generic QR code scanner.

Building the repo

  • Clone this repo onto a system with STM32CubeIDE, v1.7.0 or later. Using "Open Projects From Filesystem"

image

  • Locate and open the top-level directory of the cloned repo:

image

  • Modify your Device EUI, Application EUI, Application KEY and your LoRawan Region

  • Use Cube to reconfigure the project to your LoRaWAN commissioning parameters:

image

and

image

  • Save the IOC file and generate code when prompted:

image

image

  • Note that generating code overwrites many files; in particular, if you've selected Hybrid Mode to operate a in a sub-band, you need to check and correct the channel mask after generating code - example here is for US915 Sub-band 2:

image

  • Build project and program it into the LoRa-E5

image

image

Starting a new project

  • Use "Start a new project from an existing configuration file" and select "Seeed-LoRa-E5.ioc" in the repo

image

  • This creates a new "End client framework" project with no user code (such as contained in the repo code) included. You'll want to refer to the repo code and ST documentation for using their LoRaWAN stack.