reliable_lora_communication
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
reliable_lora_communication [2016/09/30 09:46] – samer | reliable_lora_communication [2016/10/12 15:08] (current) – removed samer | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Simple Prototype of LoRa Communications ====== | ||
- | LoRa is a modulation technique suitable for Low-Power Wide Area Networks (LPWANs). LPWANs are seen as a serious contributor in the upcoming IoT era. They provide large coverage while keeping the consumed power very low. Hence, a typical deployment consists of a simple gateway with a transmitting antenna, and a large number of wireless end-nodes physically connected to sensors or actuators. In the following, we present a prototype of LoRa communication between two wireless modules. | ||
- | ===== -. Hardware and Cost ===== | ||
- | |||
- | * Arduino Uno or Mega (x2) for [[https:// | ||
- | * Dragino shields (x2) for [[http:// | ||
- | * 868 MHz Antenna (x2) for [[http:// | ||
- | |||
- | ===== -. Software ===== | ||
- | |||
- | * RadioHead: The Packet Radio library for embedded microprocessors can be downloaded from [[http:// | ||
- | * Arduino IDE: Specific OS versions can be downloaded from [[https:// | ||
- | |||
- | ===== -. Compatibility ===== | ||
- | |||
- | This tutorial is written for : | ||
- | * Arduino IDE 1.6.9. | ||
- | * RadioHead 1.61. | ||
- | * Dragino hardware release v1.3. | ||
- | * Mac OS 10.11.5. | ||
- | |||
- | Beware of the necessary modifications, | ||
- | |||
- | ===== -. Installation ===== | ||
- | |||
- | Start by plugging the Dragino shields on the Arduino devices and mounting the antennas as shown in Fig. 1. | ||
- | |||
- | [{{ : | ||
- | |||
- | Connect the two Arduino devices to USB ports on your computer. If this is the first time you use Arduino IDE, make sure to install the necessary USB drivers by selecting '' | ||
- | |||
- | Now, you have to select the corresponding '' | ||
- | |||
- | * For Arduino Uno: Board = Arduino/ | ||
- | * For Arduino Mega: Board = Arduino/ | ||
- | |||
- | Unzip the RadioHead library and copy it to your sketchbook library folder as detailed in [[https:// | ||
- | |||
- | |||
- | ===== -. Running Basic Sketches ===== | ||
- | Start by setting the central frequency of the LoRa modules. For this, open the '' | ||
- | |||
- | <file cpp RH_RF95.cpp> | ||
- | setFrequency(868.1); | ||
- | </ | ||
- | |||
- | Download the {{ : | ||
- | ===== -. Modifying the Radio Parameters ===== | ||
- | |||
- | Bw125Cr48Sf4096 | ||
- | Bw = 125 kHz, Cr = 4/8, Sf = 4096chips/ | ||
- | |||
- | <file cpp RH_RF95.cpp> | ||
- | // | ||
- | setModemConfig(Bw125Cr48Sf4096); | ||
- | </ | ||
- | |||
- | <file cpp RHReliableDatagram.h> | ||
- | #define RH_LONG_TIMEOUT 8000 | ||
- | </ | ||
- | |||
- | <file cpp RHReliableDatagram.cpp> | ||
- | RHReliableDatagram:: | ||
- | : RHDatagram(driver, | ||
- | { | ||
- | _retransmissions = 0; | ||
- | _lastSequenceNumber = 0; | ||
- | //_timeout = RH_DEFAULT_TIMEOUT; | ||
- | _timeout = RH_LONG_TIMEOUT; | ||
- | _retries = RH_DEFAULT_RETRIES; | ||
- | } | ||
- | </ |
reliable_lora_communication.1475221572.txt.gz · Last modified: 2016/09/30 09:46 by samer