CN113473387A - WiFi module network distribution method based on UDP broadcast length coding - Google Patents
WiFi module network distribution method based on UDP broadcast length coding Download PDFInfo
- Publication number
- CN113473387A CN113473387A CN202110656640.8A CN202110656640A CN113473387A CN 113473387 A CN113473387 A CN 113473387A CN 202110656640 A CN202110656640 A CN 202110656640A CN 113473387 A CN113473387 A CN 113473387A
- Authority
- CN
- China
- Prior art keywords
- packet
- wifi module
- wifi
- data
- length
- 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.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/06—Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/06—Authentication
- H04W12/068—Authentication using credential vaults, e.g. password manager applications or one time password [OTP] applications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W48/00—Access restriction; Network selection; Access point selection
- H04W48/16—Discovering, processing access restriction or access information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Abstract
The invention discloses a WiFi module network distribution method based on UDP broadcast length coding.A mobile phone sends a preamble packet to a WiFi module; the WiFi module receives a preamble packet sent by a mobile phone, locks a channel of the wireless router and waits for receiving a configuration packet; the mobile phone end sends a configuration packet containing a WiFi password and the SSID length; after receiving the configuration packet, the WiFi module determines the analysis strategy of the data packet; the mobile phone end sends a data packet containing the WiFi password and the SSID length; and the WiFi module analyzes to obtain a WiFi password and an SSID, the locked wireless router is connected by using the WiFi password and the SSID, the WiFi module sends a successfully configured instruction to the wireless router after the connection is successful, the WiFi module is confirmed to successfully configure the network, and the configuration flow is finished. The method utilizes the WiFi module based on UDP broadcast length coding to ensure that the mobile phone and the WiFi equipment are interacted through a small amount of data and the WiFi equipment is connected to the wireless router, thereby reducing the data transmission quantity and the protocol complexity in the process of distribution network and improving the speed and the success rate of the distribution network.
Description
Technical Field
The invention relates to the field of network design, in particular to a WiFi module network distribution method based on UDP broadcast length coding.
Background
Due to the popularization of home WiFi, the smart home equipment generally selects a WiFi module to be connected with a home network. The mainstream intelligent distribution network mode in the market at present has the following 3 types: 1. SmartConfig mode: the method comprises the steps that a WiFi module in the intelligent equipment is in a hybrid mode, an SSID and a password of a wireless router are filled in an unencrypted packet head part in an MAC layer UDP packet according to a certain format at a mobile phone end, the encoded packets are sent to a home wireless router in a segmented and multi-time mode in a broadcasting mode, the WiFi module obtains data packets in a channel scanning and packet capturing mode, and networking is completed after successful analysis; 2. a WPS key distribution network: the method includes the steps that the WPS key on the wireless router is operated, so that the intelligent device is connected with a network quickly, and the method needs the support of the wireless router; 3. a WEB network distribution: and the WiFi module is switched to be in an AP mode, and the mobile phone end transmits the SSID and the password to the WiFi module by connecting the AP and accessing a WEB webpage embedded in the WiFi module so as to complete the distribution network. The three methods described above have the following problems: the process and the protocol are complex, the transmission data volume is large, and the distribution network success rate and the distribution network speed are low.
Disclosure of Invention
In order to solve the defects in the prior art, the invention provides a WiFi module network distribution method based on UDP broadcast length coding, which utilizes the WiFi module based on UDP broadcast length coding to ensure that a mobile phone and WiFi equipment are interacted by a small amount of data and the WiFi equipment is connected to a wireless router, thereby reducing the data transmission quantity and protocol complexity in the network distribution process and improving the speed and success rate of network distribution.
The technical scheme adopted by the invention is as follows:
a WiFi module network distribution method based on UDP broadcast length coding comprises the following steps:
Further, the preamble packet, the data packet and the configuration packet all adopt length coding, and information in each packet is placed in a length part of a UDP packet;
further, the length of the length information stored in the UDP packet is 10 bits;
further, the 10 th bit of the leading packet is 1, and the other 9 bits are 0;
further, the 10 th bit of the configuration packet and the data packet is 0; the 5 th to 9 th bits form index information; bits 3 and 4 are 1/4 bytes of valid Data; the 1 st and 2 nd bits are No. information;
furthermore, the index information value in the configuration packet is 0, the No. information value of the configuration packet is 0 and 1, and Data forms 4-bit Data for representing the length of the WiFi password; the index information value of the configuration packet is 0, the No. information value is 2 and 3, and Data form 4bit Data to indicate the length of the SSID;
furthermore, the values of No. information in the Data packet are 0, 1, 2 and 3, the values of index information are the same, and Data can form an 8-bit byte for representing one ASCII coded character in the WiFi password and SSID content information.
Further, the index value range of the data packet is determined by the sum of the WiFi password and the SSID length value in the configuration packet, and the maximum value range is 2-30.
Furthermore, the Data in the Data packet are arranged according to the order of the index information from small to large, the Data with the length of the former WiFi password are spliced to form WiFi password content information, and the Data with the length of the next SSID are spliced to form SSID content information.
The invention has the beneficial effects that:
the invention provides a WiFi module network distribution method based on UDP broadcast length coding, which utilizes the WiFi module based on UDP broadcast length coding to ensure that a mobile phone and WiFi equipment realize the connection of the WiFi equipment to a wireless router through a small amount of data interaction, thereby reducing the data transmission quantity and protocol complexity in the network distribution process and improving the speed and success rate of network distribution.
Drawings
Fig. 1 is a schematic flow chart of a network distribution method for a WiFi module based on UDP broadcast length coding according to the present invention.
Fig. 2 is a schematic diagram of the encoding formats of the preamble packet, the configuration packet and the data packet according to the present invention.
Fig. 3 is a timing diagram of a network distribution method for a WiFi module based on UDP broadcast length coding according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, the present invention provides a WiFi module configuration method based on UDP broadcast length coding, including the following steps:
In the embodiment of the present invention, the preamble packet, the configuration packet, and the data packet all use length coding, and information in each packet is placed in a length part of a UDP packet, where a length of length information stored in one UDP packet is 10 bits, and a specific data format is shown in fig. 2:
the 10 th bit of the leading packet is 1, and the other 9 bits are 0.
The 10 th bit of the configuration packet and the data packet is 0; the 5 th to 9 th bits form index information, and the index information comprises 5 bits in total; bits 3 and 4 are 1/4 bytes of valid Data; the 1 st and 2 nd bits are No. information; the value range of No. information is 0-3. More specifically, the index information value in the configuration packet is 0, the No. information value of the configuration packet is 0 and 1, and Data constitutes 4-bit Data for representing the length of the WiFi password; the index information value of the configuration packet is 0, the No. information value is 2 and 3, and Data form 4bit Data to indicate the length of the SSID; the value range of the 4-bit data is 0-15, and the lengths of the WiFi password and the SSID are not 0, so that the length ranges of the WiFi password and the SSID are 1-15. The value of No. information in the Data packet is 0, 1, 2 and 3, the value of index information is the same, Data can form an 8-bit byte for representing one ASCII coded character in the WiFi password and SSID content information, therefore, the value range of the index of the Data packet is determined by the sum of the WiFi password and the SSID length value in the configuration packet, and the maximum value range is 2-30. And arranging the Data in the Data packet according to the order of the index information from small to large, splicing the Data with the length of the former WiFi password to form WiFi password content information, and splicing the Data with the length of the next SSID to form SSID content information.
The process is illustrated with a simple example:
as shown in fig. 3, the mobile phone, the wireless router and the WiFi module have three terminals in common, and the mobile phone terminal sends 20 consecutive preamble packets to the wireless router. And the WiFi module receives any continuous 4 preamble packets in the process of scanning the wireless router channel, namely locking the channel and waiting for receiving the configuration packet. The mobile phone end continuously sends 2 groups of configuration packets to the wireless router, and one group comprises 4 UDP packets. And after receiving the information of the WiFi password length and the SSID length in the configuration packet, the WiFi module waits for receiving a data packet containing the WiFi password and the SSID content. And the mobile phone terminal sequentially sends data packets containing WiFi passwords and SSID contents to the WiFi module and waits for 9s, the WiFi module executes the action of connecting the wireless router after receiving and analyzing, and after the data packets are successfully connected, the mobile phone terminal continuously sends status packets successfully configured for 10 times to the local area network. And if the mobile phone end receives the status packet of successful configuration sent by the WiFi module in the waiting window period of 9s, the configuration process is ended, and if not, the steps are repeated.
Compared with distribution network methods such as SmartConfig and the like, the method has the advantages that CRC (cyclic redundancy check) is removed, the packet length and the packet number of a preamble packet, a configuration packet and a Data packet are compressed in a compact packet coding format to reduce Data transmission quantity, Data error rate caused by CRC removal is reduced through double verification of No. information and index, the complexity of interaction between a mobile phone and a WiFi module is reduced through strict control of a Data transmission flow, and distribution network speed and success rate are improved.
The above embodiments are only used for illustrating the design idea and features of the present invention, and the purpose of the present invention is to enable those skilled in the art to understand the content of the present invention and implement the present invention accordingly, and the protection scope of the present invention is not limited to the above embodiments. Therefore, all equivalent changes and modifications made in accordance with the principles and concepts disclosed herein are intended to be included within the scope of the present invention.
Claims (9)
1. A WiFi module network distribution method based on UDP broadcast length coding is characterized by comprising the following steps:
step 1, the mobile phone sends a preamble packet to a WiFi module; when the WiFi module scans channels of all wireless routers in the environment, the WiFi module receives a preamble packet sent by a mobile phone, locks the channels of the wireless routers and waits for receiving a configuration packet;
step 2, the mobile phone end sends a configuration packet containing a WiFi password and the SSID length; after receiving the configuration packet, the WiFi module determines the total length of the data packet to be received;
step 3, the mobile phone end sends a data packet containing the WiFi password and the SSID length; and (3) the WiFi module analyzes the data packet after receiving the data packet to obtain a WiFi password and an SSID, the wireless router locked in the step (1) is connected by using the analyzed WiFi password and SSID, the WiFi module sends a successfully configured instruction to the wireless router after the connection is successful, the mobile phone confirms that the WiFi module is successfully configured, and the configuration flow is ended.
2. The WiFi module distribution network method based on UDP broadcast length coding according to claim 1, wherein the preamble packet, the data packet and the configuration packet are all length coded, and information in each packet is placed in a length part of a UDP packet.
3. The WiFi module network distribution method based on UDP broadcast length coding according to claim 2, wherein the length of the UDP packet storage length information is 10 bits.
4. The WiFi module network distribution method based on UDP broadcast length coding according to claim 3, wherein the 10 th bit of the preamble packet is 1, and the remaining 9 bits are 0.
5. The WiFi module network distribution method based on UDP broadcast length coding according to claim 3, wherein the 10 th bit of the configuration packet and the data packet is 0; the 5 th to 9 th bits form index information; bits 3 and 4 are 1/4 bytes of valid Data; the 1 st and 2 nd bits are No. information.
6. The WiFi module network distribution method based on UDP broadcast length coding according to claim 5, wherein index information in the configuration packet takes the value of 0, No. information of the configuration packet takes the values of 0 and 1, and Data constitutes 4-bit Data for representing the length of a WiFi password; the index information value of the configuration packet is 0, the No. information value is 2 and 3, and Data form 4bit Data to indicate the length of the SSID.
7. The WiFi module network distribution method based on UDP broadcast length coding according to claim 3, wherein the values of No. information in the Data packet are 0, 1, 2 and 3, the values of index information are the same, and Data can form an 8-bit byte for representing one ASCII coded character in the WiFi password and SSID content information.
8. The WiFi module network distribution method based on UDP broadcast length coding according to claim 7, wherein the range of index information of the data packet is determined by the sum of the WiFi password and the SSID length value in the configuration packet, and the maximum range is 2-30.
9. The WiFi module network distribution method based on UDP broadcast length coding as claimed in claim 7, wherein the Data in the Data packet are arranged according to the order of index information from small to large, the Data with the length of the former WiFi password are spliced to form WiFi password content information, and the Data with the length of the next SSID are spliced to form SSID content information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110656640.8A CN113473387B (en) | 2021-06-11 | 2021-06-11 | WiFi module network distribution method based on UDP broadcast length coding |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110656640.8A CN113473387B (en) | 2021-06-11 | 2021-06-11 | WiFi module network distribution method based on UDP broadcast length coding |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113473387A true CN113473387A (en) | 2021-10-01 |
CN113473387B CN113473387B (en) | 2022-05-20 |
Family
ID=77869797
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110656640.8A Active CN113473387B (en) | 2021-06-11 | 2021-06-11 | WiFi module network distribution method based on UDP broadcast length coding |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113473387B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104581713A (en) * | 2015-01-15 | 2015-04-29 | 福建天晴数码有限公司 | Intelligent equipment networking method, device, equipment and system |
CN104581647A (en) * | 2015-01-30 | 2015-04-29 | 青岛海尔智能家电科技有限公司 | Network access method and device of intelligent equipment |
CN106254147A (en) * | 2016-09-08 | 2016-12-21 | 珠海全志科技股份有限公司 | A kind of collocation method for Wi Fi network, internet-of-things terminal and control end |
CN106412886A (en) * | 2015-08-13 | 2017-02-15 | 大唐半导体设计有限公司 | Method, device and system for secure access of intelligent device to wireless network |
CN109640375A (en) * | 2019-01-23 | 2019-04-16 | 欧普照明股份有限公司 | A kind of smart machine distribution method and system |
CN110072267A (en) * | 2018-01-22 | 2019-07-30 | 阿拉的(深圳)人工智能有限公司 | Method, apparatus, storage medium and the intelligent sound box of intelligent sound box networking |
CN112261591A (en) * | 2020-09-15 | 2021-01-22 | 哈工大机器人(合肥)国际创新研究院 | Method for rapidly and stably configuring wifi through one key |
-
2021
- 2021-06-11 CN CN202110656640.8A patent/CN113473387B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104581713A (en) * | 2015-01-15 | 2015-04-29 | 福建天晴数码有限公司 | Intelligent equipment networking method, device, equipment and system |
CN104581647A (en) * | 2015-01-30 | 2015-04-29 | 青岛海尔智能家电科技有限公司 | Network access method and device of intelligent equipment |
CN106412886A (en) * | 2015-08-13 | 2017-02-15 | 大唐半导体设计有限公司 | Method, device and system for secure access of intelligent device to wireless network |
CN106254147A (en) * | 2016-09-08 | 2016-12-21 | 珠海全志科技股份有限公司 | A kind of collocation method for Wi Fi network, internet-of-things terminal and control end |
CN110072267A (en) * | 2018-01-22 | 2019-07-30 | 阿拉的(深圳)人工智能有限公司 | Method, apparatus, storage medium and the intelligent sound box of intelligent sound box networking |
CN109640375A (en) * | 2019-01-23 | 2019-04-16 | 欧普照明股份有限公司 | A kind of smart machine distribution method and system |
CN112261591A (en) * | 2020-09-15 | 2021-01-22 | 哈工大机器人(合肥)国际创新研究院 | Method for rapidly and stably configuring wifi through one key |
Non-Patent Citations (1)
Title |
---|
九霄的爸爸: "airkiss技术原理", 《CSDN》 * |
Also Published As
Publication number | Publication date |
---|---|
CN113473387B (en) | 2022-05-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101066154B1 (en) | Dual mode subscriber unit for short range, high rate and long range, lower rate data communications | |
US11387965B2 (en) | Method for replying with acknowledgement frame, apparatus, and data transmission system | |
CN101552656B (en) | The method of management transmission time interval (tti) bundle transmission and communication device | |
CN102781040B (en) | Concatenated frame structure for data transfer | |
CN102355324A (en) | Frame aggregation control method, device and system | |
CN103748917A (en) | Physical layer frame format for long range wlan | |
CN112261591B (en) | Method for rapidly and stably configuring wifi through one key | |
EP2202903A1 (en) | Method and system for code combining in a communication system | |
CN113473387B (en) | WiFi module network distribution method based on UDP broadcast length coding | |
CN101166186A (en) | Construction method for physical layer frame of OFDM WLAN and its response method | |
CN109981227A (en) | Based on a group HARQ transmission method and control system for communication in scenes of internet of things | |
Dao et al. | Throughput performance of saturated 802.11 g networks | |
CN113329349A (en) | Communication method between mobile terminal and intelligent device in Wi-Fi mode and mobile terminal | |
CN113055353B (en) | Data transmission method, device, equipment and computer readable medium | |
CN109803392A (en) | Data transmission method and device | |
CN111106871B (en) | Data processing method, device, equipment and storage medium | |
CN105992308A (en) | Communication method for data encryption through broadcast frame length under unrelated WIFI environment | |
Galtier | Analysis and optimization of MAC with constant size congestion window for WLAN | |
JP2001309449A (en) | Method for increasing data transmission speed in is-95b system | |
US20010027536A1 (en) | Methods in a communication system | |
CN103997755A (en) | Wireless device signal transmission method and device | |
CN115052252B (en) | OTA (over the air) upgrading method, system and device | |
WO2013107394A1 (en) | Data transmission method and device | |
CN116192341B (en) | PCM/FM code stream transmission method for carrier rocket telemetry system | |
CN107197533A (en) | It is a kind of to be used to solve the method that multinode transmits contention PLC channel resources |
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 |