A wireless frequency hopping communication method based on Lora technology

CN122475724BActive Publication Date: 2026-09-29崂山国家实验室 +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610942403.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-29
Publication Date
2026-09-29
Estimated Expiration
2046-06-29

AI Technical Summary

Technical Problem

即便数据载荷经过加密,固定的传输特征仍可能暴露设备身份、通信模式与网络拓扑,为恶意攻击者实施频谱侦测、干扰注入或重放攻击提供了便利,难以满足对通信隐私与安全要求较高的应用需求

Benefits of technology

[0017]本申请具有的优点和积极效果是:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122475724B_ABST
    Figure CN122475724B_ABST
Patent Text Reader

Abstract

The application discloses a wireless frequency hopping communication method based on Lora technology and belongs to the technical field of wireless communication, which comprises the following steps: setting a communication module number containing three hexadecimal numbers for a wireless communication module, wherein the communication module number is represented as n1, n2 and n3; configuring Lora physical layer parameters according to the value of n1, wherein the Lora physical layer parameters comprise a spreading factor SF, a communication bandwidth BW and a coding rate CR; determining an initial frequency table according to the value of n2 and determining a frequency hopping sequence table based on a frequency hopping table generation algorithm according to the value of n3; setting the same communication module number for a transceiving end, and performing carrier frequency hopping according to a set frequency hopping period in a single data packet transmission process based on the frequency hopping table formed by the generated frequency hopping sequence table and the initial frequency table; and the application utilizes the number rules of different modules, the frequency hopping table generation algorithm based on different numbers and can ensure that different numbered devices perform data transmission according to different frequency hopping rules, thereby greatly improving the security of communication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of wireless communication technology, and particularly relates to a wireless frequency hopping communication method based on LoRa technology. Background Technology

[0002] LoRa technology, as a low-power wide-area network (LPWAN) communication standard, is widely used in various IoT scenarios, such as smart meters, environmental monitoring, and smart agriculture, due to its significant advantages of long-range operation and low power consumption. However, with the increasing complexity and scale of IoT applications, the traditional fixed-frequency LoRa communication mode is gradually revealing the following key challenges: First, there is the compliance pressure brought about by regulatory restrictions. To prevent prolonged occupation of specific frequency points and ensure the fair use of spectrum resources, global and regional radio communication regulations typically strictly limit the maximum continuous dwell time of wireless devices on a single channel. LoRa technology, in order to achieve ultra-long-distance transmission, often employs a lower spreading factor and a higher coding rate. This significantly extends the time-on-air transmission time of a single data packet, especially noticeable in environments with long loads or poor signal conditions. This can easily exceed the maximum channel dwell time allowed by regulations, thus posing compliance risks.

[0003] Secondly, there is the issue of interference from multiple coexisting devices. In densely populated scenarios with high data transmission frequency, high node density, and close proximity of devices, such as industrial sensor networks and intelligent building monitoring systems, if a large number of devices communicate on a single or a few frequency points for extended periods, co-channel and adjacent-channel interference can easily occur. This interference leads to increased packet collision rate and decreased receiver sensitivity, resulting in lower communication success rate and increased network latency, severely impacting the overall system performance and reliability.

[0004] Secondly, there are inherent weaknesses in communication security. Data transmission using fixed or predictable frequencies makes signals vulnerable to continuous eavesdropping, interception, and analysis by third parties. Even with encrypted data payloads, fixed transmission characteristics can still expose device identity, communication patterns, and network topology, facilitating malicious attackers to conduct spectrum reconnaissance, interference injection, or replay attacks. This makes it difficult to meet the needs of applications with high requirements for communication privacy and security.

[0005] While existing wireless technologies offer frequency-hopping communication solutions that can be referenced, such as Bluetooth's Adaptive Frequency Hopping (AFH) or the strong anti-jamming frequency hopping used in military communications, these solutions typically rely on precise timing synchronization, complex channel negotiation mechanisms, or highly random frequency hopping sequence generation algorithms. Their implementation often results in significant protocol overhead, computational resource consumption, and energy consumption. This makes LoRa's target low-power, low-data-rate, low-cost, and often battery-powered IoT terminal nodes difficult to adapt in terms of power consumption, cost, and complexity, lacking universal feasibility. Summary of the Invention

[0006] To address the problems mentioned in the background art, this invention provides a wireless frequency hopping communication method based on LoRa technology. By utilizing the numbering rules of different modules and the frequency hopping table generation algorithm based on different numbers, it can ensure that devices with different numbers transmit data according to different frequency hopping rules, greatly improving the security of communication.

[0007] The first objective of this invention is to provide a wireless frequency hopping communication method based on LoRa technology, comprising: The wireless communication module is assigned a communication module number consisting of three hexadecimal digits, denoted as n1, n2, and n3; the value of the communication module number n1 represents a combination of different physical layer parameters of LoRa. Configure Lora physical layer parameters based on the value of n1, including spreading factor SF, communication bandwidth BW, and coding rate CR; The initial frequency table is determined based on the value of n2, and the frequency hopping order table is determined based on the value of n3 using the frequency hopping table generation algorithm. The transmitting and receiving ends are set with the same communication module number. Based on the frequency hopping table formed by the generated frequency hopping order table and the initial frequency table, the carrier frequency is hopped according to the set frequency hopping period during the transmission of a single data packet.

[0008] Preferably, determining the frequency hopping order table based on the value of n3 using the frequency hopping table generation algorithm includes: When n3=K=0, the initial frequency hopping order table of group 0 is selected as the current frequency hopping order table; When n3 = K ≠ 0, the frequency hopping order table Hop_Order corresponding to the previous number is used. (K 1) The frequency hopping interval Hop_Interval is used to generate the current frequency hopping order table Hop_Order using the following formula. K : Hop_Order K [j]=Hop_Order (K 1)[(Hop_Interval×(j+1))%N] Where j is the position index in the frequency hopping order table, and its value ranges from [0, N]. 1], N is the number of frequency points in the frequency table, and % represents the modulo operation.

[0009] Preferably, the value of the frequency hopping interval Hop_Interval is coprime to the number of frequency points N, to ensure that the generated frequency hopping order table can traverse from 0 to N. All values ​​of 1.

[0010] Preferably, determining the initial frequency table based on the value of n2 includes: Based on the Lora operating frequency band, multiple initial frequency tables are divided, and each frequency table contains N frequency points. The corresponding initial frequency table is selected based on the value of n2, so that the equipment groups with different numbers operate in different frequency band sets.

[0011] Preferably, the step of performing carrier frequency hopping according to a set frequency hopping period during a single data packet transmission includes: Calculate the total number of symbols in a single data packet, SymbolNb; The frequency hopping period Thop is set according to application requirements, which is the number of symbols transmitted at each frequency point; The number of frequency jumps required for this transmission is determined based on the ratio of SymbolNb to Thop.

[0012] A second objective of this invention is to provide a wireless frequency hopping communication system based on LoRa technology, comprising: The numbering setting module sets a communication module number containing three hexadecimal digits for the wireless communication module, wherein the communication module number is represented as n1, n2, n3; The parameter configuration module configures LoRa physical layer parameters based on the value of n1, including spreading factor SF, communication bandwidth BW, and coding rate CR. The frequency hopping table generation module determines the initial frequency table based on the value of n2, and determines the frequency hopping order table based on the value of n3 using the frequency hopping table generation algorithm. The frequency hopping communication module has the same communication module number set at both the transmitting and receiving ends. Based on the frequency hopping table formed by the generated frequency hopping order table and the initial frequency table, the carrier frequency is hopped according to the set frequency hopping period during the transmission of a single data packet.

[0013] Preferably, the frequency hopping table generation module includes: When n3=K=0, the initial frequency hopping order table of group 0 is selected as the current frequency hopping order table; When n3 = K ≠ 0, the frequency hopping order table Hop_Order corresponding to the previous number is used.(K 1) The frequency hopping interval Hop_Interval is used to generate the current frequency hopping order table Hop_Order using the following formula. K : Hop_Order K [j]=Hop_Order (K 1) [(Hop_Interval×(j+1))%N] Where j is the position index in the frequency hopping order table, and its value ranges from [0, N]. 1], N is the number of frequency points in the frequency table, and % represents the modulo operation; The value of the frequency hopping interval Hop_Interval and the number of frequency points N are coprime to ensure that the generated frequency hopping order table can traverse from 0 to N. All values ​​of 1.

[0014] Preferably, the parameter configuration module includes: Based on the Lora operating frequency band, multiple initial frequency tables are divided, and each frequency table contains N frequency points. The corresponding initial frequency table is selected based on the value of n2, so that the equipment groups with different numbers operate in different frequency band sets.

[0015] A third objective of this invention is to provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned wireless frequency hopping communication method based on LoRa technology.

[0016] A fourth objective of this invention is to provide a computer program product, including a computer program that, when executed by a processor, implements the aforementioned wireless frequency hopping communication method based on LoRa technology.

[0017] The advantages and positive effects of this application are: This invention utilizes the numbering rules of different modules and frequency hopping table generation algorithms based on different numbers to ensure that devices with different numbers transmit data according to different frequency hopping rules, greatly improving the confidentiality and security of communication.

[0018] This invention uses recursive mathematical formulas to generate frequency hopping sequences, eliminating the need for the sender and receiver to exchange large amounts of frequency hopping table data before communication, and also eliminating the need for a complex random number seed negotiation process, making it suitable for IoT terminals with low computing power.

[0019] This invention significantly reduces the air occupancy time of a single frequency point by frequency hopping within a single data packet, meeting radio regulations and effectively avoiding interference from fixed frequencies.

[0020] This invention, through the combination of n1, n2, and n3, theoretically supports N! different permutations and combinations, ensuring interference-free communication between a large number of devices in the same space. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 A schematic diagram of the frequency hopping communication process in a preferred embodiment of the present invention is shown; Figure 2 The flowchart of the main program execution of a preferred embodiment of the present invention is shown; Figure 3 A flowchart illustrating the numbering setting and the radio frequency parameter initialization based on the numbering in a preferred embodiment of the present invention is shown. Figure 4 An example diagram of frequency hopping order table generation in a preferred embodiment of the present invention is shown. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] Please see Figures 1 to 4 The first embodiment, a wireless frequency hopping communication method based on LoRa technology, mainly includes: The wireless communication module is assigned a communication module number consisting of three hexadecimal digits, which are represented as n1, n2, and n3. Configure Lora physical layer parameters based on the value of n1, including spreading factor SF, communication bandwidth BW, and coding rate CR; The initial frequency table is determined based on the value of n2, and the frequency hopping order table is determined based on the value of n3 using the frequency hopping table generation algorithm. The transmitting and receiving ends are set with the same communication module number. Based on the frequency hopping table formed by the generated frequency hopping order table and the initial frequency table, the carrier frequency is hopped according to the set frequency hopping period during the transmission of a single data packet.

[0025] In the above embodiments: The communication module number consists of three hexadecimal digits, represented as n1, n2, and n3 respectively. For example, when n1=1, n2=2, and n3=10, the communication module number is represented as 01020A.

[0026] The value of communication module number n1 represents a combination of different physical layer parameters of LoRa, mainly including the spreading factor SF, communication bandwidth BW, and coding rate CR. Different combinations of parameters determine the different communication rates and sensitivities of the wireless module, and only modules with identical physical layer parameter configurations can communicate with each other. The program will select one of the combinations based on the value of n1.

[0027] The value of the communication module number n2 represents different initial frequency tables. Based on the Lora operating frequency band, multiple initial frequency tables are divided, and each frequency table contains N (N≥10) frequency points.

[0028] A frequency table is determined based on the communication module number n2, and a frequency hopping table is generated based on the communication module number n3. The frequency hopping table is essentially a rearrangement of the initial frequency table, with modules of different numbers hopping frequencies in different orders. For a frequency table containing N frequency points, theoretically, N! different permutations are supported. To facilitate program implementation, a frequency hopping table generation algorithm was designed.

[0029] The frequency hopping table generation algorithm includes the following steps: Several initial frequency hopping sequence tables are set up. Each frequency hopping sequence table contains N numbers, which are different permutations of the numbers 0 to N-1, matching the number of frequency points in the frequency table. When n3=0, the 0th initial frequency hopping sequence table is selected, and its frequency hopping table is generated based on the sequence table and the determined frequency table.

[0030] When n3≠0, the corresponding frequency hopping order table is generated based on the frequency hopping order table of the previous number. The specific generation rule is as follows: Several different frequency hopping intervals (Hop_Interval) are set. The Hop_Interval represents the interval between two adjacent frequency points in the current frequency hopping sequence table, based on the previous number. For example, if the previous frequency hopping sequence is 0, 1, 2, 3..., and the frequency hopping interval is 3, the generated frequency hopping sequence table will be 3, 6, 9, 12...

[0031] As mentioned above, when the frequency hopping interval is 3, the j-th value (j ranges from [0, N-1]) in the frequency hopping sequence table corresponds to the 3rd (j+1)th value of the previous number in the frequency hopping sequence table. When 3(j+1) is greater than N-1, the value at that position is assigned to 3(j+1)-N, and the cycle restarts from the smaller number. The above process can be expressed by the formula: Hop_Order_K[j]=Hop_Order_(K-1)[(Hop_Interval×(j+1))%N] Hop_Order_K[] represents the frequency hopping order table when n3=K, and Hop_Order_K[j] represents the j-th value (j takes values ​​in the range [0,N-1]).

[0032] It is important to note that the values ​​of the number of frequency points N and the frequency hopping interval Hop_Interval should ensure that the generated frequency hopping order table can traverse all values ​​from 0 to N-1.

[0033] Based on the above rules, when the number of frequency points is N, N-1 sets of frequency hopping tables with different permutations can be generated, with the corresponding n3 values ​​ranging from 0 to N-2. When n3 is numbered K (0≤K<N-1), it is necessary to perform K iterations of assignment to generate its corresponding frequency hopping order table and thus determine its frequency hopping table.

[0034] When K = N-1, if the frequency hopping order table is generated according to the above rules, it will be consistent with the frequency hopping order when K = 0. In this case, the initial frequency hopping order table should be replaced, and subsequent numbered order tables should be generated based on this table. This process continues until... When K = M × (N-1) (M is a positive integer ≥ 1), the initial frequency hopping order table is changed once. Assuming M initial frequency hopping order tables are set, based on the value of N, and with the frequency hopping interval Hop_Interval remaining constant, a total of (N-1) × M different frequency hopping orders can be generated. Subsequently, the value of Hop_Interval can be changed to continue generating different frequency hopping orders, ultimately ensuring that all different numbers correspond to different frequency hopping tables.

[0035] Based on the above numbering rules and frequency hopping table generation rules, the transmitting and receiving ends can communicate with each other by setting the same number, and multiple groups of devices can work simultaneously without interfering with each other.

[0036] Based on the set frequency hopping table, the frequency hopping communication diagram of the transceiver is shown in the attached figure. Figure 1 As shown, the specific process is as follows: 1. The transmitting end starts transmitting data and first sends a preamble at frequency 0; 2. The transmitting end prepares to receive data at frequency 0 and starts receiving data after detecting the preamble; 3. The transmitting end and the receiving end perform synchronous frequency hopping according to the set frequency table and frequency hopping period respectively.

[0037] The frequency hopping period specifically refers to the number of symbols transmitted at each frequency point, as set in the program. The total number of symbols in a data packet is determined by the number of bytes in the data packet and the set radio frequency parameters. A large frequency hopping period results in a longer airtime at a single frequency point and fewer frequency points used for transmission hopping. A small frequency hopping period results in a shorter airtime at a single frequency point and more frequency points used for transmission hopping.

[0038] To facilitate device numbering, a rapid numbering scheme based on serial port commands was designed. Commands are sent via a serial port assistant to set the number, and the set number and its corresponding physical layer parameters are stored in the on-chip FLASH of the main control chip. This storage is not lost upon power loss and remains until the next setting command changes the number. Before numbering is set, the module's default number is 010000. The main program flow and numbering process are attached. Figure 2 , Figure 3 As shown.

[0039] By implementing the method proposed in this application, multiple groups of devices can be quickly numbered, and devices with different numbers can communicate simultaneously in adjacent spaces without mutual interference, ensuring the reliability of information transmission.

[0040] The frequency hopping communication method proposed in this application ensures the security of information transmission. Although this method describes the frequency hopping method and rules in detail, even a third party using the same method cannot obtain complete transmission information if the specific physical layer parameter combination, the initial frequency table frequency point division rules, the initial frequency hopping order, the specific frequency hopping interval, and the frequency hopping period cannot be obtained.

[0041] In one specific embodiment, determining the frequency hopping order table based on the value of n3 using a frequency hopping table generation algorithm includes: When n3=K=0, the initial frequency hopping order table of group 0 is selected as the current frequency hopping order table; When n3 = K ≠ 0, the frequency hopping order table Hop_Order corresponding to the previous number is used. (K 1) The frequency hopping interval Hop_Interval is used to generate the current frequency hopping order table Hop_Order using the following formula. K : Hop_Order K [j]=Hop_Order (K 1) [(Hop_Interval×(j+1))%N] Where j is the position index in the frequency hopping order table, and its value ranges from [0, N]. 1], N is the number of frequency points in the frequency table, and % represents the modulo operation.

[0042] In one specific embodiment, the value of the frequency hopping interval Hop_Interval and the number of frequency points N are coprime to ensure that the generated frequency hopping order table can traverse from 0 to N. All values ​​of 1.

[0043] In one specific embodiment, determining the initial frequency table based on the value of n2 includes: Based on the Lora operating frequency band, multiple initial frequency tables are divided, and each frequency table contains N frequency points. The corresponding initial frequency table is selected based on the value of n2, so that the equipment groups with different numbers operate in different frequency band sets.

[0044] In one specific embodiment, the step of performing carrier frequency hopping according to a set frequency hopping period during a single data packet transmission includes: Calculate the total number of symbols in a single data packet, SymbolNb; The frequency hopping period Thop is set according to application requirements, which is the number of symbols transmitted at each frequency point; The number of frequency jumps required for this transmission is determined based on the ratio of SymbolNb to Thop.

[0045] A wireless frequency hopping communication system based on LoRa technology, comprising: The numbering setting module sets a communication module number containing three hexadecimal digits for the wireless communication module, wherein the communication module number is represented as n1, n2, n3; The parameter configuration module configures LoRa physical layer parameters based on the value of n1, including spreading factor SF, communication bandwidth BW, and coding rate CR. The frequency hopping table generation module determines the initial frequency table based on the value of n2, and determines the frequency hopping order table based on the value of n3 using the frequency hopping table generation algorithm. The frequency hopping communication module has the same communication module number set at both the transmitting and receiving ends. Based on the frequency hopping table formed by the generated frequency hopping order table and the initial frequency table, the carrier frequency is hopped according to the set frequency hopping period during the transmission of a single data packet.

[0046] In one specific embodiment, the frequency hopping table generation module includes: When n3=K=0, the initial frequency hopping order table of group 0 is selected as the current frequency hopping order table; When n3 = K ≠ 0, the frequency hopping order table Hop_Order corresponding to the previous number is used. (K 1) The frequency hopping interval Hop_Interval is used to generate the current frequency hopping order table Hop_Order using the following formula. K : Hop_Order K [j]=Hop_Order (K 1) [(Hop_Interval×(j+1))%N] Where j is the position index in the frequency hopping order table, and its value ranges from [0, N]. 1], N is the number of frequency points in the frequency table, and % represents the modulo operation; The value of the frequency hopping interval Hop_Interval and the number of frequency points N are coprime to ensure that the generated frequency hopping order table can traverse from 0 to N. All values ​​of 1.

[0047] In one specific embodiment, the parameter configuration module includes: Based on the Lora operating frequency band, multiple initial frequency tables are divided, and each frequency table contains N frequency points. The corresponding initial frequency table is selected based on the value of n2, so that the equipment groups with different numbers operate in different frequency band sets.

[0048] The following example illustrates the steps involved in generating a frequency hopping table: Set the communication module numbering rules, where n1 ranges from 1 to 5; n2 ranges from 0 to 2; and n3 ranges from 0 to 0xFF (decimal representation is 0 to 255). For example, when n1=1, n2=2, and n3=10, the module number is represented as 01020A.

[0049] The value of the communication module number n1 represents a combination of different physical layer parameters of LoRa. This system is designed with 5 combinations based on different parameters (spreading factor, communication bandwidth, coding rate). The communication module number n1 takes values ​​from 1 to 5 to represent one of these combinations.

[0050] Based on the operating frequency band of the selected LoRa module, three initial frequency tables are divided, denoted as Fre_List0[N], Fre_List1[N], and Fre_List2[N], respectively. Each frequency table contains 17 frequency points, for example: Fre_List0[N]={433000000,434000000,435000000……449000000}, The unit is Hz, and 433000000 represents 433MHz. Taking N=17, theoretically each frequency table supports 17! combinations as the frequency hopping table for the communication module.

[0051] The communication module number n2 represents a different frequency hopping table. For example, n2=1 represents Fre_List1[N], meaning that all devices with the number n2=1 perform frequency hopping based on this frequency table.

[0052] Set up 5 initial frequency hopping order tables: Hop_Order_List0[N], Hop_Order_List1[N], Hop_Order_List2[N], Hop_Order_List3[N], and Hop_Order_List4[N]. For example, N=17. Hop_Order_List0

[17] ={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16} : Hop_Order_List4

[17] ={6,16,13,5,9,15,2,8,7,1,14,12,3,4,11,0,10} The numbers 0-16 correspond to the number of each frequency point in the frequency table.

[0053] Based on the frequency table determined by the communication module number n2, an algorithm for generating a frequency hopping table based on the communication module number n3 was designed. For example, when n3=0, the corresponding frequency hopping order is set to Hop_Order[N]. Hop_Order[N]=Hop_Order_List0[N]; When n3≠0, the corresponding frequency hopping order is reordered based on the frequency hopping order of the previous sequence number according to certain rules. For example, when n3=K, the corresponding frequency hopping order generation formula is as follows: Hop_Order_K[j]=Hop_Order_(K-1)[(Hop_Interval×(j+1))%N] in: 0≤j≤N; K: represents the current value of n3; Hop_Interval: This is a custom frequency hopping interval; N: Represents the number of frequency points included in the frequency hopping table; Based on the above formula, when the initial frequency hopping order and Hop_Interval are determined, taking N=17 as an example, 16 completely different frequency hopping order tables will be generated. Therefore, when K is an integer multiple of 16, resetting the initial frequency hopping order will generate another 16 completely different frequency hopping orders. Assuming n1=1, N=17, and Hop_Interval=3, the frequency hopping order table generated based on the value of n3 is shown in Table 1. This can be implemented in the program using the following code: for(i=0;i<(K%(N-1));i++) { for(j=0;j <N;j++) { Hop_Order_temp[j]=Hop_Order[(Hop_Interval[n]*(j+1))%N]; } for(j=0;j <N;j++) { Hop_Order[j]=Hop_Order_temp[j]; } } Based on the above code, when n3 = K, the corresponding frequency hopping order table is generated after K%16 loops. K%16 represents the remainder when K is divided by 16. When K ≥ 16, the initial frequency hopping order is reset. Here, Hop_Interval[] represents the set of frequency hopping intervals, and Hop_Interval[n] represents the nth frequency hopping interval. The frequency hopping table generated from this frequency hopping order, taking the initial frequency hopping table Fre_List0[N] as an example. for(i=0;i <N;i++) { Fre_list[i]=Fre_List0[Hop_Order[i]]; } pass Figure 4 The demonstration shows that when K = 16, if the frequency hopping order table is generated according to the above rules, it will be consistent with the frequency hopping order when K = 0. In this case, the initial frequency hopping order table is replaced, and subsequent numbered order tables are generated based on this table. This process continues until K = M × 16 (where M is a positive integer ≥ 1), at which point the initial frequency hopping order table is replaced once. The specific program implementation for this process is as follows: switch(K / (N-1)) { case0x00: for(i=0;i <N;i++) { Hop_Order[[i]=Hop_Order_List0[i]; } break case0x01: for(i=0;i <N;i++) { Hop_Order[[i]=Hop_Order_List1[i]; } break case0x02: for(i=0;i <N;i++) { Hop_Order[[i]=Hop_Order_List2[i]; } break case0x03: for(i=0;i <N;i++) { Hop_Order[[i]=Hop_Order_List3[i]; } break case0x04: for(i=0;i <N;i++) { Hop_Order[[i]=Hop_Order_List4[i]; } break By setting 5 initial frequency hopping order tables and keeping the frequency hopping interval Hop_Interval constant, a total of 5 × 16 = 80 different frequency hopping orders can be generated. Afterwards, by changing the value of Hop_Interval, another 80 frequency hopping orders can be generated. Since n3 takes values ​​in the range [0, 255], setting 4 different frequency hopping intervals ensures that all different numbers correspond to different frequency hopping tables.

[0054] Based on the aforementioned numbering rules and frequency hopping table generation rules, transceivers can communicate with each other by setting the same number, supporting communication between up to 3840 devices within the same system without interference. A schematic diagram of transceiver frequency hopping communication based on the configured frequency hopping table is shown below. Figure 1 As shown, the specific process is as follows: 1. When the transmitting end starts transmitting data, it first sends a preamble on frequency 0.

[0055] 2. The transmitting end prepares to receive data at frequency 0, and begins receiving data after detecting the preamble.

[0056] 3. The transmitting and receiving ends perform synchronous frequency hopping according to the set frequency table and frequency hopping period.

[0057] The frequency hopping period specifically refers to the number of symbols transmitted at each frequency point as set in the program. The total number of symbols in a data packet is determined by the number of bytes in the data packet and the set radio frequency parameters, as shown in the following formula:

[0058] Indicates the total number of symbols in the data packet; PL represents the number of bytes in the payload; SF represents the spreading factor, with a value ranging from 6 to 12; When a header is used, H=0; when no header is used, H=1. When low-speed data optimization is enabled, DE=1; otherwise, DE=0. CR represents the coding rate, with a value ranging from 1 to 4; The function represents the maximum value within the parentheses. The function represents the floor function, which rounds up to the smallest integer greater than or equal to the value within the parentheses.

[0059] After determining the number of data packet symbols to be transmitted using the above formula, the frequency hopping period, i.e., the number of symbols transmitted per frequency point, can be flexibly set according to requirements. A larger frequency hopping period results in a longer airtime for a single frequency point, and fewer frequency points are used to complete transmission hops. A smaller frequency hopping period results in a shorter airtime for a single frequency point, and more frequency points are used to complete transmission hops.

[0060] To facilitate device numbering, a rapid numbering scheme based on serial port commands was designed. Commands are sent via a serial port assistant to set the number, and the set number and its corresponding physical layer parameters are stored in the on-chip FLASH of the main control chip. This storage is not lost upon power loss and remains until the next setting command changes the number. Before numbering is set, the module's default number is 010000. The main program flow and numbering process are as follows: Figure 2 , Figure 3 As shown.

[0061] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned LoRa-based wireless frequency hopping communication method.

[0062] A computer program product includes a computer program that, when executed by a processor, implements the aforementioned LoRa-based wireless frequency hopping communication method.

[0063] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented, in whole or in part, as a computer program product, the computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line, or wireless (e.g., infrared, wireless, microwave, etc.) means). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.

[0064] The above description is only a preferred embodiment of the present invention. It should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A wireless frequency hopping communication method based on LoRa technology, characterized in that, include: The wireless communication module is assigned a communication module number consisting of three hexadecimal digits, which are represented as n1, n2, and n3. The value of communication module number n1 represents a combination of different physical layer parameters of LoRa; Configure Lora physical layer parameters based on the value of n1, including spreading factor SF, communication bandwidth BW, and coding rate CR; The initial frequency table is determined based on the value of n2, specifically including: Based on the Lora operating frequency band, multiple initial frequency tables are divided, and each frequency table contains N frequency points. The corresponding initial frequency table is selected based on the value of n2, so that the equipment groups with different numbers work in different frequency band sets; And based on the value of n3, the frequency hopping order table is determined using a frequency hopping table generation algorithm; specifically including: When n3=K=0, the initial frequency hopping order table of group 0 is selected as the current frequency hopping order table; When n3 = K ≠ 0, the frequency hopping order table Hop_Order corresponding to the previous number is used. (K 1) The frequency hopping interval Hop_Interval is used to generate the current frequency hopping order table Hop_Order using the following formula. K Hop_Order K [j]=Hop_Order (K 1) [(Hop_Interval×(j+1))%N] Where j is the position index in the frequency hopping order table, and its value ranges from [0, N]. 1], N is the number of frequency points in the frequency table, and % represents the modulo operation; The transmitting and receiving ends are set with the same communication module number. Based on the frequency hopping table formed by the generated frequency hopping order table and the initial frequency table, the carrier frequency is hopped according to the set frequency hopping period during the transmission of a single data packet.

2. The wireless frequency hopping communication method based on LoRa technology according to claim 1, characterized in that, The value of the frequency hopping interval Hop_Interval and the number of frequency points N are coprime to ensure that the generated frequency hopping order table can traverse from 0 to N. All values ​​of 1.

3. The wireless frequency hopping communication method based on LoRa technology according to claim 1, characterized in that, The carrier frequency hopping according to a set frequency hopping period during a single data packet transmission includes: Calculate the total number of symbols in a single data packet, SymbolNb; The frequency hopping period Thop is set according to application requirements, which is the number of symbols transmitted at each frequency point; The number of frequency jumps required for this transmission is determined based on the ratio of SymbolNb to Thop.

Citation Information

Patent Citations

  • Data transmission method and device

    CN111989968A

  • LoRa positioning method and system based on symbol-level frequency hopping

    CN121240204A