Communication method and system based on loRa spread spectrum technology
By obtaining the frequency offset based on the peer's identity information in LoRa communication and switching the baseband when interference is detected, the problems of interference and high maintenance costs caused by single-frequency transmission are solved, achieving efficient data transmission and low power consumption management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 河南驰诚电气股份有限公司
- Filing Date
- 2025-04-23
- Publication Date
- 2026-05-26
AI Technical Summary
In LoRa communication, data transmission using a single frequency point is prone to co-frequency or inter-frequency interference, which can lead to false node wake-ups, data loss, reduced data transmission efficiency, increased device power consumption, shortened battery life, and increased system maintenance costs.
By obtaining the frequency offset based on the identity information of the communication peer, and superimposing the frequency offset on the latest communication base frequency, the communication frequency is obtained. When interference is detected, the communication base frequency is switched, and the frequency is flexibly configured to avoid interference.
It enables flexible and efficient data transmission management, improves transmission efficiency, reduces device power consumption, extends battery life, and reduces system maintenance costs.
Smart Images

Figure CN120166547B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to communication transmission technology, and more particularly to a communication method and system based on LoRa spread spectrum technology. Background Technology
[0002] LoRa (Long Range) spread spectrum technology is a long-distance wireless radio frequency transmission communication technology with features such as low power consumption, long transmission distance, and low implementation cost.
[0003] In IoT scenarios where continuous power supply is difficult to achieve on-site, sensor and other node devices are typically battery-powered, relying on LoRa technology for low-power, long-range communication. Traditional LoRa communication methods usually use a single frequency for data transmission, meaning multiple devices use the same frequency band to transmit data.
[0004] When using a single frequency for data transmission, interference from the same or different frequencies can easily occur, causing problems such as false wake-ups of dormant nodes and retransmission of lost data. This reduces data transmission efficiency and increases device power consumption. Increased power consumption shortens the lifespan of the batteries powering the devices, requiring more frequent battery replacements to prevent power outages and device shutdowns, significantly increasing system maintenance costs. Summary of the Invention
[0005] To overcome the problems existing in related technologies, this disclosure provides a communication method and system based on LoRa spread spectrum technology. By updating the communication baseband and then combining identity information to obtain the communication frequency point used for data transmission, the problem of low transmission efficiency and high maintenance cost caused by data transmission using a single frequency point is solved, achieving flexible and efficient data transmission management.
[0006] According to a first aspect of the present disclosure, a communication method based on LoRa spread spectrum technology is provided, comprising:
[0007] Based on the identity information of the communication peer, obtain the frequency offset of the communication peer;
[0008] The communication frequency point of the communication peer is obtained by superimposing the frequency offset on the recently updated communication base frequency.
[0009] Data is transmitted with the communication peer according to the communication frequency.
[0010] Furthermore, the method also includes:
[0011] Detect the signal quality of the connection with at least one communication peer;
[0012] If the signal quality indicates the presence of interference, a frequency switching command carrying a new communication baseband is sent to the communication peer to instruct the communication peer to update the communication baseband.
[0013] Furthermore, the signal quality includes at least the Received Signal Strength Indicator (RSSI) and / or communication success rate of the wireless connection with the communication peer, and the step of sending a frequency switching command carrying a new communication baseband to the communication peer when the signal quality indicates the presence of interference includes:
[0014] Based on the signal quality of the wireless connection with the at least one communication peer, an RSSI interference range and / or a communication success rate interference range are generated.
[0015] If the RSSI of at least one wireless connection with the communication peer is within the RSSI interference range and / or the communication success rate is within the communication success rate interference range, interference is determined to exist.
[0016] The frequency switching command is sent to the communication peer, and the frequency switching command carries the new communication base frequency.
[0017] Furthermore, after the step of sending a frequency switching command carrying a new communication baseband to the communication peer when the signal quality indicates the presence of interference, the method further includes:
[0018] If the communication peer fails to update the communication baseband, the original communication baseband will still be used as the most recently updated communication baseband.
[0019] According to a second aspect of the present disclosure, a communication method based on LoRa spread spectrum technology is provided, comprising:
[0020] Based on the local identity information, obtain the frequency offset;
[0021] The communication frequency point is obtained by superimposing the frequency offset on the most recently updated communication baseband.
[0022] Data is transmitted with the communication peer according to the communication frequency.
[0023] Furthermore, the method also includes:
[0024] Receive a frequency switching command sent by the communication peer, wherein the frequency switching command carries a new communication base frequency;
[0025] Update the local communication baseband according to the frequency switching command.
[0026] Furthermore, after the step of updating the local communication baseband according to the frequency switching command, the method further includes:
[0027] If updating the local communication baseband fails, the existing communication baseband will continue to be used as the most recently updated communication baseband.
[0028] According to a third aspect of the embodiments of this disclosure, a communication system based on LoRa spread spectrum technology is provided, including a first device and at least one second device;
[0029] The first device is configured to obtain the frequency offset of each of the second devices according to the identity information of the second devices, add the frequency offset to the most recently updated communication baseband to obtain the communication frequency of each of the second devices, and perform data transmission with each of the second devices according to the communication frequency;
[0030] The second device is configured to obtain the frequency offset based on local identity information, add the frequency offset to the most recently updated communication baseband to obtain a communication frequency, and transmit data with the first device based on the communication frequency.
[0031] Furthermore, the first device is also configured to detect the signal quality of the connection with the at least one second device, and if the signal quality indicates the presence of interference, send a frequency switching command carrying a new communication baseband to the at least one second device to instruct the second device to update the communication baseband;
[0032] The second device is further configured to receive a frequency switching command sent by the first device and update the local communication baseband according to the frequency switching command.
[0033] Furthermore, the first device is also used to continue using the original communication baseband as the most recently updated communication baseband if the second device fails to update the communication baseband.
[0034] The second device is also configured to continue using the original communication baseband as the most recently updated communication baseband in the event that updating the local communication baseband fails.
[0035] The technical solutions provided by the embodiments of this disclosure can include the following beneficial effects: Based on the identity information of the communication peer, the frequency offset of the communication peer is obtained; then, the frequency offset is superimposed on the most recently updated communication baseband to obtain the communication frequency of the communication peer; and finally, data is transmitted with the communication peer based on the communication frequency. The communication baseband is updated, and the communication frequency currently used by the device is obtained based on the latest communication baseband and the device's identity information. The frequency used by the device during frequency hopping transmission is flexibly configured, solving the problems of low transmission efficiency and high maintenance costs caused by using a single frequency for data transmission, and achieving flexible and efficient data transmission management.
[0036] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0037] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0038] Figure 1 This is a flowchart illustrating a communication method based on LoRa spread spectrum technology according to an exemplary embodiment.
[0039] Figure 2 This is a flowchart illustrating yet another communication method based on LoRa spread spectrum technology according to an exemplary embodiment.
[0040] Figure 3 This is a flowchart illustrating yet another communication method based on LoRa spread spectrum technology according to an exemplary embodiment.
[0041] Figure 4 This is a flowchart illustrating yet another communication method based on LoRa spread spectrum technology according to an exemplary embodiment.
[0042] Figure 5 This is a flowchart illustrating yet another communication method based on LoRa spread spectrum technology according to an exemplary embodiment.
[0043] Figure 6 This is a flowchart illustrating yet another communication method based on LoRa spread spectrum technology according to an exemplary embodiment.
[0044] Figure 7 This is a flowchart illustrating yet another communication method based on LoRa spread spectrum technology according to an exemplary embodiment.
[0045] Figure 8 This is a flowchart illustrating yet another communication method based on LoRa spread spectrum technology according to an exemplary embodiment.
[0046] Figure 9 This is a flowchart illustrating yet another communication method based on LoRa spread spectrum technology according to an exemplary embodiment.
[0047] Figure 10 This is a block diagram illustrating a communication system based on LoRa spread spectrum technology according to an exemplary embodiment.
[0048] Figure 11 A block diagram of an apparatus for communication based on LoRa spread spectrum technology is shown according to an exemplary embodiment.
[0049] Figure 12 This is a block diagram illustrating an apparatus 1300 for communication based on LoRa spread spectrum technology according to an exemplary embodiment. Detailed Implementation
[0050] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0051] When using a single frequency for data transmission, interference from the same or different frequencies can easily occur, causing problems such as false wake-ups of dormant nodes and retransmission of lost data. This reduces data transmission efficiency and increases device power consumption. Increased power consumption shortens the lifespan of the batteries powering the devices, requiring more frequent battery replacements to prevent power outages and device shutdowns, significantly increasing system maintenance costs.
[0052] To address the aforementioned issues, embodiments of this disclosure provide a communication method and system based on LoRa spread spectrum technology. The communication baseband is updated, and the current communication frequency used by the device is obtained by combining the latest baseband with the device's identity information. The frequency used by the device during frequency hopping transmission is flexibly configured, solving the problems of low transmission efficiency and high maintenance costs associated with data transmission using a single frequency, thus achieving flexible and efficient data transmission management.
[0053] An exemplary embodiment of this disclosure provides a communication method based on LoRa spread spectrum technology. The process of data transmission in a LoRa network using this method is as follows: Figure 1 As shown, it includes:
[0054] Step 101: Obtain the frequency offset of the communication peer based on the peer's identity information.
[0055] According to one exemplary implementation, a LoRa network has a host device and several slave devices, with the host device and slave devices being communication partners to each other.
[0056] The host device can be a network server, application server, gateway, terminal node, or main control unit within a terminal node. The host device can serve as the main control device in a LoRa network, performing functions such as network access authentication for various entities, coordination of transmission resource allocation, data aggregation, communication with gateways or servers, routing relay, and adjustment of communication parameters.
[0057] Slave devices can be network entities with data acquisition and transmission capabilities, such as terminal nodes. In a LoRa network, slave devices are controlled and / or managed by host devices, performing functions such as accepting host device management, data acquisition, and data reporting.
[0058] In this step, the host device obtains the frequency offset of the communication peer based on the peer's identity information. The communication peer can be a slave device, and the identity information can be the slave device's unique identifier.
[0059] According to one exemplary implementation, the identity information is the slave device's serial number. This serial number can be assigned and stored in both the slave and master devices during network setup, or it can be assigned and stored in both the master and slave devices when the slave device joins the network, or it can be pre-configured in both the master and slave devices. Different slave devices have unique serial numbers within the same LoRa network, which can be used to uniquely identify the slave device. The frequency offset can be calculated using the following expression:
[0060] Frequency offset = (ID% )* Formula 1
[0061] In Formula 1, ID is the slave device number, which can be an integer ranging from 1 to 9999. The total number of available frequency points and / or channels, for example =40 indicates that the available frequency range is divided into 40 frequency points or channels; This refers to the frequency spacing between adjacent frequency points or adjacent channels. Generally, the frequency spacing between adjacent frequency points or adjacent channels is the same. Set to 0.4MHz.
[0062] According to Equation 1, based on Take the remainder of ID, then multiply by This yields the frequency offset of the corresponding slave device. This distributes multiple different slave devices across different frequencies, avoiding interference caused by too many slave devices using the same frequency. Alternatively, multiple slave devices can be randomly assigned to different frequencies. This can be done by directly associating slave devices with frequency points, or by randomly assigning different frequency offsets to slave devices. Random assignment also achieves the distribution of multiple different slave devices across different frequencies. It should be noted that the frequency offset acquisition method provided in the embodiments of this disclosure is not limited to the above examples; any method capable of assigning different frequencies to different slave devices is covered within the scope of this disclosure.
[0063] According to one exemplary embodiment, the communication frequency used by the slave device when actively reporting data is different from the communication frequency used between the master and slave devices in wake-up-response mode. The communication frequencies involved in this disclosure include at least one or more of the following:
[0064] The communication frequency point at which the host device sends wake-up data and the slave device receives wake-up data in wake-up-response mode (hereinafter referred to as the first communication frequency point for ease of explanation).
[0065] The communication frequency point at which the host device receives response data / the slave device sends response data in wake-up-response mode (hereinafter referred to as the second communication frequency point for ease of explanation).
[0066] The communication frequency point for slave devices to actively report data / master devices to receive data actively reported by slave devices (hereinafter referred to as the third communication frequency point for ease of explanation).
[0067] By setting , The values of parameters are used to achieve the differential planning of the first and third communication frequency points.
[0068] When the host device receives data actively reported by the slave device, it can also calculate the frequency offset of the received data frequency point according to Equation 1. According to an exemplary implementation, the frequency offset of the received data frequency point can be calculated. Setting it to 8 means that the slave device can actively report through 8 frequency points or channels; Set to 1MHz.
[0069] Step 102: Obtain the frequency offset based on the local identity information.
[0070] In this step, the slave device obtains the frequency offset to be used by the slave device in the future based on its local identity information.
[0071] According to one exemplary implementation, the identity information is the serial number of the slave device. This serial number can be assigned and stored in both the slave and master devices during network setup, or it can be assigned and stored in both the master and slave devices when the slave device joins the network, or it can be pre-configured in both the master and slave devices. Different slave devices have unique serial numbers within the same LoRa network, which can be used to uniquely identify the slave devices.
[0072] The method by which a slave device obtains its own frequency offset is the same as the method by which a master device obtains the frequency offset of the slave device, and will not be repeated here.
[0073] Step 103: Based on the most recently updated communication baseband, superimpose the frequency offset to obtain the communication frequency of the communication peer.
[0074] In this disclosure, the communication baseband is updated according to the actual application scenario. According to one exemplary embodiment, the host device can select a new communication baseband and send it to the slave device to instruct the slave device to update the communication baseband. The host device can also detect the communication quality between itself and the slave device, and based on the analysis results of the communication quality, determine whether a new communication baseband needs to be selected and instruct the slave device to update it.
[0075] In this step, the host device calculates the communication frequency used for data transmission with a slave device based on the following expression:
[0076] FRE_ID = FR0 + Frequency Offset Equation 2
[0077] In Equation 2, FRE_ID is the communication frequency point when the master device and slave device transmit data; FR0 is the most recently updated communication baseband, specifically the communication baseband point at which the slave device was last successfully instructed to change its frequency. The communication baseband is the starting frequency point of the currently used available frequency range, providing the basis for calculating the communication frequency point.
[0078] The first communication frequency point for the host device to send wake-up data / the slave device to receive wake-up data in wake-up-response mode is calculated using Equations 1 and 2.
[0079] The second communication frequency point for the host device to receive response data / the slave device to send response data in wake-up-response mode can be calculated using Equations 1 and 2; it can also be calculated using the following expression:
[0080] Second communication frequency point = First communication frequency point + Response frequency offset formula 3
[0081] In Equation 3, the response frequency offset can be set to 0.1MHz.
[0082] For the third communication frequency point where the slave device actively reports data and the master device receives data actively reported by the slave device, the third communication frequency point and / or frequency offset can be preset and fixed; or it can be calculated according to Equations 1 and 2. According to an exemplary embodiment, the frequency offset of the third communication frequency point is calculated according to the following expression:
[0083] Frequency offset = (ID% )* Formula 4
[0084] In Equation 4, ID is the slave device number, which can be an integer ranging from 1 to 9999. The total number of available frequency points and / or uplink channels, for example =8 indicates that the available frequency range is divided into 8 frequency points or channels; This refers to the frequency spacing between adjacent frequency points or adjacent uplink channels. Generally, the frequency spacing between adjacent frequency points or adjacent uplink channels is the same. Set to 1MHz.
[0085] Step 104: Based on the most recently updated communication baseband, superimpose the frequency offset to obtain the communication frequency.
[0086] In this step, the slave device calculates the communication frequency used by itself by adding the frequency offset to the most recently updated communication baseband. The communication frequencies involved include the first communication frequency, the second communication frequency, and the third communication frequency. The specific calculation method is the same as that described in step 103, and will not be repeated here.
[0087] Step 105: Data transmission is performed with the communication peer according to the communication frequency.
[0088] In this step, the host device transmits data with the slave device, which is the communication peer, based on the calculated communication frequency.
[0089] Specifically, the system uses a first communication frequency to send wake-up data to the slave device, uses a second communication frequency to receive response data from the slave device in response to the wake-up data, and uses a third communication frequency to receive data actively reported by the slave device.
[0090] The slave device transmits data with the master device based on the calculated communication frequency.
[0091] Specifically, the system uses the first communication frequency to receive wake-up data sent by the host device, uses the second communication frequency to send response data to the host device in response to the wake-up data, and uses the third communication frequency to actively report data to the host device.
[0092] It should be noted that there is no strict timing relationship between steps 101 and 102 in this embodiment, nor is there a strict timing relationship between steps 103 and 104. The process of the host device determining the communication frequency point is relatively independent of the process of the slave device determining the communication frequency point. It can be calculated and determined in advance, or it can be calculated and determined before data transmission is required.
[0093] The time window or time slot resources for data transmission between the master and slave devices can be configured according to application requirements and network conditions. The same communication frequency can be dedicated to a single slave device or time-division multiplexed by multiple slave devices.
[0094] An exemplary embodiment of this disclosure also provides a communication method based on LoRa spread spectrum technology, wherein the process of updating the communication baseband using this method is as follows: Figure 2 As shown, it includes:
[0095] Step 201: Detect the signal quality of the connection with at least one communication peer.
[0096] In this step, the host device detects the signal quality of the connection with at least one slave device.
[0097] According to one exemplary implementation, the signal quality includes at least the Received Signal Strength Indication (RSSI) and / or communication success rate of the wireless connection with the communication peer.
[0098] According to one exemplary implementation, the signal quality further includes a signal quality weighted average, which involves at least one or more of the following basic parameters:
[0099] RSSI, Signal-to-Noise Ratio (SNR), Packet Error Rate (PER), Spreading Factor (SF).
[0100] Each basic parameter has a corresponding weighted value. After performing a comprehensive calculation on these basic parameters based on the weights, the weighted average value of the signal quality is obtained.
[0101] Step 202: If the signal quality indicates the presence of interference, send a frequency switching command carrying a new communication base frequency to the communication peer.
[0102] This step is detailed as follows: Figure 3 As shown, it includes:
[0103] Step 301: Generate RSSI interference range and / or communication success rate interference range based on the signal quality of the wireless connection with the at least one communication peer.
[0104] The host device records the signal quality during communication with the slave device, such as communication success rate data and RSSI signal quality data. When the RSSI value is high and / or the communication success rate is low, a conclusion is reached on whether to switch to another communication baseband by taking into account the relevant weighted values of other devices.
[0105] In this step, based on the signal quality S1, S2, S3, ... of each slave device recorded by the master device, the signal quality of each slave device is analyzed and processed using an FFT spectrum analysis function to obtain the RSSI interference threshold RSSI_E and the communication success rate threshold q_E in the frequency domain. The range greater than RSSI_E is defined as the RSSI interference range, and the range less than q_E is defined as the communication success rate interference range. Using historical signal quality data obtained during actual data transmission as the basis for judgment criteria makes it easier to detect sudden interference or faults, effectively ensuring system reliability.
[0106] When signal quality also includes a signal quality weighted average, the signal quality weighted average of multiple transmission processes is analyzed and processed using an FFT spectrum analysis function to obtain a threshold for the signal quality weighted average. The range less than this threshold is taken as the signal quality weighted average interference range.
[0107] The current threshold also serves as the primary evaluation criterion for whether there is interference at the current communication frequency. The host device can reselect a new frequency range based on the range of the threshold.
[0108] According to one exemplary implementation, the host device detects signal quality when sending wake-up data.
[0109] According to one exemplary implementation, a preset time-domain value can be set as a time window for interference detection. Within the preset time-domain value, an RSSI interference range and / or a communication success rate interference range are generated based on the signal quality of the wireless connection with the at least one communication peer. Data acquisition and interference determination are performed within a time window. After the time window expires, existing data is cleared, and the next round of detection and determination is initiated.
[0110] 302. If the RSSI of at least one wireless connection with the communication peer is within the RSSI interference range and / or the communication success rate is within the communication success rate interference range, interference is determined to exist.
[0111] In this step, the host device detects the signal quality during data transmission with the slave device, which is the communication peer, and makes a judgment based on the RSSI interference range and / or communication success rate range to detect whether there is interference, thus providing a basis for switching the communication baseband.
[0112] The host device respectively records the RSSI, total number of transmissions, and number of successful transmissions when performing data transmission with each slave device. According to an exemplary embodiment, the host device records the RSSI, total number of transmissions, and number of successful transmissions when sending wake-up data to the slave device.
[0113] For a certain slave device, at least any one or any combination of the following contents is recorded:
[0114] The total number of times (T_TIMES) the host device sends wake-up data or wake-up communication frames to this slave device, the number of successful communications (T_R_TIMES), the received signal quality RSSI, and the weighted average of the signal quality.
[0115] Based on the total number of transmissions and the number of successful transmissions, the communication success rate q can be calculated according to the following expression:
[0116] q = T_R_TIMES / T_TIMES * 100%. Equation 5
[0117] When q < q_E, or RSSI > RSSI_E, or q < q_E and RSSI > RSSI_E, it is determined that interference exists. The condition for switching the communication base frequency can be further triggered to control the slave device to update the communication base frequency.
[0118] According to an exemplary embodiment, the determination of whether interference exists can be performed when each data transmission occurs (including scenarios such as the host device sending wake-up data, the slave device uploading response data, and the slave device actively reporting data), or periodically, or at a specified time point. For example, taking 0:00 every day as the time condition for triggering interference determination and updating the communication base frequency, it is determined whether to switch the communication frequency point according to the communication success rate and / or RSSI and / or weighted value of the signal quality.
[0119] The success rate can be calculated according to the expression q = T_R_TIMES / T_TIMES * 100%. When q < q_E and RSSI > RSSI_E, the condition for switching the frequency point has been triggered.
[0120] Step 303: Send the frequency point switching command to the communication peer, and carry the new communication base frequency in the frequency point switching command to instruct the communication peer to update the communication base frequency.
[0121] In this step, when the host device determines that interference exists, it sends a frequency point switching command to the communication peer. The new communication base frequency is carried in this frequency point switching command to notify the slave device to update the information of the locally protected communication base frequency according to the frequency point switching command and use the updated communication base frequency for subsequent data transmission.
[0122] According to one exemplary implementation, when sending wake-up data, the host device sends the frequency switching command along with the wake-up data frame.
[0123] According to one exemplary implementation, the host device sends the frequency switching command to the slave device in a pre-configured configuration information update frame.
[0124] Step 203: Receive the frequency switching command sent by the communication peer, and update the local communication baseband according to the frequency switching command.
[0125] In this step, after receiving the frequency switching command, the slave device extracts the communication baseband information.
[0126] The slave device replaces the original communication baseband with the new one based on the extracted communication baseband information. Subsequent data transmissions use the most recently updated local communication baseband to calculate the communication frequency.
[0127] In this embodiment of the disclosure, the host device monitors the interference and controls the slave device to update the communication baseband when interference is detected, thereby achieving accurate and timely detection and effective handling of interference.
[0128] An exemplary embodiment of this disclosure also provides a communication method based on LoRa spread spectrum technology, which manages subsequent data transmission based on the success or failure of the update when the host device performs a communication baseband update. The specific process is as follows: Figure 4 As shown, it includes:
[0129] Step 401: Detect the signal quality of the connection with at least one communication peer.
[0130] Step 402: If the signal quality indicates the presence of interference, send a frequency switching command carrying a new communication base frequency to the communication peer.
[0131] The implementation principles of steps 401 and 402 are no different from those of steps 201 to 202, and will not be repeated here.
[0132] Step 403: If the other end of the communication does not respond, continue to use the original communication frequency for data transmission.
[0133] According to one exemplary implementation, if a host device sends a frequency switching command to a slave device (which is the communication peer), and does not receive a response from the slave device for the frequency switching command, it assumes that the slave device has not updated its communication frequency. Therefore, on the host device side, the original communication frequency is still used as the communication frequency for data transmission with the slave device.
[0134] According to one exemplary implementation, after sending a frequency switching command to a slave device (which acts as the communication peer), the host device switches to data receiving mode and receives data from the slave device. If the data does not contain a result of the frequency switching command execution, it is assumed that the slave device has not responded to the command, and therefore, it is determined that the slave device has not updated its communication frequency. Therefore, on the host device side, the original communication frequency is still used for data transmission with the slave device. The time window and frequency used by the host device to switch to receiving mode can be pre-configured or generated according to a preset configuration method. For example, when the host device sends wake-up data, it carries the frequency switching command in the wake-up data; correspondingly, when the slave device responds to the wake-up data and switches to the response channel to upload response data, it also uploads its response to the frequency switching command.
[0135] In this step, the host device and slave device still use the original communication baseband to calculate the communication frequency point for data transmission based on the failure of the communication baseband update.
[0136] If the communication baseband update fails, the host device can continue to send frequency switching commands to the slave device to instruct the slave device to update the communication baseband and eliminate interference.
[0137] An exemplary embodiment of this disclosure provides yet another communication method based on LoRa spread spectrum technology. When the host device updates its communication baseband, subsequent data transmission is managed according to the success or failure of the update. The specific process is as follows: Figure 5 As shown, it includes:
[0138] Step 501: Detect the signal quality of the connection with at least one communication peer.
[0139] Step 502: If the signal quality indicates the presence of interference, send a frequency switching command carrying a new communication base frequency to the communication peer.
[0140] The implementation principles of steps 501 and 502 are no different from those of steps 201 to 202, and will not be repeated here.
[0141] Step 503: Receive the frequency switching command, and if updating the local communication baseband according to the frequency switching command fails, send update failure information back to the communication peer.
[0142] In this step, after receiving the frequency switching command, the slave device provides the new communication baseband and updates its locally configured communication baseband based on this new baseband. If the update fails, it sends an update failure message to the master device.
[0143] According to one exemplary implementation, after sending a frequency switching command to a slave device (which acts as the communication peer), the host device switches to data receiving mode to receive data fed back by the slave device. Correspondingly, upon receiving the frequency switching command, the slave device switches to data sending mode, carrying update failure information indicating that the frequency switching command failed in the data it sends. The time window and frequency used by the slave device to switch to sending mode can be pre-specified or generated according to a preset configuration method. For example, when the host device sends wake-up data, it carries the frequency switching command in the wake-up data; correspondingly, when the slave device responds to the wake-up data and switches to the acknowledgment channel to upload acknowledgment data, it also uploads the update failure information.
[0144] According to one exemplary implementation, the slave device actively reports data to the master device using its existing communication frequency, and carries update failure information in the actively reported data. When the master device receives the data actively reported by the slave device, it obtains the update failure information and determines that the slave device's communication baseband update has failed.
[0145] Step 504: Continue to use the original communication baseband to calculate the communication frequency point.
[0146] In this step, the host device and slave device still use the original communication baseband to calculate the communication frequency point for data transmission based on the failure of the communication baseband update.
[0147] If the communication baseband update fails, the host device can continue to send frequency switching commands to the slave device to instruct the slave device to update the communication baseband and eliminate interference.
[0148] An exemplary embodiment of this disclosure also provides a communication method based on LoRa spread spectrum technology, wherein the process of managing data transmission when the communication baseband fails is as follows: Figure 6 As shown, it includes:
[0149] Step 601: Detect the signal quality of the connection with at least one communication peer.
[0150] Step 602: If the signal quality indicates the presence of interference, send a frequency switching command carrying a new communication base frequency to the communication peer.
[0151] Step 603: Receive the frequency switching command sent by the communication peer, and update the local communication baseband according to the frequency switching command.
[0152] The implementation principles of steps 601 to 603 are the same as those of steps 201 to 203, and will not be repeated here.
[0153] Step 604: If the communication peer fails to update the communication baseband, the original communication baseband shall still be used as the most recently updated communication baseband.
[0154] In this step, if the communication peer fails to update the communication baseband, the host device will still use the original communication baseband as the most recently updated communication baseband, and calculate the communication frequency used when transmitting data with the slave device based on this.
[0155] Step 605: If updating the local communication baseband fails, continue to use the original communication baseband as the most recently updated communication baseband.
[0156] In this step, if the slave device fails to update its local communication baseband, it will still use the original communication baseband to calculate the communication frequency point.
[0157] An exemplary embodiment of this disclosure also provides a communication method based on LoRa spread spectrum technology, wherein the data transmission process using this method is as follows: Figure 7 As shown, it includes:
[0158] Step 701: Establish a downlink channel according to the communication frequency and transmit wake-up data.
[0159] In this step, the host device establishes a downlink channel based on the communication frequency and sends wake-up data to the slave device. Correspondingly, the slave device receives the wake-up data on this downlink channel.
[0160] Specifically, a downlink channel can be established based on the first communication frequency.
[0161] Step 702: Establish an uplink channel according to the communication frequency and transmit response data.
[0162] In this step, the slave device establishes an uplink channel based on the communication frequency and sends response data to the master device; correspondingly, the master device receives response data on the uplink channel.
[0163] Specifically, an uplink channel can be established based on the second communication frequency.
[0164] An exemplary embodiment of this disclosure also provides a communication method based on LoRa spread spectrum technology. When using this method for data transmission, an uplink channel is established according to the communication frequency point to transmit actively reported data.
[0165] Specifically, the slave device establishes an uplink channel based on the communication frequency and sends proactively reported data to the master device, which is its communication peer; the master device establishes an uplink channel based on the communication frequency and receives proactively reported data from the slave device, which is its communication peer.
[0166] An exemplary embodiment of this disclosure also provides a communication method based on LoRa spread spectrum technology, including a host device and at least one slave device. For example... Figure 8 As shown, the host device uses two LoRa communication modules, namely an active data transmission module and a passive data reception module.
[0167] Step 801: Import the IDs of each slave device in the field into the host device.
[0168] The slave device ID is an integer between 1 and 9999. Different slave devices have different IDs.
[0169] The host device uses two LoRa communication modules: one for actively sending data and the other for passively receiving data reported by the device.
[0170] Step 802: Calculate the communication frequency point for transmitting wake-up data based on the ID of the slave device, and transmit the wake-up data.
[0171] In this step, when the host device is conducting active communication, it calculates the communication frequency point for sending the wake-up data frame based on the ID of the slave device, which is the communication peer.
[0172] The slave device calculates the communication frequency it is listening to based on its own ID in order to receive the wake-up data frame.
[0173] The interval between communication frequencies is 0.4MHz, and the available frequency range is from the starting frequency to the ending frequency. Forty communication frequencies are obtained by dividing the range from the starting frequency to the ending frequency into 0.4MHz intervals. Based on the weighting algorithm for each communication and considering the overall communication status of the device, the communication baseband at the starting position can be changed. According to one exemplary implementation, the communication baseband is distributed within each communication protocol frame for use by the slave device when switching communication frequencies to listen for wake-up data.
[0174] When the host device sends wake-up data and the slave device listens for wake-up data, the current communication frequency point is calculated using the following formula, specifically the first communication frequency point:
[0175] FRE_ID= (ID%40)*0.4+FR0; Formula 5
[0176] Wherein, FRE_ID is the first communication frequency; ID is the ID of the slave device, with a minimum value of 1 and a maximum value of 9999; FR0 is the communication baseband, which is sent by the master device through control frames, occupies 2 bytes, and has a data format of hexadecimal, with the unit being MHz.
[0177] The host device retrieves the ID of the slave device that needs to send downlink commands based on a polling mechanism. Using the SPI interface, and at the communication frequency point FRE_ID calculated based on Equation 5, the host device sends downlink commands to the RF chip's frequency register to configure the communication frequency point used for wake-up data transmission.
[0178] The slave device and the master device calculate the same communication frequency, and the slave device wakes up. After waking up, the slave device ID is compared with the device ID carried in the wake-up data frame. If the IDs are the same, the slave device switches from listening mode to receiving mode, and at the same time configures the receiving frequency to the second communication frequency FRE_ID+0.1 (MHz). The master device performs the same configuration.
[0179] After the host device finishes sending the wake-up data, it switches to the second communication frequency as the data transmission frequency, and configures the communication frequency used for transmission as FRE_ID+0.1 (MHz), which is the host device's data transmission frequency.
[0180] The master device waits for the slave device's response command at FRE_ID+0.1 (MHz). After a timeout or upon receiving the response data, it exits the communication command on that frequency point. After the slave device responds, it switches to listening mode.
[0181] Step 803: When the host device actively sends data, it determines whether it needs to switch the communication frequency.
[0182] When the master device sends wake-up data and receives a response from the slave device, it sends control commands based on the slave device ID. After responding, the slave device records the signal quality during data transmission, such as the average weighted signal quality value and RSSI signal quality parameters, to detect interference on the communication frequency and trigger subsequent communication frequency switching.
[0183] Step 804: When it is necessary to switch the communication frequency, the host device notifies the slave device of the new communication base frequency.
[0184] The selection of the communication baseband FR0 can be based on spectrum analysis within the existing ID communication band. The host device records the spectrum communication quality of the slave devices and selects the spectrum with better signal quality and higher communication success rate as the new communication baseband for spectrum replacement. The communication frequency of the slave devices is then changed based on this.
[0185] The host device needs to send a new frequency switching command according to the communication protocol using the existing communication frequency to notify the slave device to change to the new communication baseband. If the slave device's communication baseband update is successful, the new communication frequency will be used for communication in the next data transmission. If the communication baseband switching is unsuccessful, the host device and the slave device still need to use the existing communication frequency to continue data transmission. According to an exemplary implementation, the host device continues to use the existing communication frequency to send the frequency switching command to the slave device, so that the slave device can receive the frequency switching command as soon as possible and use the new communication frequency for data communication.
[0186] Step 805: After the communication baseband is updated, switch the communication frequency to transmit wake-up data.
[0187] In this step, after the communication baseband is updated, subsequent data transmission between the host device and the slave device can be based on the most recently updated communication baseband.
[0188] Step 806: The slave device calculates the communication frequency point for actively reporting data based on its own ID.
[0189] In this step, when the slave device actively reports data, it needs to calculate the reporting communication frequency point according to the following expression, specifically the third communication frequency point:
[0190] FRE_UP = (ID%8)*1 + FRUP0 (Equation 6)
[0191] Here, FRE_UP is the third communication frequency point used for slave devices to actively report data; ID is the slave device ID (minimum value is 1, maximum value is 9999); FRUP0 is the initial communication frequency point for reporting. The initial default value of this second communication frequency point can be set when the system is initially online. When it is necessary to switch the communication frequency point used for actively reporting data, the communication module needs to issue a separate command and confirm the switch. Otherwise, the starting frequency point for reporting data cannot be switched.
[0192] All first communication frequencies of the slave device cannot be the same as the third communication frequency. None of the eight third communication frequencies used for actively reporting data can be the same as the communication baseband used by the first communication frequencies. That is, the eight third communication frequencies of FRUP0 at 1MHz cannot be the same as the first frequency. According to an exemplary embodiment, when a conflict occurs between the first and third communication frequencies, the communication baseband of the third communication frequency for actively reporting data is reselected.
[0193] Step 807: The host device polls and switches the channel for receiving data actively reported by the slave device, and receives the data actively reported by the slave device after detecting the preamble data.
[0194] The passive receiving device's data reporting module, used to receive reported data, needs to scan and switch the third communication frequency point based on ID polling. It uses a 1MHz frequency hopping channel for data, with a total of 8 communication frequencies for active data reporting. The initial transmission parameters of the third communication frequency point must differ from those of the preceding communication frequency point, and this distinction is stored separately in the host device. The 8-frequency polling mechanism for the third communication frequency point takes into account that active data reporting does not require sending wake-up data frames, thus avoiding false wake-ups to other devices. Furthermore, the active data reporting by the slave device has a certain discrete processing mechanism; therefore, the relatively small number of third communication frequencies configured meets the normal operating requirements of the system and conserves frequency resources.
[0195] Step 808: The host device determines whether it needs to switch the communication frequency for actively reporting data.
[0196] Step 809: When it is necessary to switch the communication frequency point for actively reporting data, the host device notifies the slave device to switch the communication frequency point.
[0197] An exemplary embodiment of this disclosure also provides a communication method based on LoRa spread spectrum technology. The process of using this method to detect interference and switch communication frequencies based on the detection results is as follows: Figure 9 As shown, it includes:
[0198] Step 901: The host device records the number of communications, the number of successful communications, and the RSSI of the slave device.
[0199] After sending the wake-up data, the host device switches the first communication frequency to the second communication frequency used when sending data, just like the slave device switches to receive mode. The second communication frequency is configured as FRE_ID+0.1 (MHz), which is the frequency used by the slave device to send data.
[0200] The master device waits for a response command from the slave device at FRE_ID+0.1 (MHz). Upon timeout or receipt of a response command, it exits the communication command for this second communication frequency. After the slave device responds, it switches to listening mode. The number of communications under this slave device ID, T_TIMES, is incremented by 1. If communication is successful, the number of successful communications, T_R_TIMES, is incremented by 1. Upon successful communication, the signal strength RSSI is recorded. A weighted average signal quality can also be obtained based on parameters such as RSSI. Using the above signal quality-related data, the basis for communication frequency switching / communication baseband update is calculated.
[0201] The host device needs to record the weighted average data of the signal quality of the slave device, and at the same time record the RSSI signal quality data. Based on the RSSI and / or communication success rate and / or weighted average of the signal quality of one or more slave devices, it is calculated whether it is necessary to switch the communication base frequency to achieve the switching of the communication frequency points of the slave device.
[0202] Step 902, determine whether the time domain preset value is enabled.
[0203] The time domain preset value can be set as the time window for interference detection. Within the time domain preset value, the RSSI interference range and / or communication success rate interference range are generated according to the signal quality of the wireless connection with the at least one communication peer. Data collection and interference determination are performed within a time window. After the time window arrives, the existing data is cleared and the next round of detection and determination is started.
[0204] In this step, when the time window of the time domain preset value is enabled, the analysis and judgment of the signal quality continue, otherwise the collected / stored data is cleared.
[0205] Step 903, determine whether the communication success rate is within the communication success rate interference range.
[0206] In this step, the communication success rate is calculated according to Equation 5, and then it is determined whether the communication success rate is within the communication success rate interference range, that is, whether q < q_E is satisfied. When q < q_E is satisfied, go to step 1004; otherwise, interrupt the communication base frequency update process.
[0207] Step 904, determine whether the RSSI is within the RSSI interference range.
[0208] In this step, it is determined whether the value of the RSSI is within the RSSI interference range, that is, whether RSSI > RSSI_E is satisfied. When > RSSI_E is satisfied, go to step 1005; otherwise, interrupt the communication base frequency update process.
[0209] Step 905, send a frequency point switching command using the original communication frequency point.
[0210] When q < q_E and RSSI > RSSI_E, it is determined that the condition for switching the communication frequency point / communication base frequency has been triggered.
[0211] When selecting a new communication frequency, the spectrum analysis within the existing available frequency range can be referred to. The host device selects the spectrum with better signal quality and higher communication success rate within the communication spectrum segment through recording the spectrum communication quality of the slave device as the new communication base frequency for replacing the spectrum. The communication frequency point of the slave device is replaced based on the new communication base frequency.
[0212] In this step, the host device needs to send a frequency switching command carrying the new communication baseband using the existing communication frequency, notifying the slave device to change to the new communication baseband, thereby achieving the effect of changing the communication frequency. If the slave device's communication baseband update is successful, the new communication frequency will be used for communication in subsequent data transmission. If the communication frequency switching / communication baseband update is unsuccessful, the host device still needs to use the existing communication baseband to calculate the communication frequency and continue to send the frequency switching command to the slave device. After receiving the frequency switching command and updating the communication baseband, the slave device will use the new communication frequency for data communication.
[0213] An exemplary embodiment of this disclosure provides a communication system based on LoRa spread spectrum technology, the structure of which is as follows: Figure 10 As shown, it includes a first device 1001 and at least one second device 1002.
[0214] The first device 1001 is used to obtain the frequency offset of each of the second devices according to the identity information of the second devices, add the frequency offset to the most recently updated communication base frequency to obtain the communication frequency of each of the second devices, and perform data transmission with each of the second devices 1002 according to the communication frequency;
[0215] The second device 1002 is used to obtain the frequency offset based on local identity information, add the frequency offset to the most recently updated communication baseband to obtain a communication frequency, and transmit data with the first device 1001 according to the communication frequency.
[0216] Furthermore, the first device 1001 is also used to detect the signal quality of the connection with the at least one second device 1002, and if the signal quality indicates the presence of interference, send a frequency switching command carrying a new communication baseband to the at least one second device 1002 to instruct the second device 1002 to update the communication baseband.
[0217] The second device 1002 is also used to receive a frequency switching command sent by the first device 1101 and update the local communication baseband according to the frequency switching command.
[0218] Furthermore, the first device 1001 is also used to continue using the original communication baseband as the most recently updated communication baseband if the second device 1002 fails to update the communication baseband.
[0219] The second device 1002 is also used to continue using the original communication baseband as the most recently updated communication baseband in the event that updating the local communication baseband fails.
[0220] The first device 1001 may be a host device, and the second device 1002 may be a slave device. The same network entity may be a host device or a slave device due to different network configurations.
[0221] Figure 11 This is a block diagram illustrating an apparatus 1200 for communication based on LoRa spread spectrum technology according to an exemplary embodiment. For example, apparatus 1100 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0222] Reference Figure 11 The device 1100 may include one or more of the following components: a processing component 1102, a memory 1104, a power supply component 1106, a multimedia component 1108, an audio component 1110, an input / output (I / O) interface 1112, a sensor component 1114, and a communication component 1116.
[0223] Processing component 1102 typically controls the overall operation of device 1100, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 1102 may include one or more processors 1120 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 1102 may include one or more modules to facilitate interaction between processing component 1102 and other components. For example, processing component 1102 may include a multimedia module to facilitate interaction between multimedia component 1108 and processing component 1102.
[0224] Memory 1104 is configured to store various types of data to support the operation of device 1100. Examples of this data include instructions for any application or method operating on device 1100, contact data, phonebook data, messages, pictures, videos, etc. Memory 1104 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0225] Power supply component 1106 provides power to various components of device 1100. Power supply component 1106 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 1100.
[0226] Multimedia component 1108 includes a screen that provides an output interface between the device 1100 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 1108 includes a front-facing camera and / or a rear-facing camera. When the device 1100 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0227] Audio component 1110 is configured to output and / or input audio signals. For example, audio component 1110 includes a microphone (MIC) configured to receive external audio signals when device 1100 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 1104 or transmitted via communication component 1116. In some embodiments, audio component 1110 also includes a speaker for outputting audio signals.
[0228] I / O interface 1112 provides an interface between processing component 1102 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0229] Sensor assembly 1114 includes one or more sensors for providing status assessments of various aspects of device 1100. For example, sensor assembly 1114 may detect the on / off state of device 1100, the relative positioning of components such as the display and keypad of device 1100, changes in the position of device 1100 or a component of device 1100, the presence or absence of user contact with device 1100, the orientation or acceleration / deceleration of device 1100, and temperature changes of device 1100. Sensor assembly 1114 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 1114 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 1114 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0230] Communication component 1116 is configured to facilitate wired or wireless communication between device 1100 and other devices. Device 1100 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 1116 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 1116 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0231] In an exemplary embodiment, the apparatus 1100 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0232] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1104 including instructions, which can be executed by a processor 1120 of the device 1100 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0233] Figure 12 This is a block diagram illustrating an apparatus 1200 for communication based on LoRa spread spectrum technology according to an exemplary embodiment. For example, apparatus 1200 may be provided as a server. (Refer to...) Figure 12 The apparatus 1200 includes a processing component 1222, which further includes one or more processors, and memory resources represented by memory 1232 for storing instructions, such as application programs, that can be executed by the processing component 1222. The application programs stored in memory 1232 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1222 is configured to execute instructions to perform the methods described above.
[0234] Device 1200 may also include a power supply component 1226 configured to perform power management of device 1200, a wired or wireless network interface 1250 configured to connect device 1200 to a network, and an input / output (I / O) interface 1258. Device 1200 can operate on an operating system stored in memory 1232, such as Windows Server™, MacOS X™, Unix™, Linux™, FreeBSD™, or similar.
[0235] An exemplary embodiment of this disclosure also provides a non-transitory computer-readable storage medium, wherein when instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal is enabled to execute a communication method based on LoRa spread spectrum technology, the method comprising:
[0236] Based on the identity information of the communication peer, obtain the frequency offset of the communication peer;
[0237] The communication frequency point of the communication peer is obtained by superimposing the frequency offset on the recently updated communication base frequency.
[0238] Data is transmitted with the communication peer according to the communication frequency.
[0239] An exemplary embodiment of this disclosure also provides a non-transitory computer-readable storage medium, wherein when instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal is enabled to execute a communication method based on LoRa spread spectrum technology, the method comprising:
[0240] Based on the local identity information, obtain the frequency offset;
[0241] The communication frequency point is obtained by superimposing the frequency offset on the most recently updated communication baseband.
[0242] Data is transmitted with the communication peer according to the communication frequency.
[0243] This disclosure provides a communication method and system based on LoRa spread spectrum technology. The method obtains the frequency offset of the communication peer based on the peer's identity information. Then, it adds the frequency offset to the most recently updated communication baseband to obtain the communication frequency of the peer. Data is then transmitted with the peer based on this communication frequency. The communication baseband is updated, and the device's current communication frequency is obtained by combining the latest baseband with the device's identity information. This allows for flexible configuration of the frequency used by the device during frequency hopping transmission, solving the problems of low transmission efficiency and high maintenance costs associated with using a single frequency for data transmission, and achieving flexible and efficient data transmission management.
[0244] In applications such as battery-powered industrial alarm detectors, the host device, based on the technical solution provided in this disclosure, achieves automatic frequency adjustment and switching of the communication frequency between the master and slave devices. This quickly and effectively solves the signal interference problem. While improving the anti-interference capability of LoRa communication, it also reduces the probability of false wake-ups of devices that do not require communication, thus extending the battery life of the devices.
[0245] Those skilled in the art will also understand that the various illustrative logical blocks and steps listed in the embodiments of this application can be implemented by electronic hardware, computer software, or a combination of both. Whether such functionality is implemented through hardware or software depends on the specific application and the overall system design requirements. Those skilled in the art can implement the described functionality using various methods for each specific application, but such implementation should not be construed as exceeding the scope of protection of the embodiments of this application.
[0246] Furthermore, the term “exemplary” is used herein to mean serving as an example, instance, or illustration. Any aspect or design described herein as “exemplary” is not necessarily to be construed as advantageous compared to other aspects or designs. Rather, the use of the term “exemplary” is intended to present the concept in a concrete manner. As used herein, the term “or” is intended to mean an inclusive “or” rather than an exclusive “or.” That is, unless otherwise specified or clear from the context, “X applies A or B” is intended to mean any of the natural inclusive arrangements. That is, “X applies A or B” satisfies any of the foregoing instances if X applies A; X applies B; or both X applies A and B. Additionally, unless otherwise specified or clear from the context to refer to the singular form, the articles “a” and “an” as used in this application and the appended claims are generally understood to mean “one or more.”
[0247] Similarly, although this disclosure has been shown and described with respect to one or more implementations, equivalent variations and modifications will occur to those skilled in the art upon reading and understanding this specification and the accompanying drawings. This disclosure includes all such modifications and variations and is limited only by the scope of the claims. In particular, with respect to the various functions performed by the components described above (e.g., elements, resources, etc.), unless otherwise indicated, the terminology used to describe such components is intended to correspond to any component (functionally equivalent) that performs the specific function of the described component, even if structurally not equivalent to the disclosed structure. Furthermore, although specific features of this disclosure may have been disclosed with respect to only one of several implementations, such features may be combined with one or more other features of other implementations, as may be desired and advantageous to any given or particular application. Moreover, with regard to the terms “comprising,” “owning,” “having,” “having,” or variations thereof as used in the detailed description or claims, such terms are intended to be inclusive in a manner similar to the term “including.”
[0248] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0249] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A communication method based on LoRa spread spectrum technology, characterized in that, including: Obtain the frequency offset of the communication peer according to the identity information of the communication peer; Superimpose the frequency offset on the most recently updated communication base frequency to obtain the communication frequency of the communication peer; Perform data transmission with the communication peer according to the communication frequency; Detect the signal quality of the connection with at least one communication peer; When the signal quality indicates interference, send a frequency point switching command carrying a new communication base frequency to the communication peer to instruct the communication peer to update the communication base frequency; wherein, it is judged whether there is interference according to the signal quality through the following steps: Set a time-domain preset value as the time window for interference detection, perform FFT spectrum analysis on the signal of the connection between communication peers within the time-domain preset value, obtain the threshold RSSI_E of RSSI interference and the threshold q_E of communication success rate in the frequency domain, use the range greater than RSSI_E as the RSSI interference range, and use the range less than q_E as the communication success rate interference range; Record the RSSI, total number of transmissions, and number of successful transmissions when waking up the slave device with wake-up data, calculate the communication success rate q based on the total number of transmissions and the number of successful transmissions, and determine that there is interference when q < q_E, or RSSI > RSSI_E, or q < q_E and RSSI > RSSI_E; When the communication peer fails to update the communication base frequency, still use the original communication base frequency as the most recently updated communication base frequency.
2. A communication system based on LoRa spread spectrum technology, used to implement the method of claim 1, characterized in that, including a first device and at least one second device; The first device is configured to respectively obtain the frequency offset of each second device according to the identity information of the second device, superimpose the frequency offset on the most recently updated communication base frequency to obtain the communication frequency of each second device, and perform data transmission with each second device according to the communication frequency; The second device is configured to obtain the frequency offset according to its local identity information, superimpose the frequency offset on the most recently updated communication base frequency to obtain the communication frequency, and perform data transmission with the first device according to the communication frequency.
3. The communication system based on LoRa spread spectrum technology according to claim 2, wherein: The first device is further configured to detect the signal quality of the connection with the at least one second device, and when the signal quality indicates interference, send a frequency point switching command carrying a new communication base frequency to the at least one second device to instruct the second device to update the communication base frequency; The second device is further configured to receive the frequency point switching command sent by the first device and update the local communication base frequency according to the frequency point switching command.
4. The communication system based on LoRa spread spectrum technology according to claim 2, wherein: The first device is further configured to still use the original communication base frequency as the most recently updated communication base frequency when the second device fails to update the communication base frequency; The second device is further configured to continue to use the original communication base frequency as the most recently updated communication base frequency when the local communication base frequency update fails.