For a few weeks I have tested with LoRa technology, we have also heard about LoRaWAN, some time later we created an account on the TTN Platform or “The Things Network”, applied especially to these LP-WAN networks, for this new tutorial we will create a gateway LoRaWAN using an ESP8266 module and a Radio Modem RFM95/95W at a frequency of 915mHz with a single channel to connect with TTN.
It is a small introduction of great weight, since there are few public gateway in my region, later I will assemble a more complete gateway,
greetings from Cali, Colombia.
Complete Documentation : Gateway LoRaWan ESP8266 & RFM95 (ESP-LoRa) 915mHz single channel with The Things Network
Documentacion Completa : Gateway LoRaWAN ESP8266 & RFM95 (ESP-LoRa) 915mHz unico canal con The Things Network
1. Previous Tutorials
- LoRa is the physical layer or in simple words is the modulation, the modem or radio, the hardware.
- LoRaWAN is the network protocol or architecture that works on LoRa.
I recommend before continuing, see the following 2 tutorials to solve some doubts or questions on the subject, there are other sources of more detailed information on the subject on the Internet
2. Design Hardware
On the Internet there are a variety of connections and PCB designs completed for these tests.
- Important, The ISM bands assigned to your country before buying your module LoRa investigate, in my case my country “Colombia” has available between 902 and 928 Mhztechnically at 915 Mhz are my modules, The Things Network has a table details very detailed frequencies-by-country, if you buy at another frequency you may run the risk of using frequencies occupied for other applications.
3. Arduino IDE code Original / Oficcial
It is very possible that improvements have already been made to the original project Github repository that I used, given that my test was a few months ago.
Recommendation: For a more detailed explanation step by step I recommend watching the full video “Gateway LoRaWan ESP8266 & RFM95 (ESP-LoRa) 915mHz single channel with The Things Network”available on our Youtube channel PDAControl.
Single Channel LoRaWAN Gateway
The code was created by M. Westenberg, is under licensed MIT, initially thanks to him for sharing his code publicly, I think the code has a high complexity and should have taken much of his time in testing and debugging.
I recommend reading this documentation previously given that it has been a project that has started from version 1.0 and has evolved to v5.0.
The code was created to make the minimum of modifications for its use, configuring the file
ESP-sc-gway.h, below I will list some of its features and functionalities:
Important Note: the application currently only works with the radio modules sx1276 (and Hope RF95).
- It allows updates (OTA).
- Webserver for visualization and configuration.
- Display Oled i2c for debugging.
- Configuring network credentials with WifiManager.
- Statistical collection of shipments and receptions.
- Allows you to transmit data to your own server, configure url and port, if you have one.
- The gateway can also be configured as a Node / Sensor.
Note: The Github repository contains all the libraries used, already compatible with the project.