LoRaNow Library is a simple LoRa Node <> Gateway communication protocol.
LoRaNow is a open source communication protocol to make easier to understand the concept of Node / Gateway communication using LoRa technology.
This library was design using the Arduino LoRa Library by Sandeep Mistry.
The main focus hardware is Arduino and ESP boards with RFM95W LoRa module.
The default pinout connection is like the table below.
RFM95W | Arduino | ESP8266 | ESP32 |
---|---|---|---|
VCC | 3.3V | 3.3V | 3.3V |
GND | GND | GND | GND |
SCK | SCK | SCK | SCK |
MISO | MISO | MISO | MISO |
MOSI | MOSI | MOSI | MOSI |
SS | 10 | gpio16 | gpio18 |
DIO0 | 2 | gpio15 | gpio26 |
SS
, and DIO0
pins can be changed by using LoRaNow.setPins(ss, dio0)
or LoRaNow.setPinsSPI(sck, miso, mosi, ss, dio0)
. DIO0
pin is needed, it must be interrupt capable via attachInterrupt(...)
.
You can use this table to lookup the available frequencies by your country. The selectable frequency also depends on your hardware.
You can select the frequency using LoRaNow.setFrequency(frequency)
or you can select the frequency by country.
LoRaNow.setFrequencyCN()
- Select the frequency 486.5 MHz - Used in ChinaLoRaNow.setFrequencyEU()
- Select the frequency 868.3 MHz - Used in EuropeLoRaNow.setFrequencyUS()
- Select the frequency 904.1 MHz - Used in USA, Canada and South AmericaLoRaNow.setFrequencyAU()
- Select the frequency 917.0 MHz - Used in Australia, Brazil and ChileThis is the payload format, this protocol don't have any kind of encryption.
Protocol | Device ID | Count | Length | CheckSum | Payload |
---|---|---|---|---|---|
1 Byte | 4 Bytes | 1 Byte | 1 Byte | 1 Byte | N Bytes |
The library comes with examples. After installing the library you need to restart the Arduino IDE before they can be found under File > Examples > LoRaNow.
See API.md.
This library is licensed under the MIT Licence.
See news and other projects on my blog
Do you like this library? Please star this project on GitHub!