HomeTutorialsElectronicsRYLR896 Tutorial: LoRa Sender/Receiver Communication with REYAX RYLR896 Breakout Boards (RYLR890 Modules)

RYLR896 Tutorial: LoRa Sender/Receiver Communication with REYAX RYLR896 Breakout Boards (RYLR890 Modules)

RYLR896 Breakout Boards (RYLR890 Modules).

This tutorial teaches how to use two RYLR896 breakout boards in order to implement a simple sender-to-receiver communication with LoRa. LoRa stands for “Long Range” and is a wireless radio frequency (RF) technology that is well suited for long communication distance and low power scenarios. LoRa uses license-free sub-gigahertz radio frequency bands for communication. The radio frequency differs from region to region. In Germany, LoRa is used with a center frequency of 868 MHz (Europe). Example frequency of other regions are: 865 MHz to 867 MHz (India), 915 MHz (Australia and North America), and 923 MHz (Asia). The RYLR896 is a breakout board that comes with an RYLR890 LoRa Module (Semtech SX1276 Engine). In this tutorial, we use two RYLR896 breakout boards to establish a communication between them.

Related products

REYAX RYLR896 Breakout Board / RYLR890 Module

Don’t get confused: RYLR896 is the breakout board incl. pins, a STM32L microcontroller IC, antenna, and an RYLR890 module. The RYLR890 module is based on the Semtech SX1276 LoRa Engine and contains all the “LoRa logic”. According to REYAX, the module is supposed to achieve a typical communication distance of 4.5 km. Naturally, the communication distance depends on many aspects. Nonetheless, 4.5 km should be achievable under normal conditions (e.g. clear line-of-sight). The following table shows some characteristics of the RYLR890 module:

ItemMinTypicalMax
Power Supply Voltage2.8 V3.3 V3.6 V
Frequency Range820 MHz868/915MHz1020 MHz
Communication Range4.5 km15 km
Transmit Current43 mA
Receive Current16.5 mA
REYAX RYLR896/890 attributes (Source: http://reyax.com.cn/products/rylr896/)

The RYLR896 breakout board makes the use of the RYLR890 very easy. For instance, the breakout board comes with an own IC and pins, so it is ready to use for controlling it by a serial connection. The pin layout is quite easy, you require only to connect four pins to the RYLR896 to be able to control the RYLR890 module:

NameInput/OUTPUTDescription
VDDInputPower Supply
NRSTInputActive-Low Reset (optional)
RXDInputUART Data Input
TXDOutputUART Data Output
NC--
GND--Ground
Pin descriptions of the RYLR896 breakout board.

Controlling a RYLR896/RYLR890 module by a serial connection

First, we establish a serial connection to be able to control an RYLR890 module, e.g. to have a look in some module settings. As in my other tutorials about Reyax modules ( RYWB116, RYBI080, and RYS8830), a “USB-to-TTL” device is used to establish a connection between a PC and the breakout board. It is important that the USB-to-TTL device has a 3.3V mode. For my device, in order to activate the 3.3V mode (and deactivate 5V mode) a jumper has to be set.

USB-to-TTL PinRYLR896 Pin
5Vno connection / yellow jumper with USB-TO-TTL VCC
VCCno connection / yellow jumper with USB-TO-TTL 5V
3V3VDD
TXDRXD
RXDTXD
GNDGND
How to wire a USB-to-TTL device to an RYLR896 breakout board to establish a serial connection.

Next, we can use a terminal program to send and receive data to the module. There are many terminal programs available. I chose the free program HTerm from Tobias Hammer. HTerm has all functions that we need to exchange data with the RYLR896 breakout board. But of course, you can use any other terminal program for this task. On the next screenshot, you see my configuration parameters for the serial connection (Port: depends on setup, Baud rate: 115200, Data: 8, Stop: 1, Parity: None, Receive Newline: CR+LF, Transmit Command Delimiter: CR+LF):

After starting the serial connection, we can test the communication with a simple “AT” command. The Module should respond with an OK:

< AT\r\n
> +OK\r\n

Next, let’s check some settings of the module: the module’s version and band/center frequency. This can be done by the commands “AT+VER?\r\n” and “AT+BAND?”:

< AT+VER?\r\n
> +VER=RYLR89C_V1.2.7\r\n
< AT+BAND?\r\n
> +BAND=915000000\r\n

According to the response, the band is set to the frequency of North America (915 MHz). Since I live in Europe, I want to change it to 868 MHz. This can be achieved by the following command:

< AT+BAND=868500000\r\n
> +OK\r\n

In order to establish a communication between two modules, they must be able to find each other by an address. The addressing scheme of the LoRa ecosystem depends a bit on the modules and implementation. Simply spoken, the module enables us to set a network id and an address. Modules on the same network can communicate with each other. Each module is supposed to have a unique id within a network. In this tutorial, we set the network id to 5 and the address to 101:

< AT+NETWORKID=5\r\n
> +OK\r\n
< AT+ADDRESS=101\r\n
> +OK\r\n
Configuring a RYLR890 module for sender/receiver communication with HTerm.

Now, the module is set to the correct frequency, network id and address. I will apply the same settings to a my second module. For the second module, the address is set to 102.

Sender/Receiver Communication with two RYLR890 modules

If both modules are correctly configured, to establish a communication is very easy. Here, I used two USB-to-TTL devices to have them both connected to my PC in order to send a message with the first module and, at the same time, be able to monitor incoming messages of the second module.

In order to send a message, just send the command “AT+SEND=102,15,HELLO RECEIVER!” at the serial connection of the first module. The first parameter value ‘102’ is the address of the second module. The next value ’15’ is the number of characters/bytes to be send. The third parameter value is the message to be send: ‘HELLO RECEIVER!’ (15 characters).

< AT+SEND=102,15,HELLO RECEIVER!\r\n
> +OK\r\n

The second module should be able to receive the message after a very short moment. The received message will be automatically printed into the serial connection:

> +RCV=101,15,HELLO RECEIVER!,-42,40\r\n

The first value of “RCV” is the sender address, then the number of received characters/bytes, followed by the message. There are two additional values:  -42 which is the Received Signal Strength Indicator (RSSI) and 40 being the Signal-to-noise ratio (SNR).

Send/Receiver Communication of two RYLR890 modules. Left window: Terminal program connected to sender. Right window: Terminal program connected to receiver.

And that’s it! Now you should be able to send and receive messages with the RYLR896 breakout boards / RYLR890 modules.

For more details visit the product page.

Video Tutorial

RYLR896 Tutorial: Sender-to-Receiver-Communication with LoRa | Serial Connection, RYLR890 and HTerm
Michael Schoeffler
Let me know in the comments what you think!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most RECENT

Most Popular