Giter Site home page Giter Site logo

lmicpp-arduino's Introduction

LORAWAN Librairie for Arduino and SX1276 , SX1262 lora chip

  • Based on LMIC librairy.
  • Modified to get C++ style.
  • Only class A and C device (no class B)
  • Add some sleep of arduino board and ESP.
  • Add SX1262 chip

Limitation

This library try to comply with lorawan 1.0.3 but do not implement all feature. For example FSK datarate is not implemented.

For a more complete Lorawan library based on lmic, please have a look to https://github.com/mcci-catena/arduino-lmic

โš ๏ธ This library do not compile in Arduino IDE due to dependency to STL (ciband/avr_stl in case of AVR platform). It need PlatfomIO for the dependencies to be handle correctly.

For the SX1262 it only support board with TCXO.

AVR examples

Tested with Arduino Pro Mini and RFM95 on EU868 frequencies. Examples:

  • simple Minimal example, send one analog value.
  • balise Example, send one analog value with deepsleep using watchdog.
  • tempsensor Example, send temps reads from onewire with deepsleep using watchdog.

ESP32 examples

Tested with HelTec

  • esp32 Minimal example, send one value.
  • esp32-deepsleep Example, send one analog value with deepsleep using RTC and state save in RTC RAM.

RAK811

Usage

Work with platformio with Arduino framework.

Copy balise exemple in a new directory. Open with platformio (VSCODE with Platformio extension) In src directory create a file named lorakeys.h wich contain the keys declared in network (for exemple https://www.thethingsnetwork.org)

Exemple of file:

// Application in string format.
// For TTN issued EUIs the first bytes should be 70B3D5
constexpr char const appEui[] = "70B3D5XXXXXXXXXX";

// Device EUI in string format.
constexpr char const devEui[] = "XXXXXXXXXXXXXXXX";
// Application key in string format.
constexpr char const appKey[] = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";

Use define in platformio.ini build_flags to change activated part.

  • ENABLE_SAVE_RESTORE enable save and restore functions
  • LMIC_DEBUG_LEVEL set to 0,1 or 2 for different log levels (default value 1)

In main.cpp replace the content of do_send() with the data you want to send.

License

Most source files in this repository are made available under the Eclipse Public License v1.0. Some of the AES code is available under MIT like license. Refer to each individual source file for more details.

lmicpp-arduino's People

Contributors

ngraziano avatar marciolm 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.