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:50] – 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, [[http:// | ||
- | 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 ===== | ||
- | |||
- | The typical configuration for loRa modules consists of 125 KHz sub-channels, | ||
- | |||
- | Start by modifying in modem config in '' | ||
- | <file cpp RH_RF95.cpp> | ||
- | // | ||
- | setModemConfig(Bw125Cr48Sf4096); | ||
- | </ | ||
- | |||
- | As the data rate is lower, you may need to increase the timeout before declaring a lot transmission. Thus, you need to add a variable in '' | ||
- | <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.1475225425.txt.gz · Last modified: 2016/09/30 10:50 by samer