WiFi network distribution method, device and system of Internet of Things equipment
By using the smartphone's forced portal detection function, IoT devices automatically start a WiFi hotspot and redirect the configuration interface, solving the problems of complex on-site network configuration and poor adaptability of IoT devices, achieving convenient and secure WiFi connection, and reducing hardware costs and operating barriers.
Patent Information
- Application Number
- CN202512038962.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-02-13
AI Technical Summary
IoT devices are complex to operate and have poor adaptability when connecting to users' WiFi networks on-site. Existing network configuration methods require additional equipment or apps, which are particularly unfriendly and pose information security risks.
By leveraging the forced portal detection function of smartphones, the system automatically starts a WiFi hotspot through IoT devices and hijacks the mobile phone's access domain name, redirecting it to the local WiFi configuration interface. This enables WiFi network configuration without the need for additional devices or apps and supports flexible network configuration adjustments in multiple scenarios.
It is easy to operate, widely adaptable, reduces hardware costs, improves user experience, offers flexible network configuration processes, and is highly secure, avoiding the risk of information leakage.
Smart Images

Figure FT_1 
Figure FT_2
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet of Things (IoT) technology, specifically to a WiFi configuration method, apparatus, and system for IoT devices, applicable to various IoT device on-site WiFi configuration scenarios, including screenless devices, low-power devices, and devices requiring multiple network switching. Background Technology
[0002] With the rapid development of IoT technology, IoT devices have been widely used in smart homes, industrial control, smart cities, and many other fields. IoT devices need to connect to the internet to achieve core functions such as data interaction and remote control, and WiFi networks, as the most common network access method in home and office scenarios, are the primary network access choice for IoT devices.
[0003] However, once IoT devices arrive at the user's site, the process of connecting to the user's WiFi network faces many challenges: On the one hand, most IoT devices, in order to reduce costs and size, are not equipped with displays and input devices, so users cannot directly and manually enter the WiFi name and password on the device; on the other hand, existing network configuration methods have obvious limitations. For example, network configuration via Bluetooth is limited by communication distance, and some low-end IoT devices do not integrate Bluetooth modules; network configuration via NFC requires the mobile phone to support NFC function, resulting in insufficient compatibility; network configuration via a dedicated APP requires users to download and install an additional application, which is cumbersome and especially unfriendly to elderly users.
[0004] With the widespread adoption of smartphones, and the fact that most mainstream smartphones have built-in mandatory portal detection mechanisms to determine whether the connected Wi-Fi network requires portal authentication, and the fact that most existing Wi-Fi cards support dual-band operation or multi-mode concurrency, enabling simultaneous hotspot transmission and network connection, this invention proposes a Wi-Fi configuration solution for IoT devices that requires no additional equipment, no dedicated app, is easy to operate, and has greater adaptability, thus addressing the shortcomings of existing technologies. Summary of the Invention
[0005] I. Purpose of the Invention The purpose of this invention is to provide a WiFi configuration method, device, and system for IoT devices, which solves the problems of difficult on-site configuration, complex operation, and poor adaptability of IoT devices. By leveraging the forced portal detection function of smartphones, it achieves simple, efficient, and universal WiFi configuration, while also supporting flexible configuration adjustments in multiple scenarios. Technical solution
[0006] To achieve the above objectives, the present invention provides the following technical solution: (a) A WiFi configuration method for IoT devices (applied to IoT devices) The method includes the following steps: 1. Upon power-on, the WiFi hotspot automatically starts. The name of the WiFi hotspot is the device name specified on the device nameplate, a manufacturer-preset string, or a configurable string. When IoT devices are shipped from the factory, manufacturers can label the device nameplate with a unique hotspot name (such as "Device-XXX", where XXX is the device serial number), or uniformly set a fixed format hotspot name (such as "IoT-Config-XXXX"). Users can also modify the hotspot name through subsequent configuration, making it convenient for users to quickly identify and connect.
[0007] 2. By using forced portal technology, the forced portal access domain of at least one smartphone manufacturer is hijacked and redirected to the local host. Mainstream smartphones (such as Apple iOS devices, Android devices, and HarmonyOS devices) all have pre-set forced portal detection domains, such as "captive.apple.com" for Apple devices, "connectivitycheck.gstatic.com" for Google Android devices, and "connectivitycheck.huawei.com" for HarmonyOS devices. IoT devices use network hijacking technology to intercept access requests to these domains and redirect them to the local host.
[0008] 3. By deploying a local web service, the hijacked access URL is redirected to a local WiFi configuration interface URL. This WiFi configuration interface includes input areas for the target WiFi name and password. The IoT device can have a built-in lightweight web server (such as Nginx, Lighttpd, or a micro HTTP server) pre-deployed with a WiFi configuration webpage. This webpage allows users to input the target WiFi's SSID (name) and password, and can also add optional functions such as encryption method selection (e.g., WPA2, WPA3, open), signal strength display, and network priority settings as needed.
[0009] 4. Receive target WiFi configuration information submitted by the smartphone and filled in by the user on the WiFi configuration interface. The WiFi configuration information includes the target WiFi name and password. The IoT device receives the user-submitted HTTP / HTTPS request via a web service, parses the contained WiFi configuration parameters, and stores them. It supports storing multiple WiFi configuration information for the user to switch between.
[0010] 5. Based on the WiFi configuration information, control itself to connect to the target WiFi network. The IoT device can choose to retain or continue operating the WiFi hotspot according to its hardware capabilities, supporting subsequent user reconfiguration or new network configuration needs; simultaneously, it starts WiFi client mode, using the parsed WiFi name and password to attempt to connect to the target network. During the connection process, the connection status can be recorded and reported through a local web service.
[0011] Furthermore, the method also includes: after connecting to the target WiFi network, sending a connection result to the smartphone. The connection result includes a connection success message, a connection failure message and the reason for the failure (such as incorrect password, network unreachable, weak signal, etc.), and a network status query entry, so that users can troubleshoot problems or perform secondary configuration in a timely manner.
[0012] (ii) A WiFi configuration method for IoT devices (applied to smartphones) The method includes the following steps: 1. Connect to a WiFi hotspot with a specified name that starts after the IoT device is powered on. The WiFi hotspot name is consistent with the device name specified on the device nameplate, a manufacturer-preset string, or a configurable string. Users can find and connect to the corresponding hotspot in their mobile phone's WiFi settings according to the device manual, nameplate prompts, or network configuration guide. The hotspot can be set to open, have a preset simple password (marked on the nameplate), or a user-defined password.
[0013] 2. Initiate the mandatory portal detection mechanism and send a detection request to the preset mandatory portal access domain. After the smartphone connects to WiFi, the system's built-in mandatory portal detection process is automatically triggered, sending an access request to the manufacturer's preset detection domain to determine whether the current network requires portal authentication.
[0014] 3. Receive the redirection response from the IoT device, and based on the redirection response, access the IoT device's local WiFi configuration interface through a browser. Since the IoT device has hijacked access to the detection domain, after the smartphone receives and redirects the response, it determines that a forced portal exists on the current network. It can automatically launch the default browser or load the IoT device's local WiFi configuration interface through user-triggered browser access.
[0015] 4. Obtain the target WiFi configuration information filled in by the user on the WiFi configuration interface, and submit the WiFi configuration information to the local web service of the IoT device so that the IoT device can connect to the target WiFi network based on the configuration information. In the configuration interface displayed in the browser, the user enters the name and password of the target WiFi, and can select optional parameters such as encryption method and network priority. After clicking the submit button, the mobile phone sends the configuration information to the web service of the IoT device via HTTP / HTTPS protocol.
[0016] Furthermore, the method also includes: receiving WiFi connection results from IoT devices and displaying the connection results through any one of the following methods: browser interface, system notification, application pop-up, etc., so that users can know the network configuration status in real time and facilitate subsequent operations.
[0017] (iii) A WiFi network configuration device for Internet of Things (IoT) devices (applied to IoT devices) The device includes: • Hotspot startup module: Configured to automatically start a WiFi hotspot upon power-on. The name of the WiFi hotspot is the device name specified on the device nameplate, a manufacturer-preset string, or a configurable string.
[0018] • Domain hijacking module: Configured to hijack the forced portal access domain of at least one smartphone manufacturer to the local host via forced portal technology.
[0019] • Redirect module: Configured to redirect the hijacked access URL to a local WiFi configuration interface URL via a locally deployed web service. The WiFi configuration interface includes a target WiFi name input area and a password input area.
[0020] • Information receiving module: configured to receive target WiFi configuration information submitted by a smartphone and filled in by the user on the WiFi configuration interface, the WiFi configuration information including the target WiFi name and password.
[0021] • Network connectivity module: configured to control itself to connect to the target WiFi network based on the WiFi configuration information.
[0022] (iv) A WiFi network configuration device for a smartphone The device includes: • Hotspot connection module: Configured to connect to a WiFi hotspot with a specified name that starts after the IoT device is powered on. The WiFi hotspot name is consistent with the device name specified on the device nameplate, a manufacturer-preset string, or a configurable string.
[0023] • Detection module: Configured to initiate a forced portal detection mechanism, sending detection requests to preset forced portal access domains.
[0024] • Interface Access Module: Configured to receive redirection responses from IoT devices and access the local WiFi configuration interface of the IoT devices via a browser based on the redirection responses.
[0025] • Information Submission Module: Configured to obtain the target WiFi configuration information filled in by the user on the WiFi configuration interface, and submit the WiFi configuration information to the local web service of the IoT device.
[0026] (v) A WiFi distribution system for Internet of Things (IoT) devices The system includes an IoT device and a smartphone; the IoT device is the aforementioned WiFi configuration device applied to the IoT device; the smartphone is the aforementioned WiFi configuration device on the smartphone side; the IoT device and the smartphone establish a communication connection through the WiFi hotspot started by the IoT device to realize the transmission of target WiFi configuration information and the WiFi network connection of the IoT device. Beneficial effects
[0027] Compared with the prior art, the present invention has the following beneficial effects: 1. Easy to operate, no additional software required: Utilizing the built-in WiFi connection function and forced portal detection mechanism of smartphones, users do not need to download and install a dedicated APP, which lowers the operating threshold and is especially suitable for non-professional users and elderly users.
[0028] 2. Wide compatibility and strong popularity: It is compatible with mainstream Apple, Android, HarmonyOS and other brand smartphones, covering the vast majority of users; it supports multi-mode concurrent operation of WiFi network cards, and can complete network configuration and subsequent reconfiguration without turning off the hotspot; IoT devices only need to have a WiFi module, without the need to integrate additional communication modules such as Bluetooth and NFC, which reduces the hardware cost of the devices.
[0029] 3. Flexible network configuration process and excellent user experience: It supports users to reassign other WiFi networks when IoT devices are already connected to WiFi, and supports storing multiple WiFi configuration information for switching; the network configuration process can be flexibly adjusted according to user needs, without having to strictly follow fixed steps, resulting in high network configuration efficiency and high success rate.
[0030] 4. Secure and reliable with strong scalability: WiFi configuration information is transmitted through the local WiFi hotspot between IoT devices and smartphones, without going through the public network, avoiding the risk of configuration information being intercepted or leaked; the configuration interface supports a variety of optional function expansions to adapt to network configuration needs in different scenarios. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the present invention will be described in detail below with reference to specific embodiments.
[0032] Example 1: WiFi Configuration Process for IoT Devices This embodiment uses a smart socket (IoT device) and an Android smartphone in a smart home scenario as examples to explain the network configuration process in detail: 1. When the smart socket is powered on, it automatically starts a WiFi hotspot named "Socket-8675309" (device serial number 8675309, marked on the device nameplate). The hotspot is set to open (no password required for connection). The smart socket's WiFi network card supports simultaneous hotspot transmission and network connection.
[0033] 2. The smart socket initiates the forced portal hijacking function, hijacking the default forced portal detection domain name "connectivitycheck.gstatic.com" for Android systems, "captive.apple.com" for Apple devices, and "connectivitycheck.huawei.com" for HarmonyOS devices to the local host (IP address: 192.168.4.1).
[0034] 3. The built-in Lighttpd web server of the smart socket starts up and deploys the WiFi configuration interface (http: / / 192.168.4.1 / config). This interface includes a WiFi name input box, a password input box, an encryption method selection drop-down box (options include WPA2-PSK, WPA3-PSK, and open), a "Submit" button, and a "Reset" button.
[0035] 4. Users should follow the instructions in the device manual to find and connect to the "Socket-8675309" hotspot in the WiFi settings of their Android smartphones.
[0036] 5. After the smartphone connects to the hotspot, the forced portal detection mechanism is automatically triggered, and a GET request is sent to "connectivitycheck.gstatic.com".
[0037] 6. The smart socket intercepts the request and returns a 302 redirect response via the web server, redirecting the request to the local WiFi configuration interface (http: / / 192.168.4.1 / config).
[0038] 7. After receiving the redirection response, the smartphone determines that there is a forced portal on the current network, automatically pops up the system's default browser and loads the WiFi configuration interface.
[0039] 8. In the configuration interface, the user enters the name of their home WiFi, "Home-WiFi", the password, "12345678", selects the encryption method "WPA2-PSK", and clicks the "Submit" button.
[0040] 9. The smartphone sends the WiFi configuration information to the smart socket's web service in the form of an HTTP POST request, with the request parameters being "ssid=Home-WiFi&password=12345678&encryption=WPA2-PSK".
[0041] 10. The smart socket's information receiving module parses the request, extracts the WiFi name, password, and encryption method, and stores them in the local flash memory, while keeping the WiFi hotspot running.
[0042] 11. The smart socket's network connection module starts WiFi client mode and attempts to connect to the "Home-WiFi" network using the stored WiFi name, password, and encryption method.
[0043] 12. After a successful connection, the smart socket will send a message to the smartphone via web service: "Network configuration successful, device connected to Home-WiFi, hotspot can still be used for reconfiguration"; if the connection fails (e.g., incorrect password), a message will be sent: "Network configuration failed, incorrect password, please re-enter". The user can click the "back" button to re-enter the password.
[0044] 13. The smartphone displays a connection result prompt. After the user confirms, they can close the browser, and the network configuration process is complete. If they need to switch WiFi networks later, they can reconnect to the smart socket's WiFi hotspot and repeat the above network configuration steps.
[0045] Example 2: Extended Functionality of WiFi Configuration Interface and Multi-Network Switching This embodiment expands the functionality of the WiFi configuration interface and supports multiple network switching, based on Embodiment 1: 1. The WiFi configuration interface adds a "Stored WiFi List" area, which displays all WiFi configuration information stored by the smart socket (only SSID and signal strength are displayed, and the password is hidden). Users can directly select the stored WiFi network to connect without having to re-enter the password.
[0046] 2. Added the "Delete Configuration" function, which allows users to select and delete unwanted WiFi configurations from the "Stored WiFi List" to free up storage resources.
[0047] 3. Added a "Network Test" button. After the user completes the configuration, they can click this button. After the smart socket connects to the target WiFi, it will perform a network connectivity test (such as accessing the preset public network interface) and send the test results back to the smartphone.
[0048] 4. The smart socket can store multiple WiFi configuration information at the same time. Users can switch between different WiFi networks according to their needs (such as home, office, hotel, etc.). The switching process does not require reconfiguration; users only need to select the corresponding network in the WiFi configuration interface.
[0049] Example 3: Security Optimization and Flexible Hotspot Configuration To improve the security of the distribution network and support flexible hotspot configuration, the following optimizations are made in this embodiment: 1. The WiFi hotspot started by IoT devices supports encrypted configuration. After the initial network configuration is completed, users can set the hotspot password through the WiFi configuration interface. This password must be entered to connect to the hotspot in subsequent connections to prevent unauthorized devices from connecting.
[0050] 2. The WiFi configuration interface uses the HTTPS protocol to transmit data. The smart socket has a built-in self-signed SSL certificate or a third-party certified SSL certificate to ensure the encryption and security of the configuration information transmission process.
[0051] 3. Supports custom hotspot names. Users can set and save new hotspot names in the WiFi configuration interface. The new hotspot name will be used to start the hotspot after the device restarts, improving device recognition.
[0052] 4. Supports hotspots to be turned off as needed. After successful network configuration, users can select "turn off hotspot" or "keep hotspot" through the WiFi configuration interface to meet the usage needs of different scenarios (such as turning off the hotspot to save power when there is no need to reconfigure the network). Attached Figure Description
[0053] Figure 1 This is an interactive schematic diagram of the WiFi configuration system for IoT devices provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of a WiFi configuration interface provided in an embodiment of the present invention.
[0054] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A WiFi configuration method of an Internet of Things device, characterized in that, The application is applied to an Internet of Things device, and comprises: After power-on, a WiFi hotspot is automatically started, and the name of the WiFi hotspot is a device name specified by a device nameplate, a manufacturer preset string, or a configurable string; At least one smart phone manufacturer's forced portal access domain name is hijacked to a local host through forced portal technology; The hijacked access URL is redirected to a local WiFi configuration interface URL through a local Web service, and the WiFi configuration interface comprises but is not limited to a target WiFi name input area and a password input area; Target WiFi configuration information filled in the WiFi configuration interface by a user is received, and the WiFi configuration information comprises a target WiFi name and a password; Based on the WiFi configuration information, the device is controlled to connect the target WiFi network.
2. The method of claim 1, wherein, The forced portal access domain name comprises at least one of an Apple device forced portal detection domain name, an Android system device forced portal detection domain name, and a Harmony system device forced portal detection domain name.
3. The method of claim 1, wherein, The WiFi configuration interface further comprises at least one of a WiFi encryption mode selection area, a signal strength display area, and a network priority setting area, and the WiFi configuration information further comprises at least one of a user-selected encryption mode and a network priority parameter.
4. The method of claim 1, wherein, The method further comprises: After connecting the target WiFi network, a connection result is fed back to the smart phone, and the connection result comprises at least one of a connection success prompt, a connection failure prompt and a failure reason, and a network state query entry.
5. The method of claim 1, wherein, The encryption mode of the WiFi hotspot is any one of an open encryption mode, a WPA / WPA2 / WPA3 encryption mode, or a manufacturer-defined encryption mode. 6.A WiFi network configuration method of an Internet of Things device, characterized in that, The application is applied to a smart phone, and comprises: A specified name WiFi hotspot started after power-on of an Internet of Things device is connected, and the WiFi hotspot name is consistent with a device name specified by a device nameplate, a manufacturer preset string, or a configurable string; A forced portal detection mechanism is started, and a detection request is sent to a preset forced portal access domain name; A redirection response of the Internet of Things device is received, and a WiFi configuration interface of the Internet of Things device is accessed through a browser based on the redirection response; Target WiFi configuration information filled in the WiFi configuration interface by a user is obtained, and the WiFi configuration information is submitted to a local Web service of the Internet of Things device, so that the Internet of Things device connects a target WiFi network based on the configuration information.
7. The method of claim 6, wherein, The method further comprises: A WiFi connection result fed back by the Internet of Things device is received, and the connection result is displayed through any one of a browser interface, a system notification, and an application pop-up window.
8. A WiFi network configuration device for an Internet of Things (IoT) device, characterized in that, The application is applied to an Internet of Things device, and comprises: A hotspot starting module is configured to automatically start a WiFi hotspot after power-on, and the name of the WiFi hotspot is a device name specified by a device nameplate, a manufacturer preset string, or a configurable string; A domain name hijacking module is configured to hijack at least one smart phone manufacturer's forced portal access domain name to a local host through forced portal technology; The redirection module is configured to redirect the hijacked access URL to a local WiFi configuration interface URL through a web service deployed locally, and the WiFi configuration interface includes a target WiFi name input area and a password input area. The information receiving module is configured to receive target WiFi configuration information filled by a user in the WiFi configuration interface and submitted by a smartphone, and the WiFi configuration information includes a target WiFi name and a password. The network connection module is configured to control itself to connect to the target WiFi network based on the WiFi configuration information. 9.A WiFi network configuration device on a side of a smart phone, characterized in that, The hotspot connection module is configured to connect to a WiFi hotspot with a specified name started after the Internet of Things device is powered on, and the WiFi hotspot name is consistent with a device name specified on a device nameplate, a manufacturer preset string, or a configurable string. The detection module is configured to start a captive portal detection mechanism and send a detection request to a preset captive portal access domain name. The interface access module is configured to receive a redirection response of the Internet of Things device, access a WiFi configuration interface of the Internet of Things device locally through a browser based on the redirection response, and submit target WiFi configuration information filled by a user in the WiFi configuration interface to a local web service of the Internet of Things device. The Internet of Things device and the smartphone are included. The Internet of Things device is the WiFi network configuration device of claim 8. 10.A WiFi provisioning system of an Internet of Things device, the system comprising: The smartphone is the WiFi network configuration device of claim 9. The Internet of Things device and the smartphone establish a communication connection through a WiFi hotspot started by the Internet of Things device, implement transmission of target WiFi configuration information, and implement WiFi network connection of the Internet of Things device. The memory and the processor are included. The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions, and the computer executable instructions implement steps of the WiFi network configuration method of the Internet of Things device of any one of claims 1 to 5 when executed by the processor.
11. An Internet of Things device, comprising: The memory has computer executable instructions stored therein, and the computer executable instructions implement steps of the WiFi network configuration method of the Internet of Things device of any one of claims 1 to 7 when executed by the processor. 12. A computer-readable storage medium, characterized in that,