Home

Awesome

Single Channel LoRaWAN Gateway

This repository contains a proof-of-concept implementation of a single channel LoRaWAN gateway.

It has been tested on the Raspberry Pi platform, using a Semtech SX1272 transceiver (HopeRF RFM92W), and SX1276 (HopeRF RFM95W).

The code is for testing and development purposes only, and is not meant for production usage.

Part of the source has been copied from the Semtech Packet Forwarder (with permission).

Maintainer: Thomas Telkamp thomas@telkamp.eu

Was forked by @jlesech https://github.com/tftelkamp/single_chan_pkt_fwd to add json configuration file
then forked by @hallard https://github.com/hallard/single_chan_pkt_fwd

Added new Features

Raspberry PI pin mapping is as follow and pin number in file global_conf.json are WiringPi pin number (wPi colunm)

root@pi04 # gpio readall
+-----+-----+---------+--B Plus--+---------+-----+-----+
| BCM | wPi |   Name  | Physical | Name    | wPi | BCM |
+-----+-----+---------+----++----+---------+-----+-----+
|     |     |    3.3v |  1 || 2  | 5v      |     |     |
|   2 |   8 |   SDA.1 |  3 || 4  | 5V      |     |     |
|   3 |   9 |   SCL.1 |  5 || 6  | 0v      |     |     |
|   4 |   7 | GPIO. 7 |  7 || 8  | TxD     | 15  | 14  |
|     |     |      0v |  9 || 10 | RxD     | 16  | 15  |
|  17 |   0 | GPIO. 0 | 11 || 12 | GPIO. 1 | 1   | 18  |
|  27 |   2 | GPIO. 2 | 13 || 14 | 0v      |     |     |
|  22 |   3 | GPIO. 3 | 15 || 16 | GPIO. 4 | 4   | 23  |
|     |     |    3.3v | 17 || 18 | GPIO. 5 | 5   | 24  |
|  10 |  12 |    MOSI | 19 || 20 | 0v      |     |     |
|   9 |  13 |    MISO | 21 || 22 | GPIO. 6 | 6   | 25  |
|  11 |  14 |    SCLK | 23 || 24 | CE0     | 10  | 8   |
|     |     |      0v | 25 || 26 | CE1     | 11  | 7   |
|   0 |  30 |   SDA.0 | 27 || 28 | SCL.0   | 31  | 1   |
|   5 |  21 | GPIO.21 | 29 || 30 | 0v      |     |     |
|   6 |  22 | GPIO.22 | 31 || 32 | GPIO.26 | 26  | 12  |
|  13 |  23 | GPIO.23 | 33 || 34 | 0v      |     |     |
|  19 |  24 | GPIO.24 | 35 || 36 | GPIO.27 | 27  | 16  |
|  26 |  25 | GPIO.25 | 37 || 38 | GPIO.28 | 28  | 20  |
|     |     |      0v | 39 || 40 | GPIO.29 | 29  | 21  |
+-----+-----+---------+----++----+---------+-----+-----+
| BCM | wPi |   Name  | Physical | Name    | wPi | BCM |
+-----+-----+---------+--B Plus--+---------+-----+-----+
  "pin_nss": 6,
  "pin_dio0": 7,
  "pin_rst": 0
  "pin_nss": 8,
  "pin_dio0": 6,
  "pin_rst": 3,
  "pin_led1":4
Module-1 //have to check in my Pi
  "pin_nss": 10,
  "pin_dio0": 6,
  "pin_rst": 21,
  "pin_led1": 7

Module-2 //have to check in my Pi
  "pin_nss": 11,
  "pin_dio0": 27,
  "pin_rst": 22,
  "pin_led1": 1

Installation

Install dependencies as indicated in original README.md below then

cd /home/pi
git clone https://github.com/hallard/single_chan_pkt_fwd
make
sudo make install

To start service (should already be started at boot if you done make install and rebooted of course), stop service or look service status

systemctl start single_chan_pkt_fwd
systemctl stop single_chan_pkt_fwd
systemctl status single_chan_pkt_fwd

To see gateway log in real time

journalctl -f -u single_chan_pkt_fwd

Pictures

running daemon on Raspberry PI with LoRasPI shield

<img src="https://raw.githubusercontent.com/hallard/LoRasPI/master/images/LoRasPI-on-Pi.jpg" alt="LoRasPI plugged on PI">

Original README.md below

Features

Not (yet) supported:

Dependencies

Connections

SX127xRaspberry PI
3.3V 3.3V (header pin #1)
GNDGND (pin #6)
MISOMISO (pin #21)
MOSIMOSI (pin #19) 
SCKCLK (pin #23)
NSSGPIO6 (pin #22)
DIO0GPIO7 (pin #7)
RSTGPIO0 (pin #11)

Configuration

Defaults:

Edit source node (main.cpp) to change configuration (look for: "Configure these values!").

Please set location, email and description.

License

The source files in this repository are made available under the Eclipse Public License v1.0, except: