A system for wireless nodes to join a network

By determining the target working channel and sending synchronous broadcast commands through the wireless gateway, combined with the network synchronization preamble, it solves the problem of long time and low efficiency when wireless nodes access the network, achieving faster network joining and improved efficiency.

CN118400790BActive Publication Date: 2024-08-30GUANGZHOU XUANKUN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410822432.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-08-30
Estimated Expiration
2044-06-25

AI Technical Summary

Technical Problem

Existing wireless ad hoc network nodes need to scan and search on all available channels when accessing the network, which results in long time and low efficiency.

Method used

The wireless gateway is used to determine the target working channel and send the first network synchronization broadcast command. The node establishes a connection with the gateway according to the network identification and the target working channel, switches to the router state or terminal state, and shortens the search time through the network synchronization preamble and omits the request broadcast. Command steps.

Benefits of technology

It improves the efficiency of wireless nodes joining the network, shortens the time to search the network, increases the number of routers, and reduces the time for nodes to join the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118400790B
    Figure CN118400790B
Patent Text Reader

Abstract

The present invention discloses a system for wireless nodes to join a network, comprising: a wireless gateway and a plurality of wireless nodes; the wireless nodes include a terminal state and a router state; the wireless gateway is used to determine a target working channel and send a first network synchronization broadcast command; and send a route switching instruction to the wireless node when connected to the wireless node; each wireless node is used to send a first network association command to establish a connection to the wireless gateway; when the wireless gateway is successfully connected and the route switching instruction is received, the wireless node is switched to a router state and sends a second network synchronization broadcast command; when the wireless gateway is successfully connected and the route switching instruction is not received, the terminal state is maintained; when the connection with the wireless gateway fails, the second network synchronization broadcast command of other wireless nodes is monitored; when the second network synchronization broadcast command of other wireless nodes is received, the wireless node is connected to other wireless nodes. The present invention improves the efficiency of wireless nodes joining a network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a system for wireless nodes to join a network. Background Art

[0002] A wireless ad hoc network is a temporary multi-hop autonomous system composed of a group of mobile nodes with wireless transceivers. It does not rely on preset infrastructure and has the characteristics of temporary networking, rapid deployment, no control center, and strong anti-destruction capabilities.

[0003] When accessing the network, existing wireless ad hoc network nodes need to scan on all available channels to search for networks near the node. First, passive scanning is performed to listen to beacon frames. If a beacon frame is heard after a period of continuous listening, the network identifier is recorded and the channel is scanned; then active scanning is performed, and the node sends multiple beacon frame request broadcast commands and waits for nearby networks to respond in order to search for networks near the node. The node needs to repeat passive scanning and active scanning on each available channel to detect networks near the node. After the node searches for nearby networks, if there is a network and the gateway agrees that the node joins, an association success response is sent, otherwise a rejection response is sent, and the node needs to re-scan the channel until it successfully joins the network. When the number of channels scanned by the node is large, the time it takes for the node to search for and join the network will be very long. The wireless ad hoc network node takes a long time and is inefficient from scanning channels to searching for networks to finally joining the network.

[0004] Therefore, how to improve the efficiency of wireless nodes joining the network has become an urgent problem to be solved. Summary of the invention

[0005] The embodiment of the present invention provides a system for wireless nodes to join a network, which can effectively solve the problem in the prior art that wireless nodes take a long time and are inefficient from scanning channels, searching networks to finally joining the network.

[0006] An embodiment of the present invention provides a system for a wireless node to join a network, comprising: a wireless gateway and a plurality of wireless nodes; the wireless nodes include: a terminal state and a router state;

[0007] The wireless gateway is used to determine a target working channel and send a first network synchronization broadcast command; wherein the first network synchronization broadcast command includes a first network synchronization frame, and the first network synchronization frame includes a network identifier, a target working channel, and a first network synchronization preamble; and, when a connection is established with a wireless node, send a routing switching instruction to the wireless node;

[0008] Each of the wireless nodes is used to, after receiving the first network synchronization broadcast command, send a first network association command to the wireless gateway according to the network identifier, the target working channel and the node address of the current wireless node, so that the wireless gateway establishes a connection with the wireless node according to the first network association command; when the connection with the wireless gateway is successfully established and the routing switching instruction is received, switch to the router state and send a second network synchronization broadcast command; when the connection with the wireless gateway is successfully established and the routing switching instruction is not received, continue to maintain the terminal state; when the connection with the wireless gateway fails to be established, listen to the second network synchronization broadcast command of other wireless nodes; when the second network synchronization broadcast command of other wireless nodes is received, connect with other wireless nodes that have switched to the router state according to the second network synchronization broadcast command.

[0009] Furthermore, the wireless gateway is used to determine the target working channel, including:

[0010] Detecting a first signal strength of each channel;

[0011] The channel whose first signal strength is less than or equal to a preset strength threshold is regarded as a clean channel;

[0012] Randomly select a clean channel as the target working channel.

[0013] Furthermore, the wireless gateway is used to determine the target working channel, and further includes:

[0014] When the first signal strengths of all channels are greater than a preset strength threshold, the channel with the smallest first signal strength is used as the target working channel.

[0015] Further, each of the wireless nodes is configured to send a first network association command to the wireless gateway according to the network identifier, the target working channel and the first network synchronization preamble after receiving the first network synchronization broadcast command, so that the wireless gateway establishes a connection with the wireless node according to the first network association command, including:

[0016] Get the node address of the current wireless node;

[0017] When receiving the first network synchronization broadcast command, parsing the first network synchronization broadcast command to obtain a network identifier, a target working channel, and a first address list for determining whether the current wireless node is allowed to join the network;

[0018] According to the first address list and the node address of the current wireless node, determining whether the first address list includes the node address of the current wireless node;

[0019] In the case where the first address list contains the node address of the current wireless node, a first network association command is generated based on the network identifier, the target working channel and the node address of the current wireless node, and the first network association command is sent to the wireless gateway so that the wireless gateway establishes a connection with the wireless node according to the first network association command.

[0020] Furthermore, the wireless gateway is also used to: resend the first network synchronization broadcast command when the first network association command cannot be received.

[0021] Further, when the wireless node receives the second network synchronization broadcast command from other wireless nodes, connecting with other wireless nodes switched to the router state according to the second network synchronization broadcast command includes:

[0022] When receiving the second network synchronization broadcast command, parsing the second network synchronization broadcast command to obtain a network identifier, a target working channel, and a second address list for determining whether the current wireless node is allowed to join;

[0023] According to the second address list and the node address of the current wireless node, determining whether the second address list includes the node address of the current wireless node;

[0024] In the case that the second address list contains the node address of the current wireless node, a second network association command is generated according to the network identifier, the target working channel and the node address of the current wireless node, and the second network association command is sent to other wireless nodes switched to router state, so that other wireless nodes switched to router state establish a connection with the wireless node according to the second network association command.

[0025] Furthermore, the wireless node that has successfully established a connection with the wireless gateway is further configured to: resend the second network synchronization broadcast command when the second network association command cannot be received.

[0026] Further, the determination of the length of the first network synchronization preamble code includes:

[0027] The number of channels is obtained and the time for determining the target working channel is determined;

[0028] The length of the first network synchronization preamble code is calculated according to the number of channels and the time of determining the target working channel.

[0029] Furthermore, the wireless gateway, when establishing a connection with the wireless node, sends a routing switching instruction to the wireless node, including:

[0030] Acquire a second signal strength between wireless nodes that successfully establish a connection with the wireless gateway;

[0031] According to the second signal strength, sorting the wireless nodes that have successfully established a connection with the wireless gateway in ascending order of the second signal strength to obtain sorted wireless nodes;

[0032] According to the sorted order of the wireless nodes, the routing switching instructions are sent to the wireless nodes one by one.

[0033] Furthermore, the first network synchronization frame also includes: a physical layer frame header, a frame control type, a network identification length, a total number of frame transmissions, and a current number of frame transmissions.

[0034] By implementing the present invention, at least the following beneficial effects are achieved:

[0035] The present invention provides a system for wireless nodes to join a network, comprising a wireless gateway and a plurality of wireless nodes; the wireless nodes comprising: a terminal state and a router state; the wireless gateway is used to determine a target working channel and send a first network synchronization broadcast command; wherein the first network synchronization broadcast command comprises a first network synchronization frame, the first network synchronization frame comprises a network identifier, a target working channel and a first network synchronization preamble; and, in the case of establishing a connection with the wireless node, sending a route switching instruction to the wireless node; each of the wireless nodes is used to send a first network association command to the wireless gateway according to the network identifier and the target working channel after receiving the first network synchronization broadcast command, so that the wireless gateway establishes a connection with the wireless node according to the first network association command; in the case of successfully establishing a connection with the wireless gateway and receiving a route switching instruction, switching to a router state and sending a second network synchronization broadcast command; in the case of successfully establishing a connection with the wireless gateway and not receiving a route switching instruction, continuing to maintain a terminal state; in the case of failing to establish a connection with the wireless gateway, listening to the second network synchronization broadcast command of other wireless nodes; when receiving the second network synchronization broadcast command of other wireless nodes, connecting with other wireless nodes switched to the router state according to the second network synchronization broadcast command. The design of the network synchronization preamble ensures that the wireless node can scan all target working channels. The wireless node can successfully capture the network during the process of receiving the network preamble, which shortens the time for the wireless node to search for the network and improves the efficiency of the wireless node joining the network. In addition, the wireless node does not need to request a broadcast command, and sends a broadcast command after waiting for a response from the nearby network before responding. Instead, when the wireless node is not connected to the gateway, the wireless node connected to the wireless gateway and switched to the router state creates a route for connection, which omits the time for the wireless node to request a broadcast command. In addition, as the number of routers that can create routes with the wireless node increases, the time for the wireless node to join the network will also be accelerated, thereby improving the efficiency of the wireless node joining the network. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is a structural diagram of a system for wireless nodes to join a network provided by an embodiment of the present invention;

[0037] Figure 2 is a wireless gateway processing flow chart provided by an embodiment of the present invention;

[0038] Figure 3 is a router node processing flow chart provided by an embodiment of the present invention;

[0039] Figure 4 is a terminal node processing flow chart provided by an embodiment of the present invention;

[0040] Figure 5 It is a schematic diagram of a network synchronization frame structure provided by an embodiment of the present invention;

[0041] Figure 6 This is a timing diagram of a wireless gateway sending a network synchronization frame provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] See also Figure 1 , is a structural diagram of a system for wireless nodes to join a network provided by an embodiment of the present invention, comprising: a wireless gateway and a plurality of wireless nodes; the wireless nodes include a terminal state and a router state;

[0044] The wireless gateway is used to determine a target working channel and send a first network synchronization broadcast command; wherein the first network synchronization broadcast command includes a first network synchronization frame, and the first network synchronization frame includes a network identifier, a target working channel, and a first network synchronization preamble; and, when a connection is established with a wireless node, send a routing switching instruction to the wireless node;

[0045] Each of the wireless nodes is used to, after receiving the first network synchronization broadcast command, send a first network association command to the wireless gateway according to the network identifier and the target working channel, so that the wireless gateway establishes a connection with the wireless node according to the first network association command; when the connection with the wireless gateway is successfully established and the routing switching instruction is received, switch to the router state and send a second network synchronization broadcast command; when the connection with the wireless gateway is successfully established and the routing switching instruction is not received, continue to maintain the terminal state; when the connection with the wireless gateway fails to be established, listen to the second network synchronization broadcast command of other wireless nodes; when the second network synchronization broadcast command of other wireless nodes is received, connect with other wireless nodes that have switched to the router state according to the second network synchronization broadcast command.

[0046] Specifically, the wireless node includes a terminal state and a router state, that is, the wireless node includes terminal and router functions. In a preferred embodiment of the present invention, the network coordinator is referred to as a "gateway", abbreviated as "GW", which controls the orderly and normal operation of the entire network by creating and configuring the network; the wireless node has the functions of a routing node and a terminal node, allowing other nodes to join the network through it. The wireless gateway is used to determine the target working channel and send a first network synchronization broadcast command. When a connection is established with the wireless node, a routing switching instruction is sent to the wireless node so that the wireless node switches to a router state according to the routing switching instruction. After receiving the first network synchronization broadcast command, the wireless node sends a first network association command to the wireless gateway according to the network identifier of the first network synchronization broadcast command and the target working channel, so that the wireless gateway establishes a connection with the wireless node according to the first network association command. When the wireless node successfully establishes a connection with the wireless gateway and receives a routing switching instruction, it switches to a router state and sends a second network synchronization broadcast command. When the wireless node successfully establishes a connection with the wireless gateway and does not receive a routing switching instruction, it continues to maintain the terminal state. When the wireless node fails to establish a connection with the wireless gateway, it listens to the second network synchronization broadcast command of other wireless nodes (wireless nodes that have successfully connected to the wireless gateway and switched to the router state); when receiving the second network synchronization broadcast command of other wireless nodes, it connects with other wireless nodes that have switched to the router state according to the second network synchronization broadcast command. For example, there is a wireless gateway and ten wireless nodes, numbered 1-10 respectively. After the wireless nodes numbered 1-5 successfully establish a connection with the wireless gateway, the wireless nodes numbered 1-3 receive the routing switching instruction, so the wireless nodes numbered 1-3 switch to the router state, and the wireless nodes numbered 4-5 do not receive the routing switching instruction and remain in the terminal state. The wireless nodes numbered 6-10 listen to the network synchronization broadcast command of the wireless nodes numbered 1-3. Assuming that the wireless nodes numbered 6-8 are successfully connected to the wireless nodes numbered 1-3, the wireless nodes numbered 6-8 successfully join the network, and the wireless nodes numbered 9-10 have not yet successfully joined the network. At this time, the wireless node numbered 6 receives the routing switching instruction and switches to the router state, and the wireless nodes numbered 7-8 do not receive the routing switching instruction and remain in the terminal state. Then wireless nodes No. 9-10 continue to listen to the network synchronization broadcast command of other wireless nodes. Assuming that wireless node No. 9 successfully connects to wireless node No. 6, then wireless node No. 9 successfully joins the network and receives the routing switching instruction, switching to the router state. At this time, wireless node No. 10 continues to listen to the network synchronization broadcast command until No. 10 successfully connects to other wireless nodes that have switched to the router state, and all wireless nodes join the network. The wireless gateway and wireless node connection route can be multi-level routing.

[0047] The wireless gateway is used to determine the target working channel, including:

[0048] Detecting a first signal strength of each channel;

[0049] The channel whose first signal strength is less than or equal to a preset strength threshold is regarded as a clean channel;

[0050] Randomly select a clean channel as the target working channel.

[0051] The wireless gateway is used to determine the target working channel, and further includes:

[0052] When the first signal strengths of all channels are greater than a preset strength threshold, the channel with the smallest first signal strength is used as the target working channel.

[0053] Preferably, the wireless gateway detects the first signal strength of each channel, takes the channel whose first signal strength is less than or equal to the preset strength threshold as a clean channel, and then randomly selects a clean channel from a plurality of clean channels as the target working channel. If the wireless gateway detects that the first signal strength of all channels is greater than the preset strength threshold, it means that there is no clean channel, and the channel with the smallest first signal strength is taken as the target channel.

[0054] In a preferred embodiment of the present invention, the signal strength of the wireless interference signal of each channel is detected, and the channel where the signal strength is not detected or the signal strength of the detected wireless interference signal is less than 5% of the sensitivity of the wireless chip is taken as a clean channel, and then a clean channel is selected from the clean channels as the target working channel, and the clean channel with no wireless interference signal or the smallest interference is the best channel. If there are multiple best channels, a clean channel is randomly selected as the target working channel; if the signal strength of the wireless interference signal of all channels is greater than the preset strength threshold, the channel with the smallest signal strength is taken as the target working channel.

[0055] In a preferred embodiment of the present invention, after the wireless gateway scans the channel to obtain the target clean channel, the wireless gateway and the wireless node create a direct route, such as Figure 2As shown, the wireless gateway sends a network synchronization broadcast command, waits for the command to be sent, and waits for the wireless node to successfully join the network, and then the direct route between the wireless gateway and the wireless node is created. After the wireless gateway completes the direct route, it immediately selects a wireless node as a router, and the wireless gateway immediately sends a route creation command to the wireless node, and the directly connected wireless node switches to the router state. For the terminal nodes connected to the wireless gateway, they are sorted from bad to good according to the link quality, starting with the worst link quality, and one by one as a router, trying to create terminal routes between the remaining wireless nodes and the nodes directly connected to the wireless gateway. The reason for starting with the worst link quality is that the wireless node that has not been successfully connected to the wireless gateway may not be able to connect directly because the communication distance is too long. The wireless node with the worst link quality that is directly connected to the gateway is selected because the node has the worst quality and may have the longest communication distance with the wireless gateway, but the communication distance between the wireless node that has not been successfully connected to the wireless gateway may be the shortest, thereby improving the success rate of wireless nodes joining the network and enabling wireless nodes to quickly join the network without having to retry the connection after failing to successfully create a terminal route with the wireless node that has switched to the router state, which increases the time it takes for the wireless node to join the network. The wireless node that is directly connected to the wireless gateway is called a first-level wireless node, and the wireless node that is connected to a first-level wireless node is called a second-level wireless node. The wireless gateway can establish multiple levels of connection with the wireless node. After each level of wireless node joins the network, it may receive a routing switching instruction and switch to the router state.

[0056] Each of the wireless nodes is configured to, after receiving the first network synchronization broadcast command, send a first network association command to the wireless gateway according to the network identifier, the target working channel, and the first network synchronization preamble, so that the wireless gateway establishes a connection with the wireless node according to the first network association command, including:

[0057] Get the node address of the current wireless node;

[0058] When receiving the first network synchronization broadcast command, parsing the first network synchronization broadcast command to obtain a network identifier, a target working channel, and a first address list for determining whether the current wireless node is allowed to join the network;

[0059] According to the first address list and the node address of the current wireless node, determining whether the first address list includes the node address of the current wireless node;

[0060] In the case where the first address list contains the node address of the current wireless node, a first network association command is generated based on the network identifier, the target working channel and the node address of the current wireless node, and the first network association command is sent to the wireless gateway so that the wireless gateway establishes a connection with the wireless node according to the first network association command.

[0061] The wireless gateway is further configured to: resend the first network synchronization broadcast command when the first network association command cannot be received.

[0062] Preferably, when a wireless node receives a first network synchronization broadcast command, it parses the first network synchronization broadcast command to obtain a network identifier, a target working channel, and a first address list for determining whether the current wireless node is allowed to join the network, and then determines whether the first address list contains the node address of the current wireless node based on the first address list and the node address of the current wireless node. When the first address list contains the node address of the current wireless node, it generates a first network association command based on the network identifier, the target working channel, and the node address of the current wireless node, and sends the first network association command to the wireless gateway, so that the wireless gateway establishes a connection with the wireless node based on the first network association command. When the wireless gateway fails to receive the first network association command sent by the wireless node, it resends the first network synchronization broadcast command.

[0063] In a preferred embodiment of the present invention, the wireless node quickly switches the wireless channel, performs scanning detection, captures the network allowed to join, and after scanning and detecting the network working channel, the wireless node receives the first network synchronization broadcast command sent by the wireless gateway. After the wireless node receives the first network synchronization broadcast command sent by the wireless gateway, the first network synchronization broadcast command includes a first network synchronization frame. After the wireless node locks the first network synchronization frame, it receives the complete frame data. After receiving, the first network synchronization frame is parsed, and the wireless node synchronizes the network identifier, the target working channel, and the first address list used to determine whether the current wireless node is allowed to join the network; if the node address of the wireless node is included in the first address list, on the target working channel, the CSMA-CA competition mechanism is adopted, and the wireless node directly sends the first network association command to the wireless gateway to apply for joining the network, so that the wireless gateway sends a confirmation response command to the wireless node after receiving the first network association command. At this time, the wireless gateway creates a routing table from the gateway to the node, and the wireless node creates a routing table from the wireless node to the wireless gateway, completes the route creation, and successfully joins the network; if the node address of the wireless node is not included in the first address list, it continues to receive the first network synchronization broadcast command.

[0064] The wireless node, when receiving the second network synchronization broadcast command from other wireless nodes, connects with other wireless nodes switched to the router state according to the second network synchronization broadcast command, including:

[0065] When receiving the second network synchronization broadcast command, parsing the second network synchronization broadcast command to obtain the second network identifier, the target working channel, and a second address list for determining whether the current wireless node is allowed to join;

[0066] According to the second address list and the node address of the current wireless node, determining whether the second address list includes the node address of the current wireless node;

[0067] In the case that the second address list contains the node address of the current wireless node, a second network association command is generated according to the second network identifier, the target working channel and the node address of the current wireless node, and the second network association command is sent to other wireless nodes switched to router state, so that other wireless nodes switched to router state establish a connection with the wireless node according to the second network association command.

[0068] The wireless node that successfully establishes a connection with the wireless gateway is further configured to: resend the second network synchronization broadcast command when the second network association command cannot be received.

[0069] Preferably, when the wireless node receives the second network synchronization broadcast command, it parses the second network synchronization broadcast command, which includes a second network synchronization frame, obtains the network identifier, the target working channel, and the second address list used to determine whether the current wireless node is allowed to join according to the second network synchronization frame, and then determines whether the second address list contains the node address of the current wireless node according to the second address list and the node address of the current wireless node; when the second address list contains the node address of the current wireless node, it generates a second network association command according to the network identifier, the target working channel, and the node address of the current wireless node, and sends the second network association command to other wireless nodes switched to the router state, so that other wireless nodes switched to the router state establish a connection with the wireless node according to the second network association command. After the wireless node switched to the router state completes the creation of the route, it sends a router upload route command to the gateway. After receiving the command, the gateway sends a confirmation response command to the router node. The gateway creates a node routing table under the wireless node switched to the router state according to the uploaded routing information. At this point, the creation of this level of routing is completed. That is, the wireless node that successfully establishes a connection with the wireless gateway is realized as a router to connect with the remaining wireless nodes. When the wireless node successfully connected to the wireless gateway fails to receive the second network association command, the second network synchronization broadcast command is resent. Specifically, the second network synchronization frame also includes a physical layer frame header, a frame control type, a network identification length, a total number of frame transmissions, and a current number of frame transmissions.

[0070] In a preferred embodiment of the present invention, after the wireless node successfully connects to the wireless gateway, it switches to the router state and sends a second network synchronization broadcast command to other wireless nodes, such as Figure 3 As shown, the wireless node switched to the router state sends a second network synchronization broadcast command, waits for the second network synchronization broadcast command to be sent, waits for other wireless nodes to join the connection, creates routes with other wireless nodes, and after the route is created, the wireless node switched to the router state reports the routing information to the wireless gateway. The routing information includes the node address, version information, and link quality of the wireless node that successfully creates the route.

[0071] In a preferred embodiment of the present invention, the terminal node quickly switches the channel scan, captures and receives the network synchronization broadcast command, and after receiving the first network synchronization broadcast command, the terminal node (wireless node) synchronizes the network identifier and the target working channel. Figure 4As shown, the terminal that has been synchronized sends a first network association command to the wireless gateway and waits for confirmation from the wireless gateway. If the wireless gateway does not confirm within the preset time, the waiting timeout is reached and the second network synchronization broadcast command from other wireless nodes is continuously monitored. The wireless node that has synchronized the second network synchronization broadcast command sends a second network association command to the wireless node that has switched to the router state and waits for confirmation from the wireless node that has switched to the router state. If the wireless node that has switched to the router state does not confirm within the preset time, the waiting timeout is reached and the second network synchronization broadcast command from other wireless nodes is continuously monitored.

[0072] Specifically, the wireless gateway, when establishing a connection with the wireless node, sends a routing switching instruction to the wireless node, including:

[0073] Acquire a second signal strength between wireless nodes that successfully establish a connection with the wireless gateway;

[0074] According to the second signal strength, sorting the wireless nodes that have successfully established a connection with the wireless gateway in ascending order of the second signal strength to obtain sorted wireless nodes;

[0075] According to the sorted order of the wireless nodes, the routing switching instructions are sent to the wireless nodes one by one.

[0076] Specifically, the second signal strength between the wireless nodes that have successfully established a connection with the wireless gateway is obtained, and then the wireless nodes that have successfully established a connection with the wireless gateway are sorted in order of the second signal strength from small to large to obtain the sorted wireless nodes, and according to the sorting order of the sorted wireless nodes, routing switching instructions are sent to the wireless nodes one by one, so that the wireless nodes are switched to the router state according to the routing switching instructions. The wireless node directly connected to the gateway with the smallest second signal strength is selected, because the node has the worst quality and may have the farthest communication distance with the wireless gateway, but the communication distance with the wireless node that has not successfully connected to the wireless gateway may be the shortest, thereby improving the success rate of the wireless node joining the network and realizing the rapid joining of the wireless node to the network, without having to retry the connection after failing to successfully create a terminal route with the wireless node that has switched to the router state, which increases the time it takes for the wireless node to join the network.

[0077] Specifically, the first network synchronization frame also includes: a physical layer frame header, a frame control type, a network identification length, a total number of frame transmissions, and a current number of frame transmissions.

[0078] In a preferred embodiment of the present invention, the first network synchronization frame is used for the wireless node to quickly search for the network identifier and working channel that allow access to the network when searching for the network. The frame format of the first network synchronization frame is the frame format of data transmitted in the air, including the preamble, the physical layer frame header, the physical layer payload, and the physical layer payload check. Figure 5 As shown. The preamble is used to synchronize the receiver with the incoming data stream. The preamble length can be set by programming; the physical layer frame header is the frame control information of the wireless frame, including: wireless frame synchronization word, physical layer payload length and other information; the physical layer payload is the data frame of the media access layer above the physical layer. The physical layer payload frame format is the data format of the payload part of the wireless frame, including the media access layer frame header and the media access layer payload; the media access layer frame header includes frame control, network identification and original address; the media access layer payload includes control information 1, working channel number, control information 2 and a list of wireless node addresses allowed to join the network. Frame control: The control word of the frame, including: frame type, network identification length, whether to respond, address combination and other information. The control information is the control information of the first network synchronization frame, including: total number of frame transmissions, current number of transmissions, link quality threshold and other information; the working channel number is the working channel number of the network; the list of node addresses allowed to join the network is a list of wireless communication addresses of wireless nodes allowed to join the network. Each communication address is 4 bytes long and can contain N node addresses. Similarly, the format of the second network synchronization frame is similar to the format of the first network synchronization frame, and the difference lies in some other communication information.

[0079] In an exemplary manner, the determination of the length of the first network synchronization preamble code includes:

[0080] The number of channels is obtained and the time for determining the target working channel is determined;

[0081] The length of the first network synchronization preamble code is calculated according to the number of channels and the time of determining the target working channel.

[0082] In a preferred embodiment of the present invention, the length of the first network synchronization preamble = standard preamble length + (number of scanned channels * (clean channel detection time + channel switching time) * redundancy multiple) / one symbol duration. In the prior art, the preamble length value of the standard preamble data frame is relatively short. It is as short as possible to improve the efficiency of wireless communication under the premise of meeting the wireless data synchronization, and is defined as a "standard preamble". For example: in LoRa communication, 9 symbols are taken. First network synchronization preamble: The preamble length of the first network synchronization frame is relatively long. Its value is calculated based on the number of channels that the node needs to scan and the clean channel detection time. It is defined as a "synchronous preamble". The synchronous preamble can speed up the time it takes for the wireless node to search for the network. The clean channel detection time is much shorter than the time it takes to receive a complete frame. Generally, the time it takes to receive a complete frame is more than 100 times the time it takes to detect a clean channel. The synchronous preamble is set to be relatively long to ensure that the coverage node scans all channels and successfully captures the network during the process of receiving the preamble. The timing diagram is as follows Figure 6As shown in the figure, when a wireless gateway or router (a wireless node switched to router status) sends a network synchronization frame, the duration of the preamble code covers W times the time required for the node to scan all channels (generally W=2), ensuring that the node can scan and lock after sending one network synchronization frame. After the node locks the network synchronization frame, it receives the complete frame data. After receiving the frame, it parses the frame to obtain information such as the network identification, network working channel, and the list of node addresses allowed to join the network. If the node address is included in the parsed address list, the node directly sends an association network command to the gateway or router to apply to join the network; if the node address is not included in the parsed address list, it continues to scan and search for the network.

[0083] In a preferred embodiment of the present invention, the wireless node joins the network without affecting the normal communication of other nearby networks. Because when the wireless node switches channels to scan and search for the network, it receives wireless frames but does not send wireless frames, so when the wireless node scans and searches, it will not affect nearby networks. After the wireless node scans and searches for the network, receives the network synchronization frame, and parses the frame, if the address of the wireless node is included in the list of allowed access node addresses, it will send an association network command in the network. At this time, the wireless node may only affect the network that is allowed to join, but will not affect other nearby networks.

[0084] ZigBee is the most widely used and mature wireless ad hoc network in the civilian sector. The world is divided into three frequency bands: 868MHz in Europe, 915MHz in North America, and 2.4GHz globally. The most widely used frequency band is the 2.4GHz band globally, which has 16 channels in total, a wireless rate of 250Kbps, and a point-to-point wireless transmission distance of generally 10 to 100 meters within a visible range. The length of time it takes for ZigBee to form a network is closely related to the number of channels scanned, the number of networking nodes, the number of routing levels, and the environment. The more channels scanned, the more nodes, the more routing levels, and the more complex the environment, the longer the networking time, generally from a dozen seconds to more than ten minutes. LoRa technology has a point-to-point wireless transmission distance that can reach dozens of times that of Zigbee, and its ability to bypass obstacles is much stronger than Zigbee. Using LoRa technology to realize the self-organizing network function is a very practical technology, but the wireless rate of LoRa is relatively low, and the reliable wireless rate is less than 10Kbps, which is much smaller than Zigbee's 250Kbps. Using the traditional wireless self-organizing network networking method, it will take a very long time to create a network, generally tens of seconds to tens of minutes, and the practicality of such wireless self-organizing networks will be greatly reduced. When there are many channels for nodes to scan and the wireless rate is relatively low, it will take a long time for nodes to scan and search for networks and join networks. The method of nodes actively scanning nearby networks will affect the normal communication of other nearby networks, especially for networks that need to continuously transmit data in real time.

[0085] By implementing this embodiment, a system for wireless nodes to join a network is provided, including a wireless gateway and a plurality of wireless nodes; the wireless nodes include: a terminal state and a router state; the wireless gateway is used to determine a target working channel and send a first network synchronization broadcast command; wherein the first network synchronization broadcast command includes a first network synchronization frame, the first network synchronization frame includes a network identifier, a target working channel and a first network synchronization preamble; and, in the case of establishing a connection with the wireless node, sending a route switching instruction to the wireless node; each of the wireless nodes is used to send a first network association command to the wireless gateway according to the network identifier and the target working channel after receiving the first network synchronization broadcast command, so that the wireless gateway establishes a connection with the wireless node according to the first network association command; in the case of successfully establishing a connection with the wireless gateway and receiving a route switching instruction, switching to a router state and sending a second network synchronization broadcast command; in the case of successfully establishing a connection with the wireless gateway and not receiving a route switching instruction, continuing to maintain a terminal state; in the case of failing to establish a connection with the wireless gateway, listening to the second network synchronization broadcast command of other wireless nodes; when receiving the second network synchronization broadcast command of other wireless nodes, connecting with other wireless nodes switched to the router state according to the second network synchronization broadcast command. The design of the network synchronization preamble ensures that the wireless node can scan all target working channels. The wireless node can successfully capture the network during the process of receiving the network preamble, which shortens the time for the wireless node to search for the network and improves the efficiency of the wireless node joining the network. In addition, the wireless node does not need to request a broadcast command, and sends a broadcast command after waiting for a response from a nearby network before responding. Instead, when the second wireless node is not directly connected to the gateway, the first wireless node directly connected to the wireless gateway is converted into a router to create a route with the second wireless node, which omits the time for the wireless node to request a broadcast command. In addition, the number of routers that can create routes with the wireless node increases, and the time for the wireless node to join the network is also accelerated, thereby improving the efficiency of the wireless node joining the network.

[0086] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A system for wireless nodes to join a network, characterized in that: include: A wireless gateway and several wireless nodes; The wireless node includes: terminal status and router status; The wireless gateway is used to determine a target working channel and send a first network synchronization broadcast command; wherein the first network synchronization broadcast command includes a first network synchronization frame, and the first network synchronization frame includes a network identifier, a target working channel, and a first network synchronization preamble; and, when a connection is established with a wireless node, send a routing switching instruction to the wireless node; Each of the wireless nodes is used to, after receiving the first network synchronization broadcast command, send a first network association command to the wireless gateway according to the network identifier and the target working channel, so that the wireless gateway establishes a connection with the wireless node according to the first network association command; when the connection with the wireless gateway is successfully established and the routing switching instruction is received, switch to the router state and send a second network synchronization broadcast command; when the connection with the wireless gateway is successfully established and the routing switching instruction is not received, continue to maintain the terminal state; when the connection with the wireless gateway fails to be established, listen to the second network synchronization broadcast command of other wireless nodes; when the second network synchronization broadcast command of other wireless nodes is received, connect with other wireless nodes that have switched to the router state according to the second network synchronization broadcast command.

2. A system for wireless nodes to join a network as claimed in claim 1, characterized in that: The wireless gateway is used to determine the target working channel, including: Detecting a first signal strength of each channel; The channel whose first signal strength is less than or equal to a preset strength threshold is regarded as a clean channel; Randomly select a clean channel as the target working channel.

3. A system for wireless nodes to join a network as claimed in claim 1, characterized in that: The wireless gateway is used to determine the target working channel, and further includes: When the first signal strengths of all channels are greater than a preset strength threshold, the channel with the smallest first signal strength is used as the target working channel.

4. A system for wireless nodes to join a network as claimed in claim 1, characterized in that: Each of the wireless nodes is configured to, after receiving the first network synchronization broadcast command, send a first network association command to the wireless gateway according to the network identifier, the target working channel, and the first network synchronization preamble, so that the wireless gateway establishes a connection with the wireless node according to the first network association command, including: Get the node address of the current wireless node; When receiving the first network synchronization broadcast command, parsing the first network synchronization broadcast command to obtain a network identifier, a target working channel, and a first address list for determining whether the current wireless node is allowed to join the network; According to the first address list and the node address of the current wireless node, determining whether the first address list includes the node address of the current wireless node; In the case where the first address list contains the node address of the current wireless node, a first network association command is generated based on the network identifier, the target working channel and the node address of the current wireless node, and the first network association command is sent to the wireless gateway so that the wireless gateway establishes a connection with the wireless node according to the first network association command.

5. A system for wireless nodes to join a network as claimed in claim 1, characterized in that: The wireless gateway is further configured to: resend the first network synchronization broadcast command when the first network association command cannot be received.

6. A system for wireless nodes to join a network as claimed in claim 1, characterized in that: The wireless node, when receiving the second network synchronization broadcast command from other wireless nodes, connects with other wireless nodes switched to the router state according to the second network synchronization broadcast command, including: When receiving the second network synchronization broadcast command, parsing the second network synchronization broadcast command to obtain a network identifier, a target working channel, and a second address list for determining whether the current wireless node is allowed to join; According to the second address list and the node address of the current wireless node, determining whether the second address list includes the node address of the current wireless node; In the case that the second address list contains the node address of the current wireless node, a second network association command is generated according to the network identification target working channel and the node address of the current wireless node, and the second network association command is sent to other wireless nodes switched to router state, so that other wireless nodes switched to router state establish a connection with the wireless node according to the second network association command.

7. A system for wireless nodes to join a network as claimed in claim 6, characterized in that: The wireless node that successfully establishes a connection with the wireless gateway is further configured to: resend the second network synchronization broadcast command when the second network association command cannot be received.

8. A system for wireless nodes to join a network as claimed in claim 1, characterized in that: The determination of the length of the first network synchronization preamble code includes: The number of channels is obtained and the time for determining the target working channel is determined; The length of the first network synchronization preamble code is calculated according to the number of channels and the time of determining the target working channel.

9. A system for wireless nodes to join a network as claimed in claim 1, characterized in that: The wireless gateway, when establishing a connection with the wireless node, sends a routing switching instruction to the wireless node, including: Acquire a second signal strength between wireless nodes that successfully establish a connection with the wireless gateway; According to the second signal strength, sorting the wireless nodes that have successfully established a connection with the wireless gateway in ascending order of the second signal strength to obtain sorted wireless nodes; According to the sorted order of the wireless nodes, the routing switching instructions are sent to the wireless nodes one by one.

10. A system for wireless nodes to join a network as claimed in claim 1, characterized in that: The first network synchronization frame also includes: a physical layer frame header, a frame control type, a network identification length, a total number of frame transmissions, and a current number of frame transmissions.

Citation Information

Patent Citations

  • Dynamic adjustment method of nodes in Internet of Things system

    CN102006610A

  • Networking method and system for wireless sensor network based on multiple sink nodes

    CN102404817A