There is a great article on the ARM mbed website about their support of LoRaWAN.
Their code has improved a lot this year. Previously, it was a little tricky to work with – there is now a clean install available on github that can be built locally from the command line on Mac, Windows or linux. using the GNU ARM embedded toolchain and mbed-os.
I describe below a simple recipe to use this code with the STMicro DISCO-L072CZ-LRWAN1 evaluation board (pictured). The code can be simply adapted to run with the sx1272 mbed shield on STMicro Nucleo boards and there is also support for the RAKWireless RAK811 node.
1. Setup the GNU ARM embedded toolchain and install mbed-cli:
On a Mac – assuming python, git and brew are available:
brew update && brew upgrade
brew install gcc-arm-embedded
git clone https://github.com/ARMmbed/mbed-cli
python setup.py install
check the install location of arm-none-eabi-gcc with
should be /usr/local/bin, so set path for mbed
mbed config -G ARM_PATH "/usr/local/bin"
2. Pull the example code from the mbed github and create the local mbed-os environment in the folder
git clone https://github.com/ARMmbed/mbed-os-example-lorawan.git
mbed new .
3. Configure for your node
edit mbedapp.json to configure lora.device-eui, lora.application-eui, lora.application-key
4. compile and send to evaluation board (assumes there is only one ST-Link/Nucleo/DISCO board connected)
mbed compile -m DISCO_L072CZ_LRWAN1 -t GCC_ARM --flash
Any questions? Please get in touch…