ianccole / Link-Tester2

Programs for doing link testing with LoRa devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Link Tester2

This is a repository for the LoRaTracker link test programs

The purpose of these programs is to enable the performance of a link consisting of a pair of LoRa modules and antennas to be tested.

The testing method and instructions for use are described in this file;

'Testing and Comparing - December 2018.pdf'

The basic principle is that packets of descending power are sent in sequence from the transmitter. The packets contain information as to the power in dBm used to transmit them. The receiver picks up the packets and based on the powers used to send the packets keeps running totals. The running totals are printed to the serial monitor (and optional SD card) in CSV format for importing into a spreadsheet or other database.

The failure point, how much power is needed to operate the link, can then easily be seen. By keeping the transmitter, receiver and antennas in the same location the impact of changing antennas or LoRa modes is also easy to measure.

The programs have been tested against version 1.8.5 of the Arduino IDE. They are standalone, although if you want to use the display or SD logging options you will need to install some additional libraries to the Arduino development environment, see below.

There is a choice of displays, either a 20x4 LCD driven by a PCF8574 I2C I\O expander or an SSD1306 small OLED. The display options are selected by changing the settings.h file, the default is no display. The two libraries needed for the display options are;

LCD https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads/ - download LiquidCrystal_V1.2.1.zip

SSD1306 https://github.com/greiman/SSD1306Ascii

If your using the SD card logging option you will need this library;

SDFAT https://github.com/greiman/SdFat

The pin definitions for the LoRa device, LED and switch (optional) will need to be entered in the Pin_Definitions.h file. LoRa frequency and modem parameters, program and display options are configured in the Settings.h file. The LoRa frequency and modem settings, bandwidth, spreading factor and coding rate do need to be the same for transmitter and receiver.

Apart from the optional display and SD card libraries all the required files needed for the program are in the program folder, including the library of LoRa routines.

The programs will operate with the SX1272 or SX1276/8 LoRa devices. The setup of lora_RegModemConfig1 and lora_RegModemConfig2 on the LoRa device is different between these versions of the LoRa device so there are different library routines for the SX1272 and SX1276\8.

The library defaults to SX1276\8 mode, to use the library for SX1272 make sure there is a define '#define UseSX1272' in the settings file before including the library.

LoRaWAN uses a different sync word (0x34) from the default (0x12) used by the LoRaTracker libraries. The library uses the default sync word, to use the LoRaWAN syncword make sure there is a define '#define UseLoRaWAN' in the settings file.

The transmitter program generates a random 5 digit log number and sends this automatically across to the receiver which use the number to open the same named log on the SD card. The log number is also displayed on the display if used. Pressing the switch on the receiver (active low) closes the SD log file and halts the receiver. You need to switch the receiver off and then on again to restart it.

The user of these programs is expected to have had a reasonable level of experience in using the Arduino environment. Using the programs does require the user to make configuration changes so they will need to be able to cope with complier errors due to issues that they may create

Do not forget to fit an antenna to the LoRa device, you can destroy it if you use it without and antenna.

Stuart Robinson

December 2018

About

Programs for doing link testing with LoRa devices


Languages

Language:C++ 96.5%Language:C 3.5%