CN111372297B - Odd-even packet-based WiFi network distribution method, equipment, device and storage medium - Google Patents

Odd-even packet-based WiFi network distribution method, equipment, device and storage medium Download PDF

Info

Publication number
CN111372297B
CN111372297B CN202010187489.3A CN202010187489A CN111372297B CN 111372297 B CN111372297 B CN 111372297B CN 202010187489 A CN202010187489 A CN 202010187489A CN 111372297 B CN111372297 B CN 111372297B
Authority
CN
China
Prior art keywords
packet
information
distribution network
odd
wifi
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
CN202010187489.3A
Other languages
Chinese (zh)
Other versions
CN111372297A (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.)
Spreadtrum Communications Shanghai Co Ltd
Original Assignee
Spreadtrum Communications 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 Spreadtrum Communications Shanghai Co Ltd filed Critical Spreadtrum Communications Shanghai Co Ltd
Priority to CN202010187489.3A priority Critical patent/CN111372297B/en
Publication of CN111372297A publication Critical patent/CN111372297A/en
Application granted granted Critical
Publication of CN111372297B publication Critical patent/CN111372297B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information

Abstract

The embodiment of the application discloses a WiFi network distribution method based on parity packets, which is applied to first equipment, and comprises the following steps: acquiring distribution network information of an Access Point (AP); generating a first even packet carrying the distribution network information of the access point AP, and generating a first odd packet carrying the distribution network information of the access point AP; sending a distribution network data packet to the second device; the distribution network data packet comprises: a first even packet and a first odd packet. By adopting the method and the device, the success rate and the robustness of the distribution network can be improved.

Description

Odd-even packet-based WiFi network distribution method, equipment, device and storage medium
Technical Field
The invention relates to the field of communication, in particular to a WiFi network distribution method, device and apparatus based on parity packets and a storage medium.
Background
With the development of WiFi (Wireless-Fidelity) network communication, the demand for various devices to connect to a WiFi network is gradually increasing. Most of equipment with the distribution network requirement is not provided with input equipment such as a touch screen and a keyboard, and the equipment needing auxiliary distribution network sends distribution network information to the equipment with the distribution network requirement in a wireless electromagnetic wave mode. At present, the effective distribution network information carried by the method is less, and the condition of distribution network information which cannot be identified is easy to occur, so that the distribution network success rate is low. How to improve the success rate of the distribution network for the equipment with the distribution network requirement becomes a research hotspot.
Disclosure of Invention
The embodiment of the application provides a WiFi network distribution method, device and apparatus based on odd-even packets and a storage medium, and the success rate and robustness of the network distribution can be improved.
In order to solve the foregoing technical problem, in a first aspect, an embodiment of the present application provides a WiFi network distribution method based on parity packets, where the WiFi network distribution method is applied to a first device, and the method includes:
acquiring distribution network information of an Access Point (AP);
generating a first even packet carrying the distribution network information of the access point AP, and generating a first odd packet carrying the distribution network information of the access point AP;
sending a distribution network data packet to the second device; the distribution network data packet comprises: a first even packet and a first odd packet.
In a second aspect, an embodiment of the present application further provides a WiFi network distribution method based on parity packets, which is applied to a second device, and the method includes:
receiving a distribution network data packet; the distribution network data packet comprises: a first even packet and a first odd packet; the WiFi packet length information and the service quality QoS information of the first even packet carry distribution network information of an Access Point (AP), and the WiFi packet length information and the service quality QoS information of the first odd packet carry distribution network information of the Access Point (AP);
and decoding the distribution network data packet to acquire the distribution network information of the access point AP.
In a third aspect, an embodiment of the present application further provides a WiFi network distribution device based on an odd-even packet, where the WiFi network distribution device includes: a storage device and a processor, wherein the processor is capable of,
the storage device is used for storing program instructions;
the processor, when invoking the storage instruction, is configured to execute the parity packet-based WiFi network distribution method of the first aspect.
In a fourth aspect, an embodiment of the present application further provides a WiFi network distribution device based on parity packets, where the WiFi network distribution device includes: a storage device and a processor, wherein the processor is capable of,
the storage device is used for storing program instructions;
the processor, when invoking the storage instruction, is configured to execute the parity packet-based WiFi network distribution method of the second aspect.
In a fifth aspect, an embodiment of the present application further provides a WiFi network distribution device based on parity packets, where the WiFi network distribution device includes:
the acquisition module is used for acquiring the distribution network information of the access point AP;
the generation module is used for generating a first even packet carrying the distribution network information of the access point AP and generating a first odd packet carrying the distribution network information of the access point AP;
the sending module is used for sending the distribution network data packet to the second equipment; the distribution network data packet comprises: a first even packet and a first odd packet.
In a sixth aspect, an embodiment of the present application further provides a WiFi network distribution device based on parity packets, where the WiFi network distribution device includes:
the receiving module is used for receiving the distribution network data packet; the distribution network data packet comprises: a first even packet and a first odd packet; the WiFi packet length information and the service quality QoS information of the first even packet carry distribution network information of an Access Point (AP), and the WiFi packet length information and the service quality QoS information of the first odd packet carry distribution network information of the Access Point (AP);
and the acquisition module is used for decoding the distribution network data packet and acquiring the distribution network information of the access point AP.
In a seventh aspect, an embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium is used to store a computer program, and the computer program enables a computer to execute the parity packet-based WiFi network distribution method according to the first aspect.
In an eighth aspect, the present application further provides a computer-readable storage medium for storing a computer program, where the computer program causes a computer to execute the parity packet-based WiFi network distribution method of the second aspect.
The embodiment of the application has the following beneficial effects:
the distribution network information is transmitted through the first even-time packet and the first odd-time packet, so that the distribution network information can be effectively identified by equipment with distribution network requirements, and the success rate and the robustness of a distribution network are improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a scene diagram of a WiFi distribution network based on parity packets according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a WiFi network distribution method based on parity packets according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of another WiFi network distribution method based on parity packets according to an embodiment of the present disclosure;
fig. 4 is an interaction flow diagram of a WiFi network distribution method based on parity packets according to an embodiment of the present application;
FIG. 5 is a mapping table of TID field and AC information in QoS Control field;
fig. 6 is a diagram illustrating a second parity packet group according to an embodiment of the present application;
fig. 7 is a schematic diagram of a first parity packet group carrying a password of the access point AP according to an embodiment of the present application;
fig. 8 is a schematic diagram of a first parity packet group carrying verification information of an SSID of the access point AP according to an embodiment of the present application;
fig. 9 is a schematic diagram of a first parity packet group carrying SSIDs of the access points AP according to an embodiment of the present disclosure;
FIG. 10 is a diagram illustrating an SSID end character packet set according to an embodiment of the present application;
fig. 11 is a schematic diagram of an SSID length packet set according to an embodiment of the present application;
fig. 12 is a schematic diagram of a third parity packet group configured to the first parity packet group carrying the verification information of the password of the access point AP or the SSID of the access point AP according to the embodiment of the present application;
fig. 13 is a schematic diagram of a third parity packet group and a first parity packet group corresponding to a data segment obtained by dividing the password of the access point AP or the verification information of the SSID of the access point AP according to the embodiment of the present application;
fig. 14 is a schematic diagram of a third parity packet group configured to an SSID length data packet group according to an embodiment of the present application;
fig. 15 is a schematic diagram of a third parity packet group and an SSID length packet group corresponding to a data segment obtained by dividing the length of the SSID of the access point AP according to an embodiment of the present application;
fig. 16 is a schematic diagram of a third parity packet group configured to the first parity packet group carrying the SSID of the access point AP according to an embodiment of the present application;
fig. 17 is a schematic diagram of a third parity packet group and a first parity packet group corresponding to a data segment obtained by SSID partition of the access point AP according to an embodiment of the present application;
fig. 18 is a schematic diagram of a distribution network data packet generated by a first device in an identification phase and a data phase according to an embodiment of the present disclosure;
fig. 19 is a schematic structural diagram of a WiFi distribution network device based on parity packets according to an embodiment of the present application;
fig. 20 is a WiFi network distribution device based on parity packets according to an embodiment of the present application;
fig. 21 is another WiFi network distribution device based on parity packets according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," "third," "fourth," "fifth," "sixth," "seventh," "even," "odd," "even," and "odd," etc. used in the description and claims of this application and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in other sequences than described or illustrated herein. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Referring to fig. 1, fig. 1 is a diagram of a WiFi distribution network scenario based on parity packets according to an embodiment of the present disclosure. As shown in fig. 1, in the distribution network scenario, a first device 101 acquires distribution network information of an access point AP (access point)102, generates a distribution network data packet carrying the distribution network information of the access point AP 102, and sends the distribution network data packet to a second device 103; the second device 103 receives the distribution network data packet, acquires the distribution network information of the access point AP 102 from the distribution network data packet, and connects to the access point AP according to the distribution network information. The AP 102 is an AP in a WiFi (Wireless-Fidelity) network, and the distribution network information is WiFi network distribution network information of the AP 102. It should be noted that the distribution network packet may also carry other information, such as: whether the access point AP 102 hides information of SSID (Service Set Identifier), a version number of a distribution network protocol between the first device 101 and the second device 103, identification information for assisting in identifying distribution network information, and the like may Set information carried by the distribution network packet according to actual conditions.
In the embodiment of the present application, the first device 101 includes, but is not limited to, a device with wireless signal transceiving capability, such as a mobile phone, a tablet computer, a Personal Digital Assistant (PDA), and a Mobile Internet Device (MID). The second device 103 includes, but is not limited to, a smart socket, a smart audio, a smart appliance, and other devices having wireless signal transceiving capabilities.
Referring to fig. 2, fig. 2 is a flowchart illustrating a WiFi network distribution method based on parity packets according to an embodiment of the present application, and the present specification provides the operation steps of the method according to the embodiment or the flowchart, but the operation steps may include more or less operation steps based on conventional or non-inventive labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. In the actual execution of the terminal or the storage medium product, the methods according to the embodiments or shown in the drawings can be executed sequentially or in parallel. As shown in fig. 2 in detail, the method is applied to a first device, and the method includes:
s201: and acquiring the distribution network information of the access point AP.
Specifically, an interface for inputting the distribution network information may be generated on the first device, the user may manually input the distribution network information of the access point AP on the interface, or the distribution network information of the access point AP may be automatically input on the interface after the first device connects to the access point AP, or the first device may directly obtain the distribution network information of the access point AP from the local storage, or the first device may obtain the distribution network information of the access point AP from other devices through the network, or the first device may obtain the distribution network information of the access point AP in other manners; the method for acquiring the distribution network information of the access point AP can be realized through an application program installed on the first device, and the method for acquiring the distribution network information of the access point AP is not limited.
S202: and generating a first even packet carrying the distribution network information of the access point AP, and generating a first odd packet carrying the distribution network information of the access point AP.
S203: sending a distribution network data packet to the second device; the distribution network data packet comprises: a first even packet and a first odd packet.
In this embodiment of the application, the distribution network data packet may further include a distribution network data packet carrying other information according to an actual distribution network requirement of the second device, for example: a second even packet and a second odd packet carrying the first identification information, and a third even packet and a third odd packet carrying the second identification information; wherein the first identification information includes: the second identification information is used for assisting in identifying the distribution network information carried by the first distribution network data packet, and no limitation is made on other information carried by the distribution network data packet.
If the distribution network information in one of the two data packets of the first even packet and the first odd packet is not completely identified by the second device, the second device can also obtain complete distribution network information by combining the other data packet.
In the embodiment of the application, the distribution network information is transmitted through the first even packet and the first odd packet, so that the distribution network information can be effectively identified by equipment with distribution network requirements, and the success rate and the robustness of a distribution network are improved.
Referring to fig. 3, fig. 3 is a flowchart illustrating another WiFi network distribution method based on parity packets according to an embodiment of the present application, where the present application provides the method operation steps according to the embodiment or the flowchart, but the method may include more or less operation steps based on conventional or non-inventive labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. In the actual execution of the terminal or the storage medium product, the methods according to the embodiments or shown in the drawings can be executed sequentially or in parallel. As shown in fig. 3 in detail, the method is applied to a second device, and the method includes:
s301: receiving a distribution network data packet; the distribution network data packet comprises: a first even packet and a first odd packet; the WiFi packet length information and QoS (Quality of Service) information of the first even packet carry the distribution network information of the access point AP, and the WiFi packet length information and QoS information of the first odd packet carry the distribution network information of the access point AP;
s302: and decoding the distribution network data packet to acquire the distribution network information of the access point AP.
In the embodiment of the application, the distribution network information is carried by the first even packet and the first odd packet and the like so as to be sent to the second device, so that the success rate and the robustness of the distribution network can be improved.
It should be noted that the specific implementation of the method described in fig. 2 and fig. 3 may refer to the description of the subsequent embodiments.
Referring to fig. 4, fig. 4 is a schematic interaction flow diagram of a WiFi network distribution method based on parity packets according to an embodiment of the present application, and the present specification provides the operation steps of the method according to the embodiment or the flowchart, but the operation steps may include more or less operation steps based on conventional or non-creative labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. In the actual execution of the terminal or the storage medium product, the methods according to the embodiments or shown in the drawings can be executed sequentially or in parallel. As shown in fig. 4 in detail, the method includes:
s41: the method comprises the steps that first equipment obtains distribution network information of an Access Point (AP);
the implementation method of step S41 is shown in step S201, and is not described herein.
S42: the first equipment generates a distribution network data packet;
in this embodiment of the application, the step of generating a distribution network packet by a first device (the first device is in a distribution network process) includes: an identification phase and a data phase; the first device circularly switches work in the identification phase and the data phase. A network distribution packet comprising: second even and odd packets generated in the identification phase, first even and odd packets generated in the data phase, and third even and odd packets generated in the data phase. The first even packet and the first odd packet both carry the distribution network information of the access point AP, the second even packet and the second odd packet both carry the first identification information, and the third even packet and the third odd packet both carry the second identification information.
During the identification phase, the first device generates a second even packet and a second odd packet, including:
s4201: in the identification stage, the first device encodes the first identification information into length information to generate a second even packet.
The WiFi packet length information of the second even packet is the length information obtained by encoding in step S4201; the first identification information includes: and the access point AP hides the information of the service set identifier SSID and the version number of the distribution network protocol between the first device and the second device.
Specifically, the first device may encode the first identification information into a designated position of the length information, and the designated position of the length information corresponding to different first identification information is different.
If the information of whether the SSID is hidden by the access point AP indicates that the SSID is hidden by the access point AP, the first even packet and the first odd packet need to carry the SSID of the access point AP; and if the information indicating whether the SSID is hidden by the access point AP indicates that the SSID is not hidden by the access point AP, the SSID of the access point AP is not carried in the first even-time packet and the first odd-time packet.
In the identification phase, BSSID (Basic Service Set Identifier) of the Access point AP may be encoded into BSSID fields of WiFi MAC (Medium Access Control Layer) headers of the first even packet and the first odd packet.
The WiFi packet length of the second even packet generated in the identification stage is a first preset value; the access code AC information of the second even packet generated in the identification stage is a second preset value; the WiFi packet length of the second odd-order packet generated in the identification stage is a third preset value; and the access code AC information of the second odd-order packet generated in the identification stage is a fourth preset value.
The QoS information of the distribution network data packet comprises: access code AC information; the AC (Access Code) information is obtained by mapping according to a TID (Traffic Identifier) field in a QoS Control field of a WiFi MAC header, where the length of the AC information is fixed to 2 bits, which is the prior art and is not described herein again.
Referring to fig. 5, fig. 5 is a mapping table of TID field and AC information in QoS Control field, where the length of TID field in fig. 5 is 3 bits, and the length of AC information is 2 bits. The length of the length information may be determined according to information carried by the generated distribution network data packet, such as: and determining according to the distribution network information carried by the first even-time packet and the first odd-time packet so as to reduce the length of the length information on the basis of carrying complete distribution network information.
Q second parity packet groups may be generated in the identification stage, Q being a positive integer; each second parity packet group includes: a second even packet and a second odd packet generated by shifting the second even packet, the second even packet may precede the second odd packet in each second parity packet group.
The second preset value may be set to a different value for the second even packet in a different second parity packet group, and the fourth preset value may be set to a different value for the second odd packet in a different second parity packet group, such as: q is 2, the second preset value corresponding to the second even-order packet in the consecutive 2 second parity packet groups may be 2b '00 (00), 2 b' 10(10) in sequence, and the fourth preset value corresponding to the second odd-order packet in the consecutive 2 second parity packet groups may be 2b '01 (01), 2 b' 11(11) in sequence.
S4202: and generating a second odd-time packet carrying the first identification information.
The generating of the second odd-order packet carrying the first identification information includes:
and shifting the second even-order packet to generate a second odd-order packet carrying first identification information.
Specifically, the shifting the second even packet includes:
shifting data recorded at a second preset position in the length information of the second even packet;
shifting all data recorded in the access code AC information of the second even packet;
and all data recorded in the access code AC information of the second even-order packet is recorded in the length information of the generated second odd-order packet.
The second preset position may be set according to actual coding requirements, and is not limited herein.
In this embodiment of the present application, the shifting the data recorded at the second preset position in the length information of the second even packet and the shifting all the data recorded in the access code AC information of the second even packet may include:
and circularly shifting data recorded at a second preset position in the length information of the second even packet and all data recorded in the access code AC information of the second even packet.
Specifically, the data recorded at the second preset position in the length information of the second even packet and all the data recorded in the access code AC information of the second even packet may be formed into a cyclic data queue, and the cyclic data queue is cyclically shifted at the second preset position in the length information of the second even packet and the position of the access code AC information, so as to shift all the data recorded in the access code AC information of the second even packet to the length information.
Accordingly, to shift the data (all or part of the data) recorded at the second preset position in the length information into the access code AC information, it is ensured that the length information of the second even packet and the second odd packet and the access code AC information carry the same data, but the positions of the same data recorded in the length information of the second even packet and the second odd packet and the access code AC information are not completely the same.
And circularly shifting the data recorded at the second preset position in the length information of the second even packet and all the data recorded in the access code AC information of the second even packet, so that the data recorded in the access code AC information of the second even packet can be acquired from the length information of the second odd packet when the access code AC information of the second even packet is unavailable or cannot be decoded and identified by the second device.
And the data recorded at the second preset position in the length information of the second even-order packet and used for shifting to the access code AC information is a fourth preset value, so that the access code AC information of the second odd-order packet generated in the identification stage is the fourth preset value.
Referring to fig. 6, fig. 6 is a schematic diagram of second parity packet groups according to an embodiment of the present application, where each second parity packet group includes: a second even packet and a second odd packet generated by shifting the second even packet, the second even packet preceding the second odd packet in the same second parity packet group. Fig. 6 shows AC information and length information of the second even packet and the second odd packet, where AC [1] and AC [0] indicate AC information of an access code of the second even packet or the second odd packet of 2 bits, LEN [8] to LEN [0] indicate length information of the second even packet or the second odd packet, that is, the length information of the second even packet is 9 bits, and the length information of the second odd packet is 9 bits.
Specifically, LEN [6] (specified location) in fig. 6 is used to record information whether the SSID is hidden by the access point AP, such as: a LEN [6] of 1 indicates that the SSID is hidden by the AP, a LEN [6] of 0 indicates that the SSID is not hidden by the AP, or a LEN [6] of 0 indicates that the SSID is hidden by the AP, a LEN [6] of 1 indicates that the SSID is not hidden by the AP, and a LEN [6] of 1 in fig. 6 indicates that the SSID is hidden by the AP.
LEN [7] (location-specific) in fig. 6 is used to record the version number of the distribution network protocol between the first device and the second device, and LEN [7] of 0 in fig. 6 means that the version number of the distribution network protocol between the first device and the second device is 0(1 b' 0). LEN [8] in FIG. 6 is 1(1 b' 1) during the recognition phase.
The cyclic shift may be a cyclic right shift or a cyclic left shift. The cyclic data queue may be cyclically shifted by only 2 bits (access code AC information has 2 bits), or may be cyclically shifted by more than 2 bits, so that all data recorded in the access code AC information in the second even packet is shifted into the length information.
Such as: in fig. 6, two (Q ═ 2, Q denotes the number of second parity packet groups) second parity packet groups are generated. LEN [7] in fig. 6 is used to record information that the distribution network packet is the second even packet or the second odd packet, specifically, LEN [5] is 0 to indicate that the network packet is the second even packet, LEN [5] is 1 to indicate that the network packet is the second odd packet.
LEN [4] to LEN [0] in fig. 6 are second preset positions, and fourth preset values are recorded in LEN [1] to LEN [0] of the second even packet, specifically, 01(2b '01) is recorded in LEN [1] to LEN [0] of the second even packet in the first parity packet group, and 11(2 b' 11) is recorded in LEN [1] to LEN [0] of the second even packet in the second parity packet group. The second odd packet in fig. 6 is generated by cyclically shifting right by 2 bits the data recorded at the second predetermined position (LEN [4] to LEN [0]) of the entire data (2 bits) and the length information recorded by the access code AC information of the corresponding second even packet.
It should be noted that, the WiFi packet length and the WiFi packet length information are different concepts, the WiFi packet length refers to the length of the WiFi packet, that is, the length of the network configuration data packet, and the WiFi packet length information refers to the length information carried by the WiFi packet, that is, the length information of the network configuration data packet, for example: as shown in fig. 6, the WiFi packet length of the second even packet in the first second parity packet group is OFFSET +257[ +64], the WiFi packet length of the second odd packet in the first second parity packet group is OFFSET +288[ +64], the WiFi packet length of the second even packet in the second parity packet group is OFFSET +259[ +64], and the WiFi packet length of the second odd packet in the second parity packet group is OFFSET +304[ +64 ].
Wherein [ +64] of OFFSET +257[ +64], OFFSET +288[ +64], OFFSET +259[ +64], and OFFSET +304[ +64] refers to a length of length information of the second even-order packet or the second odd-order packet occupied by information whether the access point AP hides the service set identification SSID.
Specifically, the information whether the access point AP hides the SSID is encoded into LEN [6] in fig. 6, and if LEN [6] is 1, that is, the access point AP hides the SSID, at this time, the WiFi packet length of the second even packet in the first second parity packet group in fig. 6 is OFFSET +257+64, that is, OFFSET + 321; the WiFi packet length of the second odd packet in the first second parity packet group is OFFSET +288+64, i.e., OFFSET + 352; the WiFi packet length corresponding to the second even packet in the second parity packet group is OFFSET +259+64, i.e. OFFSET + 323; the WiFi packet length of the second odd packet in the second parity packet group is OFFSET +304+64, i.e., OFFSET + 368.
If LEN [6] is 0, that is, the SSID is not hidden by the access point AP, at this time, the WiFi packet length of the second even packet in the first second parity packet group in fig. 6 is OFFSET + 257; the WiFi packet length of the second odd packet in the first second parity packet group is OFFSET + 288; the WiFi packet length of the second even packet in the second parity packet group is OFFSET + 259; the WiFi packet in the second odd packet in the second parity packet group has a length OFFSET + 304.
Wherein, the OFFSET represents the data OFFSET of the distribution network data packet; the OFFSET is fixed in size, and the size of the OFFSET is related to the encryption mode of the distribution network data packet and whether QoS is available. The second device may calculate the OFFSET according to the encryption mode and the QoS information of the distribution network data packet after receiving the distribution network data packet, which is the prior art and is not described herein again. And the second equipment calculates the OFFSET of the second even-time packet and the second odd-time packet, and the OFFSET is subtracted from all the subsequent distribution network data packets to obtain the WiFi packet length information of the distribution network data packets. In fig. 6, the OFFSET of the second even packet and the second odd packet are equal.
The second even-order packet and the second odd-order packet are both generated according to a WiFi transmission protocol.
In the data phase, the first device generates a first even packet and a first odd packet, including:
s4211: in the data phase, the first device encodes the distribution network information of the access point AP to length information and QoS information to generate a first even packet.
The WiFi packet length information of the first even packet is the length information obtained by encoding in step S4211, and the QoS information of the first even packet is the QoS information obtained by encoding in step S4211.
The quality of service QoS information includes: access code AC information; and the access code AC information is obtained by mapping a data form identification code TID field in a QoS Control field of the WiFi MAC packet header. The description of the QoS information refers to step S4201, which is not described herein.
In this embodiment of the application, encoding the distribution network information of the AP to length information and QoS information includes:
and in the data phase, encoding the distribution network information of the access point AP into length information and access code AC information.
Specifically, the distribution network information of the access point AP may be encoded into a fourth preset position of the length information and the access code AC information, and the fourth preset position may occupy all information positions of the length information and the access code AC information, or may occupy partial information positions of the length information and the access code AC information. The fourth preset position may be set according to the actual length of the distribution network information or a coding mode, which is not limited herein.
In this embodiment of the application, the distribution network information includes: the password of the access point AP and the check information of the service set identification SSID of the access point AP, wherein the check information of the service set identification SSID of the access point AP comprises CRC5 (cyclic redundancy check code) of the SSID. If the access point AP hides the service set identifier SSID, the distribution network information further includes: and the service set identification SSID of the access point AP.
S4212: and the first equipment generates a first odd packet carrying the distribution network information of the access point AP.
The generating a first odd packet carrying the distribution network information of the access point AP includes:
and shifting the first even-time packet to generate a first odd-time packet carrying the distribution network information of the access point AP.
Specifically, the shifting the first even packet includes:
shifting data recorded at a first preset position in the length information of the first even packet;
shifting all data recorded in the access code AC information of the first even packet;
all data recorded in the access code AC information of the first even-order packet is recorded in the length information of the generated first odd-order packet.
The first preset position may be set according to actual coding requirements, and is not limited herein.
In this embodiment of the present application, the shifting the data recorded at the first preset position in the length information of the first even packet and the shifting all the data recorded in the access code AC information of the first even packet may include:
and circularly shifting the data recorded at the first preset position in the length information of the first even packet and all the data recorded in the access code AC information of the first even packet.
Specifically, the data recorded at the first preset position in the length information of the first even packet and all the data recorded in the access code AC information of the first even packet may be formed into a cyclic data queue, and the cyclic data queue is cyclically shifted at the first preset position in the length information of the first even packet and the position of the access code AC information, so as to shift all the data recorded in the access code AC information of the first even packet to the length information.
Accordingly, to shift the data (all or part of the data) recorded at the first preset position in the length information into the access code AC information, it is ensured that the length information and the access code information of the first even-order packet and the first odd-order packet carry the same data, but the positions of the same data recorded in the length information and the access code AC information of the first even-order packet and the first odd-order packet are not completely the same.
The fourth preset position may include all of the first preset positions, or may include some of the first preset positions.
The cyclic shift may be a cyclic right shift or a cyclic left shift. The cyclic data queue may be cyclically shifted by only 2 bits (access code AC information has 2 bits), or may be cyclically shifted by more than 2 bits, so that all data recorded in the access code AC information in the first even packet is shifted into the length information.
And circularly shifting the data recorded at the first preset position in the length information of the first even packet and all the data recorded in the access code AC information of the first even packet, so that the data recorded in the access code AC information of the first even packet can be acquired from the length information of the first odd packet when the access code AC information of the first even packet is unavailable or cannot be decoded and identified by the second device.
Specifically, the distribution network information of the access point AP may be sequentially divided to obtain M data segments, where M is a positive integer; each data segment contains N characters, where N is a positive integer, such as N-4; and sequentially generating N first parity packet groups according to N characters contained in the data section, wherein each first parity packet group comprises: a first even packet and a first odd packet generated by the shifting of the first even packet.
Specifically, each character is encoded into length information and access code AC information, the generated WiFi packet header length information is the length information obtained through encoding, the access code AC information is a first even packet of the AC information obtained through encoding, and the first even packet is subjected to shift processing to generate a corresponding first odd packet.
If the last data Segment has no N characters, the verification information (CRC5) of the SSID of the access point AP may be copied to fill in the N characters.
The character value range of the password which is coded into the first even packet and used for representing the access point AP is different from the character value range of the verification information which is coded into the first even packet and used for representing the SSID of the access point AP, so that the first even packet carrying the password of the access point AP and the first even packet carrying the verification information of the SSID of the access point AP can be effectively distinguished.
Corresponding distinguishing information can also be encoded into the length information and/or the AC information to distinguish various distribution network packets, such as: distinguishing the first parity packet group and the third parity packet group, distinguishing the first parity packet group carrying the password of the access point AP, the first parity packet group carrying the verification information of the SSID of the access point AP, the first parity packet group carrying the SSID of the access point AP, and the like, wherein the coding of corresponding distinguishing information to the length information and/or the AC information is not limited.
Other methods may also be used to encode the distribution network information and the related information (for example, the distinguishing information) of the access point AP into the length information and the AC information, and the method of encoding the distribution network information of the access point AP into the length information and the AC information is not limited herein. The first even packet and the first odd packet are generated according to a WiFi transmission protocol.
Wherein the first parity packet group includes: a first even packet and a first odd packet generated by the shift processing of the first even packet; the third parity packet group includes: a third even packet and a third odd packet resulting from the third even packet shifting process.
Referring to fig. 7, fig. 7 is a schematic diagram of a first parity packet group carrying a password of the access point AP according to an embodiment of the present application, where fig. 7 shows AC information and length information of a first even packet and a first odd packet, AC [1] and AC [0] indicate AC information of an access code of the first even packet or the first odd packet of 2 bits, LEN [8] to LEN [0] indicate length information of the first even packet or the first odd packet, that is, length information of the first even packet is 9 bits, and length information of the first odd packet is 9 bits.
Specifically, in fig. 7, each ASCII code corresponding to a character obtained by the cryptographic partition of the access point AP is sequentially encoded into 7 bits of the corresponding first even packet AC [1], AC [0], and LEN [4] to LEN [0], and the value range of the 7 bits is 32 to 126. The 7bit positions of AC [1], AC [0], and LEN [4] to LEN [0] in FIG. 7 are the fourth predetermined positions.
LEN [5] in fig. 7 is used to record information that the distribution network packet is the first even packet or the first odd packet, specifically, LEN [5] is 0 to indicate that the distribution network packet is the first even packet, LEN [5] is 1 to indicate that the distribution network packet is the first odd packet.
LEN [4] to LEN [0] in FIG. 7 are the first predetermined positions, and the first odd packet in FIG. 7 is generated by cyclically shifting right by 2 bits the data recorded at the first predetermined positions (LEN [4] to LEN [0]) of the access code AC information and the entire data (2 bits) recorded at the access code AC information of the corresponding first even packet and the length information.
The second device receives the first parity packet group shown in fig. 7, and can obtain ASCII codes corresponding to complete characters from the length information of the first even packet and the first odd packet even if it cannot decode the data recorded in the access code AC information.
LEN [8] in fig. 7 is 1(1 b' 1), LEN [8] in the third parity packet group is 0, which effectively distinguishes the first parity packet group from the third parity packet group, LEN [8] in the first parity packet group may be encoded as 0, LEN [8] in the third parity packet group may be encoded as 1, and this is not limited herein. In FIG. 7, LEN [7] and LEN [6] are 01(2 b' 01).
Referring to fig. 8, fig. 8 is a schematic diagram of a first parity packet group carrying SSID check information of the access point AP according to an embodiment of the present application, where fig. 8 shows AC information and length information of a first even packet and a first odd packet, AC [1] and AC [0] indicate AC information of an access code of the first even packet or the first odd packet of 2 bits, LEN [8] to LEN [0] indicate length information of the first even packet or the first odd packet, that is, length information of the first even packet is 9 bits, and length information of the first odd packet is 9 bits.
Specifically, in fig. 8, each CRC5 corresponding to a character obtained by dividing the verification information of the SSID of the access point AP is sequentially encoded into 5 bits of LEN [4] to LEN [0] of the corresponding first even-order packet, and the value range of the 5 bits is 0 to 31, so as to be different from the first even-order packet carrying the password of the access point AP in fig. 7. In FIG. 8, the 5 bits of LEN [4] to LEN [0] are the fourth predetermined positions.
LEN [5] in fig. 8 is used to record information that the distribution network packet is the first even packet or the first odd packet, specifically, LEN [5] is 0 to indicate that the distribution network packet is the first even packet, LEN [5] is 1 to indicate that the distribution network packet is the first odd packet.
LEN [4] to LEN [0] in FIG. 8 are the first predetermined positions, and the first odd packet in FIG. 7 is generated by cyclically shifting right by 2 bits the data recorded by the first predetermined positions (LEN [4] to LEN [0]) of the access code AC information and the entire data (2 bits) recorded by the access code AC information of the corresponding first even packet and the length information.
The second device receives the first parity packet group shown in fig. 8, and can obtain CRC5 corresponding to the complete character from the length information of the first even packet and the first odd packet even if it cannot decode the data recorded in the access code AC information.
LEN [8] in fig. 8 is 1(1 b' 1), LEN [8] in the third parity packet group is 0, which effectively distinguishes the first parity packet group from the third parity packet group, LEN [8] in the first parity packet group may be encoded as 0, LEN [8] in the third parity packet group may be encoded as 1, and this is not limited herein. In FIG. 8, LEN [7] and LEN [6] are 01(2 b' 01).
Referring to fig. 9, fig. 9 is a schematic diagram of a first parity packet group carrying an SSID of the access point AP according to an embodiment of the present application, where fig. 9 shows AC information and length information of a first even packet and a first odd packet, AC [1] and AC [0] indicate AC information of an access code of the first even packet or the first odd packet of 2 bits, LEN [8] to LEN [0] indicate length information of the first even packet or the first odd packet, that is, length information of the first even packet is 9 bits, and length information of the first odd packet is 9 bits.
Specifically, in fig. 9, each UTF-8(Universal charcter Set/Universal conversion Format, 8 bits) of the SSID corresponding to the Character obtained by the SSID of the access point AP is sequentially encoded into 8 bits of AC [1], AC [0], LEN [6], LEN [4] to LEN [0 ]. In FIG. 9, the 8bit positions of AC [1], AC [0], LEN [6], LEN [4] to LEN [0] are the fourth predetermined positions.
LEN [5] in fig. 9 is used to record information that the distribution network packet is the first even packet or the first odd packet, specifically, LEN [5] is 0 to indicate that the distribution network packet is the first even packet, LEN [5] is 1 to indicate that the distribution network packet is the first odd packet.
LEN [4] to LEN [0] in FIG. 9 are the first predetermined positions, and the first odd packet in FIG. 9 is generated by cyclically shifting right by 2 bits the data recorded by the access code AC information of the corresponding first even packet, i.e., the entire data (2 bits) and the first predetermined positions (LEN [4] to LEN [0]) of the length information.
The second device receives the first parity packet group shown in fig. 9, and can obtain UTF-8 of the SSID corresponding to the complete character from the length information of the first even packet and the first odd packet even if it cannot decode the data recorded in the access code AC information.
LEN [8] in fig. 9 is 1(1 b' 1), LEN [8] in the third parity packet group is 0, which effectively distinguishes the first parity packet group from the third parity packet group, LEN [8] in the first parity packet group may be encoded as 0, LEN [8] in the third parity packet group may be encoded as 1, and this is not limited herein. In FIG. 9, LEN [7] is 01(1 b' 01).
If the SSID of the access point AP is carried in the first parity packet group (the first even packet and the first odd packet), the distribution network data packet may further include: and the SSID end character data packet group and the SSID length data packet group are generated in the data phase.
The SSID end character packet group includes: an even SSID end character data packet and an odd SSID end character data packet; the SSID length packet group includes: an even SSID length packet and an odd SSID length packet.
And the SSID ending character data packet group is positioned behind the last first parity packet group carrying the SSID of the access point AP and is used for indicating the ending position of the first parity packet group carrying the SSID. Since the length information in the first parity packet group (first even packet and first odd packet) carrying the SSID of the access point AP and the data recorded in the AC information may be the same as the length information in the SSID end character packet group and the data recorded in the AC information, the SSID length packet group is located before the first parity packet group carrying the access point AP and is used to indicate the length of the SSID of the access point AP so as to be combined with the SSID end character packet group to determine the first parity packet group carrying the access point AP.
In the data phase, the first device generates an SSID end character packet set comprising:
s4231: and the first equipment encodes the end information of the SSID of the access point AP into length information and access code AC information to generate an even SSID end character data packet.
The WiFi packet length information of the even SSID ending character data packet is the length information obtained by encoding in step S4231, and the access code AC information of the even SSID ending character data packet is the access code AC information obtained by encoding in step S4231. The end information of the SSID of the access point AP may be an end character of the SSID.
Specifically, the first device may encode end information of the SSID of the access point AP into a specified position in the length information and the access code AC information.
S4232: and generating an odd SSID ending character data packet carrying the ending information of the SSID of the access point AP.
The generating of the odd SSID end character data packet carrying the end information of the SSID of the access point AP comprises:
and shifting the even SSID ending character data packet to generate an odd SSID ending character data packet carrying the ending information of the SSID of the access point AP.
Specifically, data recorded at a fifth preset position in the length information of the even SSID end character data packet is subjected to displacement processing;
all data recorded in the access code AC information of the even SSID ending character data packet are subjected to displacement processing;
and all data recorded in the access code AC information of the even SSID ending character data packet are recorded in the length information of the generated odd SSID ending character data packet.
The fifth preset position may be set according to actual coding requirements, and is not limited herein.
The data recorded at a fifth preset position in the length information of the even SSID ending character data packet is subjected to displacement processing; shifting all data recorded in the AC information of the access code of the even SSID end character data packet may include:
and circularly shifting data recorded at a fifth preset position in the length information of the even SSID ending character data packet and all data recorded in the access code AC information of the even SSID ending character data packet.
Specifically, the data recorded at the fifth preset position in the length information of the even SSID ending character data packet and all the data recorded in the access code AC information of the even SSID ending character data packet may be formed into a cyclic data queue, and the fifth preset position in the length information of the even SSID ending character data packet and the position of the access code AC information are cyclically shifted, so as to shift all the data recorded in the access code AC information of the even SSID ending character data packet to the length information.
Accordingly, data (all data or partial data) recorded at the fifth preset position in the length information is shifted into the access code AC information, and it is ensured that the length information of the even SSID ending character data packet and the odd SSID ending character data packet and the access code information carry the same data, but the positions of the same data recorded in the length information of the even SSID ending character data packet and the odd SSID ending character data packet and the access code information are not completely the same.
The cyclic shift may be a cyclic right shift or a cyclic left shift. The cyclic data queue may be cyclically shifted by only 2 bits (access code AC information has 2 bits), or may be cyclically shifted by more than 2 bits, so that all data recorded in the access code AC information in the even SSID end character packet is shifted into the length information. The even SSID end character packet and the odd SSID end character packet are generated according to a WiFi transmission protocol.
And circularly shifting data recorded at a fifth preset position in the length information of the even SSID ending character data packet and all data recorded in the access code AC information of the even SSID ending character data packet, so that the data recorded in the access code AC information of the even SSID ending character data packet can be acquired in the length information of the odd SSID ending character data packet when the access code AC information in the even SSID ending character data packet is unavailable or cannot be decoded and identified by a second device.
Referring to fig. 10, fig. 10 is a schematic diagram illustrating an SSID ending character data packet set according to an embodiment of the present application. FIG. 10 shows the AC information and length information of even SSID end character packets and odd SSID end character packets, where AC [1] and AC [0] represent the AC information of 2-bit access codes of even SSID end character packets or odd SSID end character packets, LEN [8] to LEN [0] represent the length information of even SSID end character packets or odd SSID end character packets, i.e., the length information of even SSID end character packets is 9 bits, and the length information of odd SSID end character packets is 9 bits.
In FIG. 10, the end characters of the SSID of the access point AP are encoded into the 9 bits (designated positions) of AC [1], AC [2], LEN [7], LEN [6], LEN [4] to LEN [0] in that order. The end character of the SSID of the access point AP is 9 b' 000000000.
LEN [5] in fig. 10 is used to record information that the distribution network packet is an even SSID end character packet or an odd SSID end character packet, specifically, LEN [5] is 0 to indicate that the distribution network packet is an even SSID end character packet, and LEN [5] is 1 to indicate that the distribution network packet is an odd SSID end character packet.
LEN [4] to LEN [0] in FIG. 10 are the fifth default positions, and the odd SSID END character packet in FIG. 10 is generated by circularly right shifting all data (2bit) recorded by the access code AC information of the corresponding even SSID END character packet and data recorded by the fifth default position (LEN [4] to LEN [0]) of the length information by 2 bit.
The second device receives the SSID end character packet group shown in fig. 10, and can obtain the complete end character of the SSID of the access point AP from the length information of the even SSID end character packet and the odd SSID end character packet even if it is not possible to decode the data identifying the access code AC information.
LEN [8] in FIG. 10 is 1(1 b' 1), then LEN [8] in the third parity packet group is 0, which effectively distinguishes the SSID END character packet group from the third parity packet group, and LEN [8] in the SSID END character packet group may be encoded as 0, and LEN [8] in the third parity packet group may be encoded as 1, which is not limited herein.
In the data phase, the first device generates an SSID length packet set comprising:
s4241: and the first equipment encodes the length of the SSID of the access point AP into length information and access code AC information to generate an even SSID length data packet.
The WiFi packet length information of the even SSID length data packet is the length information obtained by encoding in step S4241, and the access code AC information of the even SSID length data packet is the access code AC information obtained by encoding in step S4241.
The even-order SSID length data packet may be the same as the first even-order packet, the length of the SSID of the access point AP is divided into M data segments, M is a positive integer, each data segment includes N characters, N is a positive integer, N even-order SSID length data packets are respectively sequentially generated according to the N characters included in the data segment, and specifically, each character is encoded into length information and access code AC information.
The length of the SSID of the access point AP may also be encoded into the WiFi packet length information and the access code AC information of the even SSID length data packet in other manners, where the manner of encoding the length of the SSID of the access point AP into the WiFi packet length information and the access code AC information of the even SSID length data packet is not limited.
Specifically, the first device may encode the length of the SSID of the access point AP into a specified position in the length information and the access code AC information.
S4242: and generating an odd SSID length data packet carrying the length of the SSID of the access point AP.
The generating of the odd SSID length data packet carrying the length of the SSID of the access point AP comprises:
and shifting the even SSID length data packet to generate an odd SSID length data packet carrying the length of the SSID of the access point AP.
Specifically, data recorded at a sixth preset position in the length information of the even SSID length data packet is subjected to displacement processing;
all data recorded in the access code AC information of the even SSID length data packet are subjected to displacement processing;
and all data recorded in the access code AC information of the even-time SSID length data packet are recorded in the length information of the generated odd-time SSID length data packet.
The data recorded at the sixth preset position in the length information of the even SSID length data packet is subjected to displacement processing; shifting all data recorded in the AC information of the access code of the even SSID length packet may include:
and circularly shifting data recorded at a sixth preset position in the length information of the even-time SSID length data packet and all data recorded in the access code AC information of the even-time SSID length data packet.
Specifically, the data recorded at the sixth preset position in the length information of the even SSID length data packet and all the data recorded in the access code AC information of the even SSID length data packet may be formed into a cyclic data queue, and the cyclic data queue is cyclically shifted at the sixth preset position in the length information of the even SSID length data packet and the position of the access code AC information, so as to shift all the data recorded in the access code AC information of the even SSID length data packet to the length information.
Accordingly, to shift the data (all or part of data) recorded at the sixth preset position in the length information into the access code AC information, it is ensured that the length information and the access code information of the even-time SSID length data packet and the odd-time SSID length data packet carry the same data, but the positions of the same data recorded in the length information and the access code information of the even-time SSID length data packet and the odd-time SSID length data packet are not completely the same.
The cyclic shift may be a cyclic right shift or a cyclic left shift. The cyclic data queue may be cyclically shifted by only 2 bits (access code AC information has 2 bits), or may be cyclically shifted by more than 2 bits, so that all data recorded in the access code AC information in the even SSID length packet is shifted into the length information. The even-order SSID length data packet and the odd-order SSID length data packet are generated according to a WiFi transmission protocol.
And circularly shifting data recorded at a sixth preset position in the length information of the even-time SSID length data packet and all data recorded in the access code AC information of the even-time SSID length data packet, so that the data recorded in the access code AC information of the even-time SSID length data packet can be acquired in the length information of the odd-time SSID length data packet when the access code AC information in the even-time SSID length data packet is unavailable or cannot be decoded and identified by a second device.
Referring to fig. 11, fig. 11 is a schematic diagram illustrating an SSID length data packet set according to an embodiment of the present application. FIG. 11 shows the AC information and the length information of the even SSID length packet and the odd SSID length packet, where AC [1] and AC [0] represent the AC information of the access code of the 2-bit even SSID length packet or odd SSID length packet, LEN [8] to LEN [0] represent the length information of the even SSID length packet or odd SSID length packet, that is, the length information of the even SSID length packet is 9 bits, and the length information of the odd SSID length packet is 9 bits.
In fig. 11, characters obtained by dividing the length of the SSID of the access point AP are encoded into 5 bits (designated positions) of LEN [4] to LEN [0 ].
LEN [5] in fig. 11 is used to record information that the distribution network packet is an even SSID length packet or an odd SSID length packet, and specifically, LEN [5] is 0 to indicate that the distribution network packet is an even SSID length packet, and LEN [5] is 1 to indicate that the distribution network packet is an odd SSID length packet.
In fig. 11, LEN [4] to LEN [0] are the sixth preset positions, and in fig. 11, the odd SSID length packet is generated by cyclically shifting all data (2 bits) recorded by the access code AC information of the corresponding even SSID length packet and data recorded by the sixth preset positions (LEN [4] to LEN [0]) of the length information by 2 bits to the right.
The second device receives the SSID length packet group shown in fig. 11, and can obtain the length of the SSID of the access point AP in its entirety from the length information of the even-order SSID length packet and the odd-order SSID length packet even if it is not possible to decode the data identifying the access code AC information.
LEN [8] in fig. 11 is 1(1 b' 1), then LEN [8] in the third parity packet group is 0, which can effectively distinguish SSID length packet group and the third parity packet group, LEN [8] in SSID length packet group can be encoded as 0, LEN [8] in the third parity packet group can be encoded as 1, and this is not limited herein.
In the data phase, the first device generates a third even packet and a third odd packet, including:
s4251: and the first equipment encodes the second identification information into the length information and the access code AC information to generate a third even-order packet.
The WiFi packet length information of the third even packet is the length information obtained by encoding in step S4251, and the access code AC of the third even packet is the access code AC information obtained by encoding in step S4251.
And the second identification information is used for assisting in identifying the distribution network information carried by the first even-time packet and the first odd-time packet. The second identification information includes: CRC4 (cyclic redundancy check code) and Segment Index (Index of data Segment) of the data Segment, wherein the Segment Index indicates a segmentation position of a character in the data Segment, and a type of a third parity packet group (third even packet and third odd packet), and the type of the third parity packet group refers to a type of information used by the third parity packet group to assist identification, such as: the auxiliary identification information is the password of the access point AP, the auxiliary identification information is the verification information of the SSID of the access point AP, and the auxiliary identification information is the SSID of the access point AP. The data segment is obtained by dividing the length of the distribution network information or the SSID.
The CRC4 may use CRC4/ITU, x4+ x +1 to check the distribution network information carried by the first even packet and the first odd packet, or may use other checking algorithms to check the distribution network information carried by the first even packet and the first odd packet, where the way of checking the distribution network information carried by the first even packet and the first odd packet by the CRC4 of the data segment is not limited.
Specifically, the second identification information may be encoded into a seventh preset position of the length information and the access code AC information, and the seventh preset position may occupy all information positions of the length information and the access code AC information or occupy partial information positions of the length information and the access code AC information. The seventh preset position may be set according to an actual length or a coding mode of the second identification information, which is not limited herein.
S4252: the first device generates a third odd-order packet carrying the second identification information.
The generating of the third odd-order packet carrying the second identification information includes:
and shifting the third even-order packet to generate a third odd-order packet carrying second identification information.
Specifically, the shifting the third even packet includes:
shifting data recorded at a third preset position in the length information of the third even packet;
shifting all data recorded in the access code AC information of the third even packet;
and all data recorded in the access code AC information of the third even-order packet is recorded in the length information of the generated third odd-order packet.
In this embodiment of the present application, the shifting data recorded at a third preset position in the length information of the third even packet and the shifting all data recorded in the AC information of the access code of the third even packet may include:
and circularly shifting data recorded at a third preset position in the length information of the third even-order packet and all data recorded in the access code AC information of the third even-order packet.
Specifically, the data recorded at the third preset position in the length information of the third even packet and all the data recorded in the access code AC information of the third even packet may be formed into a cyclic data queue, and the cyclic data queue is cyclically shifted at the third preset position in the length information of the third even packet and the position of the access code AC information, so as to shift all the data recorded in the access code AC information of the third even packet to the length information.
Accordingly, to shift the data (all or part of the data) recorded at the third preset position in the length information into the access code AC information, it is ensured that the length information and the access code information of the third even-order packet and the third odd-order packet carry the same data, but the positions of the same data recorded in the length information and the access code AC information of the third even-order packet and the third odd-order packet are not completely the same.
The cyclic shift may be a cyclic right shift or a cyclic left shift. The cyclic data queue may only cyclically shift 2 bits (access code AC information has 2 bits), or may cyclically shift more than 2 bits, so that all data recorded in the access code AC information in the third even packet is shifted into the length information.
The third preset position may be set according to actual coding requirements, and is not limited herein.
And performing cyclic shift on data recorded at a third preset position in the length information of the third even-order packet and all data recorded in the access code AC information of the third even-order packet, so that when the access code AC information in the third even-order packet is unavailable or cannot be decoded and identified by a third device, the data recorded in the access code AC information in the third even-order packet can be acquired from the length information in the third odd-order packet.
The seventh preset position may include all of the third preset positions, or may include some of the third preset positions. The third even-order packet and the third odd-order packet are generated according to a WiFi transmission protocol.
In this embodiment of the application, the first device may configure a third parity packet group for each first parity packet group corresponding to the data segment obtained by partitioning the distribution network information of the access point AP. The first device may further configure a third parity packet group for each SSID length data packet group corresponding to the data segment obtained by dividing the length of the SSID of the access point AP, where the second identification information is used to assist in identifying the length of the SSID of the access point AP carried by the SSID length data packet group. The third parity packet group is located before the first parity packet group corresponding to each data segment obtained by dividing the distribution network information of the access point AP, or the third parity packet group is located before the first SSID length data packet group corresponding to each data segment obtained by dividing the SSID length of the access point AP.
Referring to fig. 12, fig. 12 is a schematic diagram of a third parity packet group configured to the first parity packet group carrying the password of the access point AP or the verification information of the SSID of the access point AP according to the embodiment of the present application. Fig. 12 shows AC information and length information of the third even packet and the third odd packet, where AC [1] and AC [0] indicate AC information of an access code of the third even packet or the third odd packet of 2 bits, LEN [8] to LEN [0] indicate length information of the third even packet or the third odd packet, that is, the length information of the third even packet is 9 bits, and the length information of the third odd packet is 9 bits.
Specifically, the Segment Index is sequentially encoded into 5 bits of LEN [7], AC [1], AC [0], LEN [1] and LEN [0] of the third even packet, the effective value of the 5 bits is 0-16, and CRC4 is sequentially encoded into 4 bits of LEN [6], LEN [4] to LEN [2] of the third even packet. In FIG. 12, the 5-bit bits of LEN [7], AC [1], AC [0], LEN [1] and LEN [0] and the 4-bit bits of LEN [6], LEN [4] to LEN [2] of the third even packet are the seventh predetermined position.
LEN [5] in fig. 12 is used to record information that the distribution network packet is the third even packet or the third odd packet, specifically, LEN [5] is 0 to indicate that the distribution network packet is the third even packet, LEN [5] is 1 to indicate that the distribution network packet is the third odd packet.
In fig. 12, LEN [4] to LEN [0] are the third predetermined positions, and in fig. 12, the third odd packet is generated by cyclically shifting all data (2 bits) recorded by the access code AC information of the corresponding third even packet and data recorded by the third predetermined positions (LEN [4] to LEN [0]) of the length information by 2 bits to the right.
The second device receives the third parity packet group shown in fig. 12, and can obtain the second identification information corresponding to the complete character, i.e., the Segment Index and the CRC4, from the length information of the third even packet and the third odd packet even if it cannot decode the data identifying the access code AC information.
LEN [8] in fig. 12 is 0, then LEN [8] in the first parity packet group, SSID end character packet group and SSID length packet group is 1, which can effectively distinguish the third parity packet group from other distribution network packets generated in the data phase, and LEN [8] in the first parity packet group, SSID end character packet group and SSID length packet group can be encoded as 0, LEN [8] in the third parity packet group can be encoded as 1, which is not limited herein.
CRC4 encoded into LEN [6], LEN [4] through LEN [2] of the third even packet in FIG. 12 is used to check for 28bit numbers encoding consecutive 4 first even packets AC [1], AC [0], LEN [4] through LEN [0] described in FIG. 7 or consecutive 28bit numbers encoding consecutive 4 first even packets AC [1], AC [0], LEN [4] through LEN [0] described in FIG. 8.
Referring to fig. 13, fig. 13 is a schematic diagram of a third parity packet group and a first parity packet group corresponding to a data segment obtained by dividing the password of the access point AP or the verification information of the SSID of the access point AP according to an embodiment of the present application. Each data segment in fig. 13 contains 4 characters (N ═ 4), and each third parity packet group carries second identification information for assisting in identifying the 4 first parity packet groups following the third parity packet group.
Referring to fig. 14, fig. 14 is a schematic diagram of a third parity packet group configured to SSID length data packet groups according to an embodiment of the present application. Fig. 14 shows AC information and length information of the third even packet and the third odd packet, where AC [1] and AC [0] indicate AC information of an access code of the third even packet or the third odd packet of 2 bits, LEN [8] to LEN [0] indicate length information of the third even packet or the third odd packet, that is, the length information of the third even packet is 9 bits, and the length information of the third odd packet is 9 bits.
Specifically, in fig. 14, Segment Index is sequentially encoded into 5bit bits of LEN [7], AC [1], AC [0], LEN [1] and LEN [0] of the third even packet, since there may be only 1 character obtained by dividing the length of the SSID of the access point AP, when N is 4, that is, the divided data Segment includes 4 characters, 3 characters after the 1 st character are the same as the 1 st character, that is, the 1 st character is copied to complete the 4 characters, so 5bit of LEN [7], AC [1], AC [0], LEN [1] and LEN [0] is fixed to 31, 5 b' 11111, that is, there is only one Segment Index.
CRC4 is encoded into the 4-bit bits of LEN [6], LEN [4] through LEN [2] of the third even packet in sequence in FIG. 14. The 5-bit bits of LEN [7], AC [1], AC [0], LEN [1] and LEN [0] and the 4-bit bits of LEN [6], LEN [4] to LEN [2] of the third even packet in FIG. 14 are the seventh predetermined position.
LEN [5] in fig. 14 is used to record information that the distribution network packet is the third even packet or the third odd packet, specifically, LEN [5] is 0 to indicate that the distribution network packet is the third even packet, LEN [5] is 1 to indicate that the distribution network packet is the third odd packet.
In fig. 14, LEN [4] to LEN [0] are the third predetermined positions, and in fig. 14, the third odd packet is generated by cyclically shifting all data (2 bits) recorded by the access code AC information of the corresponding third even packet and data recorded by the third predetermined positions (LEN [4] to LEN [0]) of the length information by 2 bits to the right.
The second device receives the third parity packet group shown in fig. 14, and can obtain the second identification information corresponding to the complete character, i.e., the Segment Index and the CRC4, from the length information of the third even packet and the third odd packet even if it cannot decode the data identifying the access code AC information.
LEN [8] in fig. 14 is 0, then LEN [8] in the first parity packet group, SSID end character packet group and SSID length packet group is 1, which can effectively distinguish the third parity packet group from other distribution network packets generated in the data phase, and LEN [8] in the first parity packet group, SSID end character packet group and SSID length packet group can be encoded as 0, LEN [8] in the third parity packet group can be encoded as 1, which is not limited herein.
CRC4 encoded into LEN [6], LEN [4] through LEN [2] of the third even packet in FIG. 14 is used to check the 28-bit number encoded into the consecutive 4 first even packets AC [1], AC [0], LEN [4] through LEN [0] of the first even packet described in FIG. 11.
Referring to fig. 15, fig. 15 is a schematic diagram of a third parity packet group and an SSID length data packet group corresponding to a data segment obtained by dividing the length of the SSID of the access point AP according to an embodiment of the present application. Each data segment in fig. 15 contains 4 characters (N ═ 4), and each third parity packet group carries second identification information for assisting in identifying the 4 SSID length data packets following the third parity packet group.
Since the length of the SSID of the AP may be divided into only 1 character, 3 characters after the 1 st character are the same as the 1 st character, that is, the 1 st character is duplicated to complete 4 characters.
Referring to fig. 16, fig. 16 is a schematic diagram of a third parity packet group configured to the first parity packet group carrying the SSID of the access point AP according to an embodiment of the present application. Fig. 16 shows AC information and length information of the third even packet and the third odd packet, where AC [1] and AC [0] indicate AC information of an access code of the third even packet or the third odd packet of 2 bits, LEN [8] to LEN [0] indicate length information of the third even packet or the third odd packet, that is, the length information of the third even packet is 9 bits, and the length information of the third odd packet is 9 bits.
Specifically, the Segment Index is encoded into the 5-bit bits of LEN [4] to LEN [0] of the third even packet in sequence, and CRC4 is encoded into the 4-bit bits of AC [1], AC [0], LEN [7] and LEN [6] of the third even packet in sequence. The 5-bit bits of LEN [4] to LEN [0] and the 4-bit bits of AC [1], AC [0], LEN [7] and LEN [6] of the third even packet in FIG. 16 are the seventh predetermined positions.
LEN [5] in fig. 16 is used to record information that the distribution network packet is the third even packet or the third odd packet, specifically, LEN [5] is 0 to indicate that the distribution network packet is the third even packet, LEN [5] is 1 to indicate that the distribution network packet is the third odd packet.
LEN [4] to LEN [0] in fig. 16 are third preset positions, and the third odd packet in fig. 16 is generated by cyclically shifting right by 2 bits the data recorded at the third preset positions (LEN [4] to LEN [0]) of the access code AC information and all data (2 bits) recorded at the length information of the corresponding third even packet.
The second device receives the third parity packet group shown in fig. 16, and can obtain the second identification information corresponding to the complete character, i.e., the Segment Index and the CRC4, from the length information of the third even packet and the third odd packet even if it cannot decode the data identifying the access code AC information.
LEN [8] in fig. 16 is 0, then LEN [8] in the first parity packet group, SSID end character packet group and SSID length packet group is 1, which can effectively distinguish the third parity packet group from other distribution network packets generated in the data phase, and LEN [8] in the first parity packet group, SSID end character packet group and SSID length packet group can be encoded as 0, LEN [8] in the third parity packet group can be encoded as 1, which is not limited herein.
CRC4 encoded into LEN [6], LEN [4] through LEN [2] of the third even packet in FIG. 16 is used to check the 28-bit number encoded into the consecutive 4 first even packets AC [1], AC [0], LEN [4] through LEN [0] of the first even packet described in FIG. 9.
Referring to fig. 17, fig. 17 is a schematic diagram of a third parity packet group and a first parity packet group corresponding to a data segment obtained by SSID partition of the access point AP according to an embodiment of the present application. Each data segment in fig. 17 contains 4 characters (N ═ 4), and each third parity packet group carries second identification information for assisting in identifying the 4 first parity packet groups following the third parity packet group.
It should be noted that the designated position in the length information involved in step S42 may be set as a different position in the length information according to the information to be encoded; the designated positions in the length information and the access code AC information referred to in step S42 may be set to different positions in the length information and the access code AC information according to the information to be encoded.
Referring to fig. 18, fig. 18 is a schematic diagram of a distribution network packet generated by a first device in an identification phase and a data phase according to an embodiment of the present disclosure. The first equipment circularly switches to work in the identification stage and the data stage so as to generate distribution network data packets corresponding to the identification stage and the data stage.
S43: and the first equipment sends the distribution network data packet to the second equipment.
Specifically, the first device sends the distribution network data packet generated in the identification phase and the data phase to the first device. The first device may send a transmission packet to the second device in a broadcast manner. The transmission data packet includes: and (5) distributing network data packets. When the distribution network data packet is sent to the second device, the first device may also send other transmission data packets to the second device, where the transmission data packets do not carry the distribution network information, the first identification information, the second identification information, and the like of the access point AP. In addition, when the first device sends the distribution network data packet to the second device, the other devices may also send the transmission data packet to the second device.
S44: and the second equipment receives the distribution network data packet.
The distribution network data packet comprises: a first even packet and a first odd packet; the WiFi packet length information and the service quality QoS information of the first even packet carry distribution network information of the access point AP, and the WiFi packet length information and the service quality QoS information of the first odd packet carry distribution network information of the access point AP.
The quality of service QoS information includes: access code AC information; and the access code AC information is obtained by mapping a data form identification code TID field in a QoS Control field of the WiFi MAC packet header. The description of the QoS information is described in step S4201, and is not described herein.
Specifically, the receiving, by the second device, the distribution network packet includes:
s4401: the second device receives two consecutive transmission packets.
The transmission data packet can be sent to the second device by the first device and also can be sent to the second device by other devices; when receiving the transmission data packet sent by the first device, the second device may also receive the transmission data packet sent by the other device.
In this embodiment, the second device may further receive 2Q consecutive transmission data packets, where Q is a positive integer.
S4402: and the second equipment decodes the WiFi packet length information and the access code AC information of the two continuous transmission data packets.
The second device decodes the WiFi packet length information of the two continuous transmission data packets, and the WiFi packet lengths of the two continuous transmission data packets can be obtained.
In this embodiment, the second device may further decode WiFi packet length information and access code AC information of consecutive 2Q transmission data packets.
S4403: and the second equipment determines whether the two continuous transmission data packets are the second even-order packet and the second odd-order packet respectively according to the WiFi packet length information and the access code AC information of the two continuous transmission data packets obtained by decoding.
According to the decoded WiFi packet length information of the transmission data packet, the WiFi packet length of the transmission data packet can be obtained, which is the prior art and is not described herein again.
Specifically, if the WiFi packet length of one of the two consecutive transmission data packets is a first preset value, the access code AC information of one of the two consecutive transmission data packets is a second preset value, the WiFi packet length of the other of the two consecutive transmission data packets is a third preset value, and the access code AC information of the other of the two consecutive transmission data packets is a fourth preset value, it is determined that one of the two consecutive transmission data packets is a second even packet, and the other of the two consecutive transmission data packets is a second odd packet.
Such as: the first preset value is set to OFFSET +257[ +64], the second preset value is set to 2b '00 (00), the third preset value is set to OFFSET +288[ +64], and the fourth preset value is set to 2 b' 01 (01). If the WiFi packet length of the first transmission data packet in two consecutive transmission data packets is OFFSET +257[ +64], the access code AC information (2bit) of the first transmission data packet is 2b '00 (00), the WiFi packet length of the second transmission data packet is OFFSET +288[ +64], and the access code AC information (2bit) of the second transmission data packet is 2 b' 01(01), it is determined that the two consecutive transmission data packets are the second even packet and the second odd packet, respectively.
In this embodiment of the present application, the second device may further determine, according to the WiFi packet length information and the access code AC information of the consecutive 2Q transmission data packets obtained through decoding, whether the consecutive 2Q transmission data packets are the second even packet and the second odd packet, respectively.
Such as: q ═ 2, i.e., there are two second parity packet groups, the first preset values are set to OFFSET +257[ +64], OFFSET +259[ +64], the second preset values are set to 2b '00 (00), 2 b' 10(10), the third preset values are set to OFFSET +288[ +64], OFFSET +304[ +64], and the fourth preset values are set to 2b '01 (01), 2 b' 11 (11). If the WiFi packet length of the consecutive 4 transmission packets is OFFSET +257[ +64], OFFSET +288[ +64], OFFSET +259[ +64] and OFFSET +304[ +64], and the access code AC information (2bit) of the consecutive 4 transmission packets is 2b '00 (00), 2 b' 01(01), 2b '10 (10) and 2 b' 11(11), then the consecutive 4 transmission packets can be determined as two consecutive second parity packet groups.
Wherein [ +64] of OFFSET +257[ +64], OFFSET +288[ +64], OFFSET +259[ +64], and OFFSET +304[ +64] refers to a length of length information of the second even-order packet or the second odd-order packet occupied by information whether the access point AP hides the service set identification SSID. Description of [ +64] is detailed in step S4202, and is not described here.
In the embodiment of the application, whether the access code AC information in the distribution network data packet is available or not can be determined according to whether the access code AC information of the transmission data packet obtained by decoding is a second preset value or a fourth preset value; such as: and if the access code AC information of the 1 st and the 3 rd in the 4 continuous transmission data packets is a second preset value and the access code AC information of the 2 nd and the 4 th in the 4 continuous transmission data packets is a fourth preset value, determining that the access code AC information in the distribution network data packets is available, and then continuing to decode the distribution network data packets to acquire the distribution network information, the first identification information and the second identification information of the access point AP.
If the two consecutive transmission data packets are the second even packet and the second odd packet, respectively, it is determined that the first device is in a network distribution process, and the second device executes step S4404.
S4404: and the second equipment receives the distribution network data packet.
Specifically, in step S4404, the second device receives other distribution network packets except the received second even packet and the second odd packet, such as: a first even packet, a first odd packet, a third even packet, and a third odd packet.
S45: and the second equipment decodes the distribution network data packet to acquire the distribution network information of the access point AP.
Specifically, the decoding the distribution network data packet to obtain the distribution network information of the access point AP includes:
s4501: and the second equipment decodes the WiFi packet length information of the second even packet and/or the WiFi packet length information of the second odd packet to acquire whether the access point AP hides the information of the service set identifier SSID.
The second device decodes the WiFi packet length information of any one of the second even packet and the second odd packet, and can obtain whether the access point AP hides the information of the service set identifier SSID, and then the WiFi packet length information of the remaining un-decoded second even packet or second odd packet does not need to be decoded; the second device decodes the WiFi packet length information of any one of the second even packet and the second odd packet, and if the access point AP cannot acquire the information of whether the service set identifier SSID is hidden by the access point AP, the WiFi packet length information of the remaining un-decoded second even packet or second odd packet needs to be decoded to acquire the information of whether the service set identifier SSID is hidden by the access point AP.
In this embodiment of the application, the distribution network information includes: the password of the access point AP and the verification information of the service set identification SSID of the access point AP.
If the SSID is hidden by the access point AP, that is, the acquired information of whether the SSID is hidden by the access point AP indicates that the SSID is hidden by the access point AP, the distribution network information further includes: the service set identifier SSID of the access point AP is identified, that is, if the SSID is hidden by the access point AP, the first device may send the SSID of the access point AP in a subsequent data phase.
If the distribution network information is the password of the access point AP or the verification information of the service set identifier SSID of the access point AP, executing step S4503; if the distribution network information is the SSID of the AP and the distribution network data packet does not include an SSID end character data packet set and an SSID length data packet set, then performing step S4503; if the distribution network information is the SSID of the AP, and the distribution network data packet further includes an SSID end character data packet set and an SSID length data packet set, then step S4502 is executed.
S4502: and determining a first parity packet group carrying the SSID of the access point AP according to the SSID length data packet group and the SSID ending character data packet group.
In the embodiment of the present application, step S4502: determining a first parity packet group carrying the SSID of the access point AP according to the SSID length data packet group and the SSID ending character data packet group, comprising the following steps:
A. the second equipment decodes the WiFi packet length information and the access code AC information of the third parity packet group (a third even packet and a third odd packet) to acquire second identification information;
B. the second equipment decodes WiFi packet length information and access code AC information of the SSID length data packet group (an even SSID length data packet and an odd SSID length data packet) to obtain the length of the SSID to be identified;
C. and the second equipment assists in identifying the length of the SSID to be identified according to the second identification information acquired in the step A so as to acquire the length of the SSID of the access point AP.
D. The second device decodes the WiFi packet length information and the access code AC information of the SSID end character data packet group (even SSID end character data packet and odd SSID end character data packet), acquires the end information of the SSID of the access point AP, and accordingly determines the end position of the SSID of the access point AP.
E. And determining a first parity packet group (a first even packet and a first odd packet) carrying the SSID of the access point AP according to the length of the SSID of the access point AP and the end information of the SSID of the access point AP.
The second identification information in the steps a to C is used for assisting in identifying the length of the access point AP carried by the SSID length data packet group; the second identification information includes: CRC4 (cyclic redundancy check code) and Segment Index (Index of data Segment) of the data Segment, wherein the Segment Index indicates a segmentation position of a character in the data Segment obtained by dividing the length of the SSID of the access point AP and a type of a third parity packet group, and the type of the third parity packet group refers to a type of information used for assisting identification of the third parity packet group, such as: the auxiliary identification information is the length of the SSID. The data segments involved in steps a to E are obtained by dividing the length of the SSID of the access point AP.
The CRC4 involved in steps a to E may use CRC4/ITU, x4+ x +1 to check the lengths of the access point APs carried by the even-order SSID length data packet and the odd-order SSID length data packet, or may use other checking algorithms to check the lengths of the SSIDs of the access point APs carried by the even-order SSID length data packet and the odd-order SSID length data packet, where the CRC4 of the data segment is not limited to checking the length of the SSID of the access point AP carried by the SSID length data packet. According to the Segment Index, whether the length of the access point AP carried by the complete SSID length data packet group is obtained or not can be determined, that is, whether the length of the SSID of the access point AP is obtained or not can be determined according to whether all the Segment indexes corresponding to all the data segments are received or not. Specifically, if the length of the SSID to be identified is checked to be correct by using the CRC4 of the data Segment, the length information of the SSID indicated by the current Segment Index is obtained, and if the length information of all the SSIDs indicated by the Segment Index is completely obtained, the second device obtains the length of the SSID of the access point AP. The third parity packet group in steps a to C is a third parity packet group that carries second identification information for assisting in identifying the length of the SSID in the SSID length data packet group.
It should be noted that, steps a and B may be performed simultaneously, or step B may be performed first, and then step a is performed, where the execution sequence of steps a and B is not limited; step D may be performed prior to steps a to C, or may be performed simultaneously with steps a to C, and the order of performing step D and steps a to C is not limited herein.
S4503: and the second equipment decodes the WiFi packet length information and the access code AC information of the third even packet and the WiFi packet length information and the access code AC information of the third odd packet to acquire second identification information.
S4504: and the second equipment decodes the WiFi packet length information and the access code AC information of the first even packet and the WiFi packet length information and the access code AC information of the first odd packet to acquire the distribution network information to be identified.
S4505: and the second equipment assists in identifying the distribution network information to be identified according to the second identification information so as to acquire the distribution network information.
The second identification information in steps S4503 to S4505 is used to assist in identifying distribution network information carried by the first parity packet group; the second identification information includes: CRC4 (cyclic redundancy check code) and Segment Index (Index of data Segment) of the data Segment, wherein the Segment Index indicates a segmentation position of a character in the data Segment and a type of a third parity packet group, and the type of the third parity packet group refers to a type of information used for assisting identification of the third parity packet group, such as: the type of the auxiliary identification information comprises a password of the access point AP, verification information of the SSID of the access point AP and the SSID of the access point AP. The data segments involved in steps S4503 to S4505 are obtained by partitioning the distribution network information of the access point AP.
The CRC4 involved in steps S4503 to S4505 may use CRC4/ITU, x4+ x +1 to check the distribution network information carried by the first parity packet group, or may use other check algorithms to check the distribution network information carried by the first parity packet group, where a mode of checking the distribution network information carried by the first parity packet group by the CRC4 of the data segment is not limited. According to the Segment Index, whether complete distribution network information is acquired can be determined, that is, whether all Segment indexes corresponding to the data Segment are received can be determined according to the judgment. Specifically, if the CRC4 of the data Segment is used to verify that the distribution network information to be identified is correct, the distribution network information indicated by the Segment Index is obtained currently, and if all the distribution network information indicated by the Segment Index is obtained completely, the second device obtains complete distribution network information. The third parity packet group described in steps S4503 to S4505 is a third parity packet group that carries second identification information for assisting in identifying distribution network information in the first parity packet group.
Steps S4503 and S4504 may be performed simultaneously, or step S4504 may be performed first and then step S4503 is performed, and the order of performing steps S4503 and S4504 is not limited herein.
In this embodiment of the application, after determining that the two consecutive transmission data packets are the second even packet and the second odd packet, respectively, the method further includes:
and the second equipment acquires the version number of the distribution network protocol between the first equipment and the second equipment according to the WiFi packet length information of the two continuous transmission data packets obtained by decoding.
In this embodiment of the application, after determining that the two consecutive transmission data packets are the second even packet and the second odd packet, respectively, the method further includes:
if the second device can analyze the Mac Header content of the second even packet and/or the second odd packet, the second device analyzes the Mac Header content of the second even packet and/or the second odd packet to obtain the BSSID of the access point AP.
In this embodiment of the application, if the second device cannot acquire complete distribution network information of the access point AP according to a received distribution network data packet at an ith data phase, before acquiring unreceived distribution network information of the access point AP by a distribution network data packet at another (for example, an (i + 1) th data phase) data phase after the ith data phase, determining whether a distribution network protocol version number between the first device and the second device and a BSSID of the access point AP, which are carried by the distribution network data packet generated at an identification phase corresponding to the ith data phase, are the same as a distribution network protocol version number between the first device and the second device and a BSSID of the access point AP, which are carried by the distribution network data packet generated at the identification phase corresponding to the ith data phase; and if the distribution network information is the same as the distribution network information, continuously acquiring the distribution network information of the access point AP in the distribution network data packet at the data stage.
S46: and the second equipment is connected with the access point AP according to the acquired distribution network information of the access point AP.
If the distribution network information of the access point AP, which is acquired by the second device from the distribution network data packet, does not include the SSID of the access point AP, the second device scans the current channel;
if the verification information (CRC5) corresponding to the SSID of the AP scanned by the second device is the same as the verification information (CRC5) of the SSID of the AP of the access point acquired from the distribution network data packet by the second device, the second device attempts to connect to the AP by using the distribution network information acquired from the distribution network data packet.
The checking information (CRC5) of SSIDs of a plurality of APs may be the same on the current channel, and attempting to connect to the AP using the distribution network information obtained from the distribution network packet may include:
if the second device can analyze the BSSID of the AP from the Mac Header content of the second distribution network data packet, the second device firstly connects the AP with the BSSID;
and if the second equipment cannot analyze the BSSID of the AP from the Mac Header content of the second distribution network data packet, the second equipment needs to try to connect the plurality of APs.
If the second device acquires the distribution network information of the access point AP from the distribution network data packet, the method includes: and the SSID of the access point AP is connected with the corresponding AP according to the obtained distribution network information of the access point AP.
S47: and after the second equipment is successfully connected with the access point AP, sending a feedback data packet to the first equipment, wherein the feedback data packet carries information for indicating that the second equipment is successfully connected with the access point AP.
Specifically, the second device may generate a feedback data packet, where the feedback data packet may be a UDP (User Datagram Protocol) broadcast packet, and an assigned port number is set in the UDP broadcast packet to indicate that the second device is successfully connected to the AP.
The UDP broadcast packet carries the password of the access point AP, the MacAddress (address of the media access control layer) of the second device, and the MacAddress CRC8 (cyclic redundancy check code of the address of the media access control layer) of the second device. The MacAddress of the second device may be used as an ID (identification) of the second device.
S48: and the first equipment receives the feedback data packet and confirms that the second equipment is successfully connected with the AP.
Specifically, when the first device receives the feedback data packet, it may display, on an interface of the first device, that the ID of the second device is successful in the distribution network.
In the embodiment of the application, the distribution network information can be coded into the WiFi packet length information and the QoS information, and the distribution network information is sent through the odd-even two data packets, so that the distribution network data packet sent to the second device carries more effective distribution network information, and the success rate and the robustness of a distribution network are improved.
Referring to fig. 19, fig. 19 is a schematic structural diagram of a WiFi network distribution device based on parity packets according to an embodiment of the present application, specifically, as shown in fig. 19, the WiFi network distribution device includes: a storage device 1901 and a processor 1902; and the user equipment may further comprise a data interface 1903, a user interface 1904. Connections may also be made between the various pieces of hardware via various types of buses.
Through the data interface 1903, the WiFi distribution network device can interact data with other devices such as terminals and servers; the user interface 1904 is used for realizing human-computer interaction between a user and WiFi distribution network equipment; when the WiFi network distribution device is the first device, the user interface 1904 may provide a touch display screen, a physical key, and the like to implement human-computer interaction between the user and the WiFi network distribution device.
The storage 1901 may include a Volatile Memory (Volatile Memory), such as a Random-Access Memory (RAM); the storage device 1901 may also include a Non-Volatile Memory (Non-Volatile Memory), such as a Flash Memory (Flash Memory), a Solid-State Drive (SSD), or the like; the storage 1901 may also comprise a combination of memories of the kind described above.
The processor 1902 may be a Central Processing Unit (CPU). The processor 1902 may further include a hardware chip. The hardware chip may be an Application-Specific Integrated Circuit (ASIC), a Programmable Logic Device (PLD), or the like. The PLD may be a Field-Programmable Gate Array (FPGA), a General Array Logic (GAL), or the like.
For the case that the WiFi distribution network equipment is first equipment:
the storage 1901 for storing program instructions;
the processor 1902, when invoking the storage instruction, is configured to obtain distribution network information of the access point AP;
generating a first even packet carrying the distribution network information of the access point AP, and generating a first odd packet carrying the distribution network information of the access point AP;
sending a distribution network data packet to the second device; the distribution network data packet comprises: a first even packet and a first odd packet.
In an embodiment, the processor 1902 is specifically configured to encode the distribution network information of the access point AP into length information and QoS information, and generate a first even packet;
the WiFi packet length information of the first even packet is length information obtained through coding, and the service quality QoS information of the first even packet is service quality QoS information obtained through coding.
In one embodiment, the quality of service QoS information includes: access code AC information; and the access code AC information is obtained by mapping a data form identification code TID field in a QoS Control field of the WiFi MAC packet header.
In one embodiment, the first even packet and the first odd packet are generated during a data phase;
the processor 1902 is specifically configured to encode, in a data phase, the distribution network information of the access point AP into length information and access code AC information.
In an embodiment, the processor 1902 is specifically configured to shift the first even packet to generate a first odd packet carrying the distribution network information of the access point AP.
In an embodiment, the processor 1902 is specifically configured to shift data recorded at a first preset position in the length information of the first even packet;
shifting all data recorded in the access code AC information of the first even packet;
all data recorded in the access code AC information of the first even-order packet is recorded in the length information of the generated first odd-order packet.
In one embodiment, the distribution network information includes: and the password of the access point AP and the verification information of the service set identifier SSID of the access point AP.
In an embodiment, if the access point AP hides a service set identifier SSID, the distribution network information further includes: and the service set identification SSID of the access point AP.
In one embodiment, the distribution network packet further comprises: a second even packet generated in the identification stage and a second odd packet generated in the identification stage;
the processor 1902 is further configured to, in an identification phase, encode the first identification information into length information before the distribution network packet is sent to the second device, and generate a second even packet; the WiFi packet length information of the second even packet is length information obtained by coding;
and generating a second odd-order packet carrying the first identification information.
In an embodiment, the processor 1902 is specifically configured to shift the second even packet to generate a second odd packet carrying the first identification information.
In an embodiment, the processor 1902 is specifically configured to shift data recorded at a second preset position in the length information of the second even packet;
shifting all data recorded in the access code AC information of the second even packet;
and all data recorded in the access code AC information of the second even-order packet is recorded in the length information of the generated second odd-order packet.
In one embodiment, the first identification information includes: and the access point AP hides the information of the service set identifier SSID and the version number of the distribution network protocol between the first device and the second device.
In one embodiment, the WiFi packet length of the second even packet is a first preset value; the access code AC information of the second even packet is a second preset value;
the WiFi packet length of the second odd-time packet is a third preset value; and the access code AC information of the second odd-time packet is a fourth preset value.
In one embodiment, the distribution network packet further includes: a third even packet generated in the data phase and a third odd packet generated in the data phase;
the processor 1902 is further configured to, in a data phase, encode second identification information into length information and access code AC information before the distribution network data packet is sent to the second device, and generate a third even packet; the WiFi packet length information of the third even packet is length information obtained by coding, and the access code AC of the third even packet is access code AC information obtained by coding;
and generating a third odd packet carrying the second identification information.
In an embodiment, the processor 1902 is specifically configured to shift the third even packet to generate a third odd packet carrying second identification information.
In an embodiment, the processor 1902 is specifically configured to shift data recorded at a third preset position in the length information of the third even packet;
shifting all data recorded in the access code AC information of the third even packet;
and all data recorded in the access code AC information of the third even-order packet is recorded in the length information of the generated third odd-order packet.
For the case that the WiFi distribution network equipment is second equipment:
the storage 1901 for storing program instructions;
the processor 1902, when invoking the storage instruction, is configured to receive a distribution network packet; the distribution network data packet comprises: a first even packet and a first odd packet; the WiFi packet length information and the service quality QoS information of the first even packet carry distribution network information of an Access Point (AP), and the WiFi packet length information and the service quality QoS information of the first odd packet carry distribution network information of the Access Point (AP);
and decoding the distribution network data packet to acquire the distribution network information of the access point AP.
In one embodiment, the quality of service QoS information includes: access code AC information; and the access code AC information is obtained by mapping a data form identification code TID field in a QoS Control field of the WiFi MAC packet header.
In one embodiment, the distribution network packet further comprises: a third even packet and a third odd packet;
the processor 1902 is specifically configured to decode WiFi packet length information and access code AC information of the third even packet, and WiFi packet length information and access code AC information of the third odd packet, and obtain second identification information;
decoding the WiFi packet length information and the access code AC information of the first even packet, and the WiFi packet length information and the access code AC information of the first odd packet to obtain distribution network information to be identified;
and auxiliary identification is carried out on the distribution network information to be identified according to the second identification information so as to obtain the distribution network information.
In one embodiment, the distribution network information includes: the password of the access point AP and the verification information of the service set identification SSID of the access point AP.
In one embodiment, the distribution network packet further comprises: a second even packet and a second odd packet;
the processor 1902 is further configured to decode WiFi packet length information and access code AC information of the third even packet, and WiFi packet length information and access code AC information of the third odd packet, and obtain second identification information; and decoding the WiFi packet length information and the access code AC information of the first even packet and the WiFi packet length information and the access code AC information of the first odd packet, and before acquiring the distribution network information to be identified, decoding the WiFi packet length information of the second even packet and/or the WiFi packet length information of the second odd packet, and acquiring the information whether the service set identifier SSID is hidden by the access point AP.
In an embodiment, if the access point AP hides a service set identifier SSID, the distribution network information further includes: and the service set identification SSID of the access point AP.
In one embodiment, the distribution network packet further comprises: a second even packet and a second odd packet;
the processor 1902 is specifically configured to receive two consecutive transmission data packets; the transmission data packet is sent to the second device by the first device;
decoding WiFi packet length information and access code AC information of the two continuous transmission data packets;
determining whether the two continuous transmission data packets are the second even packet and the second odd packet respectively according to the WiFi packet length information and the access code AC information of the two continuous transmission data packets obtained through decoding;
and if the two continuous transmission data packets are the second even packet and the second odd packet respectively, determining that the first device is in a distribution network process, and executing to receive a distribution network data packet by the second device.
In an embodiment, the processor 1902 is specifically configured to determine that one of the two consecutive transmission data packets is a second even packet and the other of the two consecutive transmission data packets is a second odd packet if the WiFi packet length of the one of the two consecutive transmission data packets is a first preset value, the access code AC information of the one of the two consecutive transmission data packets is a second preset value, the WiFi packet length of the other of the two consecutive transmission data packets is a third preset value, and the access code AC information of the other of the two consecutive transmission data packets is a fourth preset value.
In an embodiment, the processor 1902 is further configured to, after determining that the two consecutive transmission data packets are the second even packet and the second odd packet, obtain, according to the WiFi packet length information of the two consecutive transmission data packets obtained through decoding, a distribution network protocol version number between the first device and the second device.
Referring to fig. 20, fig. 20 is a WiFi network distribution device based on parity packets according to an embodiment of the present application, where the WiFi network distribution device is applicable to a first device, specifically as shown in fig. 20, the WiFi network distribution device includes:
an obtaining module 2001, configured to obtain distribution network information of the access point AP;
a generating module 2002, configured to generate a first even packet carrying the distribution network information of the access point AP, and generate a first odd packet carrying the distribution network information of the access point AP;
a sending module 2003, configured to send a distribution network packet to the second device; the distribution network data packet comprises: a first even packet and a first odd packet.
In an embodiment, the generating module 2002 is specifically configured to encode the distribution network information of the access point AP into length information and QoS information, and generate a first even packet;
the WiFi packet length information of the first even packet is length information obtained through coding, and the service quality QoS information of the first even packet is service quality QoS information obtained through coding.
In one embodiment, the quality of service QoS information includes: access code AC information; and the access code AC information is obtained by mapping a data form identification code TID field in a QoS Control field of the WiFi MAC packet header.
In one embodiment, the first even packet and the first odd packet are generated during a data phase;
the generating module 2002 is specifically configured to encode, in a data phase, the distribution network information of the access point AP into length information and access code AC information.
In an embodiment, the generating module 2002 is specifically configured to shift the first even packet, and generate a first odd packet carrying the distribution network information of the access point AP.
In an embodiment, the generating module 2002 is specifically configured to shift data recorded at a first preset position in the length information of the first even packet;
shifting all data recorded in the access code AC information of the first even packet;
all data recorded in the access code AC information of the first even-order packet is recorded in the length information of the generated first odd-order packet.
In one embodiment, the distribution network information includes: and the password of the access point AP and the verification information of the service set identifier SSID of the access point AP.
In an embodiment, if the access point AP hides a service set identifier SSID, the distribution network information further includes: and the service set identification SSID of the access point AP.
In one embodiment, the distribution network packet further comprises: a second even packet generated in the identification stage and a second odd packet generated in the identification stage;
the generating module 2002 is further configured to, in an identification stage, encode the first identification information into length information to generate a second even packet before the distribution network data packet is sent to the second device; the WiFi packet length information of the second even packet is length information obtained by coding;
and generating a second odd-order packet carrying the first identification information.
In an embodiment, the generating module 2002 is specifically configured to perform shift processing on the second even packet, and generate a second odd packet carrying first identification information.
In an embodiment, the generating module 2002 is specifically configured to shift data recorded at a second preset position in the length information of the second even packet;
shifting all data recorded in the access code AC information of the second even packet;
and all data recorded in the access code AC information of the second even-order packet is recorded in the length information of the generated second odd-order packet.
In one embodiment, the first identification information includes: and the access point AP hides the information of the service set identifier SSID and the version number of the distribution network protocol between the first device and the second device.
In one embodiment, the WiFi packet length of the second even packet is a first preset value; the access code AC information of the second even packet is a second preset value;
the WiFi packet length of the second odd-time packet is a third preset value; and the access code AC information of the second odd-time packet is a fourth preset value.
In one embodiment, the distribution network packet further includes: a third even packet generated in the data phase and a third odd packet generated in the data phase;
the generating module 2002 is further configured to, in a data phase, encode the second identification information into length information and access code AC information before the distribution network data packet is sent to the second device, and generate a third even packet; the WiFi packet length information of the third even packet is length information obtained by coding, and the access code AC of the third even packet is access code AC information obtained by coding;
and generating a third odd packet carrying the second identification information.
In an embodiment, the generating module 2002 is specifically configured to perform shift processing on the third even packet, and generate a third odd packet carrying second identification information.
In an embodiment, the generating module 2002 is specifically configured to shift data recorded at a third preset position in the length information of the third even packet;
shifting all data recorded in the access code AC information of the third even packet;
and all data recorded in the access code AC information of the third even-order packet is recorded in the length information of the generated third odd-order packet.
Referring to fig. 21, fig. 21 is a diagram of another WiFi network distribution device based on parity packets according to an embodiment of the present application, where the WiFi network distribution device is applicable to a second device, specifically as shown in fig. 21, the WiFi network distribution device includes:
a receiving module 2101 configured to receive a distribution network data packet; the distribution network data packet comprises: a first even packet and a first odd packet; the WiFi packet length information and the service quality QoS information of the first even packet carry distribution network information of an Access Point (AP), and the WiFi packet length information and the service quality QoS information of the first odd packet carry distribution network information of the Access Point (AP);
an obtaining module 2102, configured to decode the distribution network data packet, and obtain distribution network information of the access point AP.
In one embodiment, the quality of service QoS information includes: access code AC information; and the access code AC information is obtained by mapping a data form identification code TID field in a QoS Control field of the WiFi MAC packet header.
In one embodiment, the distribution network packet further comprises: a third even packet and a third odd packet;
the obtaining module 2102 is specifically configured to decode WiFi packet length information and access code AC information of the third even packet, and WiFi packet length information and access code AC information of the third odd packet, and obtain second identification information;
decoding the WiFi packet length information and the access code AC information of the first even packet, and the WiFi packet length information and the access code AC information of the first odd packet to obtain distribution network information to be identified;
and auxiliary identification is carried out on the distribution network information to be identified according to the second identification information so as to obtain the distribution network information.
In one embodiment, the distribution network information includes: the password of the access point AP and the verification information of the service set identification SSID of the access point AP.
In one embodiment, the distribution network packet further comprises: a second even packet and a second odd packet;
the obtaining module 2102 is further configured to obtain second identification information after decoding the WiFi packet length information and the access code AC information of the third even packet and the WiFi packet length information and the access code AC information of the third odd packet; and decoding the WiFi packet length information and the access code AC information of the first even packet and the WiFi packet length information and the access code AC information of the first odd packet, and before acquiring the distribution network information to be identified, decoding the WiFi packet length information of the second even packet and/or the WiFi packet length information of the second odd packet, and acquiring the information whether the service set identifier SSID is hidden by the access point AP.
In an embodiment, if the access point AP hides a service set identifier SSID, the distribution network information further includes: and the service set identification SSID of the access point AP.
In one embodiment, the distribution network packet further comprises: a second even packet and a second odd packet;
the receiving module 2101 is specifically configured to receive two consecutive transmission data packets; the transmission data packet is sent to the second device by the first device;
the obtaining module 2102 is specifically configured to decode WiFi packet length information and access code AC information of the two consecutive transmission data packets;
determining whether the two continuous transmission data packets are the second even packet and the second odd packet respectively according to the WiFi packet length information and the access code AC information of the two continuous transmission data packets obtained through decoding;
if the two continuous transmission data packets are the second even-order packet and the second odd-order packet respectively, determining that the first device is in a network distribution process;
the receiving module 2101 is specifically configured to execute receiving a distribution network data packet.
In an embodiment, the obtaining module 2102 is specifically configured to determine that one of the two consecutive transmission data packets is a second even packet and the other of the two consecutive transmission data packets is a second odd packet if the WiFi packet length of the one of the two consecutive transmission data packets is a first preset value, the access code AC information of the one of the two consecutive transmission data packets is a second preset value, the WiFi packet length of the other of the two consecutive transmission data packets is a third preset value, and the access code AC information of the other of the two consecutive transmission data packets is a fourth preset value.
In an embodiment, the obtaining module 2102 is further configured to, after determining that the two consecutive transmission data packets are the second even packet and the second odd packet, obtain, according to the WiFi packet length information of the two consecutive transmission data packets obtained through decoding, a distribution network protocol version number between the first device and the second device.
Accordingly, an embodiment of the present invention further provides a computer-readable storage medium for storing a computer program, where the computer program enables a computer to execute the method described in any embodiment of fig. 2 (steps S201 to S203), steps S41 to S43, and S48 of the present application. It is understood that the computer storage medium herein may include a built-in storage medium in the smart terminal, and may also include an extended storage medium supported by the smart terminal. The computer storage medium provides a storage space storing an operating system of the smart terminal. Also, one or more instructions, which may be one or more computer programs (including program code), are stored in the memory space and are adapted to be loaded and executed by the processor. It should be noted that the computer storage medium may be a high-speed RAM Memory, or may be a Non-Volatile Memory (Non-Volatile Memory), such as at least one disk Memory; and optionally at least one computer storage medium located remotely from the processor.
Accordingly, the present invention further provides a computer-readable storage medium for storing a computer program, where the computer program enables a computer to execute the method described in any of fig. 3 (steps S301 to S302) and steps S44 to S47 of the present application. It is understood that the computer storage medium herein may include a built-in storage medium in the smart terminal, and may also include an extended storage medium supported by the smart terminal. The computer storage medium provides a storage space storing an operating system of the smart terminal. Also, one or more instructions, which may be one or more computer programs (including program code), are stored in the memory space and are adapted to be loaded and executed by the processor. It should be noted that the computer storage medium may be a high-speed RAM Memory, or may be a Non-Volatile Memory (Non-Volatile Memory), such as at least one disk Memory; and optionally at least one computer storage medium located remotely from the processor.
While the invention has been described with reference to a number of embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (30)

1. A WiFi network distribution method based on parity packets is applied to a first device and comprises the following steps:
acquiring distribution network information of an Access Point (AP);
generating a first even-order packet carrying the distribution network information of the access point AP, and performing displacement processing on the first even-order packet to generate a first odd-order packet carrying the distribution network information of the access point AP;
sending a distribution network data packet to the second device; the distribution network data packet comprises: a first even packet and a first odd packet.
2. The method of claim 1, wherein the generating the first even packet carrying the distribution network information for the Access Point (AP) comprises:
encoding the distribution network information of the access point AP into length information and QoS (quality of service) information to generate a first even packet;
the WiFi packet length information of the first even packet is length information obtained through coding, and the service quality QoS information of the first even packet is service quality QoS information obtained through coding.
3. The method of claim 2, wherein the quality of service (QoS) information comprises: access code AC information; and the access code AC information is obtained by mapping a data form identification code TID field in a QoS Control field of the WiFi MAC packet header.
4. The method of claim 3, wherein the first even packet and the first odd packet are generated during a data phase;
the encoding the distribution network information of the access point AP to length information and QoS information comprises:
and in the data phase, encoding the distribution network information of the access point AP into length information and access code AC information.
5. The method of claim 4, wherein said shifting said first even packet comprises:
shifting data recorded at a first preset position in the length information of the first even packet;
shifting all data recorded in the access code AC information of the first even packet;
all data recorded in the access code AC information of the first even-order packet is recorded in the length information of the generated first odd-order packet.
6. The method of any of claims 1-5, wherein the distribution network information comprises: and the password of the access point AP and the verification information of the service set identifier SSID of the access point AP.
7. The method of claim 6, wherein if the access point AP hides a Service Set Identification (SSID), the distribution network information further comprises: and the service set identification SSID of the access point AP.
8. The method of claim 3, wherein the distribution network packet further comprises: a second even packet generated in the identification stage and a second odd packet generated in the identification stage;
before the sending the distribution network packet to the second device, the method further includes:
in the identification stage, encoding the first identification information into length information to generate a second even packet; the WiFi packet length information of the second even packet is length information obtained by coding;
and generating a second odd-order packet carrying the first identification information.
9. The method of claim 8, wherein generating the second odd packet carrying the first identifying information comprises:
and shifting the second even-order packet to generate a second odd-order packet carrying first identification information.
10. The method of claim 9, wherein said shifting said second even packet comprises:
shifting data recorded at a second preset position in the length information of the second even packet;
shifting all data recorded in the access code AC information of the second even packet;
and all data recorded in the access code AC information of the second even-order packet is recorded in the length information of the generated second odd-order packet.
11. The method of any one of claims 8-10, wherein the first identification information comprises: and the access point AP hides the information of the service set identifier SSID and the version number of the distribution network protocol between the first device and the second device.
12. The method of any of claims 8-10, wherein the WiFi packet length of the second even packet is a first preset value; the access code AC information of the second even packet is a second preset value;
the WiFi packet length of the second odd-time packet is a third preset value; and the access code AC information of the second odd-time packet is a fourth preset value.
13. The method of claim 3, wherein the distribution network packet further comprises: a third even packet generated in the data phase and a third odd packet generated in the data phase;
before the sending the distribution network packet to the second device, the method further includes:
in the data stage, encoding the second identification information into length information and access code AC information to generate a third even packet; the WiFi packet length information of the third even packet is length information obtained by coding, and the access code AC of the third even packet is access code AC information obtained by coding;
and generating a third odd packet carrying the second identification information.
14. The method of claim 13, wherein generating the third odd packet carrying the second identifying information comprises:
and shifting the third even-order packet to generate a third odd-order packet carrying second identification information.
15. The method of claim 14, wherein said shifting said third even packet comprises:
shifting data recorded at a third preset position in the length information of the third even packet;
shifting all data recorded in the access code AC information of the third even packet;
and all data recorded in the access code AC information of the third even-order packet is recorded in the length information of the generated third odd-order packet.
16. A WiFi network distribution method based on parity packets is applied to a second device and comprises the following steps:
receiving a distribution network data packet; the distribution network data packet comprises: a first even packet and a first odd packet; the WiFi packet length information and the service quality QoS information of the first even packet carry distribution network information of an Access Point (AP), the WiFi packet length information and the service quality QoS information of the first odd packet carry distribution network information of the Access Point (AP), and the first odd packet is generated by shifting the first even packet;
and decoding the distribution network data packet to acquire the distribution network information of the access point AP.
17. The method of claim 16, wherein the quality of service (QoS) information comprises: access code AC information; and the access code AC information is obtained by mapping a data form identification code TID field in a QoS Control field of the WiFi MAC packet header.
18. The method of claim 17, wherein the distribution network packet further comprises: a third even packet and a third odd packet;
the decoding the distribution network data packet to obtain the distribution network information of the access point AP includes:
decoding the WiFi packet length information and the access code AC information of the third even packet and the WiFi packet length information and the access code AC information of the third odd packet to obtain second identification information;
decoding the WiFi packet length information and the access code AC information of the first even packet, and the WiFi packet length information and the access code AC information of the first odd packet to obtain distribution network information to be identified;
and auxiliary identification is carried out on the distribution network information to be identified according to the second identification information so as to obtain the distribution network information.
19. The method of claim 18, wherein the distribution network information comprises: the password of the access point AP and the verification information of the service set identification SSID of the access point AP.
20. The method of claim 18 or 19, wherein the distribution network packet further comprises: a second even packet and a second odd packet;
decoding the WiFi packet length information and the access code AC information of the third even packet and the WiFi packet length information and the access code AC information of the third odd packet to obtain second identification information; decoding the WiFi packet length information and the access code AC information of the first even packet, and the WiFi packet length information and the access code AC information of the first odd packet, before acquiring the distribution network information to be identified, decoding the distribution network data packet, acquiring the distribution network information of the access point AP, further comprising:
and decoding the WiFi packet length information of the second even packet and/or the WiFi packet length information of the second odd packet to acquire whether the access point AP hides the information of the service set identifier SSID.
21. The method of claim 20, wherein the distribution network information further comprises, if the access point AP hides a service set identification SSID: and the service set identification SSID of the access point AP.
22. The method of claim 17, wherein the distribution network packet further comprises: a second even packet and a second odd packet;
the receiving distribution network data packet includes:
receiving two continuous transmission data packets; the transmission data packet is sent to the second device by the first device;
decoding WiFi packet length information and access code AC information of the two continuous transmission data packets;
determining whether the two continuous transmission data packets are the second even packet and the second odd packet respectively according to the WiFi packet length information and the access code AC information of the two continuous transmission data packets obtained through decoding;
and if the two continuous transmission data packets are the second even packet and the second odd packet respectively, determining that the first device is in a distribution network process, and executing to receive a distribution network data packet by the second device.
23. The method of claim 22, wherein the determining whether the two consecutive transmission data packets are the second even packet and the second odd packet respectively according to the WiFi packet length information and the access code AC information of the two consecutive transmission data packets obtained by decoding comprises:
if the length of the WiFi packet of one of the two continuous transmission data packets is a first preset value, the access code AC information of one of the two continuous transmission data packets is a second preset value, the length of the WiFi packet of the other of the two continuous transmission data packets is a third preset value, and the access code AC information of the other of the two continuous transmission data packets is a fourth preset value, determining that one of the two continuous transmission data packets is a second even packet and the other of the two continuous transmission data packets is a second odd packet.
24. The method of claim 22 or 23, wherein after determining that the consecutive two transmission data packets are the second even packet and the second odd packet, respectively, the method further comprises:
and acquiring the distribution network protocol version number between the first equipment and the second equipment according to the WiFi packet length information of the two continuous transmission data packets obtained by decoding.
25. A WiFi distribution network device based on parity packets, the WiFi distribution network device comprising: a storage device and a processor, wherein the processor is capable of,
the storage device is used for storing program instructions;
the processor, when invoking the store instruction, is configured to perform the parity packet-based WiFi network provisioning method of any of claims 1-15.
26. A WiFi distribution network device based on parity packets, the WiFi distribution network device comprising: a storage device and a processor, wherein the processor is capable of,
the storage device is used for storing program instructions;
the processor, when invoking the store instruction, is configured to perform the parity packet-based WiFi distribution network method of any of claims 16-24.
27. A WiFi distribution network device based on parity packets, the WiFi distribution network device comprising:
the acquisition module is used for acquiring the distribution network information of the access point AP;
a generating module, configured to generate a first even packet carrying the distribution network information of the access point AP, and perform shift processing on the first even packet to generate a first odd packet carrying the distribution network information of the access point AP;
the sending module is used for sending the distribution network data packet to the second equipment; the distribution network data packet comprises: a first even packet and a first odd packet.
28. A WiFi distribution network device based on parity packets, the WiFi distribution network device comprising:
the receiving module is used for receiving the distribution network data packet; the distribution network data packet comprises: a first even packet and a first odd packet; the WiFi packet length information and the service quality QoS information of the first even packet carry distribution network information of an Access Point (AP), the WiFi packet length information and the service quality QoS information of the first odd packet carry distribution network information of the Access Point (AP), and the first odd packet is generated by shifting the first even packet;
and the acquisition module is used for decoding the distribution network data packet and acquiring the distribution network information of the access point AP.
29. A computer-readable storage medium storing a computer program for causing a computer to perform the parity packet based WiFi distribution network method of any of claims 1-15.
30. A computer-readable storage medium storing a computer program for causing a computer to perform the parity packet based WiFi distribution network method of any of claims 16-24.
CN202010187489.3A 2020-03-17 2020-03-17 Odd-even packet-based WiFi network distribution method, equipment, device and storage medium Active CN111372297B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010187489.3A CN111372297B (en) 2020-03-17 2020-03-17 Odd-even packet-based WiFi network distribution method, equipment, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010187489.3A CN111372297B (en) 2020-03-17 2020-03-17 Odd-even packet-based WiFi network distribution method, equipment, device and storage medium

Publications (2)

Publication Number Publication Date
CN111372297A CN111372297A (en) 2020-07-03
CN111372297B true CN111372297B (en) 2022-02-22

Family

ID=71211888

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010187489.3A Active CN111372297B (en) 2020-03-17 2020-03-17 Odd-even packet-based WiFi network distribution method, equipment, device and storage medium

Country Status (1)

Country Link
CN (1) CN111372297B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104618900A (en) * 2015-02-02 2015-05-13 青岛海尔智能家电科技有限公司 Network access method for intelligent device, intelligent device and mobile terminal
CN104735260A (en) * 2015-04-01 2015-06-24 深圳市蜂联科技有限公司 Correlation method applied to intelligent terminal
CN105682253A (en) * 2016-03-02 2016-06-15 上海小蚁科技有限公司 Method and equipment for communication establishment, terminal and computer readable storage medium
CN106851640A (en) * 2015-12-04 2017-06-13 腾讯科技(深圳)有限公司 Cryptosync method and apparatus
CN110582082A (en) * 2018-06-08 2019-12-17 阿里巴巴集团控股有限公司 Method and device for accessing network to be configured to network hotspot equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8014529B2 (en) * 2006-08-18 2011-09-06 Eye-Fi, Inc. In-band device enrollment without access point support

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104618900A (en) * 2015-02-02 2015-05-13 青岛海尔智能家电科技有限公司 Network access method for intelligent device, intelligent device and mobile terminal
CN104735260A (en) * 2015-04-01 2015-06-24 深圳市蜂联科技有限公司 Correlation method applied to intelligent terminal
CN106851640A (en) * 2015-12-04 2017-06-13 腾讯科技(深圳)有限公司 Cryptosync method and apparatus
CN105682253A (en) * 2016-03-02 2016-06-15 上海小蚁科技有限公司 Method and equipment for communication establishment, terminal and computer readable storage medium
CN110582082A (en) * 2018-06-08 2019-12-17 阿里巴巴集团控股有限公司 Method and device for accessing network to be configured to network hotspot equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A research on identification method for WiFi-based home automation device suites;Kefei Cheng;《IEEEXplore》;20171002;全文 *
基于WiFi的智能家居系统设计;郑希等;《微型机与应用》;20160410(第07期);全文 *

Also Published As

Publication number Publication date
CN111372297A (en) 2020-07-03

Similar Documents

Publication Publication Date Title
CN108696936B (en) Data sending method, data receiving method and related equipment
JP4927998B2 (en) Method and apparatus for transmitting antenna configuration information through masking
CN108347301B (en) Data transmission method and device
JP2019537379A (en) Coding method determination method and apparatus
JP2020534746A (en) Methods and equipment for polar coding
US10785814B2 (en) Method, device and system for sending participating service provider identity
CN111385797B (en) WiFi network distribution method, device, apparatus and storage medium
US11653343B2 (en) Spectrum allocation for multiple resource units in a wireless network
CN1516936A (en) Packet transmitter, packet receiver and packet transmission method
CN109995492B (en) Communication method, device and system
CN111372297B (en) Odd-even packet-based WiFi network distribution method, equipment, device and storage medium
CN111225077B (en) Network distribution method, device and system for Internet of things equipment
CN110971556B (en) Signal processing method of wireless communication system, terminal equipment and network equipment
CN107078992B (en) Information transmission method, equipment and system
US10623140B2 (en) Method for processing signaling sub-segment, processing apparatus, access point, and station
CN110324110B (en) Communication method, communication device and storage medium
CN113314128B (en) Delayed access method, device and system for voice service and related products
EP3468086B1 (en) Information transmitting and receiving method and apparatus
CN104081747B (en) Transmit method, the encoding apparatus and decoding apparatus of HTTP message
CN106604305B (en) Wireless network configuration method and device and terminal
CN108964834B (en) Data transmission method, chip, transceiver and computer readable storage medium
EP2852082A1 (en) Information sending method and device
CN106471785B (en) Virtual carrier sensing method and device
WO2021088071A1 (en) Method and apparatus for determining position occupied by resource, terminal device, and storage medium
MX2011009673A (en) Method for assigning and utilizing forward error correcting (fec).

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