The LORA REYAX RYLR896 transmitter

published: 26 September 2020 / updated 10 October 2020

Lire cette page en français

 

Articles using LoRa:

Product description

The RYLR896 transceiver module feature the Lora long range modem that provides ultra-long range spread spectrum communication and high interference immunity whilst minimising current consumption. The RYLR896 is certified by NCC and FCC.

Features

Applications

Pin description

  Pin Name I/O Condition
1VDDI Power Supply
2NRSTI RESET(Active Low)100KΩ Internal pull up,
Pull down at least 100ms
3RXDI UART Data Input
4TXDO UART Data Output
5NC
6GND Ground

Block diagram

Specification

Item Min. Typical Max. Unit Condition
VDD Power Supply23.33.6VVDD
RF Output Power Range-415dBm
Filter insertion loss123dB
RF Sensitivity-148dBm
RF Input Level10dBm
Frequency Range862868/9151020MHz
Frequency Accuracy±2ppm
Communication Range *4.515KMDepend on RF parameter
Transmit Current43mARFOP = +15 dBm
Receive Current16.5mAAT+MODE=0
Sleep Current0.5uAAT+MODE=1
Baud rate300115200115200bps8, N, 1
Digital Input Level High0.7*VDDVDDVVIH
Digital Input Level Low00.3*VDDVVIL
Digital Output Level High0.9VDDVVOH
Digital Output Level Low0.1VVOL
Cycling (erase / write)
EEPROM data memory
300KCycles
Weight7g
Operating Temperature-4025+85˚C

The LoRa Alliance has defined two frequency bands for the usage of LoRa technology in Europe. These bands are EU433 from 433.05 to 434.79 MHz and EU863 from 863 to 870 MHz.

The EU863-870 band can be used in any region where the ISM radio spectrum is defined by the ETSI 307 standard. The end devices in this band will operate from 863 to 870 MHz and use a channel data structure to store the information of at least 16 channels. The channels in this band can be attributed freely by the operator; however the three default channels; 868.10, 868.30, 868.50 are mandatory to be implemented in every EU863 end-device. Other channels can be freely distributed across the allowed frequency range on a network per network basis.

Lora AT command guide

Apply for:

The sequence of using AT command

  1. Use “AT+ADDRESS” to set ADDRESS. The ADDRESS is regard as the identification of transmitter or specified receiver.
  2. Use “AT+NETWORKID” to set the ID of Lora network. This is a Group function. Only by setting the same NETWORKID can the modules communicate with each other. If the ADDRESS of specified receiver is belong to different group, it is not able to communicate with each other. The recommend value: 1~15
  3. Use” AT+BAND” to set the center frequency of wireless band. The transmitter and the receiver are required to use the same frequency to communicate with each other.
  4. Use” AT+PARAMETER” to set the RF wireless parameters. The transmitter and the receiver are required to set the same parameters to communicate with each other. The parameters of which as follows:
    1. <Spreading Factor>: The larger the SF is, the better the sensitivity is. But the transmission time will take longer.
    2. <Bandwidth>: The smaller the bandwidth is, the better the sensitivity is. But the transmission time will take longer.
    3. <Coding Rate>: The coding rate will be the fastest if setting it as 1.
    4. <Programmed Preamble>: Preamble code. If the preamble code is bigger, it will result in the less opportunity of losing data. Generally preamble code can be set above 10 if under the permission of the transmission time. Communication within 3 km: Recommend to set “AT + PARAMETER = 10,7,1,7” More than 3 km: Recommend to set “ AT + PARAMETER = 12,4,1,7”
  5. Use “AT+SEND” to send data to the specified ADDRESS. Please use “Lora Modem Calculator Tool” to calculate the transmission time. Due to the program used by the module, the payload part will increase more 8 bytes than the actual data length.

It is required to key in “enter” or “\r\n” in the end of all AT Commands.

Add“ ? ”in the end of the commands to ask the current setting value.

It is required to wait until the module replies +OK so that you can execute the next AT command.

ADDRESS

Set the ADDRESS of module.

Each LoRa transmission module must have a personal address.

syntaxresponse
AT+ADDRESS=<address> +OK
AT+ADDRESS=? +ADDRESS=22

<Address>=0~65535(default 0)

Example: Set the address of module as 22:
  AT+ADDRESS=22

The settings will be memorized in EEPROM.

AT

syntaxresponse
AT +OK

BAND

Set RF Frequency.

syntaxresponse
AT+BAND=<parameter> +OK
AT+BAND=? +BAND=868500000

<parameter>is the RF Frequency, Unit is Hz: 915000000Hz(default: RYLY89x)

Example : Set the frequency as 868500000Hz:
  AT+BAND=868500000

CPIN

Set the AES128 password of the network.

syntaxresponse
AT+CPIN=<password> +OK
AT+CPIN=? +CPIN=FABC0002EEDCAA90FABC0002EEDCAA90

Password:

An 32 character long AES password From 00000000000000000000000000000001 to FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF.

Only by same password can the data be recognized. After resetting, the previously password will disappear.

Example: Set the password as below: FABC0002EEDCAA90FABC0002EEDCAA90
  AT+CPIN=FABC0002EEDCAA90FABC0002EEDCAA90

CRFOP

Set the RF output power.

syntaxresponse
AT+CRFOP=<power> +OK
AT+CRFOP=? +CRFOP=10

Power:

Between 0..15, 15dBm(default)

Example: Set the output power as 10dBm
  AT+CRFOP=10

FACTORY

Set all current parameters to manufacturer defaults.

syntaxresponse
AT+FACTORY +FACTORY

IPR

Set the UART baud rate.

syntaxresponse
AT+IPR=<parameter> +OK
AT+IPR=? +IPR=38400

UART baud parameter:

The settings will be memorized in EEPROM.

MODE

Set the work mode.

syntaxresponse
AT+MODE=<parameter> +OK
AT+MODE=? +MODE=1

Parameter:

Forth code for FlashForth:

\ Set the work mode, must be one of 
\ 0 (defalt) Transmit and Receive mode 
\ 1 Sleep mode 
: (ATmode)  ( str ---) 
    ." AT+MODE=" type ; 
: .ATmode" ( --- <string>) 
    postpone s" 
    postpone (ATmode) 
  ; immediate 
\ example: 
\ .ATmode" 0" 

NETWORKID

Set the network ID.

syntaxresponse
AT+NETWORKID=<Network ID> +OK
AT+NETWORKID=? +NETWORKID=6

Network ID: 0~16(default 0)

Example: Set the network ID as 6
  AT+NETWORKID=6

The settings will be memorized in EEPROM.

The”0”is the public ID of Lora. It is not recommend to set 0 to make the distinction of NETWORK.

Forth code for FlahsForth:

\ Set the network ID 
\ must be 0..16 
\ 0 is the public ID of Lora 
: (ATnetworkid) ( str ---) 
    ." AT+NETWORKID=" type ; 
: .ATnetworkid" ( ---) 
    postpone s" 
    postpone (ATnetworkid) 
  ; immediate 
\ example: 
\ .ATnetworkid" 6" 

PARAMETER

Set the RF parameters.

syntaxresponse
AT+PARAMETER=<Spreading Factor>, <Bandwidth>,<Coding Rate>, <Programmed Preamble> +OK
AT+PARAMETER=? +PARAMETER=7,3,4,5

Parameters:

Spreading Factor / facteur d'étalement
Spreading factor
facteur d'étalement
Bitrate / débit
75469 bps
83125 bps
91758 bps
10977 bps
11537 bps
12293 bps
Coding rate

LoRa modulation also adds a forward error correction (FEC) in every data transmission. This implementation is done by encoding 4-bit data with redundancies into 5-bit, 6-bit, 7-bit, or even 8-bit. Using this redundancy will allow the LoRa signal to endure short interferences. The Coding Rate value need to be adjusted according to conditions of the channel used for data transmission. If there are too many interference in the channel, then it’s recommended to increase the value of Coding Rate.

However, the rise in CR value will also increase the duration for the transmission.

Example: Set the parameters as below:
<Spreading Factor> 7,<Bandwidth> 20.8KHz, <Coding Rate> 4,<Programmed Preamble>5,
  AT+PARAMETER=7,3,4,5

RCV

Show the received data.

syntaxresponse
AT+RCV=<Address>,<Length>,<Data>,<RSSI>,<SNR>

This command is not to be used directly. It results from a transmission successful.

<Address>: Transmitter Address ID.

<Length>Data Length.

<Data>Data.

<RSSI> Received Signal Strength Indicator.

<SNR> Signal-to-noise ratio.

Example: Module received the ID Address 50 send 5 bytes data, Content is HELLO string ,RSSI is -99dBm, SNR is 40, It will show as below:
  +RCV=50,5,HELLO,-99,40

RSSI

The Received Signal Strength Indication (RSSI) is the received signal power in milliwatts and is measured in dBm.

This value can be used as a measurement of how well a receiver can “hear” a signal from a sender.

The RSSI is measured in dBm and is a negative value.

The closer to 0 the better the signal is.

Typical LoRa RSSI values are:

SNR

Signal-to-Noise Ratio (SNR) is the ratio between the received power signal and the noise floor power level.

The noise floor is an area of all unwanted interfering signal sources which can corrupt the transmitted signal and therefore re-transmissions will occur.

Normally the noise floor is the physical limit of sensitivity, however LoRa works below the noise level.

Typical LoRa SNR values are between: -20dB and +10dB

A value closer to +10dB means the received signal is less corrupted.

LoRa can demodulate signals which are -7.5 dB to -20 dB below the noise floor.

RESET

Software RESET.

syntaxresponse
AT+RESET +OK

SEND

Send data to the appointment Address.

syntaxresponse
AT+SEND=<Address>,<Payload Length>,<Data> +OK
AT+SEND=? +SEND=50,5,HELLO

<Address>0~65535, When the

<Address> is 0, it will send data to all address (From 0 to 65535.)

<Payload Length>Maximum 240bytes

<Data>ASCII Format

Example: Send HELLO string to the Address 50:
  AT+SEND=50,5,HELLO

Forth code for FlashForth:

\ convert a number to a Forth code for FlahsForth:decimal string 
: .#s ( n ---) 
    base @ >r 
    0 <# #s #> type 
    r> base ! 
  ; 
\ Send data to the appointment Address n 
\ ex: AT+SEND=50,5,HELLO 
: (ATsend) ( LORAaddress str ---) 
    ." AT+SEND=" 
    rot .#s    \ convert LORAaddress to string and type 
    [char] , emit 
    dup .#s    \ convert str len to string and emit 
    [char] , emit 
    type ; 
: .ATsend" ( LORAaddress ---) 
    postpone s" 
    postpone (ATsend) 
  ; immediate 
\ exemple (COMPILE ONLY) 
\ : lights.on ( ---) 
\    120 .ATsend" LIGHTS ON" ; 

VER

To inquire the firmware version

Error result codes