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 10:38] – [5. Running Basic Sketches] samer | reliable_lora_communication [2016/10/12 15:08] (current) – removed samer | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Simple Prototype of LoRa Communications ====== | ||
- | As defined by Semtech, LoRa(c) is //a wireless technology developed to create the low-power, wide-area networks (LPWANs) required for machine-to-machine (M2M) and Internet of Things (IoT) applications. The technology offers a very compelling mix of long range, low power consumption and secure data transmission and is gaining significant traction in IoT networks being deployed by wireless network operators// | ||
- | In the following, we present a prototype of LoRa communication between two wireless modules. This enables to get basic insights on the implementation of the technology and prepares some advanced prototypes and experimentations. | ||
- | ===== -. 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.1475224729.txt.gz · Last modified: 2016/09/30 10:38 by samer