Movatterモバイル変換


[0]ホーム

URL:


CN114554460A - WiFi device connection method and device, terminal device and readable storage medium - Google Patents

WiFi device connection method and device, terminal device and readable storage medium
Download PDF

Info

Publication number
CN114554460A
CN114554460ACN202111676211.3ACN202111676211ACN114554460ACN 114554460 ACN114554460 ACN 114554460ACN 202111676211 ACN202111676211 ACN 202111676211ACN 114554460 ACN114554460 ACN 114554460A
Authority
CN
China
Prior art keywords
probe request
wifi
connection method
slave
specific field
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.)
Pending
Application number
CN202111676211.3A
Other languages
Chinese (zh)
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.)
Xiamen Yealink Network Technology Co Ltd
Original Assignee
Xiamen Yealink Network Technology 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 Xiamen Yealink Network Technology Co LtdfiledCriticalXiamen Yealink Network Technology Co Ltd
Priority to CN202111676211.3ApriorityCriticalpatent/CN114554460A/en
Publication of CN114554460ApublicationCriticalpatent/CN114554460A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

The invention discloses a WiFi device connection method, a WiFi device connection device, terminal equipment and a readable storage medium, wherein the method comprises the following steps: receiving probe request messages sent by a plurality of surrounding slave machines, wherein specific fields are added in the probe request messages; and analyzing the specific field to identify a target slave machine, and performing wireless connection with the target slave machine. According to the WiFi equipment connection method provided by the invention, the host can receive the probe Request message periodically sent by the slave while the slave is powered on, and then wireless connection is carried out by identifying and analyzing the specific field in the message. The invention overcomes the defects of easy password leakage and complex operation in the existing connection method, and has the advantages of high safety, simple operation, convenient management and the like.

Description

WiFi device connection method and device, terminal device and readable storage medium
Technical Field
The invention relates to the technical field of internet, in particular to a WiFi device connection method, a WiFi device connection device, a terminal device and a readable storage medium.
Background
With the great increase of mobile STA devices, WiFi technology is widely applied by virtue of its flexibility and mobility in network construction, device access, data communication, and the like. Among them, WiFi is a technology that allows an electronic device to perform wireless connection, and the connection mode thereof is generally divided into two types: one is a connection mode with password protection; the other is open, i.e. capable of allowing any device within signal coverage to be connected.
However, for internet of things (IoT) devices without a screen, such as smart sockets, there is always a more complicated WiFi connection configuration problem, i.e. how to let smart sockets receive the name (SSID) and password of an AP, the prior art generally uses software (WeChat Airkiss, SmartConfig) to make smart sockets listen to unencrypted fields of broadcast or multicast messages by putting the SSID and password into these unencrypted fields, and then compose the SSID and password. However, the WiFi connection method is not only insecure, and is easy to be stolen due to password cracking, but also needs to rely on configuration software, so that the configuration process is complicated, and the problem of connection failure is easy to occur, thereby affecting the efficiency of WiFi connection.
Disclosure of Invention
The invention aims to provide a WiFi device connection method, a WiFi device connection device, terminal equipment and a readable storage medium, and aims to solve the problems of low safety and complex operation of Internet of things equipment during WiFi connection.
In order to achieve the above object, the present invention provides a WiFi device connection method, applied to a host, including:
receiving probe request messages sent by a plurality of surrounding slave machines, wherein specific fields are added in the probe request messages;
and analyzing the specific field to identify a target slave machine, and performing wireless connection with the target slave machine.
Further, it is preferable that the specific field is added to an nth byte of frambdy in the probe request message.
Further, it is preferable that N is an integer and satisfies 1. ltoreq. N.ltoreq.1000.
The invention also provides a WiFi equipment connection method, which is applied to the slave machines and comprises the following steps:
sending a probe request message to surrounding hosts, wherein a specific field is added in the probe request message;
and after the target host analyzes the specific field and identifies the slave, the slave is wirelessly connected with the target host.
Further, it is preferable that the specific field is added to an nth byte of frambdy in the probe request message.
Further, it is preferable that N is an integer and satisfies 1. ltoreq. N.ltoreq.1000.
The invention also provides a WiFi equipment connecting device, which is applied to a host and comprises:
the device comprises a receiving unit, a sending unit and a receiving unit, wherein the receiving unit is used for receiving probe request messages sent by a plurality of peripheral slave machines, and specific fields are added in the probe request messages;
and the analysis unit is used for analyzing the specific field to identify a target slave machine and carrying out wireless connection with the target slave machine.
The invention also provides a WiFi equipment connecting device, which is applied to a slave computer and comprises:
the device comprises a sending unit, a receiving unit and a sending unit, wherein the sending unit is used for sending a probe request message to surrounding hosts, and a specific field is added in the probe request message;
and the connection unit is used for performing wireless connection with the target host after the target host analyzes the specific field and identifies the slave.
The present invention also provides a terminal device, including:
one or more processors;
a memory coupled to the processor for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the WiFi device connection method of any of the above.
The present invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a WiFi device connection method as described in any one of the above.
Compared with the prior art, the invention has the beneficial effects that:
the invention discloses a WiFi device connection method, a WiFi device connection device, terminal equipment and a readable storage medium, wherein the method comprises the following steps: receiving probe request messages sent by a plurality of surrounding slave machines, wherein specific fields are added in the probe request messages; and analyzing the specific field to identify a target slave machine, and performing wireless connection with the target slave machine.
According to the WiFi equipment connection method provided by the invention, the host can receive the probe Request message periodically sent by the slave while the slave is powered on, and then wireless connection is carried out by identifying and analyzing the specific field in the message. The invention overcomes the defects of easy password leakage and complex operation in the existing connection method, and has the advantages of high safety, simple operation, convenient management and the like.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings needed to be used in the embodiments will be briefly described 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 that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart illustrating a WiFi device connection method applied to a host according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a WiFi device connection method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a format of a probe Request message frame according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a WiFi device connection method applied to a slave according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a WiFi device connection apparatus applied to a host according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a WiFi device connection apparatus applied to a slave according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, 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 understood that the step numbers used herein are for convenience of description only and are not intended as limitations on the order in which the steps are performed.
It is to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
The terms "comprises" and "comprising" indicate the presence of the described features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
The term "and/or" refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1, an embodiment of the invention provides a WiFi device connection method applied to a host. As shown in fig. 1, the WiFi device connection method includes steps S10 and S20. The concrete contents of each step are as follows:
s10, receiving probe request messages sent by a plurality of peripheral slaves, wherein the probe request messages are added with specific fields.
And S20, resolving the specific field to identify a target slave machine, and performing wireless connection with the target slave machine.
It should be noted that, when there is an internet of things (IoT) device supporting WiFi in a space, such as a smart socket, it is assumed that any device in the local area network wants to find the IoT device, if the IoT device must be involved in the local area network; thus, if an IoT device fails to intervene in a local area network, other devices cannot discover this IoT device and thus cannot connect with it. Furthermore, since the smart socket usually does not have a screen, if the smart socket is enabled to receive the name (SSID) and password of the AP, software (WeChat Airkiss, SmartConfig) must be used to make the smart socket listen to the unencrypted fields of the broadcast or multicast message by putting the SSID and password into these unencrypted fields, and then compose the SSID and password. Therefore, the existing WiFi connection mode for the IoT device is not only low in security and prone to generate password leakage problem, but also cannot be identified when the device is not involved in the local area network. Therefore, the present embodiment aims to provide a WiFi connection method that is secure, reliable, simple to operate, and also suitable for IoT devices that do not access the local area network.
Specifically, the operation principle of the present embodiment is as shown in fig. 2. As shown in fig. 2, after WiFi is turned on, any IoT device with WiFi function sends a probe request message to search all wireless access points ap (access points). All WiFi devices may receive the ProbeRequest message, and the IoT device only needs to add a specific field in the ProbeRequest message, and after receiving the ProbeRequest message, other WiFi devices may analyze the specific field, and may sense that a specific IoT device is nearby, thereby discovering the specific IoT device. Therefore, in one embodiment, a specific field is added to the nth byte of the franbody in the ProbeRequest message. Wherein N is an integer and satisfies 1-1000.
It should be noted that the format of the ProbeRequest frame belongs to a management frame, which follows the general format of the management frame, wherein the structure of the format of the ProbeRequest frame is shown in fig. 3. Wherein, the FrameControl size is fixed to 0x0100, and the 0x0100 can be identified as the ProbeRequest message. In FrameBody, information such as a support rate is generally included. Where FrameBody does not specify 2312 bytes of content, the content is optional. Generally, the FrameBody of the ProbeRequest does not exceed 100 bytes. It is therefore only necessary to add specific fields such as "fixed 0x 3137", "Vendor ID", "ProductId" starting at the nth byte of the framebody (N may be any number of bytes greater than normal information, 0-1000). The format of the added field is shown in the following table:
table 1 ProbeRequest message with specific fields added
Figure BDA0003451387690000061
Therefore, when the present embodiment executes step S10, the master only needs to receive probe request messages sent by multiple peripheral slaves, and then analyzes the specific field in step S20, so as to identify the target slave and wirelessly connect to the target slave.
In summary, the WiFi device connection method provided in the embodiment of the present invention overcomes the defects of easy password leakage and complex operation in the existing connection method, and has the advantages of high security, simple operation, and convenient management.
Referring to fig. 4, an embodiment of the present invention further provides a WiFi device connection method applied to a slave, including:
s30, sending a probe request message to surrounding hosts, wherein a specific field is added in the probe request message;
and S40, after the target host analyzes the specific field and identifies the slave, the slave is wirelessly connected with the target host.
Further, the specific field is added to the nth byte of frambdy in the probe request message. N is an integer and satisfies that N is more than or equal to 1 and less than or equal to 1000.
Referring to fig. 5, an embodiment of the present invention further provides a WiFi device connection apparatus, applied to a host, including:
the receivingunit 01 is configured to receive probe request messages sent by multiple peripheral slaves, where a specific field is added to the probe request messages;
and the analyzingunit 02 is used for analyzing the specific field to identify a target slave and performing wireless connection with the target slave.
Referring to fig. 6, an embodiment of the present invention further provides a WiFi device connection apparatus, applied to a slave, including:
a sendingunit 03, configured to send a probe request message to a peripheral host, where a specific field is added to the probe request message;
and theconnection unit 04 is configured to perform wireless connection with the target host after the target host parses the specific field and identifies the slave.
In summary, the WiFi device connection apparatus provided in the embodiments of the present invention overcomes the defects of easy password leakage and complex operation in the existing connection method, and has the advantages of high security, simple operation, and convenient management.
Referring to fig. 7, an embodiment of the present invention provides a terminal device, including:
one or more processors;
a memory coupled to the processor for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the WiFi device connection method as described above.
The processor is used for controlling the overall operation of the terminal device so as to complete all or part of the steps of the WiFi device connection method. The memory is used to store various types of data to support operation at the terminal device, and these data may include, for example, instructions for any application or method operating on the terminal device, as well as application-related data. The Memory may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk.
In an exemplary embodiment, the terminal Device may be implemented by one or more Application Specific 1 integrated circuits (AS 1C), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a controller, a microcontroller, a microprocessor, or other electronic components, and is configured to perform the WiFi Device connection method according to any one of the above embodiments, and achieve the technical effects consistent with the above methods.
In another exemplary embodiment, a computer readable storage medium is also provided, which comprises a computer program, which when executed by a processor, performs the steps of the WiFi device connection method as described in any one of the above embodiments. For example, the computer readable storage medium may be the above-mentioned memory including a computer program, which can be executed by a processor of a terminal device to implement the WiFi device connection method according to any of the above-mentioned embodiments, and achieve the technical effects consistent with the above-mentioned methods.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (10)

1. A WiFi device connection method is applied to a host and is characterized by comprising the following steps:
receiving probe request messages sent by a plurality of surrounding slave machines, wherein specific fields are added in the probe request messages;
and analyzing the specific field to identify a target slave machine, and performing wireless connection with the target slave machine.
2. The WiFi device connection method of claim 1, characterized in that, the nth byte of frambdy in the probe request message is added with the specific field.
3. The WiFi device connection method of claim 2, wherein N is an integer and satisfies 1. ltoreq. N.ltoreq.1000.
4. A WiFi device connection method is applied to a slave computer and is characterized by comprising the following steps:
sending a probe request message to surrounding hosts, wherein a specific field is added in the probe request message;
and after the target host analyzes the specific field and identifies the slave, performing wireless connection with the target host.
5. The WiFi device connection method of claim 4, wherein the specific field is added to an Nth byte of FramBody in the probe request message.
6. The WiFi device connection method of claim 5, wherein N is an integer and satisfies 1. ltoreq. N.ltoreq.1000.
7. The utility model provides a wiFi equipment connecting device, is applied to the host computer, its characterized in that includes:
the device comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving probe request messages sent by a plurality of peripheral slave machines, and specific fields are added in the probe request messages;
and the analysis unit is used for analyzing the specific field to identify a target slave machine and carrying out wireless connection with the target slave machine.
8. A WiFi equipment connecting device is applied to a slave computer and is characterized by comprising:
the device comprises a sending unit, a receiving unit and a sending unit, wherein the sending unit is used for sending a probe request message to surrounding hosts, and a specific field is added in the probe request message;
and the connection unit is used for performing wireless connection with the target host after the target host analyzes the specific field and identifies the slave.
9. A terminal device, comprising:
one or more processors;
a memory coupled to the processor for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the WiFi device connection method of any of claims 1-6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the WiFi device connection method of any one of claims 1-6.
CN202111676211.3A2021-12-312021-12-31WiFi device connection method and device, terminal device and readable storage mediumPendingCN114554460A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202111676211.3ACN114554460A (en)2021-12-312021-12-31WiFi device connection method and device, terminal device and readable storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202111676211.3ACN114554460A (en)2021-12-312021-12-31WiFi device connection method and device, terminal device and readable storage medium

Publications (1)

Publication NumberPublication Date
CN114554460Atrue CN114554460A (en)2022-05-27

Family

ID=81670228

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202111676211.3APendingCN114554460A (en)2021-12-312021-12-31WiFi device connection method and device, terminal device and readable storage medium

Country Status (1)

CountryLink
CN (1)CN114554460A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
KR101502991B1 (en)*2014-07-222015-03-16(주)디지파츠Automatic cognitive-linkage system using scanning and method thereof
CN109219042A (en)*2018-10-312019-01-15全讯汇聚网络科技(北京)有限公司Wireless network automatically accesses method and system
CN110809308A (en)*2019-09-292020-02-18上海商米科技集团股份有限公司 A method and device for automatic connection between an IOT device and a WIFI router
CN112218282A (en)*2020-10-232021-01-12珠海格力电器股份有限公司Network distribution method and related device of Internet of things equipment
CN113613211A (en)*2021-07-302021-11-05中汽创智科技有限公司Method and device for automatically connecting WiFi hotspot by vehicle-mounted equipment, storage medium and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
KR101502991B1 (en)*2014-07-222015-03-16(주)디지파츠Automatic cognitive-linkage system using scanning and method thereof
CN109219042A (en)*2018-10-312019-01-15全讯汇聚网络科技(北京)有限公司Wireless network automatically accesses method and system
CN110809308A (en)*2019-09-292020-02-18上海商米科技集团股份有限公司 A method and device for automatic connection between an IOT device and a WIFI router
CN112218282A (en)*2020-10-232021-01-12珠海格力电器股份有限公司Network distribution method and related device of Internet of things equipment
CN113613211A (en)*2021-07-302021-11-05中汽创智科技有限公司Method and device for automatically connecting WiFi hotspot by vehicle-mounted equipment, storage medium and terminal

Similar Documents

PublicationPublication DateTitle
US9445286B2 (en)Protocol version negotiation method, mobile terminal, base station and communications system
US9420631B2 (en)WLAN peer-to-peer group owner negotiation
CN110032512B (en)Debugging method of small program, related equipment and terminal
CN110324193B (en) A terminal upgrade management method and device
WO2006135872A2 (en)Establishing wireless universal serial bus (wusb) connection via a trusted medium
CN112449341B (en)IoT (Internet of things) equipment data management method, device and system
CN110740490A (en)Terminal network access method, gateway equipment, system, storage medium and device
AU2022291604B2 (en)Terminal configuration method and apparatus
CN110635957B (en)Method and device for network distribution of Internet of things equipment and mobile terminal
CN105188056A (en)Method and device for connecting WiFi (Wireless Fidelity) equipment with access point
CN111163469A (en)Network distribution method of intelligent household appliance, wireless module and intelligent household appliance
CN106507501A (en) A bluetooth connection method and device
CN105827463A (en)Method, device and system for configuring business of client
CN117221868A (en)Network registration method, device and readable storage medium
CN111586691A (en)Method and device for configuring wireless connection and wireless connectable equipment
CN113992739B (en) A local area network OTA firmware upgrade device, method and system
CN101772056A (en)Method and system for managing multi-mode network element and multi-mode network element
CN107708142B (en)Grouping method, device and system for access device AP
CN107708141B (en) A wireless network scanning method, mobile terminal and storage medium
CN106027294A (en)Firmware loading method and system for terminal network access
CN114554460A (en)WiFi device connection method and device, terminal device and readable storage medium
CN105162849B (en)Intelligent camera device and its suspension access control method
WO2019232677A1 (en)Permission management method, system, mobile terminal, shared charging device, and server
CN110278558B (en)Message interaction method and WLAN system
WO2015077979A1 (en)Maintenance management method and device, and device maintenance system

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp