A configuration-free secure pairing method for WiFi devices based on custom management frames
By using a custom management frame to complete device discovery and key negotiation within the WiFi driver, the problem of long WiFi device pairing time and insufficient security is solved, enabling fast, secure, and configuration-free device pairing, which is suitable for screenless embedded devices.
Patent Information
- Application Number
- CN202611309693.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-27
- Publication Date
- 2026-11-17
AI Technical Summary
Existing WiFi device pairing solutions suffer from problems such as cumbersome operation, long time consumption, insufficient security, and the need for additional hardware or reliance on large user space components. In particular, there is a lack of fast, secure, and configuration-free pairing methods in embedded devices without screens or keyboards.
Device discovery, pairing intent confirmation, and security key negotiation are completed within the WiFi driver using a custom management frame. By generating a temporary asymmetric key pair, device identification and key negotiation are performed using a custom IEEE 802.11 management frame, enabling fast pairing without 802.11 authentication and association.
It enables quick pairing without configuration information, with pairing time in less than a few seconds, features forward security to avoid the impact of key leakage, and requires no additional hardware costs, making it suitable for screenless devices.
Smart Images

Figure CN123124124A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to embedded multimedia products, and more particularly to a configuration-free secure pairing method for WiFi devices based on a custom management frame. Background Technology
[0002] Before WiFi devices can be put into operation, they need to be paired, which involves establishing a shared password for an encrypted wireless link. Existing pairing schemes have the following shortcomings: The Wi-Fi Alliance's WPS (Wi-Fi Protected Setup) pairing specification includes two methods: button pairing (PBC) and PIN pairing. Button pairing has a waiting window of up to 120 seconds. After discovering the other end, it requires exchanging eight registration protocol messages (M1 to M8) and performing multiple public key calculations, meaning actual pairing typically takes ten to several tens of seconds. Furthermore, WPS only issues credentials; after successful pairing, the devices still need to perform the complete 802.11 association and four-way handshake process to establish an encrypted link, making the overall process even more time-consuming. PIN pairing has a recognized security vulnerability: the WPS PIN is only 8 digits, and its segmented verification protocol flaw allows attackers to brute-force their way through the PIN space to gain network access within hours. This method is widely considered insecure and is disabled by default in most modern operating systems (see Viehbock, S., "Brute forcing Wi-Fi Protected Setup", 2011). The button-based method offers insufficient protection for credentials. Key negotiation parameters are transmitted in plaintext, resulting in weak symmetric encryption protecting the final network credentials. The protocol lacks forward security, and a single key leak can affect past sessions. Chinese patent CN113993183A discloses a WiFi zero-configuration system and method based on Beacon frames. It uses vendor-specific information elements (VSIEs) carried in WiFi Beacon frames for information exchange to complete network configuration. However, it still relies on already connected devices as intermediaries to relay router credentials and does not address asymmetric key negotiation or forward security between devices. Chinese patent CN118661437A discloses a method for initiating WiFi device SoftAP mode pre-configuration via a custom data field. It triggers the device to enter SoftAP mode by carrying random data in a custom field of the probe request frame. However, its pre-configuration process still requires establishing a WiFi connection before transmitting pre-configuration data, lacking the ability to complete pairing without association. The applicant's earlier application CN119212121A discloses a WiFi-based direct connection method that uses a device broadcast action frame carrying device information to achieve device discovery. However, this method only involves the device discovery stage and does not include a complete secure pairing process involving confirmation of pairing intent, conflict detection and resolution, and key negotiation. Furthermore, pairing schemes using Bluetooth or near-field communication require additional wireless modules, increasing material costs and circuit board area. Manual password or MAC address input configuration methods are cumbersome and unsuitable for embedded devices without screens or keyboards. Currently, there is no WiFi device pairing solution that simultaneously meets the requirements of configuration-free operation, completion within seconds, password not transmitted over the air interface, forward security, no need for additional hardware, and no reliance on large user space components. Summary of the Invention
[0003] Purpose of the invention: The purpose of this invention is to provide a WiFi device configuration-free secure pairing method and system based on a custom management frame, enabling the WiFi device to complete discovery, pairing intent confirmation and security key negotiation in one step without establishing any connection.
[0004] Technical Solution: A configuration-free secure pairing method for WiFi devices based on a custom management frame. The pairing is completed before either party establishes any wireless connection or performs 802.11 authentication and association procedures. The two parties do not discover each other by listening to beacon frames or sending and receiving probe request and response frames, but rather by using the custom management frame. The entire pairing process is completed within the WiFi driver, without requiring wpa_supplicant or hostapd registration protocol components. The method includes the following steps: S1. The pairing initiator and the pairing responder each generate a one-time temporary asymmetric key pair and enter the pairing scan state; S2. Both parties broadcast a pairing frame carrying the local device mode identifier and temporary public key through a custom management frame at a preset period. The custom management frame is constructed based on the vendor-defined type reserved in the IEEE 802.11 management frame. The frame body sequentially includes a category value, an organization unique identifier (OUI), a frame type, a frame subtype, a product identifier, a device mode identifier, and a payload field. S3. The receiving end performs three layers of filtering on the received pairing frame in sequence: category and OUI filtering, product identification filtering, and device mode complementary filtering. The MAC address and public key of the complementary mode peer that passes the filtering are recorded in the list of discovered peers. S4. Perform a pairing intent confirmation judgment on the discovered peers according to the preset pairing confirmation method. The pairing confirmation method is either button pairing or number pairing. In button pairing, after the scanning window ends, the number of discovered complementary peers is used for judgment. If it is zero, the process continues to wait. If it is exactly one, a unique peer is confirmed and a unicast receive frame is sent to it. If it is greater than or equal to two, a conflict is determined and pairing is terminated. In number pairing, the access point displays a four-digit decimal display number obtained by hashing its MAC address. The station carries the target number in the pairing frame. The access point compares the target number with its own display number. If they match, it responds. S5. After confirming the unique peer, both parties perform asymmetric key negotiation operation with their own temporary private key and the peer's temporary public key as input. The mathematical properties of the algorithm ensure that both parties independently calculate the same shared key. The first 16 bytes of the shared key are converted into a 32-character hexadecimal string as a pre-shared password. After pairing is completed, the temporary private key and the shared key are immediately and securely erased from memory.
[0005] Furthermore, the pairing frames include five frame types: announcement frames, broadcast by both parties at 500-millisecond intervals, carrying the device mode identifier and the local temporary public key; acceptance frames, unicast by the adjudicating party, without carrying a payload; request frames, broadcast by the station in numbered pairings, carrying the target number and the station's public key; response frames, unicast by the access point, carrying the access point's public key; and confirmation frames, unicast by the station, without carrying a payload.
[0006] Furthermore, in the button pairing method, the scanning window is 5 seconds by default and is configurable, and the total timeout is 60 seconds by default. If an acceptance frame is received from the peer before the scanning window has ended, the local end skips the remaining scanning time and directly enters the connection process. After confirming the unique peer, the adjudicator sends a unicast acceptance frame to it, and the receiver immediately performs key negotiation after receiving the acceptance frame.
[0007] Furthermore, the number displayed in the number pairing is a four-digit decimal number from 0000 to 9999 obtained by hashing the device's MAC address and taking the modulo. It does not need to be stored and the calculation result is consistent every time the device is powered on. It is only used for device selection and does not participate in key calculation. When the access point makes repeated requests to the same site, the key pair remains unchanged, only the peer's public key is updated, and the corresponding information is temporarily stored in the pending session table, which is automatically cleaned up after 10 seconds.
[0008] Furthermore, the first 16 bytes of the shared key are converted byte by byte into a 32-character hexadecimal string and used as a pre-shared password for the encrypted wireless link. This password can be used as the access password for a standard WiFi encrypted network or as a WiFi static connection. The WiFi static connection consists of persistent configurations written locally by both communicating parties, bypasses the 802.11 association process, and directly establishes a point-to-point encrypted connection using the pre-shared password.
[0009] Furthermore, the button pairing method and the number pairing method coexist in parallel on the same device. If the operator triggers both methods at the same time, the number pairing will be completed first, and the button pairing process will naturally time out and exit. The peer counts of the two methods are independent of each other and do not interfere with each other's decisions. The pairing frames are distinguished by frame subtypes, and the receiving end counts the discovered peers according to frame subtypes.
[0010] Furthermore, in the three-layer filtering, the category and OUI filtering is used to discard frames from non-manufacturer, the product identifier filtering is used to discard frames from products that are not from the same series, and the device mode complementarity filtering is used to discard frames with the same mode as itself and only retain the complementary mode counterpart; the paired frame only carries the public key, device mode identifier and display number, and the shared key and final password are only calculated and stored internally by the two devices and are not transmitted through the wireless channel.
[0011] Furthermore, the entire pairing process is completed within the WiFi driver, without the need for wpa_supplicant or hostapd registration protocol components; the periodic timing and decision logic runs in the timer context, while frame transmission and link configuration run in the work queue context. This separation of the two contexts ensures the real-time performance and security implemented within the driver.
[0012] This invention also provides a WiFi device configuration-free secure pairing system based on a custom management frame, comprising: a frame construction and filtering module, used to construct and parse pairing frames constructed based on vendor-customized types reserved in IEEE 802.11 management frames. The frame body of the pairing frame sequentially includes a category value, an Organization Unique Identifier (OUI), a frame type, a frame subtype, a product identifier, a device mode identifier, and a payload field. The module sequentially performs category and OUI filtering, product identifier filtering, and device mode complementarity filtering on the received pairing frames, and records the MAC address and temporary public key of the complementary mode peer that passes the filtering into the discovered peer list; and a pairing intent confirmation module, used to perform pairing intent confirmation judgment on the discovered peers according to button pairing or number pairing. Button pairing uses exactly one complementary peer within a preset scanning window as the confirmation basis and sends a unicast receive frame. Number pairing matches the target number with the device display number. The display number, obtained by hashing the device's MAC address and taking the modulo operation, is used only for device selection and does not participate in key calculations. The key negotiation and password derivation module is used to perform asymmetric key negotiation operations on both parties using their own temporary private key and the other party's temporary public key after confirming a unique peer. They independently calculate the same shared key, converting the first 16 bytes of the shared key byte-by-byte into a 32-character hexadecimal string as a pre-shared password. After pairing, the temporary private key and shared key are securely erased to achieve forward security. The encrypted link establishment module is used to establish an encrypted wireless link using the derived pre-shared password. This pre-shared password can be used as a standard WiFi encrypted network access password or directly used by a static WiFi connection. Beneficial effects
[0013] Operation without configuration: Pairing is completed with a single key press or by entering a four-digit number, requiring no password, MAC address, or any configuration information. Fast pairing speed: Pairing is completed within seconds after pressing the key or entering the number (the scanning window defaults to 5 seconds or 3 seconds plus millisecond-level key negotiation). Combined with static WiFi connection, subsequent power-ons connect within milliseconds. Strong security: The password is never revealed over the air interface, preventing passive eavesdroppers from calculating the shared key; each pairing uses a one-time temporary key pair, providing forward security; the displayed number does not participate in key calculations and has no value for brute-force attacks. No additional hardware cost: Implemented entirely on existing WiFi hardware, requiring no auxiliary modules such as Bluetooth or NFC. Lightweight system implementation: The entire pairing process is completed within the WiFi driver, eliminating the need for wpa_supplicant and hostapd registration protocol components. Adaptable to screenless and keyless devices: In the number-based pairing method, the paired device only needs to display or print a four-digit number; input capability is only required on a device in the user's hand. Attached Figure Description
[0014] Figure 1 This is a flowchart of the configuration-free secure pairing (button pairing method) of the present invention.
[0015] Figure 2 This is a flowchart of the configuration-free secure pairing (number pairing method) of the present invention.
[0016] Figure 3 This is a schematic diagram illustrating the parallel coexistence of two pairing methods according to the present invention. Detailed Implementation
[0017] To make the technical solution of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Example
[0018] This embodiment describes the complete process of two WiFi devices completing a configuration-free secure pairing via button presses, such as... Figure 1 As shown.
[0019] Step 1: Enter Pairing State. The user triggers the pairing command on both the Access Point (AP) and Station Site (STA) devices, and both devices enter scanning state. Upon entering scanning state, both devices generate a new asymmetric key pair using the system's random number source as a temporary key pair for this pairing session. This temporary key pair is used only for this session. The temporary key pair corresponds to the asymmetric key negotiation algorithm used subsequently; its private key is a randomly generated fixed-length byte string, and the public key is derived from the private key through corresponding one-way mathematical operations.
[0020] Step 2: Periodic Broadcast of Announcement Frames. Both parties broadcast announcement frames every 500 milliseconds. The announcement frame is a custom management frame, and its frame body structure includes: a category value (set to the vendor-defined type value 0x7F), the company's Organization Unique Identifier (OUI) (3 bytes), frame type, frame subtype, product identifier (2 bytes, used to distinguish product series), device mode identifier, and a payload field (local temporary public key, 32 bytes). Upon receiving the announcement frame, the receiving end performs three layers of filtering: category value and OUI filtering, discarding frames from non-vendors; product identifier filtering, discarding frames from products not in the same series; and device mode complementarity filtering, discarding frames with the same mode as its own, retaining only announcement frames from the complementary mode peer. After passing through the three layers of filtering, the MAC address and temporary public key of the complementary peer are recorded in the discovered peer list; duplicate MAC addresses are not recorded repeatedly.
[0021] Step 3: Conflict Detection and Resolution. After the scanning window (default 5 seconds, configurable) ends, each device independently resolves the conflict based on the number of discovered peers: if zero, scanning continues and waiting continues, with a default total timeout of 60 seconds; failure occurs upon timeout; if exactly one peer is found, a unique peer is confirmed, a unicast accept frame is sent to it, and the connection process begins; if two or more peers are found, a conflict is determined, pairing is terminated, and the user is notified. The accept frame is also a custom management frame, with the frame subtype being accept, sent to the confirmed peer's MAC address using unicast addressing, and does not carry a payload.
[0022] Step 4: Complete ahead of schedule. If an acceptance frame is received from the other end before the scanning window has ended, it means that the other end has completed the decision and selected this end as the only peer. This end immediately skips the remaining scanning time and directly enters the connection process to avoid both ends waiting for the entire window to finish.
[0023] Step 5: Key Negotiation and Cipher Derivation. After confirming a unique peer, both parties perform asymmetric key negotiation operations using their own temporary private key and the peer's temporary public key as input. The mathematical properties of the algorithm guarantee that the AP, using its private key plus the STA's public key as input, and the STA, using its private key plus the AP's public key as input, independently calculates the same 32-byte shared key. The first 16 bytes of the shared key are taken and converted byte-by-byte into a 32-character hexadecimal string, serving as the pre-shared cipher for the encrypted wireless link. For example, if the first 16 bytes of the shared key are 0x3A7F... (16 bytes in total), then the pre-shared cipher is "3a7f..." (32 hexadecimal characters in total). Immediately after pairing, the temporary private key and the shared key are securely erased from memory, and the original data is overwritten using a memory zeroing operation to prevent residual leakage.
[0024] Step 6: Establish an encrypted link. An encrypted wireless link is established using a derived pre-shared cipher. When using a static WiFi connection, the connection parameters are constituted by persistent configurations written locally by both communicating parties. Without going through the 802.11 association process, a point-to-point encrypted connection is directly established using the pre-shared cipher, with millisecond-level connection time for each subsequent power-on.
[0025] In this embodiment, no confidential information is transmitted over the air interface in the pairing frames: each frame only transmits the public key and device mode identifier, both of which are publicly available information; the shared key and final cipher are calculated and stored only within the two devices and are never transmitted over the wireless channel. Even if a passive eavesdropper intercepts all pairing frames, they will not obtain any information that can be used to calculate the shared key. Because each pairing uses a completely new temporary key pair and is destroyed after use, even if the key of a session is leaked, it will not affect other sessions, thus providing forward security. Example
[0026] This embodiment describes the complete pairing process using a numbering system when one device (access point) is installed in a hard-to-access location such as a ceiling. Figure 2 As shown.
[0027] Step 1: Generation and Display of the Display Number. The access point device displays a four-digit decimal display number (0000 to 9999). The default number is obtained by hashing the device's MAC address, converting the first few bytes of the hash result into an unsigned integer, and then taking the modulo 10000. Since the MAC address is fixed, this number does not need to be persistently stored; the result is the same every time the device is powered on. This feature allows the number to be directly printed on the device label for user reference, while retaining a user-defined interface to handle number conflicts.
[0028] Step 2: Request. The operator enters the target number on the site device and triggers pairing; the site generates a temporary key pair and broadcasts a request frame at 500 millisecond intervals (default duration 3 seconds). The request frame is a custom management frame with the frame subtype "request". The payload carries the target number (2-byte BCD encoding, representing 0000 to 9999) and the site's temporary public key (32 bytes).
[0029] Step 3: Response and Session Storage. Upon receiving a request frame, the access point compares the target number within the frame with its displayed number. If they do not match, the frame is ignored; if they match, a temporary key pair for the current session is generated (or reused), and a response frame (frame subtype: response, payload carrying the access point's temporary public key, 32 bytes) is unicast to the site. The "site MAC + local key pair + site public key" is then temporarily stored in the pending session table. Each entry in the pending session table is automatically cleaned up after a 10-second timeout to prevent resource leakage. For repeated requests to the same site, the access point maintains the same key pair and only updates the peer's public key, ensuring consistent input between the two parties.
[0030] Step 4: Site Decision. After the request window (default 3 seconds) ends, the site makes a decision based on the number of response frames received: if it is zero, a timeout failure is reported; if it is exactly one, the peer is acknowledged, key negotiation is performed, and a unicast acknowledgment frame (without payload) is sent to it, and pairing is completed; if it is two or more, it indicates that there are multiple access points with the same display number in the environment (number conflict), pairing is terminated, the user is notified, and the user is prompted to change the number of one of the access points.
[0031] Step 5: Access point completes. After receiving the confirmation frame, the access point retrieves the corresponding entry from the pending session table, performs key negotiation, and the pairing is complete.
[0032] In this embodiment, the displayed number is only used for device selection and does not participate in key calculations. This is a fundamental difference from WPS PIN: WPS PIN directly participates in authentication calculations and can therefore be exploited through brute-force attacks; the displayed number in this invention is only used to select a target from multiple devices, and key security is entirely guaranteed by asymmetric key negotiation. Even if a third party sees or guesses the number, they cannot deduce any key information from it. Example
[0033] This embodiment describes the parallel operation mechanism when the same device simultaneously supports both button pairing and number pairing methods, such as... Figure 3 As shown.
[0034] The same device supports two pairing methods simultaneously. The pairing frames are distinguished by a frame subtype field: announcement frames and accept frames belong to button pairing, while request frames, response frames, and acknowledgment frames belong to number pairing. The receiving end counts the number of discovered peers under each method separately according to frame subtype, without interference.
[0035] If an operator presses both the access point button and enters the site number, the number pairing will be completed first, and the button pairing process will naturally time out and exit. The peer counts for the two methods are maintained independently: the conflict detection for button pairing only counts the number of announcement frames in the complementary mode, while the decision for number pairing only counts the number of response frames. The two counting systems are completely independent, and there will be no situation where frames from one method interfere with the decision of the other method.
[0036] In a specific application scenario of this embodiment, a wall-mounted access point is paired with a handheld station device: the operator can press the pairing button on the access point to enter the button pairing mode, and simultaneously enter the four-digit number printed on the access point on the station device to enter the number pairing mode. Number pairing is completed within a 3-second window, while the button pairing window has not yet closed because the number pairing has been successfully completed, and the system automatically exits. This parallel mechanism provides users with flexible pairing options; the two methods do not need to be pre-selected, and the system automatically selects the method that is completed first. Example
[0037] This embodiment details the frame body structure and security analysis of paired frames. The frame body structure and frame type table are shown below: Frame structure Fields length illustrate Category Values 1 byte 0x7F (Manufacturer-defined) OUI 3 bytes Organizational unique identifier Frame type 1 byte Paired Frames Frame type 1 byte Distinguish between five types of paired frames Product Identification 2 bytes Product series identification Device mode 1 byte AP, STA load Length Public Key / Number Frame type table Frame Name direction Address Main load The method Notification frame Both sides issued broadcast Device mode + temporary public key Button pairing Receive Frame The ruling party issued unicast none Button pairing Request Frame STA issued broadcast Target ID + STA Public Key Number matching Response frame AP issued unicast AP Temporary Public Key Number matching Confirmation frame STA issued unicast none Number matching The pairing frame is constructed based on the vendor-defined type (category value 0x7F) reserved in the IEEE 802.11 management frame. The receiving side sequentially performs category value and OUI filtering, product identifier filtering, and device mode complementary filtering. The meaning and length of each field in the frame body are as follows: Category value (1 byte, fixed 0x7F) identifies this frame as a vendor-defined management frame; OUI (3 bytes) is the unique identifier of the registered organization of the vendor, used to filter frames from non-vendors; Frame type (1 byte, pairing frame); Frame subtype (1 byte, distinguishing five types of pairing frames: announcement, acceptance, request, response, and acknowledgment); Product identifier (2 bytes) distinguishes product series, used to filter products from different series; Device mode identifier (1 byte, AP, STA), used for complementary mode filtering; Payload field (variable length, announcement frames carry a 32-byte temporary public key, request frames carry a 2-byte target number plus a 32-byte temporary public key, response frames carry a 32-byte temporary public key, acceptance frames and acknowledgment frames do not carry a payload).
[0038] Security Analysis: The only information transmitted in the pairing frame is the public key, device mode identifier, and display number, all of which are publicly available. The shared key is derived by each party using their own private key and the other party's public key to perform asymmetric key negotiation. Due to the computational difficulty of the mathematical problems relied upon by this type of algorithm, even if an attacker intercepts both parties' public keys, they cannot deduce the shared key. The pre-shared cipher is derived from the first 16 bytes of the shared key and is never transmitted over the wireless channel. The temporary key pair is newly generated using the system's random number source each time pairing begins and is immediately and securely erased after pairing is completed, achieving forward security: even if the key is leaked in one session, it will not affect the security of other sessions. The display number is a four-digit decimal number used only for device selection, not as an authentication credential, and even if it is known to a third party, it will not pose a security threat. The result of the conflict detection decision directly drives key negotiation and link establishment, rather than being used only for error reporting and termination like WPS; the decision, negotiation, and link establishment are completed in one go.
[0039] The entire pairing process is completed within the WiFi driver. Periodic timing and decision logic run in the timer context, while operations that may require sleep, such as frame transmission and link configuration, run in the work queue context. This separation of execution contexts ensures real-time performance and security within the driver. It eliminates the need for wpa_supplicant or hostapd registration protocol components, resulting in a small codebase, no need for porting or configuration, and continuous resident operation, making it suitable for embedded systems with limited storage and memory resources.
[0040] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A configuration-free secure pairing method for WiFi devices based on a custom management frame, wherein the pairing is completed before either party has established any wireless connection or performed 802.11 authentication and association procedures. The two parties do not discover each other by listening to beacon frames or sending and receiving probe request and response frames, but rather by using the custom management frame. Furthermore, the entire pairing process is completed within the WiFi driver, without requiring wpa_supplicant or hostapd registration protocol components. The method is characterized by... Includes the following steps: S1. The pairing initiator and the pairing responder each generate a one-time temporary asymmetric key pair and enter the pairing scan state; S2. Both parties broadcast a pairing frame carrying the local device mode identifier and temporary public key through a custom management frame at a preset period. The custom management frame is constructed based on the vendor-defined type reserved in the IEEE 802.11 management frame. The frame body sequentially includes a category value, an organization unique identifier (OUI), a frame type, a frame subtype, a product identifier, a device mode identifier, and a payload field. S3. The receiving end performs three layers of filtering on the received pairing frame in sequence: category and OUI filtering, product identification filtering, and device mode complementary filtering. The MAC address and public key of the complementary mode peer that passes the filtering are recorded in the list of discovered peers. S4. Perform a pairing intent confirmation judgment on the discovered peers according to the preset pairing confirmation method. The pairing confirmation method is either button pairing or number pairing. In button pairing, after the scanning window ends, the number of discovered complementary peers is used for judgment. If it is zero, the process continues to wait. If it is exactly one, a unique peer is confirmed and a unicast receive frame is sent to it. If it is greater than or equal to two, a conflict is determined and pairing is terminated. In number pairing, the access point displays a four-digit decimal display number obtained by hashing its MAC address. The station carries the target number in the pairing frame. The access point compares the target number with its own display number. If they match, it responds. S5. After confirming the unique peer, both parties perform asymmetric key negotiation operation with their own temporary private key and the peer's temporary public key as input. The mathematical properties of the algorithm ensure that both parties independently calculate the same shared key. The first 16 bytes of the shared key are converted into a 32-character hexadecimal string as a pre-shared password. After pairing is completed, the temporary private key and the shared key are immediately and securely erased from memory.
2. The WiFi device configuration-free secure pairing method based on a custom management frame according to claim 1, characterized in that, The pairing frames include five frame types: announcement frames, which are broadcast by both parties at 500-millisecond intervals and carry the device mode identifier and the local temporary public key; Accept frames are unicast by the adjudicating party and do not carry a payload; request frames are broadcast by the station in a number pair and carry the target number and the station's public key; response frames are unicast by the access point and carry the access point's public key. Acknowledgment frames are sent by the site via unicast and do not carry a payload.
3. The WiFi device configuration-free secure pairing method based on a custom management frame according to claim 1, characterized in that, In the button pairing method, the scanning window is 5 seconds by default and is configurable, and the total timeout is 60 seconds by default. If the receiving end receives an acceptance frame before the scanning window has ended, the local end skips the remaining scanning time and directly enters the connection process. After the adjudicating party confirms the unique peer, it sends a unicast acceptance frame to it. After receiving the acceptance frame, the receiving party immediately performs key negotiation.
4. The WiFi device configuration-free secure pairing method based on a custom management frame according to claim 1, characterized in that, The number pairing is a four-digit decimal number from 0000 to 9999 obtained by hashing the device's MAC address and taking the modulo. It does not need to be stored and the calculation result is consistent every time the device is powered on. It is only used for device selection and does not participate in key calculation. When the access point makes repeated requests to the same site, the key pair remains unchanged, only the peer's public key is updated, and the corresponding information is temporarily stored in the pending session table, which is automatically cleaned up after 10 seconds.
5. The WiFi device configuration-free secure pairing method based on a custom management frame according to claim 1, characterized in that, The first 16 bytes of the shared key are converted byte by byte into a 32-character hexadecimal string and used as the pre-shared password for the encrypted wireless link. This password can be used as the access password for a standard WiFi encrypted network or as a WiFi static connection. The WiFi static connection consists of persistent configurations written locally by both communicating parties, without going through the 802.11 association process, and directly establishes a point-to-point encrypted connection with the pre-shared password.
6. The WiFi device configuration-free secure pairing method based on a custom management frame according to claim 1, characterized in that, The button pairing method and the number pairing method can coexist in parallel on the same device. If the operator triggers both methods at the same time, the number pairing will be completed first, and the button pairing process will naturally time out and exit. The peer counts of the two methods are independent of each other and do not interfere with each other's decisions. The pairing frames are distinguished by frame subtypes, and the receiving end counts the discovered peers according to frame subtypes.
7. The WiFi device configuration-free secure pairing method based on a custom management frame according to claim 1, characterized in that, In the three-layer filtering, category and OUI filtering are used to discard frames from non-manufacturer, product identification filtering is used to discard frames from products that are not from the same series, and device mode complementarity filtering is used to discard frames with the same mode as itself and only retain the complementary mode counterpart; the paired frame only carries the public key, device mode identifier and display number, and the shared key and final password are only calculated and stored internally by the two devices and are not transmitted through the wireless channel.
8. The WiFi device configuration-free secure pairing method based on a custom management frame according to claim 1, characterized in that, The periodic timing and decision logic runs in the timer context, while frame transmission and link configuration run in the work queue context. This separation of the two contexts ensures the real-time performance and security implemented within the driver.
9. A WiFi device configuration-free secure pairing system based on a custom management frame, characterized in that, include: The frame construction and filtering module is used to construct and parse paired frames based on the vendor-defined types reserved in the IEEE 802.11 management frames. The frame body of the paired frame sequentially includes a category value, an organization unique identifier (OUI), a frame type, a frame subtype, a product identifier, a device mode identifier, and a payload field. The module sequentially performs category and OUI filtering, product identifier filtering, and device mode complementary filtering on the received paired frames. The MAC address and temporary public key of the complementary mode peer that passes the filtering are recorded in the list of discovered peers. The pairing intent confirmation module is used to perform pairing intent confirmation judgment on the discovered peer according to the key pairing or number pairing method. Key pairing uses the exact complementary peer in the preset scanning window as the confirmation basis and sends a unicast receive frame. Number pairing uses the matching of the target number and the device display number as the confirmation basis. The display number is obtained by hashing the device MAC address and is only used for device selection and does not participate in key calculation. The key negotiation and password derivation module is used to perform asymmetric key negotiation operation by both parties using their own temporary private key and the peer's temporary public key after confirming the unique peer. They independently calculate the same shared key and take the first 16 bytes of the shared key and convert them into a 32-character hexadecimal string as a pre-shared password. After pairing is completed, the temporary private key and the shared key are securely erased to achieve forward security. The encrypted link establishment module is used to establish an encrypted wireless link with the derived pre-shared password. The pre-shared password can be used as a standard WiFi encrypted network access password or directly used by WiFi static connection.
Citation Information
Patent Citations
WiFi zero distribution network system and method based on Beacon frame
CN113993183A
Initiating SoftAp mode provisioning of WiFi devices via custom data fields
CN118661437A
Direct connection method and system based on WiFi and related equipment
CN119212121A
