LoRaWAN frequency band adaptive configuration method, device, system, equipment and medium
By using the LoRaWAN frequency band adaptive configuration method, the node frequency band is automatically adjusted to match the gateway frequency band using near-field communication technology, which solves the problem of frequency band mismatch of LoRaWAN terminal devices, improves configuration efficiency and security, and reduces operation and maintenance costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-03-27
AI Technical Summary
When the LoRaWAN terminal device and the gateway frequency band are incompatible, they cannot communicate, resulting in low efficiency and error-prone manual configuration, and a poor operation and maintenance experience, especially in the case of multiple devices.
A LoRaWAN frequency band adaptive configuration method is provided, which automatically reads the node's built-in configuration parameters through the gateway device's near-field communication module, verifies and modifies the node's frequency band to be consistent with the gateway's frequency band, including unique identifiers, access verification passwords and frequency point adjustments, to ensure security and reliability.
It enables automatic configuration when nodes and gateways are in close proximity, avoiding the risk of information eavesdropping during remote wireless configuration, improving configuration efficiency and security, and reducing maintenance workload.
Smart Images

Figure CN121751353A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and more specifically, to a method, apparatus, system, device, and medium for LoRaWAN frequency band adaptive configuration. Background Technology
[0002] Long Range Wide Area Network (LoRaWAN) is a low-power wide area network communication technology. Due to its low power consumption and ability to achieve long-distance wireless data transmission, LoRaWAN is widely used in smart cities, smart agriculture, and the Industrial Internet of Things (IIoT). Different regions' LoRaWAN systems only support fixed LoRa frequency bands. However, when the LoRaWAN communication frequency bands are incompatible, LoRaWAN terminal devices cannot communicate with the gateway.
[0003] In related technologies, if the terminal device's frequency band does not match that of the gateway in LoRaWAN, the terminal device cannot communicate with the gateway. In this case, technicians need to manually modify the terminal device's parameters and configure it. However, if there are multiple terminal devices in LoRaWAN, configuring the terminal device's parameters is time-consuming, repetitive, and results in a poor maintenance experience. Summary of the Invention
[0004] This application provides a method, apparatus, system, device, and medium for LoRaWAN frequency band adaptive configuration. The method can automatically modify the node's current frequency to the same working frequency as the gateway device based on the node's built-in configuration parameters, thereby solving the problems of low efficiency and error-proneness in traditional manual configuration.
[0005] Firstly, a method for adaptive configuration of LoRaWAN frequency bands is provided, the method comprising: After the gateway device is powered on and initialized, the main control module loads the preset LoRa frequency band library, determines the operating frequency band and operating frequency point of the gateway device, and displays the ready status through the display module; In response to the proximity of the near-field communication sensing area of the LoRaWAN node to be configured to the near-field communication module of the gateway device, the near-field communication module reads the node's built-in configuration parameters and sends the built-in configuration parameters to the main control module; wherein, the built-in configuration parameters include at least the node's unique identifier, access verification password, frequency bands supported by the node, and the node's current frequency; The main control module verifies the built-in configuration parameters, and after the verification is successful, determines whether the node frequency band to which the current frequency point belongs is consistent with the working frequency band of the gateway device. If there is a discrepancy, the main control module will further determine whether the node supports frequency band modification; If supported, the main control module generates a frequency configuration command that matches the operating frequency band of the gateway device, writes it to the node through the near-field communication module, so as to modify the node's frequency band to match the operating frequency band of the gateway device, modify the node's current frequency to match the operating frequency of the gateway device, add the node to the local device list, and trigger the display module to display a success message. If the node does not support frequency band modification, the main control module terminates the configuration process and triggers the display module to show the addition failure information.
[0006] This method, employing the above approach, allows the configuration process to be triggered only when a node is in close proximity to the gateway, mitigating the risk of eavesdropping during remote wireless configuration. Simultaneously, the main control module verifies the node's unique identifier, access verification password, and other built-in configuration parameters, thereby blocking unauthorized node access and ensuring the security and reliability of the configuration process. Furthermore, when the gateway device is incompatible with the node, this solution automatically modifies the node's current frequency to match the gateway device's operating frequency based on the node's built-in configuration parameters, thus resolving the issues of low efficiency and error-proneness associated with traditional manual configuration.
[0007] In conjunction with the first aspect, in some possible implementations, after determining the operating frequency band and operating frequency point of the gateway device, the method further includes: The main control module monitors the channel quality of the gateway device's operating frequency band in real time; If the channel quality is lower than a preset threshold, the main control module obtains a reference frequency band and a reference frequency point from the preset LoRa frequency band library. The reference frequency band is the frequency band with the best channel quality in the preset LoRa frequency band library, and the reference frequency point is the frequency point with the best channel quality in the preset LoRa frequency band library. Update the reference frequency band to the operating frequency band of the gateway device, and update the reference frequency point to the operating frequency point of the gateway device.
[0008] In conjunction with the first aspect, in some possible implementations, the near-field communication module reads the node's built-in configuration parameters, including: The near-field communication module decrypts the encrypted information of the gateway device to obtain the original near-field communication password. The encrypted information is obtained by the near-field communication module after encrypting the near-field communication configuration information based on the encryption algorithm. Send a key verification request to the node; Receive and read the built-in configuration parameters sent by the node; The main control module verifies the built-in configuration parameters, including: The built-in parameters are verified based on the original near-field communication password and the access verification password in the built-in configuration parameters.
[0009] In conjunction with the first aspect, in some possible implementations, the verification of the built-in parameters based on the original near-field communication cipher and the access verification cipher in the built-in configuration parameters includes: If the access verification password matches the original near-field communication password, the display module will be triggered to show that information is being added. If the access verification password does not match the original near-field communication password, the display module will be triggered to display the addition failure message; If the access verification password matches the original near-field communication password and the gateway device has stored the node's unique identifier, the display module is triggered to display the node's existence information.
[0010] In conjunction with the first aspect, in some possible implementations, the method further includes: If writing to this node fails, add the node to the gateway device and trigger the display module to display frequency band mismatch information; If the node is successfully written, add the node to the gateway device and trigger the display module to show the success message.
[0011] In conjunction with the first aspect, in some possible implementations, after the display module is triggered to display the success message, the following further steps are included: Synchronize the node's built-in configuration parameters to other gateway devices on the same local area network as this gateway device.
[0012] Secondly, a LoRaWAN band adaptive configuration device is provided, the device comprising: The loading and determination module is used to load the preset LoRa frequency band library after the gateway device is powered on and initialized, determine the operating frequency band and operating frequency point of the gateway device, and display the ready status through the display module; A read and send module is used to respond to the proximity of the near-field communication sensing area of the LoRaWAN node to be configured to the near-field communication module of the gateway device. The near-field communication module reads the built-in configuration parameters of the node and sends the built-in configuration parameters to the main control module. The built-in configuration parameters include at least the node's unique identifier, access verification password, frequency bands supported by the node, and the node's current frequency. The verification and judgment module is used by the main control module to verify the built-in configuration parameters, and after the verification is passed, to determine whether the node frequency band to which the current frequency point belongs is consistent with the working frequency band of the gateway device. The judgment module is used to further determine whether the node supports frequency band modification if there is a discrepancy. The generation and writing module, if supported, is used by the main control module to generate a frequency configuration instruction that matches the operating frequency band of the gateway device, and write it to the node through the near-field communication module to modify the node's frequency band to match the operating frequency band of the gateway device, modify the node's current frequency to match the operating frequency of the gateway device, add the node to the local device list, and trigger the display module to display a success message. The termination and trigger module is used to terminate the configuration process and trigger the display module to display the addition failure information if the node does not support frequency band modification.
[0013] Thirdly, a system for LoRaWAN frequency band adaptive configuration is provided, the system comprising: The gateway device is used to parse and verify the built-in configuration parameters of the nodes in LoRaWAN so that the node and the gateway can be adapted, and the node frequency band of the node can be modified to be consistent with the operating frequency band of the gateway device through the near field communication module. The display module is used to show and provide feedback on the process of adding the node.
[0014] Fourthly, an electronic device is provided, including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, causing the electronic device to perform the method described above for LoRaWAN band adaptive configuration.
[0015] Fifthly, a computer program product is provided, comprising: computer program code, which, when run on a computer, causes the computer to execute the method described above for LoRaWAN band adaptive configuration.
[0016] In a sixth aspect, a computer-readable storage medium is provided that stores computer program code, which, when executed on a computer, causes the computer to perform the method described above for LoRaWAN band adaptive configuration. Attached Figure Description
[0017] Figure 1 This is a schematic diagram illustrating the implementation environment of a LoRaWAN frequency band adaptive configuration method provided in an embodiment of this application; Figure 2 This is a schematic flowchart illustrating a method for adaptive configuration of LoRaWAN frequency bands provided in an embodiment of this application; Figure 3 This is a schematic flowchart illustrating another method for LoRaWAN frequency band adaptive configuration provided in this application embodiment; Figure 4 This is a schematic flowchart illustrating another method for LoRaWAN frequency band adaptive configuration provided in this application embodiment; Figure 5 This is a schematic diagram of the structure of a LoRaWAN frequency band adaptive configuration system provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a LoRaWAN frequency band adaptive configuration device provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0018] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0019] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
[0020] In the following description of the embodiments of this application, it is used as... Figure 1 Taking an example, the implementation environment of the embodiments of this application will be introduced.
[0021] For example, such as Figure 1 As shown, the implementation environment includes gateway device 110 and node 120.
[0022] Gateway device 110 is a relay device in the LoRaWAN network. LoRaWAN is a low-power wide-area network (LPWAN) communication protocol based on LoRa modulation technology, specifically designed for Internet of Things (IoT) scenarios. LoRaWAN enables long-distance, low-power, high-connectivity, and low-cost wireless data transmission. Gateway device 110 acts as a bridge between node 120 and the LoRaWAN network server. In some embodiments, gateway device 110 is used for wireless signal forwarding and protocol conversion.
[0023] Node 120 is a terminal device in the LoRaWAN network. Node 120 communicates only with gateway device 110. That is, node 120 does not communicate directly with other nodes 120; all data must be forwarded through gateway device 110. For example, node 120 can be an IoT sensor or a smart terminal.
[0024] To address at least one of the aforementioned technical problems, embodiments of this application provide a method for LoRaWAN frequency band adaptive configuration. This method can automatically modify the node's current frequency to the same operating frequency as the gateway device based on the node's built-in configuration parameters, thereby solving the problems of low efficiency and error-proneness in traditional manual configuration.
[0025] Figure 2 This is a schematic flowchart illustrating a method for adaptive configuration of LoRaWAN frequency bands provided in an embodiment of this application.
[0026] For example, such as Figure 2 As shown, taking the gateway device as the execution subject as an example, this application describes a method for adaptive configuration of LoRaWAN frequency bands. The method 200 includes the following steps.
[0027] Step 201: After the gateway device is powered on and initialized, the main control module loads the preset LoRa frequency band library, determines the working frequency band and working frequency point of the gateway device, and displays the ready status through the display module.
[0028] The "ready" state indicates that the gateway device is able to acquire data from the node via near-field communication technology.
[0029] It should be understood that gateway device power-on initialization means the gateway device is powered on, and main control module loading the pre-stored LoRa band library means the main control module loads the LoRa band library pre-stored in the gateway device. The display module showing a ready status indicates that the gateway device has completed initialization. In practical applications, the operating frequency band and frequency point of LoRaWAN gateway devices are not globally unified, but are strictly regulated by national and regional regulations. For example, the first national frequency band is CN470-510 MHz, and the second national frequency band is EU863-870 MHz.
[0030] In one possible implementation, the main control module monitors the channel quality of the operating frequency band of the gateway device in real time. If the channel quality is lower than a preset threshold, the main control module obtains a reference frequency band and a reference frequency point from the preset LoRa frequency band library. The reference frequency band is the frequency band with the best channel quality in the preset LoRa frequency band library, and the reference frequency point is the frequency point with the best channel quality in the preset LoRa frequency band library. The reference frequency band is updated to the operating frequency band of the gateway device, and the reference frequency point is updated to the operating frequency point of the gateway device.
[0031] It should be understood that the communication environment of gateway devices changes over time and due to environmental factors. For example, weather, movement of obstructions, and construction work in the surrounding area can cause the channel quality of previously good frequency bands to deteriorate due to environmental changes. If not adjusted in time, this will affect the stability of data transmission. In such cases, it is necessary to switch to the frequency band and frequency point with the optimal channel quality. This can effectively avoid signal degradation caused by dynamic interference and environmental attenuation, and reduce data transmission packet loss and latency.
[0032] The preset threshold is a threshold automatically determined by the gateway device, and this application embodiment does not limit it.
[0033] In some embodiments, the main control module continuously collects quality parameters of the operating frequency band of the gateway device. These quality parameters include, but are not limited to, signal-to-noise ratio (SNR), signal strength (RSSI), data packet loss rate, and channel occupancy rate. If all quality parameters are lower than a preset threshold, the channel quality of the operating frequency band of the gateway device is deemed to be qualified. If any quality parameter is higher than the preset threshold, a reference frequency band and reference frequency point are obtained from the preset LoRa frequency band library.
[0034] In this implementation, the gateway's built-in LoRa band library contains multiple selectable bands. In this case, the gateway device can actively select the optimal band, avoiding situations where some bands are idle due to interference or others are congested due to excessive occupation, thereby improving the overall utilization efficiency of band resources.
[0035] Step 202: In response to the near-field communication sensing area of the LoRaWAN node to be configured approaching the near-field communication module of the gateway device, the near-field communication module reads the built-in configuration parameters of the node and sends the built-in configuration parameters to the main control module; wherein, the built-in configuration parameters include at least the node's unique identifier, access verification password, frequency bands supported by the node, and the node's current frequency.
[0036] The LoRaWAN node to be configured is a terminal device in the LoRaWAN network. The near-field communication sensing area refers to the close-range physical area where near-field communication (NFC) devices can establish effective communication. The communication distance of NFC devices is typically limited to 0-10 cm, and the coupling conditions of the device antenna must be met.
[0037] In some embodiments, the near-field communication module sends the built-in configuration parameters of the node to the main control module based on the near-field communication technology.
[0038] It should be understood that a node's unique identifier (DevEUI) is used to verify the node. The access verification password is used to verify whether the node is an authorized access point. The frequency bands supported by the node are those that the node can use. For example, the node supports frequency bands from both the first and second countries.
[0039] The built-in configuration parameters include at least the node's unique identifier, access verification password, supported frequency bands, and current frequency.
[0040] In one possible implementation, the near-field communication module decrypts the encrypted information of the gateway device to obtain the original near-field communication password, which is obtained by the near-field communication module encrypting the near-field communication configuration information based on an encryption algorithm; sends a key verification request to the node; and receives the built-in configuration parameters sent by the node.
[0041] The encrypted information is the encrypted near-field communication password information read by the near-field communication module from local storage. The original near-field communication password is the verification key of the gateway device.
[0042] In some embodiments, the encrypted information is decrypted using a symmetric encryption algorithm to obtain a reference cipher, and then decoded using Base64 to obtain the original near-field communication cipher. For example, the symmetric encryption algorithm could be AES-CBC-256.
[0043] In some embodiments, in response to the near-field communication sensing area of the LoRaWAN node to be configured approaching the near-field communication module of the gateway device, the gateway device first sends a key verification request to the node to obtain the verification key provided by the node, and the gateway device receives the built-in configuration parameters sent by the node.
[0044] In this implementation, since near-field communication technology is a short-range sensing technology that can limit the number of nodes that can access the device, and key verification adds authentication of the node, providing double protection, it prevents malicious nodes from illegally accessing the gateway device, tampering with the gateway device's configuration, or forging node information through near-field communication technology.
[0045] Step 203: The main control module verifies the built-in configuration parameters, and after the verification is successful, determines whether the node frequency band to which the current frequency point belongs is consistent with the working frequency band of the gateway device.
[0046] It should be understood that after the near-field communication module reads the node's built-in configuration parameters, it is necessary to prevent malicious nodes from illegally accessing the gateway device through near-field communication technology. In this case, it is necessary to verify whether the near-field communication module allows communication with the node.
[0047] In one possible implementation, the built-in parameters are verified based on the original near-field communication cipher and the access verification cipher in the built-in configuration parameters.
[0048] It should be understood that the comparison is made to determine whether the access verification password is consistent with the original near-field communication password.
[0049] In some embodiments, if the access verification password matches the original near-field communication password, the display module is triggered to display that information is being added.
[0050] The "Adding" information indicates that the node is being added to the gateway device.
[0051] It should be understood that the matching of the access verification password with the original near-field communication password indicates that the access verification password is consistent with the original near-field communication password.
[0052] In some embodiments, if the access verification password does not match the original near-field communication password, the display module is triggered to display an addition failure message.
[0053] The "Add Failure" message indicates that the node failed to be added to the gateway device. A mismatch between the access verification password and the original near-field communication password indicates that the access verification password and the original near-field communication password are inconsistent.
[0054] In some embodiments, if the access verification password matches the original near-field communication password and the gateway device has stored the node's unique identifier, the display module is triggered to display the node's existence information.
[0055] The "existing node" information indicates that the node has been added to the gateway device.
[0056] It should be understood that in practical applications, multiple nodes may have been added to the gateway device. Therefore, after obtaining the built-in configuration parameters of the node, the unique identifier of the node in the built-in configuration parameters is used to determine whether the node has been connected to the gateway device.
[0057] In some embodiments, if the gateway device already stores the unique identifier of the node, it indicates that the node has been added to the gateway device.
[0058] In this implementation, since near-field communication technology is a short-range sensing technology that can limit the number of nodes that can access the device, and key verification adds authentication of the node, providing double protection, it prevents malicious nodes from illegally accessing the gateway device, tampering with the gateway device's configuration, or forging node information through near-field communication technology.
[0059] It should be understood that in practical applications, gateway devices in a LoRaWAN network need to use the same frequency band as nodes within their coverage area to complete data transmission and reception. The frequency band library not only contains frequency band ranges but also a pre-defined list of standard frequency bands for that region. For example, the first national frequency band standard defines 20 uplink frequency bands. Gateway devices determine their operating frequency band by loading the frequency band library to ensure channel matching with nodes and avoid communication failures. In this case, it is necessary to determine whether the node's current frequency band matches the gateway device's operating frequency band.
[0060] In some embodiments, if the node frequency band is the same as the operating frequency band of the gateway device, then the node frequency band to which the current frequency point of the node belongs is consistent with the operating frequency band of the gateway device.
[0061] In some embodiments, if the node frequency band is different from the operating frequency band of the gateway device, then the node frequency band to which the current frequency point of the node belongs is inconsistent with the operating frequency band of the gateway device.
[0062] Step 204: If there is no consistency, the main control module further determines whether the node supports frequency band modification.
[0063] It should be understood that if the node's current frequency band is inconsistent with the gateway device's operating frequency band, the gateway device and the node cannot communicate, meaning that data transmission and reception cannot be completed. In this case, it is necessary to determine whether the node supports frequency band modification.
[0064] In some embodiments, if the frequency band supported by the node is consistent with the operating frequency band of the network device, then it is determined that the node supports frequency band modification.
[0065] In some embodiments, if the frequency band supported by the node is inconsistent with the operating frequency band of the network device, it is determined that the node does not support frequency band modification.
[0066] Step 205: If supported, the main control module generates a frequency configuration instruction that matches the operating frequency band of the gateway device, writes it to the node through the near-field communication module to modify the frequency band and frequency point of the node to be consistent with the gateway device; adds the node to the local device list and triggers the display module to display the addition success message.
[0067] The frequency configuration quality is used to modify the frequency band and frequency point of the node to be consistent with the gateway device. The success message indicates that the node has been successfully added to the local device list of the gateway device.
[0068] In one possible implementation, if writing to the node fails, the node is added to the gateway device, and the display module is triggered to display a frequency band mismatch message; if writing to the node succeeds, the node is added to the gateway device, and the display module is triggered to display a success message.
[0069] Among them, the frequency band mismatch information is used to indicate that the operating frequency band of the gateway device is inconsistent with the current frequency of the node.
[0070] It should be understood that a failure to write to this node indicates an inability to modify the node's frequency band and frequency point to match the gateway device. A successful write to this node indicates that the node's frequency band and frequency point were successfully modified to match the gateway device. Adding this node to the gateway device means storing the node's unique identifier in the gateway device.
[0071] In this implementation, by distinguishing whether the write to the node was successful, the node is added to the gateway device and different display information is provided. This not only makes it easier for maintenance personnel to troubleshoot the write failure, but also avoids the waste of resources due to repeated configuration, and greatly improves the maintenance efficiency of node configuration.
[0072] In one possible implementation, the node's built-in configuration parameters are synchronized to other gateway devices within the same local area network as the gateway device.
[0073] Other gateway devices are those that are on the same local area network as the gateway device and are not related to the gateway device.
[0074] It should be understood that after configuring a single node, the gateway device actively synchronizes the node's built-in configuration parameters to other gateway devices within the same local area network, allowing all gateways within the local area network to share the node's configuration information and achieve unified management of node configuration information across all gateways.
[0075] In some embodiments, the node’s built-in configuration parameters are sent to other gateway devices based on the Message Queuing Telemetry Transport (MQTT) protocol.
[0076] In this implementation, within a LoRaWAN network, the same local area network (LAN) is typically covered by multiple gateway devices. If a node moves to the coverage area of another gateway device, or subsequently approaches another gateway device, the configuration process must be repeated without synchronized configuration information, increasing maintenance workload. In this case, synchronizing the node's built-in configuration parameters to other gateway devices within the same LAN reduces network maintenance costs.
[0077] Step 206: If the node does not support frequency band modification, the main control module terminates the configuration process and triggers the display module to display the addition failure information.
[0078] It should be understood that if the node does not support frequency band modification, it means that the frequency band supported by the node is inconsistent with the operating frequency band of the gateway device. In this case, the gateway device cannot successfully exchange data with the node, that is, it cannot add the node to the gateway device, thus triggering the display module to display the addition failure message.
[0079] This application provides a method for LoRaWAN frequency band adaptive configuration. This method allows the configuration process to be triggered only when a node is in close proximity to the gateway, mitigating the risk of eavesdropping during remote wireless configuration. Simultaneously, the main control module verifies built-in configuration parameters such as the node's unique identifier and access verification password, thereby blocking unauthorized node access and ensuring the security and reliability of the configuration process. Furthermore, when the gateway device cannot be compatible with the node, this solution automatically modifies the node's current frequency to match the gateway device's operating frequency based on the node's built-in configuration parameters, thus solving the problems of low efficiency and error-proneness in traditional manual configuration.
[0080] Figure 3 This is a schematic flowchart illustrating a method for adaptive configuration of LoRaWAN frequency bands provided in an embodiment of this application.
[0081] For example, such as Figure 3 As shown, taking a gateway device as the execution subject as an example, this application describes a method for adaptive configuration of LoRaWAN frequency bands. The method 300 includes the following steps.
[0082] Step 301: Initial standby, the display module shows the ready status of the gateway device, and the near-field communication module starts searching for the card.
[0083] It is understood that the specific implementation of step 301 can be found in the relevant description of step 201 above, and will not be repeated here.
[0084] Step 302: The gateway device begins adding nodes.
[0085] The gateway device begins storing the node's unique identifier in the gateway device.
[0086] Step 303: The display module displays the node read information and determines whether the read was successful.
[0087] It is understood that the specific implementation of step 303 can be found in the relevant description of step 202 above, and will not be repeated here.
[0088] Step 304: If the built-in configuration parameters are successfully read, determine whether the main control module has successfully verified the built-in configuration parameters.
[0089] It is understood that the specific implementation of step 304 can be found in the relevant description of step 203 above, and will not be repeated here.
[0090] Step 305: If the access verification password does not match the original near-field communication password, the display module is triggered to display the addition failure information.
[0091] It is understood that the specific implementation of step 305 can be found in the relevant description of step 203 above, and will not be repeated here.
[0092] Step 306: If the access verification password matches the original near-field communication password, the display module is triggered to show that information is being added.
[0093] It is understood that the specific implementation of step 306 can be found in the relevant description of step 203 above, and will not be repeated here.
[0094] Step 307: Add the node to the local device list and trigger the display module to show a successful addition message.
[0095] It is understood that the specific implementation of step 307 can be found in the relevant description of step 203 above, and will not be repeated here.
[0096] Step 308: If the access verification password matches the original near-field communication password and the gateway device has stored the node's unique identifier, the display module is triggered to display the node's existence information.
[0097] It is understood that the specific implementation of step 308 can be found in the relevant description of step 203 above, and will not be repeated here.
[0098] Step 309: If reading the built-in configuration parameters fails, trigger the display module to display the reading failure information.
[0099] The read failure message indicates that the gateway device is unable to read the node's built-in configuration parameters.
[0100] Figure 4 This is a schematic flowchart illustrating a method for adaptive configuration of LoRaWAN frequency bands provided in an embodiment of this application.
[0101] For example, such as Figure 4 As shown, taking a gateway device as the execution subject as an example, this application describes a method for adaptive configuration of LoRaWAN frequency bands. The method 400 includes the following steps.
[0102] Step 401: Obtain the operating frequency band and operating frequency point of the gateway device.
[0103] It is understood that the specific implementation of step 401 can be found in the relevant description of step 201 above, and will not be repeated here.
[0104] Step 402: Read the node's built-in configuration parameters.
[0105] It is understood that the specific implementation of step 402 can be found in the relevant description of step 202 above, and will not be repeated here.
[0106] Step 403: Determine whether the node frequency band to which the current frequency point belongs is consistent with the working frequency band of the gateway device.
[0107] It is understood that the specific implementation of step 403 can be found in the relevant description of step 203 above, and will not be repeated here.
[0108] Step 404: If there is no consistency, the main control module further determines whether the node supports frequency band modification.
[0109] It is understood that the specific implementation of step 404 can be found in the relevant description of step 204 above, and will not be repeated here.
[0110] Step 405: If supported, the main control module generates a frequency configuration instruction that matches the operating frequency band of the gateway device, writes it to the node through the near-field communication module, so as to modify the node frequency band of the node to be consistent with the operating frequency band of the gateway device, modify the current frequency of the node to be consistent with the operating frequency of the gateway device, add the node to the local device list, and trigger the display module to display the addition success information.
[0111] It is understood that the specific implementation of step 405 can be found in the relevant description of step 205 above, and will not be repeated here.
[0112] Step 406: If the node does not support frequency band modification, the main control module terminates the configuration process and triggers the display module to display the addition failure information.
[0113] It is understood that the specific implementation of step 406 can be found in the relevant description of step 206 above, and will not be repeated here.
[0114] Step 407: If the results match, add the node to the local device list and trigger the display module to show a success message.
[0115] Figure 5This is a schematic diagram of the structure of a LoRaWAN frequency band adaptive configuration system provided in an embodiment of this application.
[0116] For example, such as Figure 5 As shown, the system 500 includes: The gateway device is used to parse and verify the built-in configuration parameters of the nodes in LoRaWAN so that the nodes and the gateway can be adapted, and to modify the node frequency band of the node to be consistent with the operating frequency band of the gateway device through the near field communication module.
[0117] In some embodiments, the gateway device includes a near-field communication module. The near-field communication module is used to parse and verify the built-in configuration parameters of the read node, and control the automatic adaptation of the node and the gateway device. It automatically modifies the frequency band of the node to be consistent with the working frequency band of the gateway device through near-field communication technology. After the built-in configuration parameters are verified, the node is added to the LoRa network through an asynchronous notification mechanism (Redis), and the result of adding the node is fed back through the display module.
[0118] The display module is used to show and provide feedback on the node addition process. In some embodiments, the display module receives feedback on the current node addition process through the Redis asynchronous notification mechanism and displays the addition process and results in the display module in real time.
[0119] Optionally, the gateway device further includes a configuration framework for receiving encrypted information sent from the network (WEB). This encrypted information is obtained by the near-field communication module encrypting near-field communication configuration information based on an encryption algorithm, and is then stored locally in the near-field communication module after being sent.
[0120] Figure 6 This is a schematic diagram of a LoRaWAN band adaptive configuration device provided in an embodiment of this application.
[0121] For example, the device 600 includes: The loading and determining module 601 is used to load the preset LoRa frequency band library after the gateway device is powered on and initialized, determine the working frequency band and working frequency point of the gateway device, and display the ready status through the display module. The read and send module 602 is used to respond to the proximity of the near-field communication sensing area of the LoRaWAN node to be configured to the near-field communication module of the gateway device. The near-field communication module reads the built-in configuration parameters of the node and sends the built-in configuration parameters to the main control module. The built-in configuration parameters include at least the node's unique identifier, access verification password, frequency bands supported by the node, and the node's current frequency. The verification and judgment module 603 is used by the main control module to verify the built-in configuration parameters, and after the verification is passed, to determine whether the node frequency band to which the current frequency point of the node belongs is consistent with the working frequency band of the gateway device. The judgment module 604 is used to further determine whether the node supports frequency band modification if there is a discrepancy. The generation and writing module 605 is used, if supported, for the main control module to generate a frequency configuration instruction that matches the operating frequency band of the gateway device, and write it to the node through the near-field communication module to modify the node's frequency band to match the operating frequency band of the gateway device, modify the node's current frequency to match the operating frequency of the gateway device; add the node to the local device list, and trigger the display module to display a successful addition message; The module 606 is terminated and triggered. If the node does not support frequency band modification, the main control module terminates the configuration process and triggers the display module to display the addition failure information.
[0122] In one possible implementation, the loading and determining module 601 is further configured to: The main control module monitors the channel quality of the gateway device's operating frequency band in real time; If the channel quality is lower than a preset threshold, the main control module obtains a reference frequency band and a reference frequency point from the preset LoRa frequency band library. The reference frequency band is the frequency band with the best channel quality in the preset LoRa frequency band library, and the reference frequency point is the frequency point with the best channel quality in the preset LoRa frequency band library. Update the reference frequency band to the operating frequency band of the gateway device, and update the reference frequency point to the operating frequency point of the gateway device.
[0123] In one possible implementation, the read and send module 602 is specifically used for: The near-field communication module decrypts the encrypted information of the gateway device to obtain the original near-field communication password. The encrypted information is obtained by the near-field communication module after encrypting the near-field communication configuration information based on the encryption algorithm. Send a key verification request to the node; Receive and read the built-in configuration parameters sent by the node; The verification and judgment module 603 is specifically used for: The built-in parameters are verified based on the original near-field communication password and the access verification password in the built-in configuration parameters.
[0124] In one possible implementation, the verification and judgment module 603 is specifically used for: If the access verification password matches the original near-field communication password, the display module will be triggered to show that information is being added. If the access verification password does not match the original near-field communication password, the display module will be triggered to display the addition failure message; If the access verification password matches the original near-field communication password and the gateway device has stored the node's unique identifier, the display module is triggered to display the node's existence information.
[0125] In one possible implementation, the generation and writing module 605 is further configured to: If writing to this node fails, add the node to the gateway device and trigger the display module to display frequency band mismatch information; If the node is successfully written, add the node to the gateway device and trigger the display module to show the success message.
[0126] In one possible implementation, the generation and writing module 605 is further configured to: Synchronize the node's built-in configuration parameters to other gateway devices on the same local area network as this gateway device.
[0127] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0128] For example, such as Figure 7 As shown, the electronic device 700 includes a memory 701 and a processor 702. The memory 701 stores executable program code 703, and the processor 702 is used to call and execute the executable program code 703 to perform a LoRaWAN frequency band adaptive configuration method.
[0129] Furthermore, embodiments of this application also protect an apparatus that may include a memory and a processor, wherein the memory stores executable program code, and the processor is used to call and execute the executable program code to perform a LoRaWAN frequency band adaptive configuration method provided in embodiments of this application.
[0130] This embodiment can divide the device into functional modules based on the above method example. For example, each module can correspond to a separate function, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0131] It should be understood that the apparatus provided in this embodiment is used to execute the above-described method for adaptive configuration of LoRaWAN frequency bands, and therefore can achieve the same effect as the above-described implementation method.
[0132] When using integrated units, the device may include a processing module and a storage module. When applied to an electronic device, the processing module can be used to control and manage the operation of the electronic device. The storage module can be used to support the execution of relevant program code by the electronic device.
[0133] The processing module may be a processor or a controller, which can implement or execute various exemplary logic blocks, modules, and circuits shown in conjunction with the disclosure of this application. The processor may also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and microprocessors, etc., and the storage module may be a memory.
[0134] In addition, the apparatus provided in the embodiments of this application may specifically be a chip, component or module. The chip may include a connected processor and a memory. The memory is used to store instructions. When the processor calls and executes the instructions, the chip can execute a LoRaWAN frequency band adaptive configuration method provided in the above embodiments.
[0135] This embodiment also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, the computer executes the above-described related method steps to implement a LoRaWAN frequency band adaptive configuration method provided in the above embodiment.
[0136] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement a LoRaWAN frequency band adaptive configuration method provided in the above embodiment.
[0137] In this embodiment, the device, computer-readable storage medium, computer program product, or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0138] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0139] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0140] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method of LoRaWAN frequency band adaptive configuration, characterized in that, The method is applied to a gateway device comprising a near field communication module, a master control module and a display module, and comprises the following steps: After the gateway device is powered on and initialized, the master control module loads a preset LoRa frequency band library, determines the working frequency band and working frequency point of the gateway device, and displays a ready state through the display module; In response to the near field communication induction area of a LoRaWAN node to be configured being close to the near field communication module of the gateway device, the near field communication module reads the built-in configuration parameters of the node and sends the built-in configuration parameters to the master control module; wherein the built-in configuration parameters at least include the unique identifier of the node, the access verification password, the frequency band supported by the node and the current frequency point of the node; The master control module verifies the built-in configuration parameters, and after verification, judges whether the node frequency band to which the current frequency point of the node belongs is consistent with the working frequency band of the gateway device; If not consistent, the master control module further judges whether the node supports frequency band modification; If it supports, the master control module generates a frequency point configuration instruction matched with the working frequency band of the gateway device, writes it into the node through the near field communication module, modifies the node frequency band of the node to be consistent with the working frequency band of the gateway device, modifies the current frequency point of the node to be consistent with the working frequency point of the gateway device, adds the node to the local device list, and triggers the display module to display an addition success information; If the node does not support frequency band modification, the master control module terminates the configuration process and triggers the display module to display an addition failure information.
2. The method of claim 1, wherein, After determining the working frequency band and working frequency point of the gateway device, further comprising: The master control module monitors the channel quality of the working frequency band of the gateway device in real time; If the channel quality is lower than a preset threshold, the master control module obtains a reference frequency band and a reference frequency point from the preset LoRa frequency band library, the reference frequency band is the frequency band with the best channel quality in the preset LoRa frequency band library, and the reference frequency point is the frequency point with the best channel quality in the preset LoRa frequency band library; The reference frequency band is updated as the working frequency band of the gateway device, and the reference frequency point is updated as the working frequency point of the gateway device.
3. The method of claim 1, wherein, The near field communication module reads the built-in configuration parameters of the node, comprising: The near field communication module decrypts the encryption information of the gateway device to obtain the original near field communication password, the encryption information is obtained by encrypting the near field communication configuration information based on an encryption algorithm by the near field communication module; Sending a key verification request to the node; Receiving and reading the built-in configuration parameters sent by the node; The master control module verifies the built-in configuration parameters, comprising: Verifying the built-in parameters based on the original near field communication password and the access verification password in the built-in configuration parameters.
4. The method of claim 3, wherein, The built-in parameters are verified based on the original near field communication password and the access verification password in the built-in configuration parameters, comprising: in a case where the access check password matches the original near field communication password, triggering the display module to display adding information; in a case where the access check password does not match the original near field communication password, triggering the display module to display adding failure information; in a case where the access check password matches the original near field communication password and the unique identifier of the node has been stored in the gateway device, triggering the display module to display node already exists information.
5. The method of claim 1, wherein, The method further comprises: in a case where writing the node fails, adding the node in the gateway device and triggering the display module to display frequency band mismatch information; in a case where writing the node succeeds, adding the node in the gateway device and triggering the display module to display adding success information.
6. The method of claim 1, wherein, After the triggering of the display module to display adding success information, the method further comprises: synchronizing the built-in configuration parameters of the node to other gateway devices in the same local area network as the gateway device.
7. A device for adaptive configuration of LoRaWAN frequency bands, characterized in that, The device comprises: a loading and determining module, configured to load a preset LoRa frequency band library by a master module after the gateway device is powered on and initialized, determine a working frequency band and a working frequency point of the gateway device, and display a ready state by the display module; a reading and sending module, configured to read built-in configuration parameters of a LoRaWAN node to be configured by a near field communication module of the gateway device in response to the near field communication induction area of the node being close to the near field communication module, and send the built-in configuration parameters to the master module; wherein the built-in configuration parameters at least include a unique identifier of the node, an access check password, a frequency band supported by the node, and a current frequency point of the node; a checking and judging module, configured to check the built-in configuration parameters by the master module, and if the checking passes, judge whether a node frequency band to which the current frequency point of the node belongs is consistent with the working frequency band of the gateway device; a judging module, configured to if the node frequency band is not consistent with the working frequency band of the gateway device, the master module further judges whether the node supports frequency band modification; a generating and writing module, configured to if the node supports frequency band modification, the master module generates a frequency point configuration instruction matched with the working frequency band of the gateway device, writes the frequency point configuration instruction into the node by the near field communication module, modifies the node frequency band of the node to be consistent with the working frequency band of the gateway device, modifies the current frequency point of the node to be consistent with the working frequency point of the gateway device, adds the node to a local device list, and triggers the display module to display adding success information; a terminating and triggering module, configured to if the node does not support frequency band modification, the master module terminates the configuration process, and triggers the display module to display adding failure information.
8. A system for LoRaWAN band adaptive configuration, characterized in that, The system comprises: a gateway device, configured to parse and check built-in configuration parameters of a node in a LoRaWAN acquired, so that the node and the gateway are adapted, and a node frequency band of the node is modified by a near field communication module to be consistent with a working frequency band of the gateway device; a display module, configured to display and feed back an adding process of the node.
9. An electronic device, comprising: The electronic device comprises: a memory for storing executable program code; a processor for calling and running the executable program code from the memory, so that the electronic device executes the method as claimed in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, when the computer program is executed, the method as claimed in any one of claims 1 to 6 is realized.