CN111277980B - Pairing method, remote control method, system and device based on WiFi detection request frame - Google Patents

Pairing method, remote control method, system and device based on WiFi detection request frame Download PDF

Info

Publication number
CN111277980B
CN111277980B CN202010069028.6A CN202010069028A CN111277980B CN 111277980 B CN111277980 B CN 111277980B CN 202010069028 A CN202010069028 A CN 202010069028A CN 111277980 B CN111277980 B CN 111277980B
Authority
CN
China
Prior art keywords
random number
pairing
equipment
hash value
key
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
CN202010069028.6A
Other languages
Chinese (zh)
Other versions
CN111277980A (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.)
Hangzhou Tuya Information Technology Co Ltd
Original Assignee
Hangzhou Tuya Information 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 Hangzhou Tuya Information Technology Co Ltd filed Critical Hangzhou Tuya Information Technology Co Ltd
Priority to CN202010069028.6A priority Critical patent/CN111277980B/en
Publication of CN111277980A publication Critical patent/CN111277980A/en
Application granted granted Critical
Publication of CN111277980B publication Critical patent/CN111277980B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C17/00Arrangements for transmitting signals characterised by the use of a wireless electrical link
    • G08C17/02Arrangements for transmitting signals characterised by the use of a wireless electrical link using a radio link
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0822Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using key encryption key
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/50Secure pairing of devices

Abstract

The present invention relates to the field of communications technologies, and in particular, to a pairing method, a remote control method, a system and a device thereof based on WiFi probe request frames. The pairing method comprises the following steps: sending a pairing request; receiving the unique serial number of the equipment, recording the MAC address of the equipment, and transmitting a first random number; receiving a second random number; the control key is encrypted by the key generated by the unique serial number, the first random number and the second random number and then sent; the hash values of the sent unique serial number, the first random number, the second random number and the control key are the first hash value, the hash values of the unique serial number, the first random number, the second random number and the control key received and decrypted by the equipment are the second hash value, and the two hash values are the same in comparison, so that the pairing is successful. The method is convenient for being compatible with old products, and for products which are delivered and have remote upgrading capability, the old products can be controlled by a remote controller by upgrading a protocol supporting the pairing method provided by the invention.

Description

Pairing method, remote control method, system and device based on WiFi detection request frame
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a pairing method, a remote control method, a system and a device thereof based on WiFi probe request frames.
Background
When the Internet of things era does not exist, the lamps in the home can only be controlled through the traditional switch. However, the traditional switch is fixed in position, wiring is required to be installed, and a plurality of inconveniences are caused during use.
A remote control for use with the lamp then appears, which is wire-free and also adds functions such as adjusting brightness, color temperature, etc., but which can also be limited to local control.
With the rapid initiation of the internet of things, many types of WiFi smart home products have appeared on the market, such as: wiFi lamp, wiFi socket etc. after the user joins in marriage the net (i.e. connects the router) equipment, can carry out long-range or local control with cell-phone APP.
There are also lamps of wifi+remote control on the market, but the implementation needs to add additional overhead to the original WiFi device for supporting the local remote control. Such as wifi+bluetooth lights, wifi+infrared remote control lights, where bluetooth and infrared are used for local remote control.
Note that: local control means that the control can be performed only in the vicinity of the device, distance limitation exists, and remote control means that the control can be performed only in the place where the network exists, and the distance is not required to be concerned.
Accordingly, the prior art has the following drawbacks:
1. the traditional switch can only be fixed on a certain wall and is not flexible to use.
Wifi devices need to rely on routers and cannot operate without routers.
3. The mobile app control is not friendly for the elderly.
4. The local remote control requires additional overhead on the WiFi device, which is not beneficial to the compatibility of old products.
Disclosure of Invention
The invention aims to provide a pairing method, a remote control method, a system and a device based on a WiFi detection request frame, which are convenient for being compatible with old products, and for products which are already shipped and have OTA (remote upgrade) capability, the old products can be controlled by a remote controller by upgrading a protocol supporting the pairing method, and if a user needs to use the remote control device, the old products can be purchased.
In order to achieve the above object, a technical solution of a first aspect of the present invention provides a pairing method based on a WiFi probe request frame, including the following steps:
sending a pairing request;
receiving a unique serial number of the equipment responding to the pairing request, simultaneously recording the MAC address of the equipment, and sending a first random number;
receiving a second random number generated by the device upon receipt of the first random number;
the unique serial number, the first random number and the second random number are generated to encrypt a control key and then send the control key;
the sent unique serial number, the first random number, the second random number and the hash value of the control key are first hash values, the hash values of the unique serial number, the first random number, the second random number and the control key received and decrypted by the equipment are second hash values, and the first hash values and the second hash values are the same in comparison, so that pairing is successful.
In some possible embodiments, the method further comprises the step of looking up the device before sending the pairing request.
In some possible embodiments, the device is found by:
scanning channels and recording effective channels;
transmitting a channel request to the effective channel;
and receiving a response signal of the equipment corresponding to the channel request.
In some possible embodiments, the information interacted in the steps of the pairing method is encrypted with an AES shared key.
In some possible embodiments, the device is a controlled device, the number of the controlled devices is more than one, and the main body of the information interacted with the device is the control device.
Further, the control device comprises a remote controller;
the controlled equipment comprises any one or more of a socket, a lamp, an air conditioner and an automatic curtain.
The technical scheme of the second aspect of the invention provides a remote control method for local equipment, which comprises the steps of sending a data packet containing a control instruction to the equipment after the pairing method is successfully adopted;
and the equipment receives the data packet and executes the operation of the control instruction.
Further, the device is more than one, and the device further comprises a step of forwarding the data packet.
The technical scheme of the third aspect of the invention provides a remote control system, which comprises a pairing module;
the pairing module comprises:
a transmitting unit configured to transmit a pairing request;
a random number unit, configured to receive a unique serial number of a device that responds to the pairing request, record an MAC address of the device, and send a first random number;
a receiving unit configured to receive a second random number generated by the device receiving the first random number;
the key unit is used for encrypting the control key by the key generated by the unique serial number, the first random number and the second random number and then sending the control key;
the pairing unit is used for sending the unique serial number, the first random number, the second random number and the hash value of the control key to be a first hash value, the unique serial number, the first random number, the second random number and the hash value of the control key received and decrypted by the equipment to be a second hash value, and the first hash value and the second hash value are compared to be the same, so that the pairing is successful.
In some possible embodiments, the remote control system further comprises a lookup module;
the searching module comprises:
a scanning unit for scanning channels and recording effective channels;
a transmitting unit, configured to transmit a channel request to the effective channel;
and the receiving unit is used for receiving a response signal of the equipment corresponding to the channel request.
The fourth aspect of the present invention provides a storage medium, where the storage medium is configured to store executable instructions, where the executable instructions when executed implement the steps of the pairing method based on WiFi probe request frames.
According to a fifth aspect of the present invention, a remote control device is provided, which includes the remote control system described above.
In some possible embodiments, the remote control device is a remote control.
Further, the remote controller is provided with more than one function key, and each function key controls the state of the paired number of devices.
Compared with the prior art, the invention has the following beneficial effects:
1. the pairing method provided by the invention does not need the participation of a router, directly carries out local control, does not need a complicated network distribution process, and only needs simple pairing.
2. The pairing method provided by the invention can be added to any existing WiFi product, can be independently used, has wide application, and overcomes the defect that original control equipment cannot be used due to the increase of functions.
3. The pairing method provided by the invention automatically forms the group remote control, a plurality of devices can be controlled simultaneously, and the number of paired devices by the remote controller is not limited.
4. According to the invention, the information interaction security level is improved through multistage protection in the information interaction process.
Drawings
The foregoing and/or additional aspects and advantages of the invention will become apparent and may be better understood from the following description of embodiments taken in conjunction with the accompanying drawings in which:
FIG. 1 is a flow diagram of a pairing method based on WiFi probe request frames according to an embodiment of the invention;
fig. 2 is a schematic diagram illustrating a search step in a pairing method based on a WiFi probe request frame according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a pairing method based on a WiFi probe request frame according to an embodiment of the invention;
FIG. 4 shows a block diagram of the pairing module in a remote control system according to an embodiment of the invention;
figure 5 shows another block diagram of the remote control system involved in an embodiment of the present invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will be more clearly understood, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description. It should be noted that, without conflict, the embodiments of the present invention and features in the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those described herein, and the scope of the invention is therefore not limited to the specific embodiments disclosed below.
As shown in fig. 1, an embodiment of the present invention discloses a pairing method based on a WiFi probe request frame, including the following steps:
sending a pairing request;
receiving a unique serial number of the equipment responding to the pairing request, simultaneously recording the MAC address of the equipment, and sending a first random number;
receiving a second random number generated by the device upon receipt of the first random number;
the unique serial number, the first random number and the second random number are generated to encrypt a control key and then send the control key;
the sent unique serial number, the first random number, the second random number and the hash value of the control key are first hash values, the hash values of the unique serial number, the first random number, the second random number and the control key received and decrypted by the equipment are second hash values, and the first hash values and the second hash values are the same in comparison, so that pairing is successful.
According to the pairing method based on the WiFi probe request frame (probe request), provided by the embodiment of the invention, both sides of the interactive information adopt a protocol of WiFi with the probe request frame, and both sides are positioned on the same channel, so that frames transmitted by information interaction between both sides do not need to be interacted directly through a router, namely, the channel of WiFi is utilized.
The first random number and the second random number can be generated according to the external temperature value, the internal temperature value or other data of some sensors, the data are irregular and unpredictable, the generated random numbers are different, and in addition, the random numbers can be true random numbers or pseudo random numbers. And comparing the calculated first hash value with the second hash value, and if the first hash value and the second hash value are the same, passing authentication and successful pairing.
In the invention, two parties of interaction information can be called as a first device and a second device, and the second device is more than one.
The specific steps of the pairing method can be as follows:
the first equipment sends a pairing request to more than one second equipment;
the first device receives the unique serial number sent by the second device, records the MAC address of the second device, generates a first random number and sends the first random number to the second device;
the first device receives a second random number sent by the second device;
the first device encrypts a control key according to the unique serial number, the first random number and the key generated by the second random number and then sends the control key to the second device;
the first device calculates the sent unique serial number, the first random number, the second random number and the hash value of the control key as a first hash value, the second device calculates the received and decrypted unique serial number, the first random number, the second random number and the hash value of the control key as a second hash value, and the first hash value and the second hash value are compared to be the same, so that the first device and the second device are successfully paired.
The specific implementation can be as follows: the first equipment sends a pairing request to the second equipment, the second equipment sends a unique serial number to the first equipment after receiving the pairing request, the first equipment receives the unique serial number and records the MAC address of the second equipment, the first equipment records the MAC address of the second equipment, and the MAC address is used for sending information to the second equipment by the subsequent first equipment; the random numbers generated by the first device and the second device can be generated randomly according to the external temperature value, the internal temperature value or the data of some other sensors, and can be true random numbers or pseudo random numbers; the unique serial number of the second device, the random numbers generated by the first device and the second device are used for encrypting the control key, the first device sends the encrypted control key to the second device, the first device calculates the hash value of the sent unique serial number, the first random number, the second random number and the control key, and the hash value of the unique serial number, the first random number, the second random number and the control key received and decrypted by the second device are compared, and if the hash value is the same, the first device and the second device are successfully paired through authentication.
Further, pairing is completed within a preset time. If the preset time is exceeded, the first device no longer accepts pairing with the second device.
In addition, the protocol of the WiFi with the detection request frame also contains a vendor specific identifier, which is used for customizing data to identify manufacturer information.
The pairing method based on the WiFi detection request frame can be added to any WiFi product, and for a fixed channel, the first equipment and the second equipment are located on the same channel, and the pairing request can be directly sent between the first equipment and the second equipment to carry out subsequent steps so as to finish pairing between the first equipment and the second equipment.
And for the pairing method based on the WiFi detection request frame, which is provided by the invention, the channel is dynamically determined after the first device is connected with the router, and then the first device needs to search first so that the first device and the second device are positioned on the same channel for pairing.
The control key is acted when the first device plays a role in control, and the instruction information sent by the first device can only be controlled by the second device with the control key.
In the present invention, the method of generating the key by the unique serial number, the first random number, and the second random number is not limited, and the arrangement order of the data is not limited. The key generation is mainly used for encrypting the control key, so that the security of information transmission is ensured.
In some possible embodiments, the method further comprises the step of looking up the device before sending the pairing request.
In some possible embodiments, the device is found by:
scanning channels and recording effective channels;
transmitting a channel request to the effective channel;
and receiving a response signal of the equipment corresponding to the channel request.
In the invention, the step of searching the equipment is the step of locking the channel. Scanning channels and recording effective channels, so that the number of the searched channels is reduced by scanning the effective channels first, and the searching of the effective channels is carried out by depending on a WiFi protocol; and then the channel requests are sent to the effective channels one by one, after receiving the response signals sent by the equipment, the channel requests are stopped being sent, the channel is locked, namely, the target channel is found, and then the pairing request can be sent.
For example, the first device scans for 5 available channels nearby according to the WiFi protocol, then the first device sequentially sends channel requests, and if the channel request sent on one channel does not receive a response signal within a preset time, the first device changes to send the channel request on another channel until receiving the response signal.
A specific example is shown in fig. 2. In fig. 2, master: refers to devices with capability control, such as: a remote controller; slaver: refers to a device being controlled, for example: lamps, sockets, etc.
Master scans nearby channels first and records (WiFi 2.4G has 14 channels total);
a master transmits a channel request in the scanned channel;
after receiving the channel request, the slave sends channel response to tell itself the channel where it is really located (two adjacent WiFi channels will also receive data).
In some possible embodiments, the information interacted in the steps of the pairing method is encrypted with an AES shared key.
The interactive data is encrypted by the agreed AES shared key, so that the security of data transmission is improved.
In the invention, the first-stage AES shared key encrypts and protects the interactive data, thereby increasing the security and the cracking difficulty; the control key carried by the control device further causes difficulty in cracking; the control key is dynamically encrypted again, so that the safety is greatly improved; the verification in the pairing process, that is, the first hash value and the second hash value are irreversible, so that the original content cannot be reversely calculated through the hash values, therefore, even if the AES shared key, the dynamic key and the control key are known, a verification method is required, and the pairing can be successfully performed through verification.
In some possible embodiments, the device is a controlled device, the number of the controlled devices is more than one, and the main body of the information interacted with the device is the control device.
In some or some embodiments of the present invention, the first device is a control device, the second device is a plurality of controlled devices, and the control device may control any number of controlled devices, and after pairing is successful, the control device only starts a function button, and responds to the controlled devices to perform a corresponding response.
Of course, the control device in the present invention may control a plurality of controlled devices, which may be the same or different; the control device may also control a plurality of functions of a certain controlled device. The control is performed by the correspondence between the buttons of the control device and the controlled device.
Further, the control device comprises a remote controller;
the controlled equipment comprises any one or more of a socket, a lamp, an air conditioner and an automatic curtain.
Specifically, the specific pairing process is illustrated in fig. 3. Wherein, master: refers to devices with capability control, such as: a remote controller; slaver: refers to a device being controlled, for example: lamps, sockets, etc.
The pairing flow is as follows:
after the master discovers the equipment, starting to send a pairing request;
after receiving the pairing request, the slave sends its own UUID (unique serial number);
after receiving the UUID sent by the slave, the master records the mac address of the slave, generates a Random number RA (Random A), and sends the Random number RA to the slave;
the slave receives the RA and stores the RA and generates a Random number RB (Random B) which is sent to the master;
after the master receives the RB, a key is generated according to the UUID, the RA and the RB, the key is used for encrypting the control keys of the masters, and the control keys of the masters are different;
the master sends the encrypted control key to the slave;
the slave also decrypts the master control key according to RA, RB and UUID;
after the slave calculates the KEY, the hash values of RA, RB, UUID and KEY are calculated and used for authenticating that the pairing is not tampered;
the master calculates hash values of RA, RB, UUID and KEY for comparison with a slave, if the hash values are the same, authentication is transmitted, and if the hash values are failed, the master does not transmit;
and after the slave receives authentication, the slave calculates that the pairing is successful.
In the whole pairing process, an AES key is used for primary protection every time information is sent.
The embodiment of the invention also provides a remote control method of the local equipment, which is used for sending a data packet containing a control instruction to the equipment after the pairing is successful;
and the equipment receives the data packet and executes the operation of the control instruction.
If the first device is a remote controller, the second device is electric lamps, the remote controller totally controls 5 electric lamps, namely 5 electric lamps are paired with the remote controller, and then the remote controller clicks a lamp-on command key, and the 5 electric lamps are lighted.
Further, the device is more than one, and the device further comprises a step of forwarding the data packet.
After receiving the data packet, a certain second device executes the instruction and forwards the data packet to other second devices, so that the data packet can be transmitted farther by forwarding the data packet, and the devices at longer distances can receive the data packet. And the data packet can be provided with a forwarding program and the maximum forwarding times, and forwarding is controlled by a forwarding sequence number, if the data packet is forwarded once after being received, the value in the data packet is correspondingly decremented, and the forwarding value is 0, so that the forwarding is not performed, and the cyclic forwarding is avoided.
In addition, in the control flow, the signal forwarded by the receiving device may consider that the second device receives the data packet successfully.
The embodiment of the invention also provides a remote control system, which comprises a pairing module;
as shown in fig. 4, the pairing module includes:
a transmitting unit configured to transmit a pairing request;
a random number unit, configured to receive a unique serial number of a device that responds to the pairing request, record an MAC address of the device, and send a first random number;
a receiving unit configured to receive a second random number generated by the device receiving the first random number;
the key unit is used for encrypting the control key by the key generated by the unique serial number, the first random number and the second random number and then sending the control key;
the pairing unit is used for sending the unique serial number, the first random number, the second random number and the hash value of the control key to be a first hash value, the unique serial number, the first random number, the second random number and the hash value of the control key received and decrypted by the equipment to be a second hash value, and the first hash value and the second hash value are compared to be the same, so that the pairing is successful.
According to the remote control system provided by the embodiment of the invention, both parties of the interactive information adopt a protocol of WiFi with a detection request frame, and both parties are positioned on the same channel, so that frames transmitted by information interaction between both parties do not need to pass through a router, namely, the channel of WiFi is utilized to directly interact. In addition, various keys and verification modes are added in the exchange of the interactive information, so that the safety and effectiveness of information transmission are improved.
As shown in fig. 5, in some possible embodiments, the remote control system further comprises a lookup module;
the searching module comprises:
a scanning unit for scanning channels and recording effective channels;
a transmitting unit, configured to transmit a channel request to the effective channel;
and the receiving unit is used for receiving a response signal of the equipment corresponding to the channel request.
In the invention, the searching module is used for searching the equipment, namely, performing channel locking. The scanning unit records effective channels, so that the number of the search channels is reduced by scanning the effective channels first; the sending unit and the receiving unit are used for locking the target channel; the subsequent pairing step may then be performed.
Based on the above method shown in fig. 1 to 3, correspondingly, the embodiment of the present invention further provides a storage medium, where the storage medium is used to store executable instructions, where the executable instructions implement the steps of the pairing method based on WiFi probe request frames.
Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which may be stored on an electronic device executing the method of the various implementation scenarios of the present invention. Other modules may also be included in the storage medium.
The remote control system provided by the invention can be directly added to the existing electronic product, and can also be independently used.
The embodiment of the invention also provides a remote control device which comprises the remote control system.
In some possible embodiments, the remote control device is a remote control.
Further, the remote controller is provided with more than one function key.
According to the remote controller provided by the invention, a certain function key can correspondingly control the states of a certain pairing number of second devices, and can also control different functions.
Further, each function key controls the state of the paired number of devices.
Based on the defects of the existing products, the protocol of the pairing or remote control method provided by the invention is directly based on WiFi to realize local remote control, wiFi remote control interaction does not need to depend on a router, only simple pairing is needed, and if the original equipment supports WiFi remote control, no additional change is needed on hardware, only the protocol is needed to be supported on software, so that the equipment supports not only mobile phone APP remote or local control, but also WiFi remote control direct control.
It should be noted that, according to the present invention, the preset time is set according to different nodes, and the preset time is counted from the start or the completion of the last program, and the length of the preset time is selected according to the actual requirement, and may be several milliseconds, several seconds, or several minutes. The preset times involved in the different steps of the invention may be the same or different.
In the present invention, the terms "first," "second," "third," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance; the term "plurality" means two or more, unless expressly defined otherwise. The terms "mounted," "connected," "secured," and the like are all intended to be broadly interpreted, as for example, "connected" may be either permanently connected, detachably connected, integrally connected, or virtually connected; "coupled" may be directly coupled or indirectly coupled through intermediaries. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art according to the specific circumstances.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and apparatus according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In the description of the present specification, the terms "one embodiment," "some embodiments," "particular embodiments," and the like, mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. The pairing method based on the WiFi detection request frame is characterized by comprising the following steps of:
sending a pairing request;
receiving a unique serial number of the equipment responding to the pairing request, simultaneously recording the MAC address of the equipment, and sending a first random number;
receiving a second random number generated by the device upon receipt of the first random number;
the unique serial number, the first random number and the second random number generate a secret key, encrypt a control secret key and then send the control secret key to the equipment;
and taking the transmitted first random number, the control key, the received unique serial number and the received hash value of the second random number as a first hash value, taking the hash value of the control key received and decrypted by the unique serial number, the first random number, the second random number and the equipment as a second hash value, and comparing the first hash value with the second hash value to be the same, thereby successfully pairing.
2. The WiFi probe request frame based pairing method according to claim 1, further comprising the step of looking up the device before sending a pairing request;
further, the device is found by:
scanning channels and recording effective channels;
transmitting a channel request to the effective channel;
and receiving a response signal of the equipment corresponding to the channel request.
3. The pairing method based on WiFi probe request frames according to claim 1, wherein the information interacted in the steps of the pairing method is encrypted by AES shared key.
4. The pairing method based on the WiFi probe request frame according to any one of claims 1 to 3, wherein the device is a controlled device, the number of the controlled devices is more than one, and a main body of information interacted with the device is a control device;
further, the control device comprises a remote controller;
the controlled equipment comprises any one or more of a socket, a lamp, an air conditioner and an automatic curtain.
5. A method for remote control of local equipment, characterized in that after successful pairing by adopting the pairing method according to any one of claims 1-4, a data packet containing a control instruction is sent to the equipment;
and the equipment receives the data packet and executes the operation of the control instruction.
6. The method of remote control of a local device according to claim 5, wherein said device is one or more devices, said device further comprising the step of forwarding said data packets.
7. A remote control system comprising a pairing module;
the pairing module comprises:
a transmitting unit configured to transmit a pairing request;
a random number unit, configured to receive a unique serial number of a device that responds to the pairing request, record an MAC address of the device, and send a first random number;
a receiving unit configured to receive a second random number generated by the device receiving the first random number;
the key unit is used for encrypting a control key by the key generated by the unique serial number, the first random number and the second random number and then sending the control key to the equipment;
and the pairing unit is used for taking the transmitted first random number, the control key, the received unique serial number and the received hash value of the second random number as a first hash value, taking the hash value of the control key received and decrypted by the unique serial number, the first random number, the second random number and the equipment as a second hash value, and comparing the first hash value with the second hash value to be the same, thereby successfully pairing.
8. The remote control system of claim 7, further comprising a lookup module;
the searching module comprises:
a scanning unit for scanning channels and recording effective channels;
a transmitting unit, configured to transmit a channel request to the effective channel;
and the receiving unit is used for receiving a response signal of the equipment corresponding to the channel request.
9. A storage medium storing executable instructions which when executed implement the steps of the WiFi probe request frame based pairing method of any one of claims 1-4.
10. A remote control device comprising the remote control system of claim 7 or 8;
further, the remote control device is a remote controller;
further, the remote controller is provided with more than one function key, and each function key controls the state of the paired number of devices.
CN202010069028.6A 2020-01-21 2020-01-21 Pairing method, remote control method, system and device based on WiFi detection request frame Active CN111277980B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010069028.6A CN111277980B (en) 2020-01-21 2020-01-21 Pairing method, remote control method, system and device based on WiFi detection request frame

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010069028.6A CN111277980B (en) 2020-01-21 2020-01-21 Pairing method, remote control method, system and device based on WiFi detection request frame

Publications (2)

Publication Number Publication Date
CN111277980A CN111277980A (en) 2020-06-12
CN111277980B true CN111277980B (en) 2023-09-26

Family

ID=71001900

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010069028.6A Active CN111277980B (en) 2020-01-21 2020-01-21 Pairing method, remote control method, system and device based on WiFi detection request frame

Country Status (1)

Country Link
CN (1) CN111277980B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111901122B (en) * 2020-07-14 2024-03-08 万通智控科技股份有限公司 Method for automatically matching head trailer and receiver
CN112270824B (en) * 2020-10-22 2022-06-03 尚科宁家(中国)科技有限公司 Pairing request terminal, random code-based remote control system and control method thereof
CN112929988A (en) * 2021-03-23 2021-06-08 上海商汤临港智能科技有限公司 Pairing method and device for vehicle-mounted equipment, electronic equipment and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101242323A (en) * 2007-02-06 2008-08-13 华为技术有限公司 Establishment method and home network system for pipes between devices
CN102387501A (en) * 2010-08-30 2012-03-21 苹果公司 Secure wireless link between two devices using probes
CN102868673A (en) * 2011-07-04 2013-01-09 索尼公司 Communication apparatus, communication method, service offering apparatus, service offering method, coordination apparatus, coordination method
CN103532713A (en) * 2012-07-04 2014-01-22 中国移动通信集团公司 Sensor authentication and sharing key generating method, sensor authentication and sharing key generating system and sensor
CN105009618A (en) * 2013-04-28 2015-10-28 华为终端有限公司 Method, device and system for configuring wireless terminal
CN105933039A (en) * 2016-06-24 2016-09-07 飞天诚信科技股份有限公司 Bluetooth device and working method of the Bluetooth device
CN106487767A (en) * 2015-08-31 2017-03-08 阿里巴巴集团控股有限公司 The update method of checking information and device
CN107969001A (en) * 2018-01-17 2018-04-27 飞天诚信科技股份有限公司 A kind of method and device of Bluetooth pairing two-way authentication
KR20180068537A (en) * 2016-12-14 2018-06-22 (주)네오와인 Encryption and decryption system using unique serial number and symmetric cryptography
WO2019168476A1 (en) * 2018-03-02 2019-09-06 Nitto Denko Corporation Device pairing system and method, and device communication control system and method
CN110492995A (en) * 2019-07-25 2019-11-22 惠州市德赛西威智能交通技术研究院有限公司 A kind of key exchange method for vehicle electronic control unit communication

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009145733A1 (en) * 2008-05-28 2009-12-03 Agency For Science, Technology And Research Authentication and key establishment in wireless sensor networks
US10382206B2 (en) * 2016-03-10 2019-08-13 Futurewei Technologies, Inc. Authentication mechanism for 5G technologies

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101242323A (en) * 2007-02-06 2008-08-13 华为技术有限公司 Establishment method and home network system for pipes between devices
CN102387501A (en) * 2010-08-30 2012-03-21 苹果公司 Secure wireless link between two devices using probes
CN102868673A (en) * 2011-07-04 2013-01-09 索尼公司 Communication apparatus, communication method, service offering apparatus, service offering method, coordination apparatus, coordination method
CN103532713A (en) * 2012-07-04 2014-01-22 中国移动通信集团公司 Sensor authentication and sharing key generating method, sensor authentication and sharing key generating system and sensor
CN105009618A (en) * 2013-04-28 2015-10-28 华为终端有限公司 Method, device and system for configuring wireless terminal
CN106487767A (en) * 2015-08-31 2017-03-08 阿里巴巴集团控股有限公司 The update method of checking information and device
CN105933039A (en) * 2016-06-24 2016-09-07 飞天诚信科技股份有限公司 Bluetooth device and working method of the Bluetooth device
KR20180068537A (en) * 2016-12-14 2018-06-22 (주)네오와인 Encryption and decryption system using unique serial number and symmetric cryptography
CN107969001A (en) * 2018-01-17 2018-04-27 飞天诚信科技股份有限公司 A kind of method and device of Bluetooth pairing two-way authentication
WO2019168476A1 (en) * 2018-03-02 2019-09-06 Nitto Denko Corporation Device pairing system and method, and device communication control system and method
CN110492995A (en) * 2019-07-25 2019-11-22 惠州市德赛西威智能交通技术研究院有限公司 A kind of key exchange method for vehicle electronic control unit communication

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Fan Yu Tao.Design of Two-Way One-Time-Password Authentication Scheme Based on True Random Numbers.2009 Second International Workshop on Computer Science and Engineering.2009,全文. *
刘海峰 ; 白群 ; 侯再恩 ; .物联网中基于动态密钥轻量级RFID认证协议.现代电子技术.2017,(23),全文. *
王春东 ; 白仪 ; 莫秀良 ; 朱远文 ; .基于物联网的身份双向认证机制研究.南开大学学报(自然科学版).2016,(02),全文. *

Also Published As

Publication number Publication date
CN111277980A (en) 2020-06-12

Similar Documents

Publication Publication Date Title
CN111277980B (en) Pairing method, remote control method, system and device based on WiFi detection request frame
CN108965218B (en) Controller area network bus secure communication method, device and system
US7987499B2 (en) Method and system for exchanging setup configuration protocol information in beacon frames in a WLAN
KR101740957B1 (en) Data certification and acquisition method for vehicle
KR100709622B1 (en) Method for device registration in a wireless home network
TWI778171B (en) Method and system for connecting network hotspot devices to network devices to be distributed
KR101413376B1 (en) Method for sharing link key in zigbee communication network and communication system therefor
US7657930B2 (en) System and method for configuring a device using remote controller
US20060129837A1 (en) Security device for home network and security configuration method thereof
CN108476140B (en) Method for safely controlling smart home and terminal equipment
KR20130083619A (en) Data certification and acquisition method for vehicle
WO2018214487A1 (en) Secure communication method, apparatus and system for controller area network bus
US11019489B2 (en) Automatically connecting to a secured network
CN105263141A (en) Household electrical appliance and control method thereof
US20190306714A1 (en) Method and system for accessing wireless network by smart device
EP1645934B1 (en) Apparatus, system and method for providing security service in home network
US20190229898A1 (en) Electronic apparatus, terminal apparatus and method of controlling the same
CN112737902A (en) Network configuration method and device, storage medium and electronic equipment
JP5370989B2 (en) COMMUNICATION DEVICE, DATA COMMUNICATION METHOD, AND NETWORK SYSTEM
WO2021259015A1 (en) Method for connecting bluetooth key to vehicle, vehicle bluetooth system, and bluetooth key
CN110138805B (en) Equipment authentication method and device and computer readable storage medium
CN112512064B (en) Wireless distribution network method, wireless gateway and equipment to be accessed
CN114390521A (en) Key updating method, device, equipment and storage medium
CN113434837B (en) Method and device for equipment identity authentication and smart home system
US10841085B2 (en) Method for generating a secret or a key in a network

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