LoRa or Long Range wireless data telemetry is a technology pioneered by Semtech that operates at a lower frequency than NRF24L01 (433 MHz, 868 MHz, or 916 MHz against 2.4 GHz for the NRF24L01) but at thrice the distance (from 5000m to 11000m).
Basic configuration option
Name | Description | Address |
---|---|---|
ADDH | High address byte of the module (the default 00H) | 00H |
ADDL | Low address byte of the module (the default 00H) | 01H |
SPED | Information about data rate parity bit and Air data rate | 02H |
OPTION | Type of transmission, packet size, allow the special message | 03H |
CHAN | Communication channel(410M + CHAN*1M), default 17H (433MHz), valid only for 433MHz device check below to check the correct frequency of your device | 04H |
OPTION | Type of transmission, packet size, allow the special message | 05H |
TRANSMISSION_MODE | A lot of parameters that specify the transmission modality | 06H |
CRYPT | Encryption to avoid interception | 07H |
SPED detail
UART Parity bit: UART mode can be different between communication parties
UART parity bit | Constant value |
---|---|
8N1 (default) | MODE_00_8N1 |
8O1 | MODE_01_8O1 |
8E1 | MODE_10_8E1 |
8N1 (equal to 00) | MODE_11_8N1 |
UART baud rate: UART baud rate can be different between communication parties (but not reccomended). The UART baud rate has nothing to do with wireless transmission parameters & won’t affect the wireless transmit/receive features.
TTL UART baud rate(bps) | Constant value |
---|---|
1200 | UART_BPS_1200 |
2400 | UART_BPS_2400 |
4800 | UART_BPS_4800 |
9600 (default) | UART_BPS_9600 |
19200 | UART_BPS_19200 |
38400 | UART_BPS_38400 |
57600 | UART_BPS_57600 |
115200 | UART_BPS_115200 |
Air data rate: The lower the air data rate, the longer the transmitting distance, better anti-interference performance, and longer transmitting time; the air data rate must be constant for both communication parties.
Air data rate(bps) | Constant value |
---|---|
2.4k | AIR_DATA_RATE_000_24 |
2.4k | AIR_DATA_RATE_001_24 |
2.4k (default) | AIR_DATA_RATE_010_24 |
4.8k | AIR_DATA_RATE_011_48 |
9.6k | AIR_DATA_RATE_100_96 |
19.2k | AIR_DATA_RATE_101_192 |
38.4k | AIR_DATA_RATE_110_384 |
62.5k | AIR_DATA_RATE_111_625 |
OPTION detail
Sub packet setting
This is the max length of the packet.
When the data is smaller than the subpacket length, the serial output of the receiving end is an uninterrupted continuous output. The receiving end serial port will output the subpacket when the data is larger than the subpacket length.
Packet size | Constant value |
---|---|
200bytes (default) | SPS_200_00 |
128bytes | SPS_128_01 |
64bytes | SPS_064_10 |
32bytes | SPS_032_11 |
RSSI Ambient noise enable
This command can enable/disable the management type of RSSI, and It’s essential to manage the remote configuration. Pay attention isn’t the RSSI parameter in the message.
When enabled, the C0, C1, C2, C3 commands can be sent in the transmitting mode or WOR transmitting mode to read the register. Register 0x00: Current ambient noise RSSI Register 0X01: RSSI when the data was received last time.
RSSI Ambient noise enable | Constant value |
---|---|
Enable | RSSI_AMBIENT_NOISE_ENABLED |
Disable (default) | RSSI_AMBIENT_NOISE_DISABLED |
Transmission power
You can change this set of constants by applying a define like so:
#define E220_22 // default value without set
Applicable for E220 with 22dBm as max power.
Low power transmission is not recommended due to its low power supply efficiency.
Transmission power (approximation) | Constant value |
---|---|
22dBm (default) | POWER_22 |
17dBm | POWER_17 |
13dBm | POWER_13 |
10dBm | POWER_10 |
Applicable for E220 with 30dBm as max power.
Low power transmission is not recommended due to its low power supply efficiency.
#define E220_30
Transmission power (approximation) | Constant value |
---|---|
30dBm (default) | POWER_30 |
27dBm | POWER_27 |
24dBm | POWER_24 |
21dBm | POWER_21 |
You can configure Channel frequency also with this define:
// One of
#define FREQUENCY_433
#define FREQUENCY_170
#define FREQUENCY_470
#define FREQUENCY_868
#define FREQUENCY_915
TRANSMISSION_MODE Detail
Enable RSSI
When enabled, the module receives wireless data, and it will follow an RSSI strength byte after output via the serial port TXD
Enable RSSI | Constant value |
---|---|
Enable | RSSI_ENABLED |
Disable (default) | RSSI_DISABLED |
Transmission type
Transmission mode: The first three bytes of each user’s data frame can be used as high/low address and channel in fixed transmission mode. The module changes its address and channel when transmitted. And it will revert to the original setting after completing the process.
Fixed transmission enabling bit | Constant value |
---|---|
Fixed transmission mode | FT_FIXED_TRANSMISSION |
Transparent transmission mode (default) | FT_TRANSPARENT_TRANSMISSION |
Monitor data before transmission
When enabled, wireless data will be monitored before it is transmitted, avoiding interference to a certain extent, but may cause data delay.
LBT enable byte | Constant value |
---|---|
Enable | LBT_ENABLED |
Disable (default) | LBT_DISABLED |
WOR cycle
If WOR is transmitting: after the WOR receiver receives the wireless data and outputs it through the serial port, it will wait for 1000ms before entering the WOR again. Users can input the serial port data and return it via wireless during this period. Each serial byte will be refreshed for 1000ms. Users must transmit the first byte within 1000ms.
- Period T = (1 + WOR) * 500ms, maximum 4000ms, minimum 500ms
- The longer the WOR monitoring interval period, the lower the average power consumption, but the greater the data delay
- Both the transmitter and the receiver must be the same (very important).
Wireless wake-up time | Constant value |
---|---|
500ms | WAKE_UP_500 |
1000ms | WAKE_UP_1000 |
1500ms | WAKE_UP_1500 |
2000ms (default) | WAKE_UP_2000 |
2500ms | WAKE_UP_2500 |
3000ms | WAKE_UP_3000 |
3500ms | WAKE_UP_3500 |
4000ms | WAKE_UP_4000 |
Check buffer
First, we must introduce a simple but practical method to check if something is in the receiving buffer.
int available();
It’s simple to return how many bytes you have in the current stream.
Send receive messages
Normal transmission mode
Normal/Transparent transmission mode sends messages to all devices with the same address and channel.
Fixed transmission
Fixed transmission have more scenarios
Thanks
Now you have all information to do your work, but I think It’s important to show some real examples to understand better all the possibilities.
- Ebyte LoRa E220 device for Arduino, esp32 or esp8266: settings and basic usage
- Ebyte LoRa E220 device for Arduino, esp32 or esp8266: library
- Ebyte LoRa E220 device for Arduino, esp32 or esp8266: configuration
- Ebyte LoRa E220 device for Arduino, esp32 or esp8266: fixed transmission, broadcast, monitor, and RSSI
- Ebyte LoRa E220 device for Arduino, esp32 or esp8266: power saving and sending structured data
- Ebyte LoRa E220 device for Arduino, esp32 or esp8266: WOR microcontroller and Arduino shield
- Ebyte LoRa E220 device for Arduino, esp32 or esp8266: WOR microcontroller and WeMos D1 shield
- Ebyte LoRa E220 device for Arduino, esp32 or esp8266: WOR microcontroller and esp32 dev v1 shield