Learn how to configure the parameters for LoRa® P2P and Mesh communication. This guide covers settings including frequency, TX power, bandwidth, and spreading factor.
This article is based on a guide authored by our customer, Seneca Technologies and is published with their permission.
LoRa communications allow end devices to operate within a mesh network or establish direct communication between two devices using LoRa P2P (Point-to-Point). In both scenarios, key parameters must be configured on any LoRa device. This article offers a brief introduction to these parameters.
Essential LoRa P2P & Mesh Communication Settings
Although LoRa has been on the market for years, it remains relatively unknown, and its parameters are not easily understood. To better grasp the concept, consider a familiar device: the walkie-talkie.
Walkie-talkies are commonly used by security personnel and staff at public events and provide a useful analogy for LoRa communication.
For walkie-talkies to communicate effectively, users need to agree on:
Being on the same channel
The volume of their speech
The speed of their talking
The clarity of their enunciation
The number of times they say "hello" before delivering their message
-
Whether they are listening or speaking at any given moment
Before continuing with this comparison, it's important to remember that walkie-talkies and LoRa devices serve different purposes.
LoRa devices are ideal for transmitting data, such as sensor readings or written messages, while walkie-talkies are designed exclusively for voice communication.
LoRa vs. Walkie-Talkies: Understanding Transmission Parameters
The following table highlights the similarities between LoRa parameters and walkie-talkie features to enhance understanding of how LoRa communication functions.
| Walkie-Talkie | LoRa P2P / Mesh |
| Being on the same channel | LoRa frequency |
| How loudly they speak | TX power |
| How quickly they talk | Spreading factor |
| How clearly they enunciate | Coding rate |
| How many times they say "hello" before delivering the message | Preamble |
| Whether they are listening or speaking at a given moment | RX or TX mode |
Think of these parameters as the knobs on a walkie-talkie, which are used to adjust the channel, transmission power, and other settings, allowing LoRa devices to communicate reliably with one another.
Key LoRa Parameters Explained
Now, let’s take a closer look at what the LoRa parameters actually are.
LoRa Tx Power
What it is: Transmit power, measured in decibels relative to 1 milliwatt (dBm).
Why it matters: Higher transmit power typically results in a longer communication range but also increases power consumption and may be subject to regional regulations.
Possible values: Generally ranges from 2 dBm to 22 dBm for sub-GHz modules.
How to choose: Use a lower value if battery life is a priority or if local regulations impose limits. Select a higher value for maximum range, provided it complies with legal regulations.
Analogy: It’s like shouting versus whispering. Shouting allows you to be heard from farther away but requires more energy and may not be allowed everywhere.
LoRa Bandwidth
What it is: The bandwidth setting for LoRa communication. A setting of “0” typically corresponds to 125 kHz, while other values may represent narrow bandwidths, such as 62.5 kHz or 41.7 kHz.
Why it matters: Narrower bandwidths (indicated by higher numerical values in some configurations) provide better range but lower data rates, meaning it transmits less data per second.
-
Possible values:
125 kHz (default and most common)
250 kHz
500 kHz
62.5 kHz
41.7 kHz
31.25 kHz
20.8 kHz
15.6 kHz
10.4 kHz
7.8 kHz (very narrow, enables long range but results in very slow transmission)
How to choose: Use 125 kHz for typical use, short distances, or higher data rates. Choose narrower bandwidths like 62.5 kHz for longer range or low-power applications where speed is less critical.
Analogy: Think of it like the width of a water pipe: a wider pipe moves more water faster but may not push it as far if the pressure is low.
LoRa Spreading Factor
What it is: The Spreading Factor (SF) is a key parameter that influences range, transmission speed, and energy consumption. A higher SF means better signal sensitivity, resulting in a long range but slower data rates.
Why it matters: SF7 provides a good balance between speed and range. If you require more distance, consider increasing the SF to SF8, SF9, etc. But keep in mind that this will reduce transmission speed.
Possible values: SF6 to SF12
Some modules may support starting at SF5, but SF6 is more commonly used as the lower limit.
How to choose: Use a higher spreading factor (SF) for long-distance or low-signal environments where slower data rates are acceptable. Use a lower SF when you need faster data over shorter distances.
Analogy: It’s similar to speaking slowly and clearly versus speaking quickly and mumbling. Clear, slow speech travels farther and is easier to understand, but it takes longer to convey your message.
Coding Rate (Error Correction in LoRa P2P)
What it is: LoRa employs forward error correction to enhance reliability. The coding rate determines the level of redundancy added to each message. A typical value of “1” corresponds to a coding rate of 4/5, which means one additional bit of error correction for every four bits of data. Higher values indicate increased error correction, expressed in LoRa terms, which is expressed as 4/x.
Why it matters: Higher coding rates provide better protection in noisy or long-range conditions but reduce data throughput.
-
Possible values:
4/5
4/6
4/7
4/8
How to choose: Use a higher coding rate when communication is susceptible to interference or when reliability is crucial. In cleaner environments or for faster data requirements, select a lower coding rate.
Analogy: It’s like repeating yourself several times to ensure you're understood effectively, but it takes longer to convey the message.
LoRa Frequency
What it is: The radio channel the device uses to send and receive data, measured in Hz.
Why it matters: All LoRa devices must agree on the same frequency to communicate effectively.
-
Possible values:
EU: 868,000,000 to 868,600,000 Hz (868 MHz band)
US: 902,000,000 to 928,000,000 Hz (915 MHz band)
How to choose: LoRa operates over the ISM band, which varies by region. Refer to the official LoRa regional parameters to determine the correct frequency for your location.
Analogy: It’s like tuning an FM radio to a specific station, such as 100.3 MHz—if you’re not on the exact frequency, you won’t receive the signal.
Preamble Length (Synchronization in LoRa Transmissions)
What it is: The preamble is a sequence of symbols sent before the actual data to help the receiver synchronize with the incoming signal.
Why it matters: A typical value is 8. Increasing the preamble can assist the receiver in detecting very weak signals, but it also adds a slight delay to transmission time.
-
Possible values:
6 to 65,535 (theoretically), though 8 is the standard in most cases.
How to choose: If you are experiencing missed data due to synchronization issues or are operating over very long distances, consider increasing the value. Otherwise, 8 is a reliable default.
Analogy: Like saying “Hello… hello… hello…” At the beginning of a conversation, it gives the listener time to tune in and be ready to receive the message.
Symbol Timeout (LoRa RX Mode Configuration)
What it is: This parameter configures the device to remain in Receive mode, waiting for incoming data packets.
Why it matters: Without this setting, the device may automatically switch between transmit and receive modes. By enabling this parameter, the device is always ready to listen, similar to a walkie-talkie locked on the “listen” channel.
-
Possible values:
RX_MODE_NONE: Not in receive mode
RX_MODE_RX or RX_MODE_CONTINUOUS: Constantly listening
RX_MODE_SINGLE: Listens for a single packet, then stops
TX_MODE_TX: Transmit mode
How to choose: Use RX_MODE_CONTINUOUS if the device needs to be always ready to receive. For devices that primarily transmit or only need to listen occasionally, adjust the mode as necessary.
Analogy: Like a walkie-talkie that remains locked in listening mode, always prepared for someone else to speak.
How the Settings Work Together
To get your LoRa device operational, you need to configure the transmission channel (frequency) and the transmission power (Tx Power). These settings should align with your application requirements. You can also adjust the bandwidth and spreading factor to optimize the balance between range and power consumption.
To minimize the risk of lost data packets, set appropriate values for the preamble length and symbol timeout. Lastly, ensure your device is always prepared to receive by properly configuring the symbol timeout, which will enhance its reliability as a listener.
LoRa P2P Configurations (AT Commands & APIs)
Now that we've explained the configuration terms, let's apply them in practice.
Use RUI3 AT Commands for LoRa P2P
Command:
AT+P2P=909600000:7:0:0:8:22
The parameters here are
AT+P2P=<Frequency>:<Spreading Factor>:<Bandwidth>:<Code Rate>:<Preamble Length>:<TX Power>
The symbol timeout has to be set with a separate command:
AT+SYMBOLTIMEOUT=0
Receive mode is enabled with
AT+PRECV=xx
Where xx can be:
0 = RX off
1 to 65532 = RX time in milliseconds
65533 = Continuous RX mode with TX enabled
65534 = Continuous RX mode; to transmit data, RX must be stopped first using
AT+PRECV=065535 = Continuous RX mode until a transmission is received, after which the transceiver enters standby mode.
Configure LoRa P2P with RUI3 API
api.lora.pfreq.set(909600000); // frequency for transmission api.lora.ptp.set(22); // Max TX power api.lora.pbw.set(0); // 0 = 125kHz, can try 3 (62.5kHz) or 4 (41.67kHz) for longer range api.lora.psf.set(7); // Can try 8, 9, 10 for longer range api.lora.pcr.set(0); // Can try 1, 2 or 3 for longer range api.lora.ppl.set(8); // "standard"
Set Up LoRa P2P on WisBlock API
// Settings for LoRa P2P and LoRa Mesh` g_lorawan_settings.p2p_frequency = 909600000 // frequency for transmission g_lorawan_settings.p2p_tx_power = 22; // Max TX power g_lorawan_settings.p2p_bandwidth = 0; // 0 = 125kHz, can try 3 (62.5kHz) or 4 (41.67kHz) for longer range g_lorawan_settings.p2p_sf = 7; // Can try 8, 9, 10 for longer range g_lorawan_settings.p2p_cr = 1; // Can try 2, 3 or 4 for longer range g_lorawan_settings.p2p_preamble_len = 8; // "standard" g_lorawan_settings.p2p_symbol_timeout = 0; // "standard" // Force listening` g_lora_p2p_rx_mode = RX_MODE_RX;
Changelog
-
Version 1 - Understanding Key Transmission Settings for LoRa® P2P and Mesh
- Author: Bernd Giesecke
- Reviewer: Harold Duarte
- Date Published: 07/25/2025
Updated