Giter VIP home page Giter VIP logo

ttgo-lorawan-probe's Introduction

ttgo-lorawan-probe

LoRaWAN Probe This is a simple LoRaWAN probe that sends multiple messages at different datarates to test the range of a LoRaWAN network. It uses the GPS to get a location and sends this in the message. Supports TTGO T-Beam with Pycom Firmware and OLED display.

Instructions

  1. Create your app at TTN, use the following sample as payload formatter:
function decodeUplink(input) {
  var bytes = input.bytes;
  var port = input.fPort;
  var decoded = {};
  if(port == 1) {
    if(bytes.length == 10) {
      decoded.gpsfix = true;
      decoded.latitude = ((bytes[0]<<16)>>>0) + ((bytes[1]<<8)>>>0) + bytes[2];
      decoded.latitude = (decoded.latitude / 16777215.0 * 180) - 90;
      decoded.longitude = ((bytes[3]<<16)>>>0) + ((bytes[4]<<8)>>>0) + bytes[5];
      decoded.longitude = (decoded.longitude / 16777215.0 * 360) - 180;
      var altValue = ((bytes[6]<<8)>>>0) + bytes[7];
      var sign = bytes[6] & (1 << 7);
      if(sign){
        decoded.altitude = 0xFFFF0000 | altValue;
      }else{
        decoded.altitude = altValue;
      }
      decoded.hdop = bytes[8] / 10.0;
      decoded.sats = bytes[9];
    } 
  }
  if (decoded.latitude == -90) {
    decoded = {};
    decoded.gpsfix = false;
  }

  return {
      data: decoded
    };
}
  1. Create a device in your app
  2. Configure the device to use OTAA or ABP, ABP is better for testing range
  3. Configure an integration to store your received data together with network metrics (rssi and snr)
  4. Configure settings in lib/config.py, including your newly created device at TTN
  5. Push everything to the TTGO
  6. Wait for the messages to arrive at TTN
  7. Check the data in your integration and push it to TTN Mapper
  8. Use the data to create a map of the range of your network
  9. Profit!

ttgo-lorawan-probe's People

Contributors

nunomcruz avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

esteves25566

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.