Master-slave mode dynamic channel assessment frequency hopping method based on SX1262
Through dynamic channel assessment of master and slave nodes and custom protocols, LoRa communication is made efficient and reliable in complex environments, solving the problem of insufficient channel quality assessment and improving spectrum utilization efficiency and system adaptability.
Patent Information
- Application Number
- CN202511249414.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-03
- Publication Date
- 2025-11-21
AI Technical Summary
Existing LoRa communication solutions cannot dynamically and accurately assess channel quality in complex interference scenarios, resulting in easy interruption of communication links, inefficient use of spectrum resources, and a lack of adaptive capabilities.
A master-slave dynamic channel evaluation frequency hopping method is adopted. Through the interaction between the master node and the slave node, the RSSI, SNR and CAD status of candidate frequency points are obtained and evaluated. A multi-dimensional scoring model is constructed, high-quality frequency points are selected for communication, and frequency point synchronization and frequency hopping are performed through a custom protocol.
It improves the reliability and stability of communication, enhances the efficiency of spectrum resource utilization, reduces communication latency and power consumption, and strengthens the system's adaptability.
Smart Images

Figure CN121000247A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of wireless communication, more particularly, it relates to a master-slave type dynamic channel assessment frequency hopping method based on SX1262. BACKGROUND
[0002] LoRa (Long Range Radio) is a super-long-distance wireless transmission scheme based on spread spectrum technology, developed and popularized by Semtech Company. It adopts chirp spread spectrum (CSS) technology, has the characteristics of low power consumption, long-distance transmission (kilometer-level coverage), strong anti-interference ability, etc., and is widely used in the Internet of Things (IoT) field, such as data collection in smart agriculture, environmental monitoring in smart cities, device interconnection in industrial Internet of Things, etc.
[0003] In the LoRa communication process, the channel environment is a key factor affecting the communication quality. In the actual deployment scene, there are many interference sources: on the one hand, electromagnetic devices (such as motors, frequency converters) in industrial environments will produce narrowband or wideband interference; on the other hand, the frequency spectrum reuse of wireless communication (such as other LoRa nodes, WiFi devices working in the same frequency band) will also cause channel conflict. At the same time, the fading characteristics of the channel (such as multipath fading, shadow fading) will change dynamically with the environment (for example, changes in building obstructions, weather influences), causing fluctuations in key parameters such as signal strength, signal-to-noise ratio, and thus affecting the reliability and stability of communication.
[0004] In order to meet the specifications of wireless communication regulations in various countries for spectrum use (such as spectrum power limitation, frequency band authorization requirement), while ensuring communication quality (low packet loss rate, stable transmission rate), the traditional LoRa communication scheme has obvious shortcomings: 1. Static channel strategy limitation: Most schemes use fixed frequency points or simple polling frequency points for communication. Fixed frequency points are easily affected by continuous interference, and once the channel quality deteriorates (such as interference burst), the communication link is easily interrupted; simple polling frequency points lack precise assessment of channel quality, and cannot prioritize high-quality channels, resulting in inefficient use of spectrum resources, increased communication latency and power consumption.
[0005] 2. Lack of channel assessment: Existing technologies have single monitoring dimensions for channel quality (such as only focusing on signal strength RSSI), without considering parameters such as signal-to-noise ratio (SNR) and channel activity detection (CAD) results, making it difficult to fully reflect the actual communication capability of the channel. In complex interference scenarios, it is difficult to provide sufficient decision basis for frequency hopping and link adaptive adjustment.
[0006] Therefore, there is an urgent need for a LoRa communication algorithm capable of dynamically and accurately evaluating channel quality and realizing intelligent wireless frequency hopping based on the evaluation results to adapt to complex and variable communication environments, meet regulatory requirements, and ensure communication quality and efficiency. SUMMARY
[0007] In view of the deficiencies in the prior art, the purpose of the present application is to provide a master-slave dynamic channel evaluation frequency hopping method based on SX1262.
[0008] To achieve the above-mentioned purpose, the present application provides the following technical solutions: A master-slave dynamic channel evaluation frequency hopping method based on SX1262, characterized in that it comprises the following steps: The master node and the slave node establish a communication connection, and the master node obtains the received signal strength indication (RSSI), signal-to-noise ratio (SNR), and channel activity detection (CAD) state of the communication frequency point through the SX1262 chip; the slave node synchronously feeds back the RSSI and SNR data received by the master node; The master node maintains buffer information for storing historical data for a plurality of candidate frequency points, including RSSI, SNR, and CAD data; The master node scores the candidate frequency points in multiple dimensions based on the buffer information; The master node selects at least one high-quality frequency point from the candidate frequency points as a subsequent communication frequency point according to the score results; The master node informs the slave node of the selected subsequent communication frequency point information through a protocol frame to realize synchronous frequency hopping communication between the master node and the slave node.
[0009] Further, a custom communication protocol is used between the master node and the slave node, wherein the data structure sent by the master node includes: a 2-byte preamble for communication link synchronization; a 1-byte frequency point and protocol control field containing 4-bit current transmission frequency point index (MTX) and 4-bit reception frequency point index (MRX); a 1-byte next transmission and protocol type field containing 4-bit next transmission frequency point index (MNTX) and 4-bit protocol type identification (TYPE); and a 124-byte data field for carrying business data.
[0010] Further, a custom communication protocol is used between the master node and the slave node, wherein the data structure sent by the master node includes: a 1-byte preamble as a synchronization identifier for the slave node response; a 2-byte signal quality parameter field containing the RSSI and SNR values read in real time from the chip register; a 1-byte channel and state feedback field containing 4-bit CAD detection results and 4-bit slave node state return value (STATUS).
[0011] Further, the step of establishing a communication connection between the master node and the slave node comprises: the master node broadcasts a handshake protocol frame containing information of a receiving frequency point (Yi) and a next sending frequency point (Zi) at a default interaction frequency point (Xi); the slave node receives and parses the handshake protocol frame at the Xi frequency point, collects RSSI and SNR of the Xi frequency point, then hops to the Yi frequency point and performs CAD detection; the slave node returns a response protocol frame containing the collected information to the master node through the Yi frequency point, and the master node receives the response frame at the Yi frequency point to complete the connection establishment.
[0012] Further, the master node maintains 3 groups of cache information for each candidate frequency point, and each group of cache stores the latest 100 pieces of data of the corresponding frequency point, which are F[index][RSSI], F[index][SNR] and F[index][CAD] respectively, wherein index is the frequency point index.
[0013] Further, the step of scoring the candidate frequency point by the master node comprises calculating at least one of the following scores: a basic quality score calculated based on a weighted average of RSSI and SNR; an RSSI stability score calculated based on overall variance of RSSI historical data and variance of recent data; a CAD interference score calculated based on a channel blocking rate in CAD historical data; and a timeliness trend score calculated based on a deviation rate of a recent weighted average of RSSI and a long-term weighted average.
[0014] Further, the calculation standard of the basic quality score comprises: when the weighted average of RSSI is not less than a threshold m and the weighted average of SNR is not less than a threshold n, the highest score is given; when the weighted average of RSSI is less than the threshold m and the weighted average of SNR is less than a threshold k, the lowest score is given; wherein m, n and k are thresholds in actual application.
[0015] Further, the calculation standard of the RSSI stability score comprises: when the variance of the frequency point is less than a threshold m, the highest score is given; when the variance of the frequency point is greater than a threshold n and the variance of the recent 10 pieces of data is not less than a threshold k, the lowest score is given.
[0016] Further, the calculation standard of the CAD interference score comprises: when the blocking rate probability is less than a threshold m%, the highest score is given; when the blocking rate probability is greater than a threshold n%, the lowest score is given.
[0017] Further, the step of selecting a subsequent communication frequency point by the master node comprises: selecting the top 5 frequency points with the highest total scores from the 13 candidate frequency points to form a high-quality frequency point pool; randomly selecting 2 frequency points from the high-quality frequency point pool and ensuring that the 2 frequency points are non-adjacent frequency points; and taking the selected 2 frequency points as the master node receiving frequency point and the master node next sending frequency point respectively.
[0018] By adopting the above technical solutions, the application has the following beneficial effects: Enhancing communication reliability and stability: By dynamically assessing channel quality and intelligently selecting high-quality frequency points for communication, the invention effectively avoids the problem of persistent interference caused by fixed frequency points or simple polling strategies. When channel quality deteriorates or sudden interference occurs, the system can quickly switch to a better communication link, avoiding communication interruption and ensuring low packet loss rate and stability of data transmission.
[0019] Improving spectrum resource utilization efficiency: The algorithm can accurately assess and preferentially select high-quality channels, avoiding ineffective communication attempts on congested or interfered frequency points. Through intelligent frequency hopping, the available spectrum resources are maximized, significantly improving the utilization efficiency of the spectrum compared to traditional static strategies, and reducing communication latency and power consumption.
[0020] Achieving comprehensive and accurate channel quality assessment: The invention not only monitors signal strength (RSSI), but also considers signal-to-noise ratio (SNR) and channel activity detection (CAD) results. By scoring the basic quality, stability, interference situation, and timeliness trend in multiple dimensions, a comprehensive channel quality model is constructed, providing more sufficient and reliable data basis for frequency hopping decision.
[0021] Enhancing the adaptive and self-optimizing capabilities of the system: Through continuous interaction and parameter feedback between master and slave nodes, the master node can build a cache space containing 100 groups of historical data for each frequency point. This large amount of cache supports the algorithm module to model and analyze link quality, enabling the communication link to have self-optimizing and intelligent scheduling capabilities, dynamically adapting to complex and changing communication environments.
[0022] Efficient and low-overhead protocol design: The custom communication protocol structure is compact, with the master node protocol control part being only 4 bytes and the slave node response frame total length being only 4 bytes. This lightweight design greatly reduces transmission overhead while ensuring complete functionality, improving interaction efficiency, and is particularly suitable for power-sensitive and bandwidth-sensitive Internet of Things application scenarios. BRIEF DESCRIPTION OF DRAWINGS
[0023] Figure 1 The flowchart of the custom communication protocol in the embodiment of the invention.
[0024] Figure 2 The flowchart of the master-slave node connection establishment in the embodiment of the invention.
[0025] Figure 3 The flowchart of the communication link continuous interaction and frequency point polling in the embodiment of the invention.
[0026] Figure 4 The flowchart of the master-slave dynamic channel assessment algorithm in the embodiment of the invention. DETAILED DESCRIPTION
[0027] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort belong to the scope of protection of the present application.
[0028] The dynamic channel assessment algorithm and the wireless frequency hopping communication scheme based on the algorithm are specifically solved as follows: I. Defining a communication protocol, as shown in Figure 1 1. The master node sends a data structure (S101) Preamble: 2 bytes, fixed as AA55, used for communication link synchronization identification and quick establishment of data alignment reference at the two ends of the transceiver.
[0029] Frequency point and protocol control field: 1 byte, divided into 4-bit MTX and 4-bit MRX. Among them, MTX defines the current transmission frequency point index of the master node, 4 bits support 0-15, a total of 16 frequency points, which can adapt to the demand of multi-channel communication; MRX defines the receiving frequency point index after the master node finishes transmitting, also 4 bits support 16 frequency points, realizing flexible switching of the transmission and receiving frequency points and avoiding channel conflict.
[0030] Next transmission and protocol type field: 1 byte, divided into 4-bit MNTX and 4-bit TYPE. MNTX defines the next transmission frequency point index of the master node, so that the slave node knows the subsequent communication frequency point in advance, can pre-enter the corresponding receiving mode, and reduces the waiting time delay; TYPE is the protocol type identifier, when TYPE = 0, it represents the handshake request protocol, and other values correspond to the data communication protocol, which is distinguished and processed by the upper logic to realize protocol multiplexing.
[0031] Data field: 124 bytes, used to carry actual business data, and zero is automatically filled when the data length is insufficient, so as to ensure the overall data structure to be regular and adapt to the byte alignment requirement of hardware transceiving.
[0032] The total length of the overall master node data structure is 2+1+1+124=128 bytes, and the protocol control part is only 4 bytes, which greatly compresses the transmission overhead while ensuring the integrity of the function.
[0033] 2. The slave node sends a data structure (S102) Preamble: 1 byte, fixed as A5, as a synchronization identifier for the response of the slave node, cooperating with the preamble of the master node to complete the identification of the bidirectional link.
[0034] Signal quality parameters: 2 bytes, including RSSI (received signal strength indication) and SNR (signal-to-noise ratio), each occupying 1 byte. Both parameters are read in real time from the SX1262 chip register, reflecting the signal quality of the slave node when receiving the master node data (usually corresponding to the MTX frequency point), providing a basis for the master node to evaluate the stability of the communication link and adjust the transmission parameters.
[0035] Channel and status feedback field: 1 byte, divided into 4-bit CAD and 4-bit STATUS. CAD is used to check the congestion state of the master node MRX frequency point, with actual values of 0 (not congested) or 1 (congested), allowing the master node to know the channel availability in advance and avoid invalid transmission; STATUS is the return value of the slave node state, with 4 bits supporting 0-15, a total of 16 state definitions, which can cover various feedbacks such as successful reception, failure, waiting, exception, upgrade, and retransmission of the slave node, meeting the state transmission needs of complex interaction scenarios.
[0036] The total length of the slave node data structure is 1 + 1 + 1 + 1 = 4 bytes, which is returned to the master node as an ACK (acknowledgment character), multiplexed in the handshake process and data communication, extremely simplifying the response overhead and improving interaction efficiency.
[0037] II. Master-slave node connection establishment process, as shown in Figure 2 When the master node completes power-on initialization, it actively triggers the handshake protocol construction structure: the master node generates a handshake protocol according to the preset rules (such as S101 definition logic), with MTX set as the default interaction frequency point Xi, MRX assigned as Yi generated by a pseudo-random algorithm, MNTX corresponding to the pseudo-randomly generated Zi, and the protocol type field TYPE set to 0. Xi, Yi, and Zi are all index values of the frequency point. After the slave node is powered on, it automatically frequency-hops to the default interaction frequency point MTX (Xi) and continuously maintains the receiving mode (RX mode), waiting for the master node handshake protocol frame.
[0038] The master node enters the transmission mode (TX mode) and performs channel activity detection (CAD) based on the frequency point Xi, and then broadcasts the handshake protocol frame (carrier frequency FREQ = xi). After the slave node captures the protocol frame at the Xi frequency point, it parses and obtains the MTX (Xi), MRX (Yi), and other protocol fields; then it collects the received signal strength indication (RSSI) and signal-to-noise ratio (SNR) of the Xi frequency point communication link. Subsequently, the slave node frequency-hops to the Yi frequency point, performs CAD detection at the Yi frequency point, and constructs a response protocol based on the parsed protocol parameters (such as S102 structure definition).
[0039] After the master node completes the transmission on the Xi frequency point, it switches to the Yi frequency point and enters the receiving mode (RX mode). After the slave node completes the CAD detection and protocol construction on the Yi frequency point, it transmits a response frame (carrier frequency FREQ=yi) on the Yi frequency point, and the master node receives the data on the Yi frequency point.
[0040] Through the above interaction process, the master node can synchronously obtain the RSSI, SNR, and CAD detection result of the Xi frequency point link and the RSSI, SNR, and CAD detection result of the Yi frequency point link. When the S203 process (i.e., the master-slave node completes the bidirectional protocol interaction and link parameter collection) is executed, it indicates that the master-slave node completes the connection establishment and enters the stable communication ready state.
[0041] III. Communication link continuous interaction and frequency point polling process, as shown in Figure 3 S301: Link parameter caching and algorithm iteration After the master-slave node completes the initial handshake (corresponding to the S203 process), the master node parses the data returned by the slave node, caches the RSSI, SNR, and CAD indicators of the FREQ=Yi link and the RSSI, SNR, and CAD of the FREQ=xi link.
[0042] The master node calls the algorithm module, based on the historical cached parameters and the preset strategy (such as link quality evaluation and pseudo-random sequence update rule), outputs new frequency point parameters Yi' and Zi', and performs frequency point mapping update: Xi of the current round is assigned to Zi of the last round, and a dynamic frequency hopping sequence MNTX=X1(last round Zi)→MRX=Yi'(current round)→MNTX=Zi'(current round) is constructed, and the frequency point logic is preconfigured for the next round of interaction.
[0043] S302: Master-slave node data interaction and mode switching The master node enters the data transmission stage and constructs a TYPE=1 type protocol frame (carrying Payload data). It performs frequency hopping operation: first switch to the frequency point Xi (i.e., the last round Zi), perform TX mode channel activity detection (CAD) on the Xi frequency point, and broadcast the protocol frame (carrier frequency FREQ=xi) after completion.
[0044] After the slave node completes the previous interaction, it automatically hops to FREQ=zi (the last round MNTX of the master node) and switches to the receiving mode (RX mode). The target frequency point of the slave node in the receiving mode is always aligned with the last round Zi of the master node, forming a dynamic synchronization mechanism.
[0045] If a slave node triggers a timeout in RX mode (failure to capture a valid protocol frame within a specified time), it will trigger reconnection detection logic; if the number of timeouts accumulates to a threshold, it will eventually enter a re-handshake mode to ensure communication reliability.
[0046] S303: Closed-loop construction of ACK protocol and collection of link parameters After capturing the master node's protocol frame at the FREQ=zi frequency point, the slave node parses and extracts the payload data, MRX, and MNTX frequency point parameters. On one hand, the valid data is passed through to the upper-layer processing module (such as application layer data parsing and business logic triggering); on the other hand, frequency hopping is performed: first, the node switches to the MRX frequency point (current round Yi'), and CAD detection is performed on the MRX frequency point, while simultaneously collecting the RSSI and SNR indicators of the Xi frequency point link.
[0047] Based on the acquired parameters, the slave node constructs an ACK protocol frame (logic echoing S202, supplementing the "upper-layer data pass-through" branch), switches to TX mode, and transmits it back to the master node via the Yi' frequency point; the master node synchronously hops to MRX (Yi') and enters RX mode. If the master node triggers a timeout in RX mode (failure to capture a valid protocol frame within a specified time), it will trigger reconnection detection logic; if the number of timeouts accumulates to a threshold, it will eventually enter a re-handshake mode to ensure communication reliability.
[0048] After this round of interaction, the master node synchronously updates the cache: adds RSSI, SNR, and CAD detection results for the Yi' frequency link, and RSSI, SNR, and CAD data for the Xi (previous round Zi) frequency link.
[0049] Polling mechanism and cache design After the S303 process is completed, a new round of S301 iteration is automatically triggered, forming a closed loop of "parameter acquisition - algorithm iteration - data interaction". The master node continuously polls (preset number of rounds or duration) to cache 100 sets of link parameters (RSSI, SNR, CAD) for each frequency point (16 available frequency points in total), constructing a 16×100×3-dimensional cache space to support large-scale data analysis of subsequent algorithm modules (such as link quality modeling and frequency point optimization strategies), realizing self-optimization and intelligent scheduling of communication links. IV. Master-Slave Dynamic Channel Evaluation Algorithm Flow, as follows Figure 4 As shown After the master node and slave node establish communication, during each interaction, the master node obtains the Received Signal Strength Indicator (RSSI) and Signal-to-Noise Ratio (SNR) of the current communication frequency through the SX1262 chip, and obtains the channel occupancy status through Channel Activity Detection (CAD); the slave node synchronously feeds back the RSSI and SNR of the current frequency to the master node; The master node maintains 3 groups of cache information for each candidate frequency point, and each group of cache stores the latest 100 pieces of data of the corresponding frequency point: F[index][RSSI], F[index][SNR], and F[index][CAD], wherein index is the frequency point index (0-15); The master node scores the candidate frequency points, and the candidate frequency points are 13 frequency points remaining after excluding 3 frequency points used in the last communication from 16 preset frequency points. The scoring steps of a single frequency point include: S401. Calculate the basic quality score As shown in the formula in S401, the weighted average value based on F[index][RSSI] and F[index][SNR] is calculated, and a basic score of 0-5 is generated according to a preset rule. The basic score accounts for 40% of the total score, and is marked as total score 1. The scoring standard is as follows, wherein m, n, and k are threshold values in actual application, and can be modified by instructions: If the RSSI weighted average value is greater than or equal to m dBm and the SNR weighted average value is greater than or equal to n dB, the basic quality score is 5. If the RSSI weighted average value is less than m dBm and the SNR weighted average value is greater than or equal to n dB, the basic quality score is 3. If the RSSI weighted average value is greater than or equal to m dBm and the SNR weighted average value is less than k dB, the basic quality score is 1. If the RSSI weighted average value is less than m dBm and the SNR weighted average value is less than k dB, the basic quality score is 0.
[0050] S402. Calculate the RSSI stability score Based on the overall variance of F[index][RSSI] and the variance of the latest 10 pieces of data, a stability score of 0-5 is generated. The stability score accounts for 20% of the total score, and is marked as total score 2. The scoring standard is as follows, wherein m, n, and k are threshold values in actual application, and can be modified by instructions: If the frequency point variance is less than m dBm² (stable): 5 points. If the variance is m-n dBm² (slight fluctuation): 3 points.
[0051] If the frequency point variance is greater than n dBm² (severe fluctuation): If the frequency point variance of the recent 10 pieces of data is less than k dB: 2 points. If the frequency point variance of the recent 10 pieces of data is greater than or equal to k dB: 0 points.
[0052] S403. Calculate the CAD interference score Based on the blocking rate (the proportion of "channel busy" in 100 data) of F[index][CAD], a 0-5 point interference score is generated, which accounts for 20% of the total score, marked as total score 3; The scoring criteria are as follows, where m, n are the threshold values in actual application, which can be modified by instructions: When the "busy" probability is less than m%, the trend score is 5; When m%≤"busy" probability≤n%, the trend score is 3; When the "busy" probability is greater than n%, the trend score is 1.
[0053] S404. Calculate the timeliness trend score According to the same logic in S401, calculate the deviation rate of the recent 10 weighted averages based on F[index][RSSI] and the long-term 100 weighted averages, generate a 0-5 point trend score, which accounts for 20% of the total score, marked as total score 4; The scoring criteria are as follows, where m, n are the threshold values in actual application, which can be modified by instructions: The deviation of the recent 10 averages and the long-term 100 averages is less than m% (trend stable): 5 points; Deviation m%-n% (slight deterioration): 3 points; Deviation>n% (significant deterioration): 1 point.
[0054] S405 total score calculation and frequency point selection: The total score of a single frequency point is the sum of the above four scores: total score = total score 1+total score 2+total score 3+total score 4 Frequency point selection rules: From the 13 candidate frequency points, select the top 5 frequency points with the highest total score to form a "high-quality frequency point pool"; Randomly select 2 frequency points from the "high-quality frequency point pool", and ensure that the two are "non-adjacent frequency points" (frequency interval≥preset threshold, such as 5MHz, to avoid adjacent frequency interference); The selected 2 frequency points are respectively "master node receiving frequency point" and "master node next sending frequency point", which are informed to the slave node through the protocol frame.
[0055] The above only describes the preferred embodiments of the present application, and does not limit the present application, and those skilled in the art can make usual changes and replacements within the technical solution range of the present application, which should be included in the protection scope of the present application.
Claims
1. A master-slave dynamic channel assessment frequency hopping method based on SX1262, characterized in that, The method comprises the following steps: The master node and the slave node establish a communication connection, and the master node obtains a received signal strength indication (RSSI), a signal-to-noise ratio (SNR) and a channel activity detection (CAD) state of a communication frequency point through an SX1262 chip; The slave node synchronously feeds back the RSSI and SNR data received by the slave node to the master node; The master node maintains buffer information for storing historical data for a plurality of candidate frequency points, including RSSI, SNR and CAD data; The master node scores the candidate frequency points in multiple dimensions based on the buffer information; The master node selects at least one high-quality frequency point from the candidate frequency points as a subsequent communication frequency point according to the scoring result; The master node informs the slave node of the selected subsequent communication frequency point information through a protocol frame to realize synchronous frequency hopping communication between the master node and the slave node.
2. The master-slave dynamic channel assessment frequency hopping method based on SX1262 according to claim 1, characterized in that, The master node and the slave node adopt a self-defined communication protocol, wherein the data structure sent by the master node comprises: A 2-byte preamble for communication link synchronization; A 1-byte frequency point and protocol control field, containing a 4-bit current transmission frequency point index and a 4-bit receiving frequency point index; A 1-byte next transmission and protocol type field, containing a 4-bit next transmission frequency point index and a 4-bit protocol type identifier; And a 124-byte data field for carrying service data.
3. The master-slave dynamic channel assessment frequency hopping method based on SX1262 according to claim 1, characterized in that, The master node and the slave node adopt a self-defined communication protocol, wherein the data structure sent by the slave node comprises: A 1-byte preamble as a synchronization identifier for the response of the slave node; A 2-byte signal quality parameter field, containing RSSI and SNR values read in real time from a chip register; A 1-byte channel and state feedback field, containing a 4-bit CAD detection result and a 4-bit slave node state return value.
4. The master-slave dynamic channel assessment frequency hopping method based on SX1262 according to claim 1, characterized in that, The step of establishing a communication connection between the master node and the slave node comprises: The master node broadcasts a handshake protocol frame containing receiving frequency point (Yi) and next transmission frequency point (Zi) information on a default interaction frequency point (Xi); The slave node receives and analyzes the handshake protocol frame on the Xi frequency point, collects RSSI and SNR of the Xi frequency point, then hops to the Yi frequency point and performs CAD detection; The slave node returns a response protocol frame containing the collected information to the master node through the Yi frequency point, and the master node receives the response frame on the Yi frequency point, completing the connection establishment.
5. The master-slave dynamic channel assessment frequency hopping method based on SX1262 according to claim 1, characterized in that, The master node maintains 3 sets of buffer information for each candidate frequency point, and each set of buffer stores the latest 100 data of the corresponding frequency point, namely F[index][RSSI], F[index][SNR] and F[index][CAD], wherein index is the frequency point index.
6. The master-slave dynamic channel assessment frequency hopping method based on SX1262 according to claim 1, characterized in that, The step of scoring the candidate frequency points by the master node comprises calculating at least one of the following scores: Basic quality score: calculated based on the weighted average value of RSSI and SNR; RSSI stability score: calculated based on the overall variance of RSSI historical data and the variance of recent data; CAD interference score: calculated based on the channel blocking rate in the CAD historical data; Time effectiveness trend score: calculated based on the deviation rate of the recent weighted mean value and the long-term weighted mean value of RSSI.
7. The master-slave dynamic channel assessment frequency hopping method based on SX1262 according to claim 6, characterized in that, The calculation standard of the basic quality score comprises: when the RSSI weighted mean is not less than a threshold m and the SNR weighted mean is not less than a threshold n, the highest score is given; when the RSSI weighted mean is less than the threshold m and the SNR weighted mean is less than a threshold k, the lowest score is given; wherein m, n and k are thresholds in actual application.
8. The master-slave dynamic channel assessment frequency hopping method based on SX1262 according to claim 6, characterized in that, The calculation standard of the RSSI stability score comprises: when the frequency point variance is less than a threshold m, the highest score is given; when the frequency point variance is greater than a threshold n and the variance of the recent 10 data is not less than a threshold k, the lowest score is given.
9. The master-slave dynamic channel assessment frequency hopping method based on SX1262 according to claim 6, characterized in that, The calculation standard of the CAD interference score comprises: when the blockage rate probability is less than a threshold m%, the highest score is given; when the blockage rate probability is greater than a threshold n%, the lowest score is given.
10. The master-slave dynamic channel assessment frequency hopping method based on SX1262 according to claim 1, characterized in that, The step of selecting the subsequent communication frequency point by the master node comprises: From the 13 candidate frequency points, the top 5 frequency points with the highest total score are selected to form a high-quality frequency point pool; Two frequency points are randomly selected from the high-quality frequency point pool, and it is ensured that the two frequency points are non-adjacent frequency points; The selected two frequency points are respectively taken as the master node receiving frequency point and the master node next sending frequency point.
Citation Information
Patent Citations
Frequency hopping communication method based on self-adopting channel
CN108347263A
LoRa network channel access method and system, terminal, gateway and server
CN109195195A
Ad hoc network frequency hopping and frequency synchronization method, system, device and medium
CN117879644A
Adaptive frequency hopping apparatus in wireless personal area network system
US20030031231A1
