GithubHelp home page GithubHelp logo

thesolarnomad / resin-ttn-gateway Goto Github PK

View Code? Open in Web Editor NEW
14.0 4.0 2.0 1.37 MB

The Things Network Gateway based on Raspberry Pi and resin.io

License: MIT License

Makefile 0.87% C 30.00% C++ 69.13%
lorawan lora resin-io resin raspberry-pi gateway sx1276 ttn network-gateway lorawan-gateway

resin-ttn-gateway's Introduction

Resin.io The Things Network Gateway based on Raspberry Pi

This uses a fork of the Single Channel LoRaWAN Gateway on a Raspberry Pi as described by Dragino on resin.io.

Overview

With resin.io you can easily manage multiple gateways on multiple devices remotely and use environment variables (see table at the end of the page) to control each of the device parameters.

Hardware

It uses a Raspberry Pi Model B+ V1.2 and

OR

Default pin mapping:

Dragino LoRa v 1.3 inAir9 Raspberry Pi WiringPi
3.3V 3.3V pin #1
ICSP GND GND pin #6
ICSP MISO MISO pin #21
ICSP MOSI MOSI pin #19
ICSP SCK SCK pin #23
Pin 10 NSS pin #22 6
DIO0 DIO0 pin #7 7
RESET RST pin #11 0

Examples

Rpi from top

RPi top

Rpi from side

both

RPi pin table

RPi pins

inAir9 layout

inAir9 pins

Arduino pin layout

Arduino pins

Dragino 1.3

Dragino 1.3 annotated

Environment variables for resin.io

Variable name Value More info
DIO_PIN 7 Optional. Defaults to 7 (WiringPi pin).
RST_PIN 0 Optional. Defaults to 0 (WiringPi pin).
SS_PIN 6 Optional. Defaults to 6 (WiringPi pin).
EMAIL_ADDRESS [email protected] Optional, empty by default.
FREQUENCY Depends on your location and chip Optional. In Hz. Defaults to 868100000
HOSTS Depends on your location Optional
LATITUDE Your latitude Optional. Float. Defaults to 0.0
LONGITUDE Your longitude Optional. Float. Defaults to 0.0
ALTITUDE Your altitude Optional. Integer. Defaults to 0

Example

resin.io interface

Client

You should be able to get most of the code from the instructables page (see link in the intro), however I needed to add

#define CFG_eu868 0
#define CFG_us915 1

and

LMIC_setupChannel(0, 916800000, DR_RANGE_MAP(DR_SF12, DR_SF7),  BAND_CENTI);

to my sketch to connect to it. You can then read the results from the TTN website (https://thethingsnetwork.org/api/v0/nodes/<DEVICEID>/).

resin-ttn-gateway's People

Contributors

jbaldwinroberts avatar joscha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

zum444 bvh-esl

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.