#mbed

STMicro DISCO-L072CZ-LRWAN1 quickstart with mbed-os

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.

I am assuming that you have already registered your device in your application in your TTN console:https://console.thethingsnetwork.org/applications/[your application name]/devices

1. Setup the GNU ARM embedded toolchain and install mbed-cli:

On a Windows 10 PC – just use the installer that you can download from here:mbed-cli installer

The Windows installer for Mbed CLI includes the following components:

Python – Mbed CLI is a Python script, so you need Python to use it. The installer installs version 2.7.13 of Python. It is not compatible with Python 3

Check the version of mbed-cli and that it is installed OK – version should be =>1.8.2mbed-cli --versionCheck the install location of arm-none-eabi-gcc withwhich arm-none-eabi-gccSet path for mbedmbed config -G GCC_ARM_PATH "/usr/local/bin"