Method, device, node device, system and medium for joining LoRa network
Through node devices polling the scan channel and obtaining the working address in the LoRa network, the problems of cumbersome configuration and high cost of gateway equipment are solved, and the LoRa network is automatically added, which reduces operating costs and promotes the miniaturization of gateway equipment.
Patent Information
- Application Number
- CN202110281170.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-16
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2041-03-16
AI Technical Summary
In the LoRa network, the configuration of node devices is cumbersome and the cost of gateway devices is high. The existing configuration methods require manual participation, which increases the complexity and cost of gateway devices.
The node device automatically determines the channel of the gateway device by polling the scan channel, and obtains the working address through the registration response message of the gateway device, thereby automatically joining the LoRa network, avoiding the increase of manual configuration and additional hardware modules.
The automation of node equipment is realized and the LoRa network is added, which reduces the operation and maintenance workload, saves the hardware cost of gateway equipment, and promotes the miniaturization of gateway equipment.
Smart Images

Figure CN115087076B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of Internet of Things, and more specifically, to a method, apparatus, node device, system and medium for joining a LoRa network in the field of Internet of Things. Background Art
[0002] In recent years, the Internet of Things technology has developed rapidly and has been widely used in many fields such as smart transportation, environmental protection, public safety, safe home, environmental monitoring, and food traceability.
[0003] With more and more node devices acting as sensor devices, if each node device directly communicates with the background through a communication module, not only will the cost be high, but the platform will also have to carry more device connections. In addition, in a large number of IoT applications, it is hoped that the service life of the node device can be as long as possible, the distance covered by each gateway device (or base station) can be as far as possible, and the technology is simple and the implementation cost is low. Therefore, in more and more IoT solutions, LoRa (Long Range) technology has been more and more widely used.
[0004] LoRa technology is a low-power LAN wireless standard created by Semtech in the United States. Its characteristic is that it can transmit farther than other wireless methods under the same power consumption conditions, achieving the unity of low power consumption and long distance. When the LoRa technology is used to build a network (such a network can also be called a LoRa network), the node device no longer communicates directly with the platform, but sends the sensed data such as humidity, temperature, and force to the gateway device through the LoRa module, and then the gateway device collects and reports to the platform in a unified manner. The advantages of the LoRa network are at least the following: First, the LoRa technology is mature, the module cost is low, and the application is simple; second, after the data is collected through the gateway device, the number of network connections and data transmission volume of the platform can be reduced.
[0005] In order to enable node devices to communicate normally in the LoRa network, it is necessary to configure the working address and working channel for the LoRa module used by the node device. These two parameters as a whole need to remain unique in the LoRa network corresponding to the application scenario to ensure that there will be no communication conflicts. There are currently two ways to configure the working address and working channel for the LoRa module of the node device, one is manual configuration, and the other is gateway dual LoRa mode configuration.
[0006] In manual configuration, it is necessary to manually set the working address and working channel required for communication for the LoRa module of the node device, and it is also necessary to set the LoRa configuration information of one or more gateway devices connected to it in the LoRa module of the node device (for example, the working address and working channel of the gateway device), which makes the configuration work very cumbersome. In order to perform manual configuration, it is also necessary to reserve a LoRa configuration interface for each node device and equip it with corresponding tool software. For example, the LoRa module of the node device can be configured by sending AT commands via the serial port, and the configuration of the node device can be modified by instructions during the operation of the node device and the configuration information of the LoRa module can be written. In addition, in the event that a node device communicating in the LoRa network fails, the backup device must be manually configured according to the configuration information of the failed node device before it can be replaced.
[0007] In the dual LoRa mode configuration of the gateway, the gateway device needs to have two LoRa modules, one is a registered LoRa module for configuring the working address and / or working channel of the node device, and the other is a working LoRa module for communicating with the node device. In the process of configuring the node device, the address and channel of the registered LoRa module of the gateway device are first manually set in the node device, so that when the node device joins the LoRa network, it automatically connects to the registered LoRa module of the gateway device according to the manually set known address and channel, and sends a registration request to it. The registered LoRa module assigns a unique working address and working channel to the node device based on the registration request, and returns the working address and working channel of the working LoRa module of the gateway device to the node device. After that, the LoRa module of the node device can be connected to the working LoRa module of the gateway device and communicate with it. Although this configuration can alleviate the cumbersomeness of the above-mentioned manual configuration to a certain extent, there are still some problems. For example, the gateway setting needs to have two LoRa modules, which obviously increases the cost of the gateway, and the gateway device needs to reserve the corresponding circuit design and corresponding antenna for the added LoRa module, which is not conducive to the miniaturization of the gateway device. In addition, before a node device joins the LoRa network, it still needs to manually set the information of the registered LoRa module of the gateway device, which is still a cumbersome task.
[0008] Therefore, when a node device attempts to join a LoRa network, there are problems with cumbersome configuration and increased gateway device costs. Summary of the invention
[0009] The present disclosure provides a method, apparatus, node device, LoRa network system and computer-readable storage medium for joining a LoRa network, which can enable a node device attempting to join a LoRa network to automatically join the LoRa network.
[0010] According to one aspect of the present disclosure, a method for use in a LoRa network is provided. The method includes: broadcasting a registration request message on a current channel, the registration request message being used to request a gateway device in a LoRa network that a node device attempts to join to allocate a working address required for communication in the LoRa network to the node device; if a registration response message in response to the registration request message is not received within a predetermined time, changing the current channel to another channel so as to use the another channel as the current channel for the next broadcast of the registration request message; and if a registration response message in response to the registration request message is received within the predetermined time, communicating with the gateway device on the current channel according to the working address contained in the registration response message.
[0011] According to another aspect of the present disclosure, a node device used in a LoRa network is provided. The node device includes: a memory storing computer executable instructions; and a processor coupled to the memory, wherein the computer executable instructions, when executed by the processor, cause the processor to perform the above method.
[0012] According to another aspect of the present disclosure, a LoRa network system is provided. The LoRa network system includes: one or more of the above-mentioned node devices; and a gateway device capable of communicating with the node devices.
[0013] According to another aspect of the present disclosure, a computer-readable storage medium is provided, wherein the medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the processor executes the above method.
[0014] According to another aspect of the present disclosure, a device for joining a LoRa network is provided, wherein the device comprises components for executing the steps of the above method.
[0015] Based on the above technical solution, the node device can automatically determine the channel where the gateway device is located by polling and scanning the channel, and can communicate with the gateway device on the channel determined by the polling scan through the working address contained in the registration response message returned by the gateway device in response to the registration request message. In this way, the node device can automatically obtain the working address and working channel required for communication without human intervention to automatically join the LoRa network. In addition, since the above solution does not require any additional hardware modules to be added to the network device, it will not increase the hardware cost of the gateway device and will help to miniaturize the gateway device.
[0016] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0018] Figure 1 It is a schematic diagram of the structure of a LoRa network according to an embodiment of the present disclosure.
[0019] Figure 2 is a flowchart of a method for joining a LoRa network according to an embodiment of the present disclosure.
[0020] Figure 3 It is a schematic diagram of an example of a node device joining a LoRa network according to an embodiment of the present disclosure.
[0021] Figure 4 It is a structural block diagram of a device for joining a LoRa network according to an embodiment of the present disclosure.
[0022] Figure 5 It is a structural block diagram of a node device used in a LoRa network according to an embodiment of the present disclosure.
[0023] Figure 6 is a schematic diagram of a LoRa network system according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0024] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.
[0025] At the same time, it should be understood that, for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship. The following description of at least one exemplary embodiment is actually only illustrative and is by no means any limitation to the present disclosure and its application or use. The technology, method and equipment known to ordinary technicians in the relevant field may not be discussed in detail, but in appropriate cases, the technology, method and equipment should be regarded as a part of the specification. In all examples shown and discussed here, any specific value should be interpreted as being merely exemplary, rather than as a limitation. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in an accompanying drawing, it does not need to be further discussed in subsequent drawings. The use of "and / or" herein represents at least one of the connected elements, which means that each connected element can appear separately in different embodiments, a plurality of connected elements can appear in one embodiment, and all connected elements can appear in one embodiment.
[0026] First, refer to Figure 1 A schematic diagram describing the structure of a LoRa network according to an embodiment of the present disclosure.
[0027] The LoRa network 100 includes one or more node devices and a gateway device 110 for collecting sensor data of the node devices. The number of node devices can be tens of thousands, but in Figure 1 In the schematic diagram, only four node devices 120-1, 120-2, 120-3 and 120-4 are shown for the sake of simplicity. Those skilled in the art will appreciate that the number of node devices in the LoRa network 100 may be more or less. The node devices may be various sensing devices that collect relevant data in their application scenarios through built-in sensors. The gateway device 110 receives the collected data from each node device wirelessly, and may transmit the received data to a server or management platform for analysis and processing through a wired connection such as a network cable. The gateway device may also be referred to as a LoRa gateway or base station.
[0028] Communication in the LoRa network generally adopts a directional transmission mode, that is, point-to-point transmission. It is necessary to set up LoRa modules that support LoRa technology in both node devices and gateway devices for LoRa communication. In addition to configuring the LoRa module with parameters that can be unified between devices, such as power, baud rate, and parity check mode, it is also necessary to configure the address and channel (also called working address and working channel) required for communication for the LoRa module. There are 32 channels in LoRa technology, numbered from 0 to 31. Each channel corresponds to a different communication frequency. The LoRa module generally supports a communication frequency of 410-441Mhz. The address in LoRa technology is usually represented by 2 bytes, with a value range from 0 to 65535. These addresses distinguish different LoRa modules and are used for message addressing. The set of working addresses and working channels of each LoRa module needs to be unique in the LoRa network (which can be regarded as a wireless local area network) used for a certain application scenario to avoid conflicts and communication failures. The message initiator can send a message to the receiver if he knows the address and channel of the receiver.
[0029] For example, in Figure 1 In the example, the address of the gateway device is 00 and the channel is 01, the address of the node device 120-1 is 01 and the channel is 01, the address of the node device 120-2 is 02 and the channel is 01, the address of the node device 120-3 is 03 and the channel is 01, and the address of the node device 120-4 is 04 and the channel is 01. When the node device 120-1 sends a message to the gateway device 110, the following format can be used:
[0030]
[0031] The gateway address is the destination address, the gateway channel is the destination channel, and the message content part can carry the data collected by the node device 120 - 1 .
[0032] When the gateway device 110 sends a message to the node device 120-2, the following format may be used:
[0033]
[0034] The node device address is the destination address, the node device channel is the destination channel, and the message content part may be, for example, request information for the gateway device to request the node device to report status, configuration information assigned by the gateway device to the node device, etc.
[0035] When a new node device is ready to join the LoRa network, it may not know the working address and working channel of the gateway device, nor does it have its own working address and working channel for the LoRa network. In order to automatically join the LoRa network without human assistance, you can use Figure 2 The method 200 for joining a LoRa network according to an embodiment of the present disclosure is shown. The method 200 is performed by a node device attempting to join a LoRa network.
[0036] In S210, the node device broadcasts a registration request message on the current channel, where the registration request message is used to request a gateway device in the LoRa network that the node device attempts to join to allocate to the node device a working address required for communication in the LoRa network.
[0037] For example, if a node device attempts to join a LoRa network, the address of the LoRa module of the node device can be set to a predetermined broadcast address, such as 0xFFFF (i.e., 65535). The address setting can be automatically set by the node device in response to detecting a LoRa network, or automatically set by the node device when it is first started, or automatically set by the node device in response to detecting that its position has changed and has been fixed for a certain period of time.
[0038] The LoRa module with a broadcast address can not only broadcast the registration request message in the LoRa network it is trying to join, but also be in a broadcast listening state. This means that if the LoRa module of the node device is set with a predetermined address of 0xFFFF, the message sent by the LoRa module of the node device will be received by all other LoRa modules on the same channel, and the LoRa module of the node device will also receive messages sent by all other LoRa modules on the same channel. It should be noted here that the same channel also means the same data rate on the channel, otherwise the receiver cannot decode the received data.
[0039] For example, if Figure 1 The address of the LoRa module of the node device 120-1 in the example is set to 0xFFFF, and other information remains unchanged. Then the message sent by the LoRa of the node device 120-1: FFFF (address) 01 (channel) 010203 (message content) will be received by the node devices 120-2 to 120-4 and the gateway device 110. When the node device 120-2 sends the message: 0000 (address) 01 (channel) 030405 (message content) to the gateway device 110, in addition to the gateway device 110 being able to receive the message, the node device 120-1 can also receive the message.
[0040] Since the number of channels in LoRa technology is limited (e.g., 32), a node device attempting to join the LoRa network may perform a polling scan on the channel to determine the channel where the gateway device is located. The "current channel" in S210 refers to the channel that the node device is currently scanning. The node device may start scanning from the initial channel 0, that is, the node device may initially broadcast a registration request message on the initial channel 0 to request the gateway device to assign a working address to it.
[0041] In S220, if a registration response message in response to the registration request message is not received within a predetermined time, the current channel is changed to another channel to use the another channel as the current channel for broadcasting the registration request message next time.
[0042] If the gateway device is not on the currently scanned channel, the node device will not receive the registration response message, so the node device can scan a new channel to determine whether the gateway device is on the new channel. For example, the node device can increase the number of the currently scanned channel by 1 to scan the next channel. In other words, for example, if the node device does not receive a registration response message on the initial channel 0, the node device starts scanning channel 1. If the registration response message has not been received on channel 1, the node device starts scanning channel 2, and so on, until the registration response message is received.
[0043] A timer may be set in the node device. In response to sending a registration request message, the node device starts the timer. If the registration response message is not received after the timer expires (e.g., 5 seconds, 10 seconds, 30 seconds, etc.), it is determined that the gateway device is not on the currently scanned channel. After the node device changes the channel to be scanned, it may return to S210 to continue scanning on the new current channel.
[0044] In S230, if a registration response message in response to the registration request message is received within a predetermined time, communication is performed with the gateway device on the current channel according to the working address included in the registration response message.
[0045] If the gateway device happens to be on the currently scanned channel, the node device will receive the registration response message before the timer expires. Based on the reception of the registration response message, the node device determines the currently scanned channel as the working channel of the gateway device, thereby also determining that it communicates with the gateway device on the working channel.
[0046] According to an embodiment of the present disclosure, when the node device does not know the working address of the gateway device, the registration response message may include the working address assigned by the gateway device to the node device and the working address of the gateway device. In this way, the node device can determine the working address and working channel required for its own communication and the working address and working channel of the gateway device, thereby performing directional communication with the gateway device.
[0047] According to an embodiment of the present disclosure, if the node device knows the working address of the gateway device, for example, the working address of the gateway device is fixed and written into the LoRa module of the node device when the node device is manufactured, then the registration response message may only contain the working address assigned to the node device by the gateway device. In this way, the node device can also determine the working address and working channel required for its own communication and the working address and working channel of the gateway device, thereby performing directional communication with the gateway device.
[0048] exist Figure 3 2 shows a schematic diagram of an example of a node device joining a LoRa network according to an embodiment of the present disclosure. This example can be implemented by a method 300 executed between a LoRa module of a gateway device 310 and a LoRa module of a node device 320.
[0049] exist Figure 3 In FIG. 3 , it is assumed that the working channel of the LoRa module of the gateway device 310 is 10 and the working address is 00. The node device 320 attempts to join the LoRa network where the gateway device 310 is located, and is an unregistered node device of the LoRa network.
[0050] In S310, the node device 320 sets the channel to be scanned as the initial channel 0, and sets the initial address of its own LoRa module to 0xFFFF. In this way, the node device 320 can broadcast messages and be in a broadcast monitoring state.
[0051] In S320, the node device 320 broadcasts a registration request message on the currently scanned channel.
[0052] In S330, if the currently scanned channel is not the channel where the gateway device 310 is located, the gateway device 310 cannot receive the registration request message, and the node device cannot receive the registration response message when the timer expires, so the node device sets the currently scanned channel to the next channel (i.e., the current channel + 1), and re-broadcasts the registration request message on the new scan channel until the channel where the gateway device is located is scanned. In this example, the node device 320 first scans channel 0, but due to timeout, there is no response, and then scans channel 1, and due to timeout, there is no response, and then scans channel 2, and so on, until a registration response message is received when scanning channel 10, so the node device 320 determines that the working channel of the gateway device 310 and itself is 10.
[0053] In S340 , after receiving the registration request message, the LoRa module of the gateway device 310 allocates a unique working address in the LoRa network to the node device 320 , and returns its own working address at the same time.
[0054] In S350, the node device 320 saves the working channels and working addresses of both parties and modifies the configuration of its own LoRa module. In this way, the node device 320 does not need to register with the gateway device 310 again when it is restarted next time, and can directly connect to the LoRa network for communication.
[0055] In S360 , the node device 320 restarts the LoRa module so that the LoRa module connected to the gateway device 310 starts to work normally.
[0056] Through the above method, the node device can lock the channel where the gateway device is located by polling and scanning the channel, and can obtain the working address assigned to it based on the registration response message, so that the configuration information can be automatically obtained, eliminating the need for manual participation, making joining the network smoother and more convenient. At the same time, the gateway device does not need to set up multiple LoRa modules, saving costs.
[0057] The working address of the gateway device may be fixed or not. Regardless of whether the node device knows the working address of the gateway device, the node device can determine the channel where the gateway device is located by broadcasting a registration request message in a polling scanning channel manner. In the case where the working address of the gateway device is fixed (for example, address 0 is assigned to the gateway device), the broadcasting method of the node device includes sending a registration request message to the working address of the gateway device. In this case, a fixed registration address can be initialized for the node device that is ready to join the LoRa network. This address is only used for the registration of new devices to avoid conflicts with other node devices that are working. Then, the node device starts to poll and scan channels, for example, starting scanning from the initial channel 0. Each time it scans, the node device sends a registration request message to address 0 of the gateway device and waits for a response. The advantage of this is that other node devices on the same channel will not be affected by the registration request message. When the node device receives a registration response message sent by the gateway device to its registration address, the node device determines the currently scanned channel as the working channel, and extracts the working address assigned to it by the gateway device from the registration response message, thereby communicating with the gateway device through its working address and working channel.
[0058] A LoRa network can be regarded as a wireless local area network. Sometimes, there may be a complex application environment where multiple LoRa networks coexist in the same space. According to an embodiment of the present disclosure, a registration switch can be added to the gateway device, and the gateway device responds to the registration request message only when the registration switch is turned on. As a result, the registration request message sent by the node device may not trigger the gateway device to send a registration response message, which prevents the node device from joining the LoRa network corresponding to the gateway device. This method of adding a registration switch to the gateway device can accurately control which gateway device the node device registers to, thereby achieving accurate and controllable joining of the node device.
[0059] According to an embodiment of the present disclosure, before a node device broadcasts a registration request message for the first time, the node device can delete the working address and working channel previously used to communicate with another gateway device. This allows the node device to first clear the existing configuration and then join a new LoRa network, making the reuse of the node device simpler and more convenient. For example, a reset switch can be set on the node device. When the node device needs to replace the gateway device to which it belongs (i.e., from one LoRa network to another LoRa network), the existing configuration of the LoRa module of the node device can be cleared by turning on the reset switch, and the LoRa module can be re-registered with the gateway device.
[0060] By using the method for joining the LoRa network provided by the embodiment of the present disclosure, there is no need to add an additional LoRa module to the gateway device, which saves hardware costs and is conducive to the miniaturization of the gateway device. Since the node device can automatically join the LoRa network and automatically obtain the working address and working channel, the tedious manual configuration is eliminated, and the replacement of the node device can also be easily carried out, and professionals are no longer required to perform complex configuration operations, which greatly reduces the workload of operation and maintenance. In addition, the node devices can be uniformly produced in a standardized manner, which greatly facilitates the production, stocking, and replacement of the node devices after failure.
[0061] The above describes the method for joining the LoRa network according to the embodiment of the present disclosure. Figures 4 to 6 A structural block diagram of an apparatus for joining a LoRa network, a node device, and a LoRa network system according to an embodiment of the present disclosure is described.
[0062] Figure 4 The device 400 for joining the LoRa network shown includes a sending component 410, a channel changing component 420 and a communication component 430. Each of these components can be implemented by hardware, software, firmware or any combination thereof. The sending component 410 can be configured to broadcast a registration request message on the current channel, and the registration request message is used to request the gateway device of the LoRa network that the node device attempts to join to allocate the working address required for communication in the LoRa network to the node device. The channel changing component 420 can be configured to change the current channel to another channel if a registration response message in response to the registration request message is not received within a predetermined time, so as to use the other channel as the current channel for the next broadcast registration request message. Each operation of the channel changing component 420 triggers the sending component 410 to broadcast the registration request message on the new current channel. The communication component 430 can be configured to communicate with the gateway device on the current channel according to the working address contained in the registration response message if a registration response message in response to the registration request message is received within the predetermined time.
[0063] In addition, according to an embodiment of the present disclosure, in addition to the above-mentioned components, the device 400 may also include a deletion component (not shown in the figure). The deletion component may be implemented by hardware, software, firmware or any combination thereof. The deletion component may be configured to delete the working address and working channel previously used to communicate with another gateway device before broadcasting the registration request message for the first time. The existence of the clearing component can make the reuse of the node device more convenient and simple.
[0064] The above and / or other operations and functions of the sending component 410, the channel changing component 420, the communication component 430, the deleting component and the apparatus 400 may refer to the above Figures 1 to 3 In order to avoid repetition, the relevant descriptions in will not be repeated here.
[0065] exist Figure 5 , a structural block diagram of a node device 500 used in a LoRa network according to an embodiment of the present disclosure is shown.
[0066] The node device 500 may include a memory 510 and a processor 520. The memory 510 may be a read-only memory, an optical disk, a hard disk, a magnetic disk, a flash memory, or any other non-volatile storage medium. The memory may store computer executable instructions for implementing at least one of the methods 200 and 300.
[0067] The processor 520 may be coupled to the memory 510, for example, via a bus, and may be implemented as one or more integrated circuits, such as a microprocessor or a microcontroller. The processor 520 is used to execute computer executable instructions stored in the memory 510 for implementing at least one of the methods 200 and 300. Through the execution of the computer executable instructions, a node device attempting to join the LoRa network can be automatically registered with the gateway device, and automatically have a working address and a working channel for communication, eliminating the need for manual intervention.
[0068] As in existing computer devices, the node device 500 can be connected to an external storage device through a read-write interface to call external data, and can also be connected to a network or other computer devices through a network interface, which will not be described in detail here.
[0069] According to an embodiment of the present disclosure, computer executable instructions for executing at least one of methods 200 and 300 may be stored on a computer-readable storage medium. When the instructions are executed by a processor, the processor is enabled to execute corresponding steps, thereby enabling a node device attempting to join the LoRa network to automatically join the LoRa network and automatically obtain the working address and working channel required for communication, without increasing the hardware cost of the gateway device.
[0070] Figure 6 A schematic diagram of a LoRa network system 600 is shown in FIG. Figure 6 As shown, the LoRa network system 600 includes one or more node devices 620, which are substantially the same as the above-mentioned node device 500. The LoRa network system 600 also includes a gateway device 610 capable of communicating with the node device 620. The gateway device 610 does not need to have two LoRa modules as in the related art, thereby reducing costs.
[0071] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, devices, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable non-transient storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0072] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram and the combination of processes and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0073] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0074] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0075] So far, the present disclosure has been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solution disclosed here.
[0076] The method and system of the present disclosure may be implemented in many ways. For example, the method and system of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
[0077] Although some specific embodiments of the present disclosure have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present disclosure. It should be understood by those skilled in the art that the above embodiments may be modified without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.
Claims
1. A method for joining a LoRa network, comprising: When the node device does not know the working address of the gateway device: Broadcasting a registration request message on the current channel, wherein the registration request message is used to request a gateway device in the LoRa network that the node device attempts to join to allocate a working address required for communication in the LoRa network to the node device; If a registration response message in response to the registration request message is not received within a predetermined time, changing the current channel to another channel to use the another channel as the current channel for the next broadcast of the registration request message; and When the node device knows the working address of the gateway device, sending a registration request message to the working address of the gateway device on the current channel; as well as If a registration response message in response to the registration request message is received within the predetermined time, communication is performed with the gateway device on the current channel according to the working address included in the registration response message.
2. The method according to claim 1, wherein: The communicating with the gateway device on the current channel according to the working address included in the registration response message includes: In the case where the node device does not know the working address of the gateway device: Extracting the working address assigned by the gateway device to the node device and the working address of the gateway device from the registration response message; and A message is sent to the working address of the gateway device on the current channel, and / or a message sent to the working address of the node device is received from the gateway device on the current channel, thereby performing directional communication with the gateway device.
3. The method according to claim 1, wherein: A predetermined broadcast address is set for the node device to broadcast a registration request message on a current channel.
4. The method according to claim 3, wherein: Before receiving the registration response message, receive messages sent from any device in the LoRa network on the current channel.
5. The method according to claim 1, wherein: The initial value of the current channel is 0, and the other channel is the current channel plus 1.
6. The method according to claim 1, wherein: In a case where the node device knows the working address of the gateway device, the communicating with the gateway device on the current channel according to the working address included in the registration response message includes: Extracting the working address assigned by the gateway device to the node device from the registration response message; and A message is sent to the working address of the gateway device on the current channel, and / or a message sent to the working address of the node device is received from the gateway device on the current channel, thereby performing directional communication with the gateway device.
7. The method according to claim 1, wherein: The registration request message cannot trigger the gateway device to send a registration response message when the gateway device is configured to refuse to accept new node devices, thereby preventing the node device from joining the LoRa network.
8. The method according to claim 1, further comprising: Before broadcasting the registration request message for the first time, the working address and working channel previously used for communicating with another gateway device are deleted.
9. A node device used in a LoRa network, comprising: a memory storing computer executable instructions; as well as A processor is coupled to the memory, and the computer executable instructions, when executed by the processor, cause the processor to perform the method according to any one of claims 1-8.
10. A LoRa network system, comprising: One or more node devices according to claim 9; as well as A gateway device that can communicate with node devices.
11. A computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 8.
12. A device for joining a LoRa network, comprising: Means for performing the steps of the method according to any one of claims 1-8.
