A wireless device fast network configuration method and system based on independent recording of multiple sub-packets

By splitting the protocol packet into multiple subpackets and performing integrity verification, the problem of slow wireless device distribution speed and low success rate in IoT IOT technology is solved, and fast and accurate wireless device discovery and connection are achieved, which is significantly Improves user experience and reduces costs.

CN111787541BActive Publication Date: 2024-12-03HANGZHOU MIAOLIAN INTERNET OF THINGS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010749674.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-30
Publication Date
2024-12-03
Estimated Expiration
2040-07-30

AI Technical Summary

Technical Problem

In the existing IoT technology, wireless devices have slow network distribution speed and low success rate, especially in multiple WIFI hotspot environments, there are interference and Android phones' automatic switching of WIFI hotspot permissions, resulting in high network distribution failure rate and affecting user experience.

Method used

Using the wireless device accurate discovery method based on serial number packet technology, by broadcasting or multicasting protocol packets to the wireless device, it is divided into multiple sub-packets, each sub-containing check bits and content packets, and completeness checks are performed until all sub-packets After complete, parse and connect to the target wireless hotspot.

Benefits of technology

It significantly improves the speed and success rate of wireless device distribution network, reduces the number of times the router sends protocol packets, reduces the chip frequency requirement, thereby reducing costs and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111787541B_ABST
    Figure CN111787541B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for rapid network configuration of wireless devices based on independent recording of multiple sub-packets. In the existing network configuration process of wireless devices, verification of the entire packet of data is performed, which will reduce the success rate of network configuration. The steps of the present invention are as follows: 1. Broadcast or multicast a protocol data packet to the wireless device; the protocol data packet contains multiple sub-packets. 2. The wireless device receives the protocol data packet; 3. The wireless device receives the protocol data packet again to supplement the missing sub-packets. 4. The wireless device parses the protocol data packet to obtain the encryption value and password of the target wireless hotspot, and matches the encryption value accordingly to obtain the hotspot name and connect to the target wireless hotspot. The wireless device in the present invention checks and filters the multiple sub-packets in the protocol data packet respectively, saves the sub-packets with complete data, and can accurately and completely obtain the protocol data packet after 3-5 rounds of data transmission; the small amount of data in a single sub-packet is effectively utilized, and the speed and success rate of network configuration of the wireless device are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of Internet of Things (IOT), and in particular relates to a method and system for accurately discovering wireless devices based on sequence number packet technology. Background Art

[0002] At present, the Internet of Things (IoT) technical solutions include AP configuration and one-click configuration. In the home or hotel application environment, there are too many wireless device hotspots. Multiple WIFI hotspots in the same environment will interfere with the performance of the router actually used by the user and interfere with the user's choice when using the mobile phone to connect to the hotspot. On the other hand, the AP configuration method will have problems on some Android phones. Specifically, Android phones perform AP configuration and use automatic switching of WIFI hotspots, and then perform communication configuration and authentication. When automatically switching WIFI hotspots, some versions of Android phones cannot obtain the permission to switch WIFI hotspots, which will cause AP configuration failure.

[0003] The one-click network configuration method is implemented in that the mobile phone assembles the router hotspot and router password into a data packet, then sends the data packet to the router and broadcasts it through the router; after the wireless device collects it, the whole packet is verified. If the verification is successful, the router hotspot and password are parsed, and then the module is connected to the router. There are problems with this solution: 1. The sent data packet includes the router and password, and the data packet is too large. 2. Verifying the entire packet data will reduce the success rate of network configuration and extend the network configuration time. There is no network configuration error debugging mechanism. Under normal circumstances, the router needs to send continuously for 10 seconds at a transmission frequency of 20Hz to realize the collection of protocol data packets by wireless devices, and the failure rate is high, which greatly reduces the user experience. Summary of the invention

[0004] The purpose of the present invention is to overcome the defects of slow network configuration speed and low success rate of wireless devices in the prior art, and to provide a method and system for accurately discovering wireless devices based on sequence number packet technology.

[0005] The specific steps of the present invention are as follows:

[0006] Step 1: Broadcast or multicast a protocol data packet to the wireless device; the protocol data packet contains multiple sub-packets, each of which contains a check bit and a content packet.

[0007] Step 2: The wireless device receives the protocol data packet; after receiving the data packet, the wireless device performs integrity check on the N sub-packets in the received protocol data packet, and saves one or more complete sub-packets in the received protocol data packet;

[0008] Step 3: If there are sub-packets missing in the saved data, the wireless device receives the protocol data packet again; after receiving it again, the wireless device performs integrity check again, and saves one or more sub-packets that were missing at the time of the last reception and are received completely this time; this cycle is repeated until there are no more sub-packets missing.

[0009] Step 4: The wireless device parses the protocol data packet, obtains the name and password of the target wireless hotspot, and connects to the target wireless hotspot accordingly.

[0010] Preferably, in step three, each time a protocol data packet is received, only the sub-packets missing as of the last reception are checked for integrity.

[0011] Preferably, each sub-packet includes a sub-packet identification code, a sub-packet check bit, a sequence number and a content package.

[0012] Preferably, in steps two and three, the process of performing integrity check on a sub-packet is as follows: the wireless device calculates a check code according to the sequence number and content package data of the sub-packet according to a preset calculation formula; compares the check code with the check bit recorded in the sub-packet; if the two are consistent, the sub-packet is considered to be complete.

[0013] Preferably, in step one, the protocol data packet is obtained by assembling the encrypted value of the wireless hotspot name and the password by the user client.

[0014] Preferably, the protocol data packet complies with the segmentation mechanism of <main packet> <sub-packet> <end packet>; the content packets in multiple <sub-packets> together constitute the data to be transmitted. In step 1, the method of broadcasting or multicasting the protocol data packet is to broadcast or multicast the main packet, each sub-packet, and the end packet in sequence.

[0015] Preferably, the main packet includes a start packet identifier, a data packet number identifier and a whole packet calibration code;

[0016] Preferably, in step four, the specific process of the wireless device connecting to the target wireless hotspot is as follows: the WIFI module of the wireless device searches for the surrounding wireless hotspots, and filters out a list of surrounding wireless hotspots with the same encrypted value as the parsed wireless hotspot name; and then uses the parsed password value to link to each wireless hotspot on the wireless hotspot list in turn until the wireless device successfully links to one of the wireless hotspots.

[0017] Preferably, in step 1, while broadcasting or multicasting the protocol data packet, the user client connects to the router through UDP to listen and judge whether the network configuration of the wireless device is completed. When the wireless device is connected to the wireless hotspot, the MAC address is sent to the user client through the router. After the broadcast or multicast ends, the user client sends the MAC address of the wireless device to the IoT cloud platform to bind the wireless device to the IoT cloud platform.

[0018] A wireless device rapid network configuration system based on independent recording of multiple sub-packets includes a wireless device and a user mobile terminal. The user mobile terminal is used to assemble a protocol data packet containing multiple sub-packets and control the router to broadcast or multicast the protocol data packet. The wireless device includes a data packet inspection module, a data packet parsing module and a storage module; the data packet inspection module is used to inspect each received sub-packet separately and judge the integrity of each sub-packet separately. The storage module is used to store the sub-packets that have been inspected by the data packet inspection module. The data packet parsing module is used to parse each sub-packet after all sub-packets are saved to obtain the name and password of the wireless hotspot.

[0019] The present invention has the following beneficial effects:

[0020] 1. The wireless device in the present invention checks and screens multiple sub-packets in the protocol data packet respectively, saves the sub-packets with complete data, and can accurately and completely obtain the protocol data packet after 3-5 rounds of data transmission; it effectively utilizes the characteristics of a small amount of data in a single sub-packet and a high success rate of receiving a complete packet, thereby greatly improving the speed and success rate of wireless device network configuration.

[0021] 2. The present invention uses a method of separate verification of sub-packets to reduce the number of times the router sends protocol data packets. At a transmission frequency of 20 Hz, it only takes about 4 seconds for the wireless device to receive the completed protocol data packet. Compared with the existing network configuration method that requires continuous transmission for 10 seconds at a transmission frequency of 20 Hz, the user experience is significantly improved.

[0022] 3. The number of transmissions required by the present invention is extremely small, so compared with the 120MHz chip in the existing Internet of Things module, the wireless device using the present invention can use a chip with a lower main frequency, thereby reducing the cost of the Internet of Things module.

[0023] 4. The user client in the present invention splits the valid information in the protocol data packet into multiple sub-packets for transmission, and sets a flag packet and a sequence number in each sub-packet, so that the wireless device can more conveniently identify whether each sub-packet is complete in combination with the number of data bits. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is a flowchart of the present invention. DETAILED DESCRIPTION

[0025] The present invention will be further described below in conjunction with the accompanying drawings.

[0026] A method for accurately discovering wireless devices based on sequence number packet technology, the specific steps are as follows:

[0027] Step 1: The user client prepares a data packet. The application software of the user client starts to configure the WIFI module in the wireless device (i.e., the IoT device), and assembles a protocol data packet consisting of the encrypted value of the router hotspot name and the password; after the WIFI module obtains the encrypted value of the hotspot name, it scans nearby hotspots, and then calculates the hotspot name with an encryption inverse algorithm as the hotspot name for the connection; the protocol data packet is prepared according to the <main package> <sub-package> <end package> segmentation mechanism. Among them, there are N <sub-packages>, which together record the encrypted value of the name of the router hotspot and the password. In this embodiment, N=14.

[0028] Step 2: The user client cyclically broadcasts or multicasts a hexadecimal protocol data packet to the wireless device through the router: The process of broadcasting or multicasting a protocol data packet is as follows:

[0029] 2-1. The user client broadcasts or multicasts the main packet to the wireless device; the main packet contains the start packet identifier, the number of data packets identifier and the whole packet calibration code; the start packet identifier consists of 1 to 4 bytes (such as FF, FFFF or FFFFFFF, etc.).

[0030] For example, the main packet is FFFFFFFF0F00, where FFFFFFFF is the start packet identifier, used to indicate the start of transmission; 0F is the number of data packets, indicating that there are a total of 0F sub-packets in the protocol data packet to be sent; and 00 is the calibration code for the entire packet.

[0031] 2-2. The user client broadcasts or multicasts the segmented sub-packets to the wireless devices in sequence (a total of N packets);

[0032] The first to third bytes in each sub-packet are the sub-packet identification code, the fourth byte is the sub-packet check bit, the fifth byte is the sequence number, and the sixth byte is the content packet; the content packet is the specific data to be transmitted, which is the sixth byte.

[0033] For example, there are 14 sub-packages in total; the first sub-package is FEFEFE09010A, the second sub-package is FEFEFE09020B, the third sub-package is FEFEFE09030B, the fourth sub-package is FEFEFE09040B, the fifth sub-package is FEFEFE09050B, the sixth sub-package is FEFEFE09060B, the seventh sub-package is FEFEFE09070B, the eighth sub-package is FEFEFE09080B, and the ninth sub-package is FEFEFE 09090B, the tenth sub-packet is FEFEFE090A0B, the eleventh sub-packet is FEFEFE090B0B, the twelfth sub-packet is FEFEFE090C0B, the thirteenth sub-packet is FEFEFE090D0B, and the fourteenth sub-packet is FEFEFE090E0B; among them, the first three bytes FEFEFE are the sub-packet identification code; the fourth byte 09 is the check digit; the fifth byte 01~0E is the sequence number, and the sixth byte is the content package (the content package is 1 byte in this example). The check digit can be calculated according to the sequence number and the content package data of the sub-packet according to the preset calculation formula.

[0034] 2-3. The user client broadcasts or multicasts an end packet to the WIFI module of the wireless device; for example, the end packet is FDFDFDFDFDFD, which is used to indicate the end of sending.

[0035] Step 3, the wireless device receives the packet. The wireless device can receive part of the complete sub-packet content each time, but may not be able to receive the entire sub-packet at one time; therefore, after step 3 is completed, the wireless device receives the protocol data packet, and performs integrity checks on the N sub-packets in the received protocol data packet, screening and saving each complete sub-packet; the process of performing integrity checks on a sub-packet is as follows: the wireless device calculates the check code according to the preset calculation formula based on the sequence number and content packet data of the sub-packet; compares the check code with the check bit recorded in the sub-packet; if the two are consistent, the sub-packet is considered complete and can be saved.

[0036] Afterwards, the sequence numbers of the missing (not saved) sub-packets are obtained according to the data packet number identifier in the main packet and the sequence numbers in the saved sub-packets. If there are missing sub-packets, the wireless device receives the protocol data packet again, and the wireless device performs integrity checks on the partially received sub-packets (i.e., the sub-packets that were not completely received before) according to the sequence numbers of the missing sub-packets, checks, selects, and saves the complete sub-packets; this cycle repeats until there are no more missing sub-packets (i.e., N sub-packets are all checked and saved).

[0037] In most cases, according to the method of this application, the protocol data packets are recorded and saved. After only 3-5 rounds of protocol data packet transmission operations, the wireless device can complete the recording and storage of all sub-packets, so that the wireless device's packet sequence number complete reception degree reaches more than 99%, thereby achieving accurate discovery of wireless devices. When the network is configured using the existing technology, the router needs to send continuously for 10 seconds at a transmission frequency of 20Hz to enable the wireless device to collect the protocol data packet, that is, 160 transmissions are required. Even so, the complete reception degree under the existing technology is still lower than 99% of the present invention. In contrast, with the same transmission frequency, the present invention only takes 4 seconds to complete the transmission and data analysis, which obviously greatly improves the network configuration efficiency of wireless devices.

[0038] In addition, since the number of transmissions required by the present invention is extremely small, compared with the 120MHz chip in the existing Internet of Things module, the wireless device using the present invention can use a chip with a lower main frequency (such as a 60MHz chip), thereby greatly reducing the cost of the Internet of Things module.

[0039] Step 4. The wireless device parses the complete data content package according to the received N sub-packets, including the encryption value and password of the router hotspot of the network configuration; then, the WIFI module of the wireless device searches for the surrounding wireless hotspots, encrypts and calculates the names of the surrounding wireless hotspots during the search process, and selects a list of surrounding wireless hotspots with the same encryption value as the parsed hotspot name; then, the parsed password value is used to link to each wireless hotspot on the wireless hotspot list in turn until the wireless device successfully links to one of the wireless hotspots.

[0040] Step 5: While the user client sends the protocol data packet to the router, it connects to the router through UDP (User Datagram Protocol) to listen and determine whether the wireless device has completed the network configuration. When the wireless device is connected to the wireless hotspot released by the router, the router sends a notification of "device has completed network configuration" to the user client (specifically sending onlineRoutePack, RouteNowPack or configRouteNowPackAck) and the mac address of the wireless device (i.e., the LAN address).

[0041] Step 6: The user client sends the MAC address of the wireless device to the IoT cloud platform, thereby binding the wireless device to the IoT cloud platform.

[0042] Step 7: Network configuration is successful and completed.

Claims

1. A wireless device fast network configuration method based on independent recording of multiple sub-packets, Features: Step 1, broadcast or multicast protocol data packets to wireless devices cyclically; the protocol data packets are obtained by assembling the encrypted value of the wireless hotspot name and the password by the user client; the protocol data packet contains multiple sub-packets; each sub-packet contains a sub-packet identification code, a sub-packet check bit, a sequence number and a content packet; the protocol data packet conforms to the <main packet><sub-packet><end packet> segmentation mechanism; the content packets in multiple <sub-packets> together constitute the data to be transmitted; in step 1, the method of broadcasting or multicasting the protocol data packet is to broadcast or multicast the main packet, each sub-packet, and the end packet in sequence; the main packet contains a start packet identifier, a packet number identifier and a whole packet calibration code; the end packet is used to indicate the end of transmission; Step 2: The wireless device receives the protocol data packet; after receiving the data packet, the wireless device performs integrity check on the N sub-packets in the received protocol data packet, and saves one or more complete sub-packets in the received protocol data packet; The process of integrity check for a sub-packet is as follows: the wireless device calculates a check code according to the sequence number of the sub-packet and the content packet data according to a preset calculation formula; compares the check code with the check bit recorded in the sub-packet; if the two are consistent, the sub-packet is considered to be complete; Step 3: If there are sub-packets missing in the stored data, the wireless device receives the protocol data packet again; after receiving the data packet again, the wireless device performs integrity check again, and saves one or more sub-packets that were missing as of the last reception and are received completely this time; this cycle is repeated until there are no more sub-packets missing; each time a protocol data packet is received, only the sub-packets that were missing as of the last reception are checked for integrity; Step 4: The wireless device parses the protocol data packet, obtains the encrypted value of the target wireless hotspot name and password, and connects to the target wireless hotspot accordingly.

2. A wireless device rapid network configuration method based on independent recording of multiple sub-packets according to claim 1, Features: In step 4, the specific process of the wireless device connecting to the target wireless hotspot is as follows: the WIFI module of the wireless device searches for the surrounding wireless hotspots, and selects a list of surrounding wireless hotspots with the same encrypted value as the parsed wireless hotspot name; and then uses the parsed password value to link to each wireless hotspot on the wireless hotspot list in turn until the wireless device successfully links to one of the wireless hotspots.

3. A wireless device rapid network configuration method based on independent recording of multiple sub-packets according to claim 1, Features: In step 1, while broadcasting or multicasting protocol data packets, the user client connects to the router through UDP to listen and determine whether the wireless device has completed network configuration; when the wireless device is connected to the wireless hotspot, the MAC address is sent to the user client through the router; after the broadcast or multicast ends, the user client sends the MAC address of the wireless device to the IoT cloud platform to bind the wireless device to the IoT cloud platform.