What is lora communication

First, let's take a brief look at the Lora technology. Lora (Long Range Radio) is not a protocol, but a radio frequency technology based on spread spectrum communication. Compared with other radio frequency technologies such as 2.4G or ordinary 433/915MHz, Lora has a longer transmission distance (several thousand meters) and stronger obstacle crossing performance. This makes Lora the preferred solution in the field of Internet of Things (IoT), especially in scenarios that require long-distance, low-power communication.

Lora module one-to-many communication

Generally, we use lora modules for one-to-one communication. Sometimes we face one-to-many usage scenarios, and the same message needs to be sent to multiple modules; if one-to-one communication is still used here, it will be inefficient. As mentioned above, Lora is a radio frequency technology for spread spectrum communication rather than a protocol, so all modules in the same channel can receive the same radio frequency signal. Based on this feature, our E22 series realizes the broadcast function, and modules with different addresses in the same channel can receive broadcast messages at the same time; based on broadcasting, we can achieve one-to-many communication.

Let's take the E22-400T22S module as an example to implement one-to-many communication through the broadcast function.

Hardware environment:

 3 E22-400T22S modules

 3 USB to TTL modules: used to connect Lora module and computer

 Several Dupont lines: used for hardware connection.

 Glue stick antenna: prepared as needed to enhance communication effect.

Software environment:

 Serial port debugging assistant: used to display received data.

 Module configuration host computer: used to configure the working mode and parameters of Lora module.

 USB to serial port driver: used for computer to identify USB to TTL module

Experimental steps:

  1. Install the corresponding serial port driver: ensure that the computer can identify and communicate with USB to TTL module
  2. Connect E22 module and USB to TTL tool
  3. Open E22 to configure the host computer, connect module mode pin M0 to low level, M1 to high level to enter configuration mode, open the corresponding serial port to read parameters.

 

  1. We configure the master node address to send data to the broadcast address 0xFFFF, which is converted to decimal 65535, and the slave node addresses are set to 1 and 2 respectively.

 

  1. After the configuration is completed, connect the mode pins M0 and M1 of the three modules to a low level to enter the transparent transmission mode.
  2. Open the three serial port assistants, and the master node sends data to observe whether the slave nodes have received the data. It can be seen that the slave nodes with two different addresses have received the broadcast data.

From the above example, we can see that when the master node sends broadcast data, the slave nodes with two different addresses receive the data. This proves that the one-to-many communication capability of the E22 Lora module enables one central node to control multiple slave nodes.

Application scenarios

The one-to-many communication capability of the Lora module is widely used in the field of the Internet of Things. For example, in a smart street lamp, a control center can control multiple terminal street lamps at the same time, realizing one-to-many control and management. In addition, Lora technology is also widely used in agriculture, forestry, water conservancy, environmental protection and other fields, providing these industries with efficient and low-cost communication solutions.