CN114338852B - Method for encapsulating data packet based on Thread protocol to obtain IEEE802.11 physical frame - Google Patents

Method for encapsulating data packet based on Thread protocol to obtain IEEE802.11 physical frame Download PDF

Info

Publication number
CN114338852B
CN114338852B CN202111666977.3A CN202111666977A CN114338852B CN 114338852 B CN114338852 B CN 114338852B CN 202111666977 A CN202111666977 A CN 202111666977A CN 114338852 B CN114338852 B CN 114338852B
Authority
CN
China
Prior art keywords
thread
protocol
frame
data packet
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111666977.3A
Other languages
Chinese (zh)
Other versions
CN114338852A (en
Inventor
陈曙
姜江建
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Espressif Systems Shanghai Co Ltd
Original Assignee
Espressif Systems Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Espressif Systems Shanghai Co Ltd filed Critical Espressif Systems Shanghai Co Ltd
Priority to CN202111666977.3A priority Critical patent/CN114338852B/en
Publication of CN114338852A publication Critical patent/CN114338852A/en
Application granted granted Critical
Publication of CN114338852B publication Critical patent/CN114338852B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present application provides a method for encapsulating data packets based on the Thread protocol to obtain IEEE802.11 physical frames, which is performed by Wi-Fi devices based on the Thread protocol to form a Thread mesh network. The method comprises the following steps: step 1: acquiring a data packet based on a Thread protocol; step 2: according to the preset definition of the IEEE802.11 protocol, carrying out first encapsulation on the data packet based on the Thread protocol to obtain an IEEE802.11MAC frame; step 3: according to the preset definition of the IEEE802.11 protocol, performing second encapsulation on the IEEE802.11MAC frame to obtain a physical frame, wherein the second encapsulation comprises: all fields of the IEEE802.11MAC frame are taken as a service data unit (PSDU) of the physical frame, and the IEEE802.11 physical frame header and trailer are added. The application also provides a networking method based on the Thread protocol, which is used for forming a Thread mesh network by a plurality of Wi-Fi devices based on the Thread protocol.

Description

Method for encapsulating data packet based on Thread protocol to obtain IEEE802.11 physical frame
Technical Field
The present application relates to a mesh network, and more particularly, to a method for wireless network communication based on a Thread protocol, and a networking method based on the Thread protocol.
Background
Wi-Fi is a high-speed, high-performance network protocol that has been widely used. At present, mesh networking (Mesh networking) based on Wi-Fi mainly has two standards, namely IEEE802.11 s and Easy Mesh protocols, in which:
(1) IEEE802.11 s began in 2006 by IEEE, and the standard only defines a mesh networking protocol of the MAC layer, and an upper layer protocol needs to be configured for commercialization. Because the bottom layer of IEEE802.11 s is complex and difficult to realize, and the upper layer lacks support, the development is not advanced, and the market application is few;
(2) Easy Mesh is one Wi-Fi Mesh networking protocol that is currently in widespread use, being Wi-Fi based AP and Station modes. Wi-Fi nodes in a Wi-Fi network simultaneously support two modes, namely AP and Station, point-to-point links are established in a traditional AP and Station mode, and then a tree network is formed, so that the problem of Wi-Fi coverage is solved.
Since Easy Mesh is a Wi-Fi Mesh network formed by establishing links between an AP and a Station mode based on Wi-Fi, and is not a true pure Mesh structure, the actual network topology is similar to a tree structure, and disadvantages caused by this mode include:
(1) After a certain node in the network is disconnected, all subsequent nodes taking the node as an AP are disconnected;
(2) The data route between two nodes must be upward layer by layer and downward layer by layer, and even if the actual physical distance between two nodes is very close, the data transmission can be completed by multi-hop route;
(3) Additional data communication is required between each two nodes that establish a link to maintain the link, and the more links that a node establishes, the more it consumes to maintain the link.
In view of the above, there is currently a lack of networking schemes that enable a true mesh network to be implemented over Wi-Fi links (i.e., IEEE 802.11).
Drawings
FIG. 1 is a schematic diagram of a protocol stack according to the Thread protocol;
FIG. 2 is a schematic flow chart diagram of a method of encapsulating a Thread protocol based data packet to obtain an IEEE802.11 physical frame in accordance with one embodiment of the application;
FIG. 3 is a schematic diagram of a frame format of a particular offer Shang Zi type frame (vendor-specific action frame) in the IEEE802.11 protocol in accordance with one embodiment of the present application;
FIG. 4 is a schematic diagram of an exemplary method of encapsulating a Thread protocol based data packet to obtain an IEEE802.11 physical frame in accordance with one embodiment of the application;
FIG. 5 is a schematic diagram of a method of encapsulating a Thread protocol based data packet to obtain an IEEE802.11 physical frame in accordance with another example of an embodiment of the application;
FIG. 6 is a schematic diagram of a method of encapsulating a Thread protocol based data packet to obtain an IEEE802.11 physical frame in accordance with yet another example of an embodiment of the application;
FIG. 7 is a schematic diagram of establishing a parent-child link according to another embodiment of the application;
FIG. 8 is a schematic diagram of establishing routing Links (Route Links) between routing nodes according to another embodiment of the present application;
FIG. 9 is a schematic diagram of a node becoming a route in accordance with another embodiment of the present application;
FIG. 10 is a schematic diagram of a Router node that may also downgrade to REED nodes in accordance with another embodiment of the present application;
fig. 11 is a schematic diagram of hybrid networking of a Thread network and a Wi-Fi network by a bridging device according to yet another embodiment of the present application.
Disclosure of Invention
Aiming at the problem that the networking of a real mesh network cannot be realized on a Wi-Fi link in the prior art, the application aims to provide a method for encapsulating a data packet based on a Thread protocol to obtain an IEEE802.11 physical frame.
In one aspect of the application, a method of encapsulating a Thread protocol based data packet to obtain an IEEE802.11 physical frame is provided, the method performed by a Thread protocol based Wi-Fi device to form a Thread mesh network. The method comprises the following steps: step 1: acquiring a data packet based on a Thread protocol; step 2: according to the preset definition of the IEEE802.11 protocol, carrying out first encapsulation on the data packet based on the Thread protocol to obtain an IEEE802.11MAC frame; step 3: according to the preset definition of the IEEE802.11 protocol, performing second encapsulation on the IEEE802.11MAC frame to obtain a physical frame, wherein the second encapsulation comprises: all fields of the IEEE802.11MAC frame are taken as a service data unit (PSDU) of the physical frame, and the IEEE802.11 physical frame header and trailer are added.
Preferably, the data packet based on the Thread protocol is a data packet from the Thread protocol IPv6 network layer or an IEEE802.15.4MAC frame obtained by encapsulating a data packet from the Thread protocol 6LoWPAN adaptation layer, wherein encapsulating includes adding a MAC frame header and a frame trailer.
Further preferably, the first package includes: all fields of a single IEEE802.15.4MAC frame are taken as traffic data units (MSDUs) in the IEEE802.11MAC frame, and the header and the end of the IEEE802.11MAC frame are added.
Further optionally, the first package includes: the Payload fields (Payload) of multiple IEEE802.15.4MAC frames are combined as a service data unit (MSDU) in the IEEE802.11MAC frame, and the IEEE802.11MAC frame header and trailer are added.
Preferably, the data packet based on the Thread protocol is a data packet from the Thread protocol IPv6 network layer or a data packet from the Thread protocol 6LoWPAN adaptation layer.
Further preferably, the first package includes: all fields of the data packet based on the Thread protocol are taken as service data units (MSDUs) in the IEEE802.11MAC frame, and the header and the end of the IEEE802.11MAC frame are added.
Preferably, the physical frames are sent over an IEEE802.11 communication link to other Wi-Fi devices in the Thread mesh network.
Preferably, the physical frames are sent in a full broadcast manner to other Wi-Fi devices in the Thread mesh network.
Further preferably, after receiving the physical frame, other Wi-Fi devices in the Thread mesh network analyze the physical frame to obtain a destination address of a data packet based on a Thread protocol, and judge whether the destination address matches an address of the current Wi-Fi device, if so, continue to process the physical frame; if not, the physical frame is discarded.
Preferably, the IEEE802.11MAC frame adopts a frame format of a specific offer Shang Zi type frame (vendor-specific action frame) in the IEEE802.11 protocol, wherein the first encapsulation includes inserting all fields of the data packet based on the Thread protocol into a specific vendor content field (vendor specific content field) in the adapted MAC frame.
Preferably, the plurality of Wi-Fi devices in the Thread mesh network form the Thread mesh network based on Thread protocol.
In another aspect of the present application, a method for networking based on a Thread protocol is provided, for forming a Thread mesh network from a plurality of Wi-Fi devices based on the Thread protocol. The networking method comprises the following steps: configuring network parameters for each Wi-Fi device of a plurality of Thread protocol-based Wi-Fi devices; one Wi-Fi device in a plurality of Wi-Fi devices based on the Thread protocol creates a Thread mesh network according to the Thread protocol and serves as a Leader node of the Thread mesh network; the Wi-Fi equipment in the Thread network performs first communication with one or more Wi-Fi equipment which is not added into the Thread network in the plurality of Wi-Fi equipment so as to add the Wi-Fi equipment into the Thread network; and performing second communication between Wi-Fi devices in the Thread network to exchange information based on the Thread protocol. Wherein the first communication and the second communication are performed through IEEE802.11 physical frames, wherein the IEEE802.11 physical frames are obtained by encapsulating a data packet based on a Thread protocol generated by each Wi-Fi device in the plurality of Thread mesh networks according to the above scheme.
Preferably, configuring the network parameters includes any of manually configuring, configuring through a cell phone, or automatically generating.
In yet another aspect of the present application, there is provided a communication apparatus including: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program when executed by the processor implementing the steps of a method of encapsulating a Thread protocol based data packet to obtain an IEEE802.11 physical frame as described above.
In yet another aspect of the present application, there is provided a computer readable storage medium having stored thereon a program for implementing information transfer, which when executed by a processor implements the steps of a method of encapsulating a Thread protocol based data packet to obtain an IEEE802.11 physical frame as described above.
The application realizes a new networking scheme for realizing the mesh network in the Wi-Fi link by applying the Thread protocol to the Wi-Fi link, and avoids the problem of the traditional Wi-Fi mesh network. Meanwhile, wi-Fi protocol and Thread protocol are communicated at a link layer, so that Wi-Fi equipment and Thread equipment can form a unified network, and more intelligent home application scenes are unlocked.
It is to be understood that the above description of the background and summary is illustrative only and is not intended to be in any way limiting.
Detailed Description
The present application now will be described more fully hereinafter with reference to the accompanying drawings, which form a part hereof, and which show, by way of illustration, exemplary embodiments. It is to be understood that the embodiments shown in the drawings and described below are merely illustrative and not restrictive of the application.
Thread is an emerging low power consumption Mesh network protocol based on IPhttps:// www.threadgroup.org/) The communication of the bottom layer is based on the physical layer (PHY layer) and the MAC layer of the IEEE802.15.4 standard, and a complete set of protocols such as adaptation, networking, authentication security and the like are defined. The Thread protocol has been attracting attention in recent years, and is increasingly applied to low-power-consumption intelligent home products. The protocol stack diagram of the Thread protocol is shown in fig. 1, which adopts the physical layer and the MAC layer of the IEEE802.15.4 protocol for the communication at the bottom layer, and adopts the adaptation, networking, authentication security and other protocols defined by the Thread protocol at the upper layer such as the network layer and the application layer.
According to the application, the data packet based on the Thread protocol is packaged to obtain the IEEE802.11 physical frame, and the Thread protocol can be operated on the Wi-Fi link, so that a new Wi-Fi Mesh network networking scheme is realized, and the problem of the traditional Wi-Fi Mesh network is avoided. According to the application, wi-Fi and Thread are communicated at the link layer, so that Wi-Fi and Thread equipment can form a unified network, and more intelligent home application scenes are unlocked. On one hand, the application realizes the real mesh network networking on Wi-Fi links, and inherits the advantages of a Thread mesh network, such as pure mesh topology, no single point failure, low delay, high-efficiency routing and the like; on the other hand, the application realizes Wi-Fi network and Thread network mixed networking from the link layer, and realizes interconnection and intercommunication.
According to one embodiment of the present application, a method of encapsulating a data packet based on a Thread protocol to obtain an IEEE802.11 physical frame is provided, the method being performed by Wi-Fi devices based on the Thread protocol to form a Thread mesh network. Fig. 2 schematically shows the main steps of the method, comprising:
step 1: acquiring a data packet based on a Thread protocol;
step 2: according to the preset definition of the IEEE802.11 protocol, carrying out first encapsulation on the data packet based on the Thread protocol to obtain an IEEE802.11MAC frame;
step 3: according to the preset definition of the IEEE802.11 protocol, carrying out second encapsulation on the IEEE802.11MAC frame to obtain a physical frame;
wherein the second package comprises: all fields of the IEEE802.11MAC frame are taken as a service data unit (PSDU) of the physical frame, and the IEEE802.11 physical frame header and trailer are added.
Further, the physical frame is sent over an IEEE802.11 communication link to other Wi-Fi devices in the Thread mesh network. Further alternatively, the physical frames may also be sent to other Wi-Fi devices in the Thread mesh network in a full broadcast manner.
Further, after receiving the physical frame, other Wi-Fi devices in the Thread mesh network analyze the physical frame to obtain a destination address of a data packet based on a Thread protocol, judge whether the destination address matches with the address of the current Wi-Fi device, and if so, continue to process the physical frame; if not, the physical frame is discarded.
Further, a plurality of Wi-Fi devices in the Thread mesh network form the Thread mesh network based on Thread protocol.
It should be understood that in the context of the present application, "Wi-Fi devices" refer to devices capable of communicating with each other via an IEEE802.11 communication protocol, examples of which include, but are not limited to, devices with Wi-Fi communication functions used in various contexts, such as in homes, factories, malls, sports venues, outdoors, etc., such as cell phones, desktop computers, laptop computers, tablet computers, smart appliances, smart office supplies, smart lights, smart switches, smart speakers, set-top boxes, routers, etc. In embodiments of the application, the Wi-Fi device may be various devices equipped with Wi-Fi communication function chips, such as embedded devices of various forms equipped with Le Xin ESP32 chips.
It is to be understood that embodiments of the present application may be applied to various versions of the IEEE802.11 communication protocol, including but not limited to IEEE802.11 a/b/g/n/ac/ax/be, as well as future versions of the IEEE802.11 communication protocol, in accordance with the principles of the present application.
By way of example and not limitation, an IEEE802.11MAC frame may be transmitted using any Wi-Fi MAC frame type, such as a management frame, a data frame, and the like. For example, the IEEE802.11MAC frame adopts a frame format (as shown in fig. 3) of a specific offer Shang Zi type frame (vendor-specific action frame) in the IEEE802.11 protocol, wherein the first encapsulation includes inserting all fields of the Thread protocol-based data packet into a specific vendor content field (vendor specific content field) in the adaptation MAC frame.
Example 1
Specifically, a specific packaging method is shown in fig. 4. First, a data packet based on a Thread protocol is obtained, wherein the data packet based on the Thread protocol is a data packet from an IPv6 network layer of the Thread protocol or an IEEE802.15.4MAC frame obtained by encapsulating a data packet from a 6LoWPAN adaptation layer of the Thread protocol, and the encapsulating includes adding a MAC frame header and a frame tail. In other words, the Payload field (Payload) of the IEEE802.15.4mac frame is a packet from the Thread protocol IPv6 network layer or a packet from the Thread protocol 6LoWPAN adaptation layer. Next, according to the preset definition of the IEEE802.11 protocol, the data packet based on the Thread protocol is first encapsulated, so as to obtain an IEEE802.11MAC frame. Wherein the first package comprises: all fields of a single IEEE802.15.4MAC frame are taken as traffic data units (MSDUs) in the IEEE802.11MAC frame, and the IEEE802.11MAC frame header and trailer are added. By way of example and not limitation, the header of an IEEE802.11MAC frame is set to the full broadcast address. According to the preset definition of the IEEE802.11 protocol, performing second encapsulation on the IEEE802.11MAC frame to obtain a physical frame, wherein the second encapsulation comprises: all fields of the IEEE802.11MAC frame are taken as a service data unit (PSDU) of the physical frame, and the IEEE802.11 physical frame header and trailer are added.
Further, the physical frame is sent over an IEEE802.11 communication link to other Wi-Fi devices in the Thread mesh network. Further alternatively, the physical frames may also be sent to other Wi-Fi devices in the Thread mesh network in a full broadcast manner.
Further, after receiving the physical frame, other Wi-Fi devices in the Thread mesh network analyze the physical frame to obtain a destination address of a data packet based on a Thread protocol, judge whether the destination address matches with the address of the current Wi-Fi device, and if so, continue to process the physical frame; if not, the physical frame is discarded.
By way of example and not limitation, in this example, the destination address is resolved by packet header processing, and in the present application, all received IEEE802.11MAC frames are resolved by default, and the destination address is determined by the packet header of the data packet based on the Thread protocol obtained after the resolution. Similarly, security verification may not be performed on all received IEEE802.11MAC frames, but the security verification may be performed on the data packet address obtained after parsing and based on the Thread protocol through software. Therefore, both the resolution of the destination address and the security verification are performed by software.
Further, a plurality of Wi-Fi devices in the Thread mesh network form the Thread mesh network based on Thread protocol.
According to the method of example 1, the MAC layer packet originally sent on the 802.15.4 link in the Thread protocol may be adapted to be sent on the Wi-Fi (i.e., IEEE 802.11) link, where the adaptation is simpler, and the method related to encryption, integrity check, networking, authentication, etc. in the Thread protocol may be used without changing the part of the Thread protocol above the MAC layer, so that the mesh network networking based on the Thread protocol is implemented on the Wi-Fi link. In addition, the encapsulated data packet is sent in the MAC layer of the Wi-Fi link in a full broadcast manner, wherein address resolution, security verification and the like of the data packet all conform to the requirements of the MAC layer of IEEE802.15.4 adopted in the original Thread protocol and are processed by software. By way of example and not limitation, the process by which the physical layer of IEEE802.15.4, originally employed in the Thread protocol, parses the physical frame to obtain the MAC frame, may also be handled by hardware.
Example 2
Specifically, a specific packaging method is shown in fig. 5. First, a data packet based on a Thread protocol is obtained, wherein the data packet based on the Thread protocol is a data packet from an IPv6 network layer of the Thread protocol or an IEEE802.15.4MAC frame obtained by encapsulating a data packet from a 6LoWPAN adaptation layer of the Thread protocol, and the encapsulating includes adding a MAC frame header and a frame tail. Next, according to the preset definition of the IEEE802.11 protocol, the data packet based on the Thread protocol is first encapsulated, so as to obtain an IEEE802.11MAC frame. Wherein the first package comprises: the Payload fields (Payload) of the multiple IEEE802.15.4MAC frames are combined as a service data unit (MSDU) in the IEEE802.11MAC frame, and the IEEE802.11MAC frame header and trailer are added. By way of example and not limitation, at the time of the first encapsulation, address information in an IEEE802.15.4MAC frame header is mapped into an IEEE802.11MAC frame header by conversion between different address formats, the address format of the IEEE802.11MAC frame being MAC48 and the address format of the IEEE802.15.4MAC frame being EUI64. According to the preset definition of the IEEE802.11 protocol, performing second encapsulation on the IEEE802.11MAC frame to obtain a physical frame, wherein the second encapsulation comprises: all fields of the IEEE802.11MAC frame are taken as a service data unit (PSDU) of the physical frame, and the IEEE802.11 physical frame header and trailer are added.
Further, the physical frame is sent over an IEEE802.11 communication link to other Wi-Fi devices in the Thread mesh network. Further alternatively, the physical frames may also be sent to other Wi-Fi devices in the Thread mesh network in a full broadcast manner. Still alternatively, unicast or broadcast in IEEE802.11 may be used to transmit unicast or broadcast IEEE802.15.4mac frames, respectively, based on the Thread protocol.
Further, after receiving the physical frame, other Wi-Fi devices in the Thread mesh network analyze the physical frame to obtain a destination address of a data packet based on a Thread protocol, judge whether the destination address matches with the address of the current Wi-Fi device, and if so, continue to process the physical frame; if not, the physical frame is discarded.
Further, a plurality of Wi-Fi devices in the Thread mesh network form the Thread mesh network based on Thread protocol.
The method of example 2 may take full advantage of the high performance and throughput of Wi-Fi by merging multiple IEEE802.15.4MAC packets into one Wi-Fi (IEEE 802.11) packet, while removing the header (MHR) and the trailer (MFR) of the IEEE802.15.4MAC packet, and transmitting the IEEE802.15.4MAC packet using the mechanisms of address filtering, integrity checking, etc. of the MAC layer of the Wi-Fi protocol. The adaptation method requires the MAC layer data of the Thread protocol to be re-packetized.
By way of example and not limitation, similar mechanisms in Wi-Fi protocols may be employed for mechanisms such as CSMA/CA defined in the MAC layer of IEEE802.15.4 as originally employed in Thread protocols to increase the efficiency of transceiving packets.
By way of example and not limitation, the scheme according to example 2 may be based on a MAC layer encryption mechanism in the Wi-Fi protocol, with the Thread protocol issuing keys to the hardware to implement hardware encryption and decryption of the Wi-Fi MAC layer.
Example 3
Specifically, a specific packaging method is shown in fig. 6. First, a data packet based on a Thread protocol is acquired, wherein the data packet based on the Thread protocol is a data packet from an IPv6 network layer of the Thread protocol or a data packet from a 6LoWPAN adaptation layer of the Thread protocol. Next, according to the preset definition of the IEEE802.11 protocol, the data packet based on the Thread protocol is first encapsulated, so as to obtain an IEEE802.11MAC frame. Wherein the first package comprises: all fields of the data packet based on the Thread protocol are taken as service data units (MSDUs) in the IEEE802.11MAC frame, and the frame header and the frame tail of the IEEE802.11MAC frame are added. According to the preset definition of the IEEE802.11 protocol, performing second encapsulation on the IEEE802.11MAC frame to obtain a physical frame, wherein the second encapsulation comprises: all fields of the IEEE802.11MAC frame are taken as a service data unit (PSDU) of the physical frame, and the IEEE802.11 physical frame header and trailer are added.
Further, the physical frame is sent over an IEEE802.11 communication link to other Wi-Fi devices in the Thread mesh network. Further alternatively, the physical frames may also be sent to other Wi-Fi devices in the Thread mesh network in a full broadcast manner.
Further, after receiving the physical frame, other Wi-Fi devices in the Thread mesh network analyze the physical frame to obtain a destination address of a data packet based on a Thread protocol, judge whether the destination address matches with the address of the current Wi-Fi device, and if so, continue to process the physical frame; if not, the physical frame is discarded.
Further, a plurality of Wi-Fi devices in the Thread mesh network form the Thread mesh network based on Thread protocol.
The IP packet of the Thread protocol has a length of 1280 Bytes (Bytes), the MAC frame of IEEE802.15.4 has a length of 127 Bytes (Bytes), and the MAC frame of a part of IEEE802.11 has a length of 1280 Bytes (Bytes) or more, so most MAC frames of IEEE802.11 can withstand the IP packet of the Thread protocol. The function of the 6LoWPAN adaptation layer in the Thread protocol is to adapt the IP layer and the MAC layer, and its main purpose is to fragment and compress the IP packets. Example 3 the 6LoWPAN layer in the Thread protocol was further removed and the IP packet based on the Thread protocol was directly sent over the Wi-Fi link, thereby taking full advantage of the high performance and high throughput of the Wi-Fi link.
According to the scheme of the application, mesh networking on a Wi-Fi link is completed based on the Thread protocol, and meanwhile, the AP/Station mode of the Wi-Fi standard can be compatible, and the IP network can be accessed. Because the physical layer and the MAC layer based on IEEE802.11 are adopted in the scheme, the network layer of the Thread protocol and the Wi-Fi protocol can be simultaneously supported.
The above embodiments give specific operation procedures and steps by way of example, but it should be understood that the scope of the present application is not limited thereto.
In another aspect of the present application, a method for networking based on a Thread protocol is provided, for forming a Thread mesh network from a plurality of Wi-Fi devices based on the Thread protocol. The networking method comprises the following steps:
configuring network parameters for each Wi-Fi device of a plurality of Thread protocol-based Wi-Fi devices;
one Wi-Fi device in a plurality of Wi-Fi devices based on the Thread protocol creates a Thread mesh network according to the Thread protocol and serves as a Leader node of the Thread mesh network;
the Wi-Fi equipment in the Thread network performs first communication with one or more Wi-Fi equipment which is not added into the Thread network in the plurality of Wi-Fi equipment so as to add the Wi-Fi equipment into the Thread network;
and performing second communication between Wi-Fi devices in the Thread network to exchange information based on the Thread protocol;
wherein the first communication and the second communication are performed through IEEE802.11 physical frames, wherein the IEEE802.11 physical frames are obtained by encapsulating a data packet based on a Thread protocol generated by each Wi-Fi device in the plurality of Thread mesh networks according to the above scheme.
Example 4
By way of example and not limitation, the Thread protocol based networking method includes the steps of:
step 1: wi-Fi devices are configured manually, by cell phone, or automatically generated to obtain network parameters. The network parameters include: channel, panID (one PanID per Thread Network, which is for IEEE 15.4), key, network Name (for Thread protocol), etc.;
step 2: the Wi-Fi device sends a parent request (parent request);
if no reply is received, the current Wi-Fi device is considered to be the first node of the Thread network;
if a reply (parent response) is received, further performing step 3;
step 3: sending a Child node request (Child ID request);
step 4: receiving a child node reply (Child ID response);
step 5: communication is performed according to a routing protocol in the Thread protocol.
By way of example and not limitation, configuring network parameters includes any of manually configuring, configuring through a cell phone, or automatically generating.
Example 5
Example 5 describes a networking method based on the Thread protocol in terms of establishing a Parent-Child Link (Child Link), establishing a Route Link (Route Links), becoming a routing node (Becoming a Router), becoming a REED node (beacon a REED), and the like, respectively.
In the first aspect, if a Device chooses to join an existing Network, it configures its Channel, PAN ID, XPAN ID, and Network Name to be the same as the target Network through Thread Commissioning, and then performs an MLE Attach procedure to join as a child node (End Device). This procedure is used to establish a "Child-Parent link". Fig. 7 shows a schematic diagram of setting up a parent-child link, wherein dots represent child nodes, pentagons represent parent nodes (Router nodes or REED nodes), solid-line connected dots represent child nodes that have joined the network, and dashed-line connected dots represent child nodes that are to join the network, comprising the steps of:
step 1: the child node sends a multicast Parent node Request (Parent Request) to all adjacent Router nodes and REED nodes in the target network;
step 2: all adjacent Router nodes and REED nodes should send Parent node replies (Parent Response) to tell child nodes its own information;
step 3: the Child node selects a parent node and sends a Child node ID Request (Child ID Request) to it;
step 4: the parent node sends a child node ID reply (Child ID Response) to confirm the link establishment.
In a second aspect, fig. 8 shows that a routing Link (Route Links) is established between routing nodes (as shown by pentagons in the figure), and a bidirectional Link is established through 3 messages (Link Request, link Accept and Request, link Accept), specifically comprising the following steps:
step 1: transmitting a Link Request (Link Request), and if the node becomes a Router node for the first time, using a multicast mode; otherwise, the link request is sent to other Router nodes discovered through MLE Advertisements in a unicast mode;
step 2: the Router node of the receiver replies the Link Accept (Link Accept) through unicast mode
Step 3: the message Link Accept and Request is used to respond to establish the routing link.
In a third aspect, in the Thread protocol, the REED node may be upgraded to a Router node, and fig. 9 shows a schematic diagram of the Router node. All routing nodes in the Thread network form a connection support set (Connected Dominating Set, CDS), i.e. there is a Router-only path between any two Router nodes. Each node in the Thread network is directly connected to a Router node or is itself a Router node.
Thread maintains CDS using a distributed algorithm to ensure minimal redundancy. Each device is initially connected to the network as a child node. As the Thread network state changes, algorithms add or remove Router nodes to maintain CDS. When there is an explicit need to support a child node, the current non-Router child node may be upgraded to a Router node.
In a fourth aspect, in the Thread protocol, the Router node may also downgrade to the REED node. When Router downgrades to REED, its routing link breaks and the node starts the MLE Attach procedure to establish the parent-child link, as shown in fig. 10.
As a specific embodiment of the present application, the present application also enables hybrid networking of the Thread network and the Wi-Fi network, and forms an independent Mesh network by means of a bridging device. Because it is composed of one independent Mesh network, it is more efficient than the conventional way of connecting multiple independent networks based on Thread Border Router. As shown in fig. 11, the bridging device is a device that combines two nodes together, and parses a data packet to the MAC layer after receiving a data packet of a certain standard (Thread protocol or Wi-Fi protocol), and packages the data packet into a data packet of another standard (Wi-Fi protocol or Thread protocol). In contrast to conventional Thread Border Router, the bridging device of the present application connects Wi-Fi and IEEE802.15.4 networks at the data link layer (MAC layer), while forwarding is performed at the routing layer. The forwarding logic of the bridging device of the present application may be designed according to the application layer requirements, such as forwarding all data packets, or forwarding only broadcast data, etc.
In summary, the scheme of the application adapts and receives and transmits the MAC data frame of IEEE802.15.4 on the Wi-Fi connectionless link, and can operate the Thread mesh network group network routing protocol on Wi-Fi equipment; in addition, the Thread and Wi-Fi equipment can be combined and networked through the bridging equipment, interconnection is realized at a link layer, and an independent mesh network is formed.
A Wi-Fi mesh network implemented based on the Thread protocol implemented according to an embodiment of the present application is a true mesh structure, and nodes within one hop range can form peer-to-peer links, thus one or more of the following benefits can be obtained:
(1) The problem of single point failure does not exist, and even if one node in the network is dropped, the overall connectivity of the network is not affected, because all nodes and surrounding nodes maintain links;
(2) The dynamic and efficient routing mechanism in the Thread protocol is realized, a specific node is not required to be used as a root node for forwarding, and an optimal route can be selected in real time according to the network topology and the link quality;
(3) The link maintenance in the Thread protocol is based on broadcasting, and one broadcasting can update all linked neighbor nodes, so that the overhead for maintaining the mesh network is greatly reduced; a kind of electronic device with high-pressure air-conditioning system
(4) The design of the Thread protocol for low power consumption also enables the power consumption of the nodes of the Thread-based Wi-Fi mesh network to be obviously reduced.
The interconnection of Wi-Fi and Thread at the link layer by the bridging device according to the embodiments of the present application also has the following advantages:
(1) The Mesh network can be formed into an independent Mesh network, and the routing efficiency is higher;
(2) When a plurality of Thread devices cannot be connected with each other in the same environment, unified networking can be realized through Wi-Fi Mesh network communication in the application.
While various embodiments of the various aspects of the present application have been described for the purposes of this disclosure, it should not be construed that the teachings of this disclosure are limited to these embodiments. Features disclosed in one particular embodiment are not limited to that embodiment, but may be combined with features disclosed in a different embodiment. Furthermore, it should be understood that the method steps described above may be performed sequentially, in parallel, combined into fewer steps, split into more steps, combined and/or omitted in a different manner than described. It will be understood by those skilled in the art that there are many more alternative embodiments and variations that the above-described components and constructions may be varied or modified without departing from the scope of the application as defined in the appended claims.

Claims (10)

1. A method of encapsulating data packets based on a Thread protocol to obtain IEEE802.11 physical frames, which is performed by Wi-Fi devices based on the Thread protocol to form a Thread mesh network, comprising:
step 1: acquiring a data packet based on a Thread protocol, wherein the data packet based on the Thread protocol is a data packet from an IPv6 network layer of the Thread protocol or an IEEE802.15.4MAC frame obtained by encapsulating a data packet from a 6LoWPAN adaptation layer of the Thread protocol, and the encapsulating comprises adding an MAC frame header and a frame tail;
step 2: according to the preset definition of the IEEE802.11 protocol, the data packet based on the Thread protocol is subjected to first encapsulation to obtain an IEEE802.11MAC frame; wherein the first package comprises: taking all fields of a single IEEE802.15.4MAC frame as service data units (MSDUs) in the IEEE802.11MAC frame, and adding an IEEE802.11MAC frame head and frame tail;
step 3: according to a preset definition of an IEEE802.11 protocol, performing a second encapsulation on the IEEE802.11MAC frame to obtain a physical frame, where the second encapsulation includes: all fields of the IEEE802.11MAC frame are taken as a service data unit (PSDU) of the physical frame, and an IEEE802.11 physical frame header and a frame trailer are added.
2. The method of claim 1, wherein the physical frame is sent over an IEEE802.11 communication link to other Wi-Fi devices in the Thread mesh network.
3. The method of claim 1, wherein the physical frame is transmitted to other Wi-Fi devices in the Thread mesh network in a full broadcast manner.
4. A method according to claim 2 or 3, wherein after receiving the physical frame, the other Wi-Fi devices in the Thread mesh network parse the physical frame to obtain a destination address of the data packet based on the Thread protocol, and determine whether the destination address matches the address of the Wi-Fi device currently, and if so, continue to process the physical frame; if not, discarding the physical frame.
5. The method of claim 1, wherein the IEEE802.11MAC frame is in a frame format of a vendor-specific action frame specific offer Shang Zi type frame in the IEEE802.11 protocol, and wherein the first encapsulating comprises inserting all fields of the Thread protocol-based data packet into a vendor-specific content field (vendor specific content field) in the adaptation MAC frame.
6. The method of claim 1, wherein the plurality of Wi-Fi devices in the Thread mesh network form a Thread mesh network based on a Thread protocol.
7. A networking method based on a Thread protocol, configured to form a Thread mesh network from a plurality of Wi-Fi devices based on the Thread protocol, wherein the networking method comprises:
configuring network parameters for each Wi-Fi device of the plurality of Thread protocol-based Wi-Fi devices;
one Wi-Fi device in the plurality of Wi-Fi devices based on the Thread protocol creates a Thread mesh network according to the Thread protocol and serves as a Leader node of the Thread mesh network;
the Wi-Fi equipment in the Thread network performs first communication with one or more Wi-Fi equipment which is not added into the Thread network in the plurality of Wi-Fi equipment so as to add the Wi-Fi equipment into the Thread network; and
performing second communication between Wi-Fi devices in the Thread network to exchange information based on a Thread protocol;
wherein the first communication and the second communication are performed through IEEE802.11 physical frames, wherein the IEEE802.11 physical frames are obtained by each Wi-Fi device of the plurality of Thread mesh networks by encapsulating Thread protocol-based data packets generated by the Wi-Fi device according to any one of claims 1 to 6.
8. The networking method of claim 7, wherein configuring the network parameters comprises any of manual configuration, configuration via a cell phone, or automatic generation.
9. A communication device, the communication device comprising: memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor performs the steps of the method of encapsulating a Thread protocol based data packet to obtain an IEEE802.11 physical frame as claimed in any one of claims 1 to 6.
10. A computer-readable storage medium, in which a program for implementing information transfer is stored, the program, when executed by a processor, implementing the steps of the method for encapsulating a data packet based on a Thread protocol to obtain an IEEE802.11 physical frame according to any one of claims 1 to 6.
CN202111666977.3A 2021-12-31 2021-12-31 Method for encapsulating data packet based on Thread protocol to obtain IEEE802.11 physical frame Active CN114338852B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111666977.3A CN114338852B (en) 2021-12-31 2021-12-31 Method for encapsulating data packet based on Thread protocol to obtain IEEE802.11 physical frame

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111666977.3A CN114338852B (en) 2021-12-31 2021-12-31 Method for encapsulating data packet based on Thread protocol to obtain IEEE802.11 physical frame

Publications (2)

Publication Number Publication Date
CN114338852A CN114338852A (en) 2022-04-12
CN114338852B true CN114338852B (en) 2023-09-29

Family

ID=81020093

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111666977.3A Active CN114338852B (en) 2021-12-31 2021-12-31 Method for encapsulating data packet based on Thread protocol to obtain IEEE802.11 physical frame

Country Status (1)

Country Link
CN (1) CN114338852B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101854736A (en) * 2010-05-18 2010-10-06 北京交通大学 Method for converting wireless sensor network protocols
CN102868647A (en) * 2012-09-26 2013-01-09 大唐移动通信设备有限公司 Data processing method and device based on Linux network core
CN105744011A (en) * 2016-01-25 2016-07-06 中国科学技术大学 MAC (Media Access Control) address scanning method based on Openwrt router
CN109246142A (en) * 2018-10-26 2019-01-18 深圳市通用互联科技有限责任公司 Data encapsulation method, router things-internet gateway and storage medium
CN109450875A (en) * 2018-10-23 2019-03-08 清华大学 MAC layer packaging method and device
CN111480320A (en) * 2017-12-14 2020-07-31 谷歌有限责任公司 Wireless mesh access point with user space tunnel

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101854736A (en) * 2010-05-18 2010-10-06 北京交通大学 Method for converting wireless sensor network protocols
CN102868647A (en) * 2012-09-26 2013-01-09 大唐移动通信设备有限公司 Data processing method and device based on Linux network core
CN105744011A (en) * 2016-01-25 2016-07-06 中国科学技术大学 MAC (Media Access Control) address scanning method based on Openwrt router
CN111480320A (en) * 2017-12-14 2020-07-31 谷歌有限责任公司 Wireless mesh access point with user space tunnel
CN109450875A (en) * 2018-10-23 2019-03-08 清华大学 MAC layer packaging method and device
CN109246142A (en) * 2018-10-26 2019-01-18 深圳市通用互联科技有限责任公司 Data encapsulation method, router things-internet gateway and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
杨雷 ; 王鹏 ; 林开伟 ; .Thread技术与电梯物联网.物联网技术.2016,(第03期),全文. *
黄祥才.《基于Thread 的智能家居无线传感网络系统设计》.中国优秀硕士学位论文全文数据库 信息科技辑.2020,正文第10-18、33、51-54、60-65页. *

Also Published As

Publication number Publication date
CN114338852A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
EP3228123B1 (en) Efficient hybrid resource and schedule management in time slotted channel hopping networks
KR101261637B1 (en) Method of transmitting MIH message during handover between heterogeneous networks
EP2059083B1 (en) Data transmission method in wireless MESH network and A-MSDU format
EP1886451B1 (en) Multiple wireless spanning tree protocol for use in a wireless mesh network
TWI463834B (en) Procedure of setting up peer link in wireless mesh network and wireless station supporting the same
US20080205385A1 (en) Data frame formats to improve groupcast efficiency in multi-hop wireless networks
CN104272836B (en) The apparatus and method compressed for control frame and management frame
JP5537651B2 (en) Communication method in IEEE 802.11 wireless LAN environment
US20130301553A1 (en) System and method for wireless station bridging
CN103200283B (en) The implementation method of many relay wireless communications system and this Systems Air Interface IPization
WO2019183919A1 (en) Method and apparatus for converged networking
WO2006130278A1 (en) A spanning-tree protocol for wireless networks
JP2012508496A (en) Data rate adaptation method for multicast communication
JP2009267936A (en) Wireless communication system, wireless communication apparatus, wireless communication method, and program
US20110032842A1 (en) System, apparatus and method for seamless roaming through the use of routing update messages
KR101530018B1 (en) Communication method in a network comprising a primary network and a secondary network
KR20140069307A (en) Systems and method for reduced power wireless communication
BR112016010139A2 (en) APPLIANCE AND METHODS FOR MAC HEADER COMPRESSION
WO2023011245A1 (en) Communication method and communication apparatus
WO2017041534A1 (en) Power line network communication method and device, and computer storage media
WO2018210114A1 (en) Wifi network, and networking method therefor and data transmission method therein
CN114338852B (en) Method for encapsulating data packet based on Thread protocol to obtain IEEE802.11 physical frame
CN106688304B (en) ZigBee system management using TR-069 enabled CPE agent
JP6802530B2 (en) Communication method
WO2021109821A1 (en) Network structure, method for sending packet between network elements in network, and receiving method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant