GithubHelp home page GithubHelp logo

isabella232 / swsd001 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lora-net/swsd001

0.0 0.0 0.0 2.88 MB

LoRa Basics Modem SDK

C 97.15% Makefile 0.20% Python 0.01% HTML 0.11% Assembly 2.53% Shell 0.01%

swsd001's Introduction

LoRa Basics Modem SDK

The LoRa Basics modem SDK contains several simple examples highlighting LoRa Basic Modem features.

There are also two demonstrations explaining how direct access to the transceiver can be interleaved while LoRa Basics modem is running. The two demonstrations are based on the geolocation features offered by the LR1110 transceiver: Wi-Fi and GNSS scanning.

Examples

Name Description Documentation
Almanac update Perform a partial almanac update README
DM information Configure periodic DM message reports and trigger asynchronous report README
Geolocation - GNSS Perform GNSS scans interleaved with LoRaWAN operations README
Geolocation - Wi-Fi Perform Wi-Fi scans interleaved with LoRaWAN operations README
Large file upload Transfer a file (up to 2048 byte long) to LoRa Cloud README
LoRaWAN Send data on a periodic basis README
LoRaWAN asynchronous React on an asynchronous event - a putton press here - and send data README
Stream Send data as a stream to LoRa Cloud README
Time synchronization Get time from the network server or from LoRa Cloud README

Configuration

Each example has its own set of parameters - see apps/<example>/main_<example>.h.

There is also a common configuration file where LoRaWAN parameters can be set:

  • DevEUI
  • JoinEUI
  • AppKey
  • Class
  • Region

Requirements

Supported platforms

LoRa Basics Modem is platform independant and can be used with any MCU that fulfills the requirements.

This SDK is developed on the following hardware:

Toolchain

Examples can be compiled with either Keil MDK ARM or GNU Arm Embedded toolchain.

Firmware

The LoRa Basics Modem library requires the LR1110 runs the transceiver firmware version 0x0307 (available here).

To update the transceiver with the desired firmware version, please use the updater tool application.

Getting started

Configure

Before starting to build an example, check the parameters in the common configuration file. Make sure that the LoRaWAN configuration is consistent with what is configured in your network server and in your LoRa Cloud account.

Parameters can be seen in the debug output.

Build

Keil MDK ARM

Each example is delivered with a Keil project file - see apps/MDK-ARM/lbm_example_<example>.uvprojx. For instance, the Keil poject file for the LoRaWAN example is available in $SDK_FOLDER/apps/lorawan/MDK-ARM/lbm_example_lorawan.uvprojx.

Launch Keil IDE, open the project file and compile it.

Each project has 3 targets (Keil manual), each one allowing to chose how cryptographic operations are performed and where the LoRaWAN parameters are:

Target name Cryptographic operations LoRaWAN parameters
<example>_crypto_sw Software User-defined
<example>_crypto_lr1110 LR1110 cryptographic engine User-defined
<example>_crypto_lr1110_with_credentials LR1110 cryptographic engine LR1110-based

GNU Arm embedded toolchain

Examples are built from their respective subfolder in the apps directory. For instance, the makefile for the LoRaWAN example is available in $SDK_FOLDER/apps/lorawan/makefile/Makefile.

Build settings, compile time and configuration options are specified in the project's Makefile.

To build a project, simply run make

$ cd $SDK_FOLDER/apps/lorawan/makefile
$ make

The output files of the build process are stored in the build folder with firmware binary file having the same name as the project with a .bin extension.

It is possible to choose the cryptographic mode with the CRYPTO variable:

CRYPTO value Cryptographic operations LoRaWAN parameters
SOFT Software User-defined
LR1110 LR1110 cryptographic engine User-defined
LR1110_WITH_CREDENTIALS LR1110 cryptographic engine LR1110-based

For instance, to build the project lorawan with software-based cryptographic operations and user-defined LoRaWAN parameters:

To build a project, simply run make

$ cd $SDK_FOLDER/apps/lorawan/makefile
$ make CRYPTO=SOFT

The default value for all examples is set to LR1110, except for geolocation examples (geolocation_gnss and geolocation_wifi) where the CRYPTO value is set to SOFT.

Load

After a project is built, it can be loaded onto a device.

There are multiple ways to do it:

  • Drag and drop the binary file to the USB drive liste by our OS - usually shows up as NODE_L476RG.
  • Load it through the Keil IDE

View debug output

On the NUCLEO-L476RG development board, the firmware prints debug information to the UART that is connected via the ST-LINK to the host computer. The configuration is 921600/8-N-1:

  • On Linux, this device usually shows up as /dev/ttyACM0
  • On Windows, the port can be obtained from the device manager

For instance, using stty on Linux:

$ stty -echo raw speed 921600 < /dev/ttyACM0 && cat /dev/ttyACM0

INFO: ###### ===== LoRa Basics Modem LoRaWAN Class A/C demo application ==== ######

INFO: LoRaWAN version: 01.00.04.01
INFO: LoRa Basics Modem version: 02.01.00
INFO: ###### ===== BASICS MODEM RESET EVENT ==== ######
Reset count : 95 
INFO: Application parameters:
INFO:   - LoRaWAN uplink Fport = 2
INFO:   - DM report interval   = 60
INFO:   - Confirmed uplink     = No
INFO: LoRaWAN parameters:
DevEUI - (8 bytes):
 00 16 C0 00 00 00 00 00
JoinEUI - (8 bytes):
 00 16 C0 01 FF FE 00 01
Class: A
Region: EU868

INFO: ###### ===== JOINED EVENT ==== ######

swsd001's People

Contributors

matthieuantoine avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.