Methods, devices, systems, and storage media for accessing wireless local area networks
By assisting IoT devices in mode switching and information acquisition through mobile devices and configuration devices, and using device whitelists for identity authentication, the cumbersome batch network configuration problem under the SoftAP method is solved, enabling efficient and secure access of home devices to the wireless LAN.
Patent Information
- Application Number
- CN202210887204.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-26
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2042-07-26
AI Technical Summary
The existing SoftAP method is cumbersome and time-consuming when configuring home devices in batches, and the user operation is complicated, with low compatibility and efficiency.
Mobile devices assist IoT devices in completing the mode switching phase, configuration devices assist IoT devices in completing the network configuration information acquisition phase, device whitelists are used for identity authentication, and IoT devices cooperate to form multiple links for mode switching, enabling parallel execution.
It improves the efficiency of network distribution in batch distribution scenarios, simplifies user operations, reduces the risk of malicious attacks, and increases the success rate of network distribution.
Smart Images

Figure CN117499922B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wireless communication, and more particularly to a method, apparatus, system, and storage medium for accessing a wireless local area network. Background Technology
[0002] In a smart home scenario, home devices connected to the home LAN can interconnect with each other and be controlled in a unified manner via mobile devices (such as mobile phones), thereby providing users with a smart living experience.
[0003] Currently, households typically have multiple home appliances. In some cases, it's necessary to configure these appliances on a network (i.e., connect them to a home LAN). The mainstream configuration method is currently the Soft Access Point (SoftAP) method. When configuring home appliances in batches using the SoftAP method, users need to configure each appliance individually, which is not only cumbersome but also time-consuming. Summary of the Invention
[0004] Some embodiments of this application provide a method for accessing a wireless local area network, a wireless local area network system, an electronic device, and a computer-readable storage medium. The application is described below from multiple aspects, and the embodiments and beneficial effects of the following aspects can be referred to each other.
[0005] A first aspect provides a method for accessing a wireless local area network (WLAN), for a system including a mobile device, a configuration device, and at least one IoT device, wherein the at least one IoT device includes a first IoT device; the method includes: the configuration device determining a device whitelist, the device whitelist including device identifiers of one or more IoT devices; the first IoT device transmitting at least one broadcast frame in access point (AP) mode, the at least one broadcast frame including a first broadcast frame, the first broadcast frame including a first network identifier of the WLAN provided by the first IoT device; the mobile device receiving the first broadcast frame and sending a reply frame to the first IoT device in response to the first broadcast frame; the first IoT device switching from AP mode to site-specific (STA) mode in response to receiving the reply frame; the first IoT device transmitting a second broadcast frame on at least one wireless channel, the second broadcast frame including the device identifier of the first IoT device, the at least one wireless channel including the working channel of the configuration device; the configuration device receiving the second broadcast frame, determining that the device identifier of the first IoT device matches the device whitelist based on the second broadcast frame, and providing the first IoT device with network configuration information of the WLAN where the configuration device is located, the network configuration information being used by the first IoT device to access the WLAN.
[0006] According to the embodiments of this application, the mobile device assists the IoT device in completing the mode switching stage of the distribution network process, and the configuration device assists the IoT device in completing the distribution network information acquisition stage of the distribution network process. Since different stages are executed by different devices, the distribution network processes of different IoT devices can be executed in parallel, thereby improving the distribution network efficiency in batch distribution network scenarios.
[0007] In addition, unlike the SoftAP network configuration method, in this embodiment, the configuration device performs identity authentication on the IoT devices to be configured based on the device whitelist, thereby saving user operations.
[0008] In some implementations, at least one IoT device further includes a second IoT device; the method further includes: the second IoT device sending a third broadcast frame in AP mode, the third broadcast frame including a first network identifier of the wireless local area network provided by the second IoT device; the first IoT device, which has switched to STA mode, receiving the third broadcast frame; the first IoT device sending a reply frame to the third broadcast frame to the second IoT device, the reply frame sent by the first IoT device to the third broadcast frame being used to trigger the second IoT device to switch from AP mode to STA mode.
[0009] According to the embodiments of this application, in the process of mass distribution of IoT devices, multiple links for mode switching can be formed through mutual assistance between IoT devices, which can significantly improve the efficiency of distribution.
[0010] In some implementations, the first network identifier is a string named according to a first rule, and the first network identifier includes random characters.
[0011] According to the embodiments of this application, malicious attacks from other devices can be mitigated.
[0012] In some implementations, at least one broadcast frame further includes a fourth broadcast frame, which includes a second network identifier of the wireless local area network provided by the first IoT device. The second network identifier is a string named according to a second rule and is used by the first IoT device to access the wireless local area network using the Soft Access Point (SoftAP) method.
[0013] In some implementations, the mobile device receiving the first broadcast frame includes: the mobile device performing a wireless channel scan to receive the first broadcast frame.
[0014] In some implementations, the response frame sent by the mobile device to the first broadcast frame includes a first message, which is a message determined according to a first network identifier.
[0015] In some implementations, configuring the device to determine a device whitelist includes: configuring the device to receive device identifiers of one or more IoT devices sent by a mobile device, and determining a device whitelist based on the received device identifiers.
[0016] In some implementations, the second broadcast frame also includes encryption parameters used by the first IoT device and the configuration device for key negotiation.
[0017] In some implementations, the configuration device provides wireless local area network (WLAN) configuration information to the first IoT device, including: the configuration device determining an encryption key based on encryption parameters in a second broadcast frame; the configuration device encrypting the WLAN configuration information based on the encryption key; and sending the encrypted WLAN configuration information to the first IoT device.
[0018] In some implementations, the first broadcast frame is a beacon frame; and / or, the wireless LAN's network configuration information includes the wireless LAN's network identifier (SSID); and / or, the IoT device's device identifier includes the IoT device's MAC address.
[0019] A second aspect provides a method for accessing a wireless local area network (WLAN) for a first IoT device. The method includes: transmitting at least one broadcast frame in access point (AP) mode, the at least one broadcast frame including a first broadcast frame, the first broadcast frame including a first network identifier of the WLAN provided by the first IoT device; receiving a reply frame from a mobile device to the first broadcast frame, and switching from AP mode to site-specific (STA) mode; transmitting a second broadcast frame on at least one wireless channel, the second broadcast frame including a device identifier of the first IoT device, the at least one wireless channel including an operating channel of a configuration device; and receiving network configuration information from the configuration device in response to the second broadcast frame, the network configuration information being used by the first IoT device to access the WLAN where the configuration device is located.
[0020] According to the embodiments of this application, the mobile device assists the IoT device in completing the mode switching stage of the distribution network process, and the configuration device assists the IoT device in completing the distribution network information acquisition stage of the distribution network process. Since different stages are executed by different devices, the distribution network processes of different IoT devices can be executed in parallel, thereby improving the distribution network efficiency in batch distribution network scenarios.
[0021] In addition, unlike the SoftAP network configuration method, in this embodiment, the configuration device performs identity authentication on the IoT devices to be configured based on the device whitelist, thereby saving user operations.
[0022] In some implementations, the method further includes: a first IoT device that has switched to STA mode receiving a third broadcast frame from a second IoT device in AP mode, the third broadcast frame including a first network identifier of the network provided by the second IoT device; and sending a reply frame to the third broadcast frame to the second IoT device, the reply frame sent by the first IoT device to the third broadcast frame being used to trigger the second IoT device to switch from AP mode to STA mode.
[0023] According to the embodiments of this application, in the process of mass distribution of IoT devices, multiple links for mode switching can be formed through mutual assistance between IoT devices, which can significantly improve the efficiency of distribution.
[0024] In some implementations, the first network identifier is a string named according to a first rule, and the first network identifier includes random characters.
[0025] According to the embodiments of this application, malicious attacks from other devices can be mitigated.
[0026] In some implementations, at least one broadcast frame includes a fourth broadcast frame, which includes a second network identifier of the wireless local area network provided by the first IoT device. The second network identifier is a string named according to a second rule and is used by the first IoT device to access the wireless local area network using the Soft Access Point (SoftAP) method.
[0027] In some implementations, the second broadcast frame includes encryption parameters used by the first IoT device and the configuration device for key negotiation.
[0028] A third aspect provides a method for accessing a wireless local area network (WLAN) for configuring a device. The method includes: determining a device whitelist, the device whitelist including device identifiers of one or more IoT devices; receiving a second broadcast frame from a first IoT device, the second broadcast frame including the device identifier of the first IoT device; determining, based on the second broadcast frame, that the device identifier of the first IoT device matches the device whitelist, and providing the first IoT device with configuration information for the WLAN where the device is located, the configuration information being used by the first IoT device to access the WLAN.
[0029] According to the embodiments of this application, the configuration device assists the IoT device in completing the distribution network information acquisition stage of the distribution network process. Different stages of the IoT device's distribution network process can be executed by different devices. Therefore, the distribution network processes of different IoT devices can be executed in parallel, thereby improving the distribution network efficiency in batch distribution network scenarios.
[0030] In addition, unlike the SoftAP network configuration method, in this embodiment, the configuration device performs identity authentication on the IoT devices to be configured based on the device whitelist, thereby saving user operations.
[0031] In some implementations, the second broadcast frame includes encryption parameters; providing the first IoT device with wireless local area network (WLAN) configuration information includes: determining an encryption key based on the encryption parameters in the second broadcast frame; encrypting the configuration information based on the encryption key; and sending the encrypted configuration information to the first IoT device.
[0032] A fourth aspect provides a wireless local area network (WLAN) system, comprising a mobile device, a configuration device, and at least one IoT device. The at least one IoT device includes a first IoT device. The mobile device is used to perform the steps executed by the mobile device in any embodiment of the method provided in the first aspect of this application; the configuration device is used to perform the steps executed by the configuration device in any embodiment of the method provided in the first aspect of this application; and the first IoT device is used to perform the steps executed by the first IoT device in any embodiment of the method provided in the first aspect of this application. The beneficial effects achievable by the fourth aspect can be referred to the beneficial effects of any embodiment of the first aspect of this application, and will not be repeated here.
[0033] A fifth aspect provides an electronic device, comprising: a memory for storing instructions executable by one or more processors of the electronic device; and a processor, which, when executing the instructions in the memory, causes the electronic device to perform the method provided in any embodiment of the second aspect of this application. The beneficial effects achievable by the fifth aspect can be referred to in the context of the beneficial effects of any embodiment of the second aspect of this application, and will not be repeated here.
[0034] A sixth aspect provides an electronic device, comprising: a memory for storing instructions executable by one or more processors of the electronic device; and a processor, which, when executing the instructions in the memory, causes the electronic device to perform the method provided in any embodiment of the third aspect of this application. The beneficial effects achievable by the sixth aspect can be referred to in the context of the beneficial effects of any embodiment of the third aspect of this application, and will not be repeated here.
[0035] A seventh aspect provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the method provided in any embodiment of the first aspect, any embodiment of the second aspect, or any embodiment of the third aspect of this application. The beneficial effects achievable by the seventh aspect can be found in the beneficial effects of any embodiment of the first aspect, any embodiment of the second aspect, or any embodiment of the third aspect of this application, and will not be repeated here. Attached Figure Description
[0036] Figure 1 An exemplary structural diagram of a wireless local area network provided in an embodiment of this application;
[0037] Figure 2 This is a schematic diagram of the working channel of a wireless local area network provided in an embodiment of this application;
[0038] Figure 3 This is a schematic diagram of the structure of the management frame provided in an embodiment of this application;
[0039] Figure 4 An exemplary structural diagram of a home local area network provided in the embodiments of this application;
[0040] Figure 5 An exemplary interface of the device management application provided in the embodiments of this application. Figure 1 :
[0041] Figure 6 An exemplary flowchart of a power distribution method provided in some embodiments;
[0042] Figure 7 An exemplary interface of the device management application provided in the embodiments of this application. Figure 2 :
[0043] Figure 8 A schematic diagram illustrating the batch network configuration process for some embodiments;
[0044] Figure 9 Exemplary flow of the method for accessing a wireless local area network provided in the embodiments of this application Figure 1 ;
[0045] Figure 10 An exemplary interface of the device management application provided in the embodiments of this application. Figure 3 :
[0046] Figure 11 This application provides a schematic diagram of the working state of home appliances in AP mode as described in the embodiments of this application. Figure 1 ;
[0047] Figure 12 A schematic diagram of the structure of the first broadcast frame provided in an embodiment of this application;
[0048] Figure 13 A schematic diagram of the structure of the reply frame of the first broadcast frame provided in the embodiments of this application;
[0049] Figure 14 This is a schematic diagram of the structure of the second broadcast frame provided in an embodiment of this application;
[0050] Figure 15 This is a schematic diagram of the structure of the response frame of the second broadcast frame provided in the embodiments of this application;
[0051] Figure 16 An exemplary interface of the device management application provided in the embodiments of this application. Figure 4 :
[0052] Figure 17 Exemplary flow of the method for accessing a wireless local area network provided in the embodiments of this application Figure 2 ;
[0053] Figure 18 This application provides a schematic diagram of the working state of home appliances in AP mode as described in the embodiments of this application. Figure 2 ;
[0054] Figure 19A A schematic diagram illustrating the batch network configuration process of devices provided in the embodiments of this application;
[0055] Figure 19B An exemplary interface of the device management application provided in the embodiments of this application. Figure 5 :
[0056] Figure 20 Exemplary flow of the method for accessing a wireless local area network provided in the embodiments of this application Figure 3 ;
[0057] Figure 21 An exemplary flowchart illustrating the sending of a second broadcast frame by an IoT device according to an embodiment of this application;
[0058] Figure 22 An exemplary flowchart illustrating how a configuration device sends network distribution information in encrypted form, as provided in the embodiments of this application;
[0059] Figure 23 An exemplary flowchart for decrypting network distribution information by an IoT device provided in this application embodiment;
[0060] Figure 24 A schematic diagram illustrating the structure of an electronic device provided in an embodiment of this application;
[0061] Figure 25 A block diagram of an electronic device provided according to an embodiment of this application is shown;
[0062] Figure 26 A schematic diagram of the structure of a System on Chip (SOC) provided in an embodiment of this application is shown. Detailed Implementation
[0063] This application provides a wireless local area network access method that can improve network configuration efficiency and simplify user operations when configuring Internet of Things (IoT) devices in batches.
[0064] To facilitate understanding, some terms that may be involved in the embodiments of this application will be introduced first.
[0065] (1) Wireless Local Area Network (WLAN). A wireless local area network (WLAN) is a network system that interconnects multiple computer devices through wireless communication technology, enabling the multiple computer devices to communicate with each other and share resources.
[0066] Wireless local area networks (WLANs) follow the IEEE 802.11 series of protocols defined by the Institute of Electrical and Electronics Engineers (IEEE). Currently, the IEEE 802.11 series of protocols includes multiple versions such as 802.11be, 802.11ax, and 802.11a / b / g / n / ac. In this application, the WLAN can be a wireless network based on any of these protocol versions. In some embodiments, the WLAN can be a Wireless Fidelity (Wi-Fi) network, a cellular network, etc. Throughout this document, devices capable of accessing a WLAN are referred to as "wireless devices."
[0067] Figure 1 An exemplary structure of a wireless local area network 50 is shown. (Reference) Figure 1 The wireless LAN 50 includes multiple wireless devices: one access point (AP) and multiple stations (STAs). The AP creates the wireless LAN 50 and serves as its hub, while the STAs are located at its endpoints. STAs connect to the wireless LAN 50 by establishing a connection (or association) with the AP. Once connected, different STAs can interact with each other via the AP; direct data exchange between STAs is typically not possible.
[0068] Wireless LAN 50 can declare its identity through a Service Set Identifier (SSID). The SSID can be a specific string composed of letters, numbers, etc., such as "Connection7890". The access point (AP) device can send a broadcast frame carrying the SSID to declare the existence of wireless LAN 50. Other devices, after discovering wireless LAN 50, can request access from the AP device. In the following text, the device requesting access to wireless LAN 50 will be referred to as the "device to be configured".
[0069] Devices seeking network access can connect to the wireless LAN 50 by sending network configuration information to the access point (AP). When the wireless LAN 50 is an encrypted network (e.g., a private network in a home, office, or other location), the network configuration information includes the service set identifier (SSID) and access password (PWD) of the wireless LAN 50. When the wireless LAN 50 is a public network (e.g., a public network in a shopping mall, station, or other location), the network configuration information may not include the PWD.
[0070] (2) AP mode and STA mode. AP mode and STA mode are two working modes of wireless devices. When a wireless device works in AP mode, it can function as an AP device. For example, when a wireless device works in AP mode, it is responsible for sending broadcast frames carrying the wireless LAN SSID so that the device to be configured can discover the wireless LAN 50; it is also responsible for listening for connection requests from the device to be configured so as to connect the device to the wireless LAN 50, etc.
[0071] When a wireless device operates in STA mode, it can perform WLAN scanning (i.e., wireless channel scanning) to discover wireless LAN 50 in the environment; it can also send connection requests to AP devices to access wireless LAN 50. Additionally, it can be understood that STA devices within wireless LAN 50 also operate in STA mode.
[0072] It should be noted that wireless devices can operate in different modes at different times. For example, a wireless device can operate in T... A The time period operates in AP mode, in T B The system operates in STA mode during certain periods.
[0073] (3) Channel. A channel, also known as a transmission channel, is a data signal transmission channel that uses wireless signals (electromagnetic waves) as the transmission carrier. The IEEE 802.11 protocol specifies multiple operating channels for wireless local area networks (WLANs), some of which are located in the 2.4 GHz band and some in the 5 GHz band.
[0074] For ease of description, please refer to Figure 2 In this paper, the operating channels of the wireless LAN 50 are denoted as channel 1, channel 2, ..., channel M, where M is any integer greater than 2 (e.g., M = 13). At any given time, all devices in the wireless LAN 50 operate on the same channel, for example, channel 4, which is configured by the access point (AP) device. Furthermore, the AP device can periodically update the current operating channel of the wireless LAN 50. For example, the AP device updates the current operating channel to the next adjacent channel at 2:00 AM every day.
[0075] STA devices in WLAN 50 can briefly leave their current operating channel. For example, when an STA device needs to discover other WLANs 50, it can briefly leave its current operating channel to perform WLAN scanning (by listening alternately on channels 1 through M). The AP can set a maximum time T1 for the STA device to leave its current operating channel, for example, setting T1 to 10 seconds. When the STA device leaves its current operating channel for more than time T1, the AP device disconnects from the STA device.
[0076] (4) Management frames. The IEEE 802.11 protocol frames include three different types: data frames, control frames, and management frames. When the AP device and STA device are connected, they can exchange information through data frames and control frames; when the AP device and STA device are disconnected, they can interact through management frames.
[0077] Management frames include several subclasses, such as beacon frames, probe request frames, probe response frames, association request frames, and disassociation frames. Different subclasses of management frames are used in different situations. For example, beacon frames can be used to declare the existence of a wireless LAN; association request frames can be used to establish an association (or "connection") between access points (APs) and standby devices (STAs).
[0078] Figure 3 A schematic diagram of the management frame structure is shown. (Reference) Figure 3 A management frame consists of a header, a body, and a checksum. The header includes several control fields, such as a type identifier field (to identify which subclass the management frame belongs to), a retransmission frame identifier field, an encrypted frame identifier field, and a MAC address field (used to store the local machine's MAC address).
[0079] The frame body includes fixed message fields and custom message fields (or "tag fields"). Fixed message fields are used to write specific information about the management frame, such as timestamp information and channel information. Tag fields are used to write user-defined information.
[0080] The verification section is used to write verification information into the management frame for error detection. The verification method can be Cyclic Redundancy Check (CRC) or similar methods, and this application does not limit it.
[0081] The following describes specific embodiments of this application. In this application, wireless local area network (WLAN) technology is applied to the Internet of Things (IoT). That is, multiple IoT devices are interconnected through WLAN technology to achieve communication and information exchange between them, and to realize intelligent control and management of each IoT device. Specifically, this application provides a method for connecting IoT devices to a WLAN, which can improve access efficiency in scenarios where IoT devices are connected in batches.
[0082] In this application, the wireless local area network (WLAN) can be applied in any setting, such as homes, factories, docks, office buildings, mines, ships, aircraft, and other similar locations. Furthermore, the IoT devices connected to the WLAN can be any type of device, including office equipment (e.g., projectors, printers, mice), smart home devices (e.g., lighting equipment, cooking equipment, cleaning equipment), urban public facilities (e.g., road surveillance cameras, fire-fighting equipment), factory assembly line equipment (e.g., various position sensors, drive motors), construction equipment (e.g., winches, welding machines), etc. This application does not impose any limitations on these devices.
[0083] In the following text, a home LAN is used as an example of a wireless LAN, and smart home devices are used as examples of IoT devices. However, it is understood that this application is not limited to these examples.
[0084] Figure 4 An exemplary structural diagram of a home local area network 60 provided in an embodiment of this application is shown. Figure 4 (a) shows the state where the home device is not connected to the home LAN 60. Figure 4 (b) shows the status of home devices connected to home LAN 60. Figure 4 This includes an AP device 10 (e.g., a home gateway), a mobile device 20 (e.g., a mobile phone), a configuration device 30 (also known as a "master configurator"), and multiple smart home devices (home device 01, home device 02, ..., home device N). This embodiment does not limit the specific types of home devices; for example, home devices can be... Figure 4 The water dispenser, door lock, fan, kettle, air conditioner, etc. shown can also be used for... Figure 4 Robotic vacuum cleaner, microwave oven, LED strip lights, etc. (not shown). Figure 4 (a) Mobile device 20 and configuration device 30 are connected to AP device 10; in Figure 4 (b) In addition to mobile device 20 and configuration device 30, each home device is also connected to AP device 10. This embodiment provides a method for accessing a wireless local area network (WLAN) to connect each home device to a home WLAN 60, for example, connecting home devices from... Figure 4 (a) The state of not being connected to AP device 10 as shown in the diagram changes to Figure 4 (b) shows the state of connection to AP device 10.
[0085] It is understood that in home LAN 60, configuration device 30, mobile device 20, and various home appliances are all STA devices. For example, the SSID of home LAN 60 is "Connection7890" and the PWD is "abc123". In some embodiments, mobile device 20 and / or AP device 10 may be connected to the Internet to access devices on the Internet (e.g., cloud server 40). In other embodiments, mobile device 20 may not be connected to home LAN 60.
[0086] After home devices are connected to the home LAN 60, the mobile device 20 can control all home devices in a unified manner. Figure 5 An example is shown. (Reference) Figure 5 Mobile devices 20 include device management applications for managing home devices (e.g., smart living). TM The device management application's scene interface 21 includes multiple scene options. When a user selects a scene, they can control each home appliance to work in the mode corresponding to that scene. For example, when a user selects the "Away from Home" option, they can control each home appliance to work in the user's away-from-home mode, such as closing the door lock and turning off the air conditioner.
[0087] In some embodiments, the cloud server 40 serves as a backend device for controlling home appliances. For example, each home appliance registers with the cloud server 40 after connecting to the home LAN 60. When a user controls the home appliances via the mobile device 20, the mobile device 20 sends the user's control information to the cloud server 40. After analyzing the user's control information, the cloud server 40 issues specific control commands to the home appliances. For example, after the user selects the "Away from Home" option, the cloud server 40 issues a closing command to the door lock. However, this application is not limited to this. For example, in other embodiments, other devices (e.g., configuration device 30) can also be used as backend devices for controlling home appliances.
[0088] This application does not limit the specific form of the AP device 10, the configuration device 30, and the mobile device 20. For example, the AP device 10 can be a home gateway, router, computer, etc.; the configuration device 30 can be a smart box, large-screen device, smart speaker, etc.; and the mobile device 20 can be a mobile phone, tablet, laptop, wearable device, etc. In some embodiments, the mobile device 20 can have a good user interface, for example, it can have a touch screen, camera, etc.
[0089] To achieve unified control over all home appliances, they need to be connected to the home LAN 60. This process of connecting home appliances to the home LAN 60 is also known as the process of configuring the home appliances for network use. In some scenarios (e.g., new renovations, or smart home upgrades), batch configuration of home appliances is required. For example, batch configuration of home appliances 1 through N may be necessary.
[0090] In some embodiments, the method for configuring home devices is as follows: AP device 10 or mobile device 20 broadcasts or multicasts IEEE 802.11 messages carrying configuration information M (typically including the SSID and PWD of the home LAN 60) of the home LAN 60. The home devices listen for messages in the environment in promiscuous mode. Promiscuous mode is a data reception mode for network devices (which can be wireless devices as described herein, or other network devices, such as devices in a wired network). When a network device is in promiscuous mode, it can receive all messages passing through it, regardless of whether the destination address of the message is that of the network device. After the home device captures a data message conforming to the configuration rules, it locks the current channel and attempts to receive all messages on the current channel before parsing out the configuration information M. Then, the home device initiates a connection request to AP device 10 based on the received configuration information M to establish a connection with AP device 10. This configuration method provided in this embodiment is called "one-click configuration".
[0091] One-click network configuration has strict compatibility requirements for AP device 10 and mobile device 20. For example, when AP device 10 has its broadcast or multicast functions disabled, or when mobile device 20 is connected to other wireless hotspots (e.g., 5G hotspots), home devices cannot receive the network configuration information M and therefore cannot connect to the home LAN 60. Therefore, the overall compatibility of one-click network configuration is poor, and the network configuration success rate is low.
[0092] In other implementations, home devices are configured via a Soft Access Point (SoftAP) method. The main difference between SoftAP and one-click configuration is that in one-click configuration, the mobile device 20 sends the configuration information M via multicast or broadcast; while in SoftAP configuration, the mobile device 20 sends the configuration information M to the home devices via a point-to-point IP channel. The following describes the process in conjunction with... Figure 6 Please provide an explanation.
[0093] Figure 6 Taking home device 10 as an example, an exemplary process is shown in which mobile device 20 sends network configuration information M of home LAN 60 to home device in SoftAP network configuration mode, specifically including the following steps:
[0094] S10: Home device 10 broadcasts beacon frames in AP mode.
[0095] When home device 10 is in the network configuration state, it first operates in AP mode and sends beacon frames in AP mode. The beacon frame carries the SSID of the wireless network (denoted as "Wireless Network E") provided by home device 10, for example, "heater".
[0096] S20: Mobile device 20 receives a beacon frame sent by home device 10.
[0097] Mobile device 20 performs WLAN scanning (or "wireless channel scanning", specifically listening for wireless frames in the environment on channels 1 to M in turn). When mobile device 20 scans to the operating channel of home device 10 (e.g., channel 3), if home device 10 happens to send a complete beacon frame, mobile device 20 can receive that beacon frame.
[0098] S30: Mobile device 20 obtains the SSID of the wireless network provided by home device 10. By parsing the beacon frame, mobile device 20 can obtain the SSID of wireless network E (this SSID can be understood as the network configuration information of wireless network E).
[0099] S40: Mobile device 20 establishes a connection with home device 10.
[0100] Mobile device 20 initiates a connection request to home device 40 based on the obtained SSID. Upon receiving the connection request, home device 10 establishes a connection with mobile device 20. After successful connection, mobile device 20 and home device 10 can establish a point-to-point IP channel. For example, during the connection establishment process, home device 10 assigns an IP address (e.g., 192.168.1.10) to mobile device 20 according to the Dynamic Host Configuration Protocol (DHCP) to establish a point-to-point IP channel.
[0101] S50: Mobile device 20 sends network configuration information M to home device 10 via IP channel.
[0102] Specifically, mobile device 20 first requests the user to input network configuration information M, and then sends the user-input network configuration information M to home device 10. For example, after establishing a connection with home device 10, mobile device 20 displays as follows: Figure 7The network configuration information input interface 22 is shown. After the user confirms that the network configuration device is correct (for example, by confirming the network configuration device through the device identifier "heater"), the user enters the SSID and PWD (i.e., the network configuration information M of the home LAN 60) in the input box of interface 22. After receiving the user input, the mobile device 20 sends the network configuration information M of the home LAN 60 to the home device 10 through the IP channel established with the home device 10.
[0103] After receiving the network configuration information M, home device 10 switches its operating mode from AP mode to STA mode. Then, based on the received network configuration information M, home device 10 initiates a connection request to AP device 10 in home LAN 60 to access home LAN 60.
[0104] In the SoftAP configuration method, mobile device 20 sends configuration information M to home devices via a point-to-point IP channel. According to the IEEE 802.11 protocol, a STA device (e.g., mobile device 20) can only establish a connection with one AP device 10 (e.g., a home device) at a time. Therefore, mobile device 20 can only assist one home device in configuration at a time. (Reference) Figure 8 When there are multiple home devices waiting to be networked (home device 1, home device 2, ..., home device N), the mobile device 20 needs to establish a connection with each home device one by one, which makes the network configuration process slow and cumbersome.
[0105] In addition, in order to establish a connection with the home devices to be configured, the mobile device 20 needs to disconnect from the AP device 10 in the home LAN 60, which will affect the normal communication of the mobile device 20.
[0106] In addition, to receive beacon frames sent by home devices, mobile device 20 needs to perform WLAN scanning on each channel. Since the listening time of mobile device 20 to the working channel of the home devices overlaps with the time when the home devices send beacon frames, mobile device 20 can receive the beacon frames. Typically, mobile device 20 needs to perform multiple rounds of WLAN scanning to receive beacon frames. Therefore, the WLAN scanning step (e.g., step S20) is relatively time-consuming. When multiple home devices need to be configured for network setup, the WLAN scanning step may become an efficiency bottleneck for the SoftAP network configuration method.
[0107] To address these issues, this application provides a method for accessing a wireless local area network (or "network configuration method") to solve the aforementioned technical problems. In this embodiment, two devices (a mobile device 20 and a configuration device 30) assist a home device (as an example of an IoT device) in completing the network configuration process. The mobile device 20 triggers the home device to switch from the AP device 10 to STA mode (this stage is called the mode switching stage of the network configuration process), and the configuration device 30 provides the home device in STA mode with network configuration information M of the home LAN 60 (as an example of a wireless local area network) (this stage is called the network configuration information acquisition stage of the network configuration process). This allows the network configuration processes of different home devices to be executed in parallel. For example, when home device 01 is in the network configuration information acquisition stage, home device 02 can be in the mode switching stage, thereby improving the network configuration efficiency of the home devices.
[0108] Furthermore, in the network configuration method provided in this application, the mobile device 20 does not need to establish a connection with home appliances. Therefore, during the network configuration process, the mobile device 20 does not need to disconnect from the AP device 10 in the home LAN 60, thereby reducing the impact on the normal communication of the mobile device 20.
[0109] In addition, when a home device switches from AP mode to STA mode, it can act as a trigger device to instruct other home devices still in AP mode to switch from AP mode to STA mode. This can create multiple links for home devices to complete mode switching, thereby accelerating the batch network configuration process.
[0110] The following describes the specific steps of the method for accessing a wireless local area network (WLAN) provided in the embodiments of this application. In this embodiment, a home LAN 60 is used as an example of a WLAN, but it is understood that this application is not limited thereto. In other embodiments, the WLAN can be applied to various occasions such as factories, docks, mines, and ships.
[0111] refer to Figure 9 The method for accessing a wireless local area network provided in this embodiment includes the following steps:
[0112] S110: Mobile device 20 obtains the device identifier of the home device to be configured on the network.
[0113] The device identifier of a home appliance is used to uniquely identify the home appliance. Examples include the home appliance's Media Access Control (MAC) address, Serial Number (SN), Personal Identification Number (PIN), device name, etc., but this application does not limit the specific identifier. In this embodiment, the mobile device 20 can obtain one or more device identifiers from the home appliance.
[0114] Device identification for home appliances can be located on the appliance itself, its packaging, or accessories (e.g., instruction manual). For example, device identification can be printed on the appliance's nameplate or warranty card, stored in an embedded chip, or written to an electronic tag (e.g., an NFC chip). Device identification can be presented in various forms such as barcodes, QR codes, or strings.
[0115] In this embodiment, the mobile device 20 acquires device identifiers for multiple home appliances (home appliances 1 to N) one by one. This embodiment does not limit the method by which the mobile device 20 acquires the device identifiers. For example, when the device identifier is a QR code, the mobile device 20 can obtain the device identifier of the home appliance by scanning the QR code; when the device identifier is a string printed on a nameplate, the mobile device 20 can obtain the device identifier of the home appliance by receiving user input; when the device identifier is NFC tag data, the mobile device 20 can obtain the device identifier of the home appliance by reading the NFC tag, and so on.
[0116] S120: Mobile device 20 requests activation code for home device from cloud server 40.
[0117] To facilitate subsequent registration of home devices on cloud server 40 (e.g., Huawei Home Cloud), mobile device 20 requests an activation code from cloud server 40 before connecting to home LAN 60. After connecting to home LAN 60, the home device can use this activation code to initiate a registration request to cloud server 40.
[0118] For example, refer to Figure 10 After obtaining the device identifiers of N home devices, the mobile device 20 can display the obtained device identifiers on the interface 23 of the device management application on the mobile device 20. Figure 10 The image shows the MAC addresses of N home devices. After the user clicks the "Batch Get Activation Codes" button 24, the mobile device 20 sends an activation code retrieval request to the cloud server 40 to obtain N activation codes from the cloud server 40. Each activation code can be a random string, for example, "d2f7".
[0119] S130: Mobile device 20 sends the device identifier and activation code of each home device to configuration device 30.
[0120] For example, mobile device 20 sends the device identifiers of N home devices and N activation codes to configuration device 30 via AP device 10 in home LAN 60.
[0121] S140: Configure device 30 to determine the device whitelist based on the device identifier of the home device.
[0122] After receiving the device identifiers of each home appliance, configuration device 30 determines a device whitelist based on the received device identifiers. The device whitelist is used for subsequent authentication of the home appliances to be configured (the authentication process will be described in detail in step S320 below). Table 1 shows an example of a device whitelist. Specifically, when the device identifier received by configuration device 30 includes a MAC address, the MAC address is added to the "MAC" field of the device whitelist; when the device identifier received by configuration device 30 includes a serial number (SN), the SN is added to the "SN" field. Additionally, configuration device 30 also adds the received activation codes to the "Activation Code" field and distributes the received N activation codes to the N home appliances.
[0123] Table 1 Equipment Whitelist
[0124] Equipment serial number MAC SN Activation code 1 08:00:20:0A:8C:6D 002684 d2f7 2 10:11:21:1A:6D:2A 000227 1258 3 13:41:20:G0:7H:2C 005849 11a4 …… …… …… …… N 01:03:20:3C:40:52 000147 2658
[0125] It should be noted that Table 1 is an exemplary description of the device whitelist. In other embodiments, the device whitelist may take different forms. For example, the device identifier of a home appliance may only include the device identifier of a certain type of home appliance (e.g., MAC address); or, the device whitelist may not include the activation code of the home appliance. In addition, the number N of home appliances can be any value, such as 2, 5, 16, etc.
[0126] Steps S110 to S140 constitute the data preparation stage S1 of the network configuration method provided in this embodiment. In the data preparation stage S1, the configuration device 30 obtains a whitelist of devices for subsequent authentication of home appliances. After the data preparation stage S1, the home appliance mode switching stage S2 (including steps S210 to S240) begins. The steps in the mode switching stage S2 can be applied to any home appliance to be configured; the following description uses home appliance 01 (specifically a water dispenser) as an example.
[0127] S210: Home device 01 (as the first IoT device) sends a broadcast frame S1-1 (as the first broadcast frame) in AP mode. The broadcast frame S1-1 carries the first network identifier (denoted as "first SSID") of the wireless network E-1 provided by home device 01.
[0128] When home device 01 is in network configuration standby mode, it initially operates in AP mode. (Reference) Figure 11 In AP mode, home device 01 can send a broadcast frame S1-1 to provide wireless network E-1 to the outside world. The broadcast frame S1-1 includes the first SSID of wireless network E-1. The first SSID is explained below.
[0129] The first SSID is a string named according to a first rule. According to the first rule, the first SSID is a string of a set length (e.g., 32 bits), which includes a fixed part and a random part. The fixed part consists of predetermined fixed characters (e.g., pw), and the random part is a string randomly generated by home device 01 during this network configuration process, such as "2aacc45……d2356". The home device updates the value of the random part each time it configures the network. That is, the value of the first SSID of home device 01 is different each time it configures the network. This is because if the value of the first SSID is the same each time it configures the network, when broadcast frame S1-1 is illegally intercepted, other devices can use broadcast frame S1-1 to launch malicious attacks on home device 01, for example, forcing home device 01 to switch from AP mode to STA mode, making home device 01 unable to successfully configure the network. In this implementation, home device 01 can reduce malicious attacks from other devices by updating the first SSID each time it configures the network.
[0130] This embodiment does not limit the order of the fixed and random parts; the fixed part can be located before or after the random part. This embodiment also does not limit the length of the fixed and random parts; for example, both the fixed and random parts can be 10 bits long. In some embodiments, to increase the randomness of the first SSID, the length of the random part can be greater than the length of the fixed part. For example, when the total length of the first SSID is 32 bits, the fixed part is 2 bits long, and the random part is 30 bits long.
[0131] For example, broadcast frame S1-1 is a management frame. (See reference...) Figure 12The first SSID can be located in the Tag field of the broadcast frame S1-1. In some embodiments, considering that the beacon frame is a management frame without an acknowledgement mechanism, the broadcast frame S1-1 is specifically implemented as a beacon frame. However, this application is not limited to this. In other embodiments, the broadcast frame S1-1 can also be a management frame of other subclasses, such as a Probe Request frame, a probe response frame, etc.
[0132] Additionally, when home device 01 is in AP mode, it can periodically send broadcast frames S1-1 at a set time interval ΔT1. This application does not limit the specific value of the time interval ΔT1. For example, the time interval ΔT1 can be 50ms, 100ms, 200ms, etc.
[0133] S220: Mobile device 20 starts WLAN scanning to receive broadcast frame S1-1 sent by home device 01.
[0134] For example, after sending the device identifier of the home device to the configuration device 30 (e.g., after step S130), the mobile device 20 may initiate a WLAN scan (or "wireless channel scan," specifically listening alternately on channels 1 to M) to listen for IEEE 802.11 protocol frames in the environment. When the mobile device 20 is listening to the operating channel of the home device 01 (e.g., channel 2), if the home device 01 sends a complete broadcast frame S1-1, the mobile device 20 may receive the broadcast frame S1-1.
[0135] S230: Mobile device 20 sends a reply frame B1-1 (as the first reply frame) to home device 01 in response to broadcast frame S1-1.
[0136] After receiving broadcast frame S1-1, mobile device 20 can parse the first SSID of home device 01 from broadcast frame S1-1 and send a reply frame B1-1 to home device 01 in response to broadcast frame S1-1. It can be understood that mobile device 20 sends reply frame B1-1 on the working channel of home device 01 (e.g., channel 2) so that home device 01 can receive reply frame B1-1. After sending reply frame B1-1, mobile device 20 can continue to scan the channel to listen for broadcast frames sent by other home devices.
[0137] The response frame B1-1 may include a custom message M-1 (as the first message). In some embodiments, the custom message M-1 is a message determined based on the first SSID of home device 01. For example, the custom message M-1 is the same as the first SSID of home device 01; or, the custom message M-1 is the reverse order of the first SSID of home device 01; or, the custom message M-1 is the hash value obtained by hashing the first SSID of home device 01, etc., which will not be elaborated further. In this way, after receiving the response frame B1-1, home device 01 can determine that the response frame B1-1 is a reply to the broadcast frame S1-1.
[0138] Reply frame B1-1 can be a management frame. (See reference) Figure 13 The custom message M-1 can be located in the Tag field of the response frame B1-1. This embodiment does not limit the specific type of the response frame B1-1; for example, the response frame B1-1 can be a beacon frame, a probe request frame, a probe response frame, etc. Additionally, in other embodiments, the response frame B1-1 may not include the custom message M-1, but instead include a fixed-format message, such as the fixed-format message "0000".
[0139] S240: Home appliance 01 switches from AP mode to STA mode.
[0140] In response to receiving reply frame B1-1, home device 01 switches from AP mode to STA mode. That is, reply frame B1-1 is used to trigger home device 01 to switch from AP mode to STA mode. Mobile device 20 is the triggering device that assists home device 01 in completing the mode switch.
[0141] Steps S210 to S240 constitute the mode switching stage S2 of the network distribution method provided in this embodiment. In mode switching stage S2, the home appliance to be networked switches from AP mode to STA mode. After mode switching stage S2, the network distribution information acquisition stage S3 (including steps S310 to S330) of the home appliance begins. The steps in network distribution information acquisition stage S3 can be used for any home appliance that has completed mode switching; the following description uses home appliance 01 as an example.
[0142] S310: Home device 01 transmits broadcast frame S1-3 (as an example of a second broadcast frame) on channels 1 to M. The broadcast frame S1-3 carries the device identifier of home device 01.
[0143] After completing the mode switch (i.e., switching from AP mode to STA mode), home device 01 will transmit broadcast frames S1-3 alternately on channels 1 to M. The broadcast frames S1-3 carry the device identifier of home device 01, such as its MAC address and / or SN number. Other details regarding the device identifier of home device 01 are described in step S110 and will not be repeated here.
[0144] Broadcast frames S1-3 can be management frames, such as beacon frames, probe request frames, etc. (See reference) Figure 14 When the device identifier of home device 01 includes the MAC address of the home device, the MAC address of home device 01 can be located in the frame header of broadcast frame S1-3; when the device identifier of home device 01 includes other types of identifiers of home device 01 (e.g., SN number), the other types of identifiers can be located in the Tag field of broadcast frame S1-3.
[0145] S320: Configure device 30 to authenticate home device 01 according to broadcast frame S1-3.
[0146] The channels (channels 1 to M) through which home device 01 transmits broadcast frame S1-3 include the current operating channel of configuration device 30 (i.e., the current operating channel of home LAN 60, for example, channel 4). When home device 01 transmits broadcast frame S1-3 on channel 4, configuration device 30 can receive broadcast frame B1-3.
[0147] After receiving broadcast frame S1-3, configuration device 30 can parse the device identifier of home device 01 from broadcast frame S1-3. Then, configuration device 30 matches the device identifier of home device 01 with the device whitelist. When the device identifier of home device 01 matches the device whitelist, configuration device 30 authenticates the identity of home device 01; when the device identifier of home device 01 does not match the device whitelist, configuration device 30 fails to authenticate the identity of home device 01.
[0148] When the configuration device 30 successfully authenticates the home device 01, the configuration device 30 further executes step S330 to send the network configuration information M of the home LAN 60 to the home device 01; when the configuration device 30 fails to authenticate the home device 01, the configuration device 30 may ignore the received broadcast frame S1-3 and not respond to the broadcast frame S1-3.
[0149] Specifically, when the device identifier of home device 01 is the same as any device identifier in the device whitelist, the configuration device 30 determines that the device identifier of home device 01 matches the device whitelist; otherwise, it determines that the device identifier of home device 01 does not match the device whitelist.
[0150] For example, when broadcast frame S1-3 includes the MAC address and SN number of home device 01, configuration device 30 compares the MAC address with the value in the "MAC" field of the device whitelist and the SN number with the value in the "SN" field of the device whitelist. When the MAC address is the same as one of the MAC values in the device whitelist, and / or the SN number is the same as one of the SN values in the device whitelist, configuration device 30 determines that the device identifier of home device 01 matches the device whitelist; otherwise, configuration device 30 determines that the device identifier of home device 01 does not match the device whitelist.
[0151] S330: Configuration device 30 sends the network configuration information M of home LAN 60 to home device 01. The network configuration information M is used for home device 01 to access home LAN 60.
[0152] In this embodiment, the network configuration information M of the home LAN 60 includes the SSID (e.g., "Connection7890") and PWD (e.g., "abc123") of the home LAN 60. In other embodiments, when the home LAN 60 is a public network, the network configuration information M of the home LAN 60 may not include the PWD.
[0153] Configuration device 30 can send network configuration information M for home LAN 60 to home device 01 via response frame B1-3. Response frame B1-3 can be a management frame. (See reference) Figure 15 The network configuration information M of the home LAN 60 can be located in the Tag field of response frame B1-3. In addition, the Tag field of response frame B1-3 may also include the activation code assigned to home device 01 (for example, the activation code assigned to home device 01 in the device whitelist), so that home device 01 can register with cloud server 40 based on the activation code (specific details will be introduced in step S420 later).
[0154] In this embodiment, the configuration device 30 sends the network configuration information M of the home LAN 60 in plaintext. In other embodiments, to improve information security, the configuration device 30 may send the network configuration information M of the home LAN 60 in encrypted form. For the sake of narrative coherence, the method by which the configuration device 30 sends the network configuration information M in encrypted form will be described later.
[0155] Steps S310 to S330 constitute the network distribution information acquisition stage S3 of the network distribution method provided in this embodiment. In the network distribution information acquisition stage S3, the home appliance to be networked can acquire the network distribution information M of the home LAN 60. After the network distribution information acquisition stage S3, the connection establishment stage S4 (including steps S410 and S420) begins. The steps in the connection establishment stage S4 can be used for any home appliance that has acquired the network distribution information M; the following description still uses home appliance 01 as an example.
[0156] S410: Home device 01 establishes a connection with AP device 10 based on the distribution network information M.
[0157] After receiving the network configuration information M sent by the configuration device 30, home device 01 can initiate a connection with AP device 10 based on the network configuration information M. For example, home device 01 sends an association request frame carrying the network configuration information M to AP device 10. After receiving the association request frame, AP device 10 authenticates home device 01 according to the network configuration information M in the association request frame. After successful authentication, a connection is established with home device 01. Other details of the connection establishment between home device 01 and AP device 10 can be found in the prior art and will not be elaborated here. After establishing a connection with AP device 10, home device 01 can join the home LAN 60 to complete the network configuration process.
[0158] S420: Home appliance 01 is registered in the cloud server 40.
[0159] After completing network configuration, home device 01 can send a registration request to cloud server 40 through AP device 10 to register on cloud server 40.
[0160] In some embodiments, the registration request sent by home device 01 may include the device name of home device 01 and the activation code received by home device 01 (e.g., the activation code sent by configuration device 30 to home device 01 in step S330). After verifying the activation code of home device 01, cloud server 40 can accept the registration request of home device 01 and add home device 01 to the device list. Then, cloud server 40 sends the updated device list to mobile device 20 so that the user can view the newly connected home devices on mobile device 20. For example, refer to... Figure 16 Users can see the newly added home appliance 01 (specifically a water dispenser) in the device management application interface 25.
[0161] In summary, this embodiment provides a method for accessing a wireless local area network (WLAN) by using two devices (mobile device 20 and configuration device 30) to assist home devices in completing the network configuration process. Mobile device 20 triggers the home devices to switch from AP mode to STA mode, and configuration device 30 provides network configuration information M to the home devices. Specifically, mobile device 20 assists the home devices in completing the mode switching phase S2 of the network configuration process, and configuration device 30 assists the home devices in completing the network configuration information acquisition phase S3. Since different phases are executed by different devices, the network configuration processes of different home devices can be executed in parallel. For example, when home device 01 enters the network configuration information acquisition phase S3 (assisted by configuration device 30), home device 03 can simultaneously execute the mode switching phase S2 (assisted by mobile device 20), thereby improving network configuration efficiency in batch configuration scenarios.
[0162] Furthermore, as described above, in the SoftAP configuration method, the user authenticates the home appliances to be configured. After successfully authenticating the home appliances, the user manually inputs the configuration information M into the mobile device 20. Unlike the SoftAP configuration method, in this embodiment, the configuration device 30 authenticates the home appliances to be configured based on a preset device whitelist, thus saving user effort. For example, the user does not need to manually authenticate the home appliances or manually input the configuration information M into the mobile device 20.
[0163] In addition, in this embodiment, the mobile device 20 does not need to disconnect from the AP device 10 during the process of assisting home devices in network configuration, thus reducing the impact on the normal communication of the mobile device 20.
[0164] It should be noted that this embodiment is an exemplary description of the technical solution of this application, and those skilled in the art can make other modifications.
[0165] For example, in this embodiment, the configuration device 30 obtains the device identifier of the home device via the mobile device 20. When the mobile device 20 is a portable device such as a mobile phone, this embodiment can conveniently obtain the device identifier of the mobile device 20. In other embodiments, the configuration device 30 can also directly obtain the device identifier of the home device. For example, when the configuration device 30 is equipped with a camera, the configuration device 30 can obtain the device identifier of the home device by scanning a QR code; when the configuration device 30 is equipped with a touch screen, the configuration device 30 can obtain the device identifier of the home device through user input.
[0166] For example, in this embodiment, the configuration device 30 and the AP device 10 are implemented as two separate devices. This way, the user does not need to replace their existing home AP device 10 to implement the network configuration method provided in this embodiment. In other embodiments, the configuration device 30 and the AP device 10 can be a single device.
[0167] For example, in this embodiment, when the home device is about to connect to the home LAN 60, the mobile device 20 will request an activation code from the cloud server 40 beforehand (i.e., execute step S120). In other embodiments, the mobile device 20 may not request an activation code from the cloud server 40. After the home device is successfully configured for network access, it will then request an activation code from the cloud server 40.
[0168] For example, in this embodiment, the home device sends a first broadcast frame in AP mode. In other embodiments, in addition to sending the first broadcast frame, the home device can also send a fourth broadcast frame in AP mode. The fourth broadcast frame includes the second SSID of the wireless network provided by the home device. The second SSID is used by the home device for network configuration using SoftAP. The method provided in this embodiment can be used for any home device. The following description uses home device 01 as an example.
[0169] For example, in step S210, in AP mode, in addition to sending broadcast frame S1-1, home device 01 can also send broadcast frame S1-2 (as a fourth broadcast frame). Broadcast frame S1-2 carries the second network identifier (denoted as "second SSID") of the wireless network E-1 provided by home device 01. The second SSID will be explained below.
[0170] The second SSID is a string named according to the second rule. According to the second rule, the second SSID includes several fixed fields. For example, the second SSID includes, in sequence, the manufacturer field, the equipment category field, the equipment model field, and the production batch field for home equipment 01.
[0171] It is understandable that the second SSID of different home appliances can be different. For example, the second SSID of home appliance 01 (specifically a water dispenser) is "fac001heater……03"; the second SSID of home appliance 02 (specifically a door lock) is "fac006locker……11".
[0172] Additionally, the type of broadcast frame S1-2 can be the same as that of broadcast frame S1-1, for example, both being beacon frames. The second SSID can be located in the Tag field of broadcast frame S1-2.
[0173] Furthermore, when home device 01 is in AP mode, it can periodically send broadcast frame S1-1 at time interval ΔT1 and broadcast frame S1-2 at time interval ΔT2. When mobile device 20 receives broadcast frame S1-1 within a set WLAN scanning period (e.g., within 30 seconds), it assists home device in network configuration using the method provided in this embodiment (e.g., the method described in steps S210 to S330). When mobile device 20 does not receive broadcast frame S1-1 within the set WLAN scanning period, but only receives broadcast frame S1-2, it assists home device in network configuration using SoftAP (e.g., network configuration according to the method described in steps S10 to S50). With this setting, when home device cannot perform network configuration using the method provided in this embodiment (e.g., when there is no configuration device 30 in the home LAN 60 that supports the method described in this embodiment), or when network configuration using the method provided in this embodiment times out, home device can also perform network configuration using SoftAP to ensure successful network configuration.
[0174] In some embodiments, in order to enable home devices to preferentially use the method provided in this embodiment for network distribution, the time interval ΔT1 can be less than the time interval ΔT2. For example, the time interval ΔT1 is 50ms and the time interval ΔT2 is 200ms.
[0175] In other embodiments of this application, after a home device completes its switch from AP device 10 to STA device, it can act as a trigger device to assist other home devices that have not yet completed their mode switch to complete the mode switch, thereby further accelerating the batch network configuration process of home devices. This will be described in detail below.
[0176] Specifically, refer to Figure 17 According to some embodiments of this application, in the mode switching stage S2, after the home device 01 switches from AP mode to STA mode (i.e., after step S240), the method for accessing the wireless local area network may further include:
[0177] S250: Home device 01 performs a WLAN scan to receive a broadcast frame S2-1 (as a third broadcast frame) sent by home device 02, which carries the first SSID of home device 02.
[0178] refer to Figure 18When home device 01 switches to STA mode, other home devices (home device 2, home device 3, ..., home device N) are still in AP mode. These other home devices can send broadcast frames S2-1, S3-1, ..., SN-1 to provide wireless networks E-2, E-3, ..., EN. Each broadcast frame sent by a home device carries the first SSID of the wireless network it provides. For example, the broadcast frame S2-1 sent by home device 02 carries the first SSID of wireless network E-2.
[0179] The method by which each home appliance generates the first SSID is essentially the same as the method by which home appliance 01 generates the first SSID in step S210, so the description in step S210 can be referred to, and will not be repeated here. In addition, the method by which each home appliance forms a broadcast frame is essentially the same as the method by which home appliance 01 generates broadcast frame S1-1 in step S210, so the description in step S210 can also be referred to, and will not be repeated here.
[0180] After switching to STA mode, home device 01 performs a WLAN scan. Through the WLAN scan, home device 01 can receive broadcast frames from at least one other home device. For example, home device 01 receives broadcast frame S2-1 from home device 02. Broadcast frame S2-1 carries the first SSID (e.g., pw345cc45...f1180) of the wireless network E-2 provided by home device 02.
[0181] S260: Home device 01 sends a reply frame B2-1 to home device 02 in response to broadcast frame S2-1.
[0182] After receiving broadcast frame S2-1, home device 01 can parse the first SSID of wireless network E-2 from broadcast frame S2-1 and send a reply frame B2-1 to broadcast frame S2-1. Reply frame B2-1 is used to trigger home device 02 to switch from AP mode to STA mode.
[0183] The reply frame B2-1 may include a custom message M-2, which can be determined based on the first SSID of the wireless network E-2. The method for determining the custom message M-2 is essentially the same as the method for determining the custom message M-1 in step S230, so the description in step S230 can be referred to, and will not be repeated here. Furthermore, the method for forming the reply frame B2-1 is essentially the same as the method for forming the reply frame B1-1 in step S230, so the description in step S230 can be referred to, and will not be repeated here.
[0184] S270: Home appliance 02 switches from AP mode to STA mode.
[0185] After receiving reply frame B2-1, home device 02 switches from AP mode to STA mode. That is, in this embodiment, home device 01 is the triggering device that triggers home device 02 to complete the mode switch. Similarly, after home device 02 completes the mode switch, it can assist other home devices that have not yet completed the mode switch to complete the mode switch process.
[0186] In other words, according to the method provided in the embodiments of this application, home appliances that have completed mode switching can assist other home appliances that have not completed mode switching to complete mode switching, thereby forming multiple links that have completed mode switching, so as to accelerate the batch network configuration process of home appliances. This will be described in conjunction with Figure 19.
[0187] Figure 19A An exemplary process for multiple home devices to complete mode switching is shown. Figure 19A In the diagram, multiple home appliances are connected by unidirectional arrows; the device in front of the arrow is the triggering device, and the device behind the arrow is the triggered device. (Reference) Figure 19A After mobile device 20 triggers home device 01 to complete mode switching, home device 01 can trigger home devices 02, 07, and 08 to complete mode switching; after home device 02 completes mode switching, it can trigger home devices 04 and 06 to complete mode switching, and so on. That is, according to the method provided in this embodiment, during the batch network configuration process of home devices, multiple links for mode switching are formed through mutual assistance between home devices. Compared to the sequential network configuration method of SoftAP, this significantly improves network configuration efficiency.
[0188] Furthermore, as mentioned above, the WLAN scanning phase is a relatively time-consuming stage in the network configuration process. In this embodiment, the WLAN scanning process is completed through mutual assistance among home devices, which can overcome the efficiency bottleneck in the network configuration process and improve network configuration efficiency. In some embodiments, taking 30 home devices to be configured as an example, the method provided in this embodiment can improve efficiency by more than 5 times compared to the SoftAP network configuration method.
[0189] After all home appliances awaiting network configuration have completed configuration and registered with the cloud server 40, the cloud server 40 returns an updated device list to the mobile device 20, allowing the user to view the successfully configured home appliances on the mobile device 20. For example, refer to... Figure 19B Users can see the successfully configured home devices in the device management application interface 25. After all the home devices to be configured have been successfully configured, the mobile device 20 can send a configuration completion signal to the configuration device 30 to notify the configuration device 30 to stop adding new devices.
[0190] As described above, in some embodiments, during the network distribution information acquisition stage S3, the configuration device 30 can send the network distribution information M of the home LAN 60 in encrypted form to improve information security.
[0191] For example, refer to Figure 20 In some embodiments, the distribution network information acquisition stage S3 may include the following steps (hereinafter, home device 01 is described as an example of a home device, but it is understood that the method provided in this embodiment can be used for any home device):
[0192] S510: Home device 01 sends broadcast frame S1-4 (as an example of the second broadcast frame) on channels 1 to M. The broadcast frame S1-4 carries the device identifier and encryption parameters of home device 01. The encryption parameters are used for key negotiation between home device 01 and configuration device 30.
[0193] The difference between step S510 and step S310 lies in the content of the broadcast frame sent by home device 01. Specifically, in step S310, the broadcast frame S1-3 sent by home device 01 includes the device identifier of home device 01; in step S510, the broadcast frame S1-4 sent by home device 01 includes not only the device identifier of home device 01, but also encryption parameters, which are used for key negotiation between home device 01 and configuration device 30.
[0194] For example, refer to Figure 21 Step S510 may include the following sub-steps:
[0195] S511: Home device 01 determines encryption parameters. In some embodiments, the encryption parameters include a public-private key pair (priKeyS, pubKeyS), a random salt value (Salt), and a random challenge value (ChallengeS). The public-private key pair (priKeyS, pubKeyS) can be generated according to a public-key algorithm; the random salt value (Salt) and the random challenge value (ChallengeS) can be generated according to a secure random number algorithm.
[0196] S512: Home device 01 assembles the device identifier and encryption parameters to form assembly parameters CombS. In some embodiments, assembly parameters CombS include the MAC address, SN number, random challenge value ChallengeS, public key pubKeyS, and random salt value Salt of home device 01.
[0197] S513: Home appliance 01 generates verification information HashS for assembly parameter CombS. For example, home appliance 01 performs a hash operation on assembly parameter CombS, and the resulting hash value is the verification information HashS. In some embodiments, the hash operation uses a one-way hash algorithm, such as the SHA256 algorithm.
[0198] S514: Home device 01 encapsulates the assembly parameters CombS and verification information HashS in the Tag field of a management frame (e.g., a proberequest frame) to form broadcast frame S1-4. Additionally, the header of broadcast frame S1-4 may also include the MAC address of the home device.
[0199] S515: Home devices take turns sending broadcast frames S1-4 on channels 1 to M.
[0200] Other undescribed details of home device 01 sending broadcast frames S1-4 are essentially the same as those of home device 01 sending broadcast frames S1-3 in step S310, so please refer to the description in step S310 and we will not repeat them here.
[0201] S520: Configure device 30 to authenticate home devices based on broadcast frames S1-4.
[0202] When home device 01 sends a broadcast frame S1-4 on the current operating channel (e.g., channel 4) of configuration device 30, configuration device 30 can receive the broadcast frame S1-4. After receiving the broadcast frame S1-4, configuration device 30 parses the device identifier (e.g., MAC address, SN number) of the home device from the broadcast frame S1-4, and authenticates the home device based on the device identifier. If configuration device 30 successfully authenticates the home device 01, it further executes step S530; otherwise, configuration device 30 ignores the received broadcast frame S1-4 and does not respond to the broadcast frame S1-4.
[0203] Other undescribed details regarding the authentication of home device 01 by configuration device 30 are substantially the same as those in step S320, and therefore can be referred to the description in step S320 without further elaboration.
[0204] S530: Configure device 30 to send the network configuration information M of home LAN 60 to home device 01 in encrypted form. The network configuration information M is used for home device 01 to access home LAN 60.
[0205] The difference between step S530 and step S330 is that in step S330, the configuration device 30 sends the network configuration information M to the home device 01 in plaintext; while in step S530, the configuration device 30 sends the network configuration information M to the home device 01 in encrypted form.
[0206] For example, refer to Figure 22 Step S530 may include the following sub-steps:
[0207] S531: Configuration device 30 obtains the assembly parameter CombS and the verification information HashS. Specifically, configuration device 30 obtains the assembly parameter CombS and the verification information HashS carried in the broadcast frame S1-4 by parsing the broadcast frame S1-4.
[0208] S532: Configuration device 30 verifies the assembly parameter CombS based on the verification information HashS. Specifically, configuration device 30 performs a hash operation on the assembly parameter CombS (the hash operation algorithm is the same as the hash algorithm used in step S513) to obtain a hash value HashS'. If the hash value HashS' is the same as the hash value HashS parsed from broadcast frame S1-4, the configuration device 30's verification of the assembly parameter CombS is successful; otherwise, the verification is unsuccessful. When configuration device 30 successfully verifies the assembly parameter CombS, it continues to execute step S533; otherwise, configuration device 30 may pause the execution of subsequent steps and request home device 01 to retransmit broadcast frame S1-4.
[0209] S533: Configure device 30 to generate a random challenge value ChallengeB and a public-private key pair (priKeyB, pubKeyB). The public-private key pair (priKeyB, pubKeyB) can be generated using a public-key algorithm; the random challenge value ChallengeB can be generated using a secure random number algorithm.
[0210] S534: Configure device 30 to determine the shared key Sharekey based on the private key priKeyB and the public key pubKeyS. For example, shared key Sharekey = Compute(priKeyB, pubKeyS). Here, the algorithm Compute is a key negotiation algorithm, such as SPEKE, J-PAKE, ECDH, etc.
[0211] S535: Configure device 30 to generate verification information HashB based on the shared key Sharekey and random challenge values ChallengeB and ChallengeS. For example, HashB = HMAC(Sharekey, ChallengeB + ChallengeS), where HMAC is the hash algorithm, such as HMAC SHA256 algorithm.
[0212] S536: Configure device 30 to generate an encryption key encKey based on the shared key Sharekey. For example, encKey = HKDF(Sharekey, Salt, "key_info"), where HKDF is the key derivation algorithm, Salt is the random salt value carried in the assembly parameter CombS, and "key_info" is a preset fixed string.
[0213] S537: The configuration device 30 uses the encryption key encKey to encrypt the network configuration information M and the activation code to generate encrypted ciphertext MessageB. For example, the encryption algorithm can be the AES-GCM algorithm.
[0214] S538: Configure device 30 to generate assembly parameter CombB. Assembly parameter CombB includes public key pubKeyB, random challenge value ChallengeB, encrypted ciphertext MessageB, and verification information HashB.
[0215] S539: Configuration device 30 sends a response frame B1-4 to the home appliance, the response frame B1-4 including the assembly parameter CombB. For example, the response frame B1-4 is a management frame such as a probe response frame, and the assembly parameter CombB is located in the Tag field of the response frame B1-4.
[0216] Other undescribed details regarding the configuration device 30 sending network distribution information M to home device 01 are substantially the same as those in step S330, and therefore can be referred to the description in step S330 without further elaboration.
[0217] S540: Home device 01 obtains network configuration information M from home LAN 60.
[0218] After receiving the response frame B1-4 sent by the configuration device 30, the home device 01 parses the assembly parameter CombB from the response frame B1-4 and decrypts the encrypted ciphertext MessageB in the assembly parameter CombB, thereby obtaining the network configuration information M of the home LAN 60.
[0219] For example, refer to Figure 23 Step S540 may include the following sub-steps:
[0220] S541: Home appliance 01 parses response frames B1-4 to obtain the assembly parameter CombB. The assembly parameter CombB includes the public key pubKeyB, the random challenge value ChallengeB, the encrypted ciphertext MessageB, and the verification information HashB.
[0221] S542: Home device 01 determines the shared key Sharekey based on the private key priKeyS and the public key pubKeyB. For example, the shared key Sharekey = Compute(priKeyS, pubKeyB). The Compute algorithm is the same key negotiation algorithm as in step S534. According to the principle of the key negotiation algorithm, the shared key Sharekey calculated by home device 01 has the same value as the shared key Sharekey calculated by configuration device 30 in step S534.
[0222] S543: Home device 01 generates verification information HashCheck based on the shared key Sharekey and random challenge values ChallengeB and ChallengeS. For example, verification information HashCheck = HMAC(Sharekey, ChallengeB + ChallengeS). It can be understood that the verification information HashCheck generated by the home device has the same value as the verification information HashB generated by the configuration device 30 in step S535.
[0223] S544: Home device 01 generates an encryption key encKey based on the shared key Sharekey. For example, encryption key encKey = HKDF(Sharekey, Salt, "key_info"). It can be understood that the encryption key encKey calculated by the home device has the same value as the encryption key encKey generated by configuring device 30 in step S536.
[0224] S545: Home appliance 01 decrypts the encrypted ciphertext MessageB using the encryption key encKey to obtain the network configuration information M and the activation code.
[0225] In this embodiment, the configuration device 30 sends the network configuration information M in encrypted form, which can prevent the leakage of the network configuration information M and improve information security. After obtaining the network configuration information M of the home LAN 60, the home device 01 can establish a connection with the AP device 10 based on the network configuration information M, thereby accessing the home LAN 60. The process of establishing a connection between the home device 01 and the AP device 10 can be referred to the description in step S410 above, and will not be repeated here.
[0226] Figure 24A schematic diagram of the structure of electronic device 100 is shown. Electronic device 100 can be implemented as a mobile device, configuration device, or IoT device. Electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) connector 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0227] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0228] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0229] The processor can generate operation control signals based on the instruction opcode and timing signals to control the instruction fetching and execution.
[0230] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0231] In some embodiments, the processor 110 may include one or more interfaces. These interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, and a subscriber identity module (SIM) interface.
[0232] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 can couple to the touch sensor 180K, charger, flash, camera 193, etc., through different I2C bus interfaces. For example, the processor 110 can couple to the touch sensor 180K through the I2C interface, enabling the processor 110 and the touch sensor 180K to communicate through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0233] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via the PCM bus interface. The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via a CSI interface to enable the electronic device 100 to capture images. The processor 110 and the display screen 194 communicate via a DSI interface to enable the electronic device 100 to display images.
[0234] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0235] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0236] USB connector 130 is a connector that conforms to the USB standard specification and can be used to connect electronic device 100 and peripheral devices. Specifically, it can be a standard USB connector (such as a Type C connector), a Mini USB connector, a Micro USB connector, etc.
[0237] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via a USB connector 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0238] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0239] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0240] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0241] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0242] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0243] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0244] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.
[0245] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0246] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.
[0247] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0248] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0249] Camera 193 is used to capture still images or videos. An object passes through the lens to generate an optical image that is projected onto a photosensitive element. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP (Internet Service Provider) for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP (Digital Signal Processor) for processing. The DSP converts the digital image signal into image signals in standard formats such as RGB and YUV. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0250] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.
[0251] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats.
[0252] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0253] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0254] Internal memory 121 can be used to store computer executable program code, which includes instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as image playback function), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phone book, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, etc. Processor 110 executes various functional applications and data processing of electronic device 100 by running instructions stored in internal memory 121 and / or instructions stored in memory located in the processor.
[0255] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0256] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0257] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or make hands-free calls through the speaker 170A.
[0258] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a telephone call or voice message, the receiver 170B can be brought close to the ear to listen to the voice.
[0259] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Electronic device 100 may have at least one microphone 170C. In some embodiments, electronic device 100 may have two microphones 170C, which, in addition to collecting sound signals, can also achieve noise reduction.
[0260] The 170D headphone jack is used to connect wired headphones.
[0261] The pressure sensor 180A is used to sense pressure signals and can convert pressure signals into electrical signals.
[0262] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100. In some embodiments, the gyroscope sensor 180B can determine the angular velocity of the electronic device 100 about three axes (i.e., the x, y, and z axes). The barometric pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates altitude using the air pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation.
[0263] The magnetic sensor 180D includes a Hall sensor.
[0264] The 180E accelerometer can detect the magnitude of acceleration of electronic device 100 in various directions (typically three axes). When electronic device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of electronic devices and applied to applications such as screen orientation switching and pedometers.
[0265] A distance sensor 180F is used to measure distance. Electronic device 100 can measure distance via infrared or laser. In some embodiments, during a shooting scene, electronic device 100 can utilize the distance sensor 180F to measure distance for rapid focusing.
[0266] The proximity light sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode.
[0267] The 180L ambient light sensor is used to detect ambient light intensity.
[0268] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering calls with fingerprints, etc.
[0269] The 180J temperature sensor is used to detect temperature.
[0270] Touch sensor 180K, also known as a "touch device," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can then transmit the detected touch operation to the application processor to determine the type of touch event.
[0271] The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire vibration signals from vibrating bone fragments in the human vocal cords. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure signals.
[0272] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.
[0273] Motor 191 can generate vibration as a notification. Indicator 192 can be an indicator light, used to indicate charging status, power level changes, or to indicate messages, missed calls, notifications, etc.
[0274] The SIM card interface 195 is used to connect the SIM card.
[0275] Now for reference Figure 25 The diagram shows a block diagram of an electronic device 400 according to one embodiment of the present application. The electronic device 400 may include one or more processors 401 coupled to a controller hub 403. In at least one embodiment, the controller hub 403 communicates with the processor 401 via a multi-branch bus such as a Front Side Bus (FSB), a point-to-point interface such as a QuickPath Interconnect (QPI), or a similar connection 406. The processor 401 executes instructions controlling general types of data processing operations. In one embodiment, the controller hub 403 includes, but is not limited to, a Graphics & Memory Controller Hub (GMCH) (not shown) and an Input / Output Hub (IOH) (which may be on a separate chip) (not shown), wherein the GMCH includes memory and a graphics controller and is coupled to the IOH.
[0276] Electronic device 400 may also include a coprocessor 402 and a memory 404 coupled to a controller hub 403. Alternatively, one or both of the memory and GMCH may be integrated within the processor (as described in this application), with memory 404 and coprocessor 402 directly coupled to processor 401 and controller hub 403, which is located on a single chip with IOH.
[0277] Memory 404 may be, for example, Dynamic Random Access Memory (DRAM), Phase Change Memory (PCM), or a combination of both. Memory 404 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. The computer-readable storage medium stores instructions, specifically, temporary and permanent copies of those instructions.
[0278] like Figure 25 The illustrated electronic device 400 can be implemented as a mobile device, a configuration device, and an IoT device, respectively. When the electronic device 400 is implemented as a mobile device, the instructions stored in the memory 404 may include: instructions that, when executed by at least one of the processors, cause the mobile device to perform, as Figure 9 , Figure 17 , Figure 20 , Figure 21 , Figure 22 , Figure 23 The instructions for the steps implemented by the mobile device in the method shown.
[0279] When the electronic device 400 is implemented as a configuration device, the instructions stored in the memory 404 may include: instructions that, when executed by at least one of the processors, cause the configuration device to perform actions such as Figure 9 , Figure 17 , Figure 20 , Figure 21 , Figure 22 , Figure 23 The instructions for the steps implemented by the configuration device in the method shown.
[0280] When the electronic device 400 is implemented as an IoT device, the instructions stored in the memory 404 may include: when executed by at least one of the processors, causing the IoT device to perform, as Figure 9 , Figure 17 , Figure 20 , Figure 21 , Figure 22 , Figure 23 The instructions for the steps performed by the home appliances in the method shown.
[0281] In one embodiment, the coprocessor 402 is a dedicated processor, such as, for example, a high-throughput many-integrated core (MIC) processor, a network or communication processor, a compression engine, a graphics processor, general-purpose computing on graphics processing units (GPGPU), or an embedded processor, etc. Optional properties of the coprocessor 402 are indicated by dashed lines. Figure 25 middle.
[0282] In one embodiment, electronic device 400 may further include a Network Interface Controller (NIC) 406. The network interface 406 may include a transceiver for providing a radio interface for electronic device 400 to communicate with any other suitable device (such as a front-end module, antenna, etc.). In various embodiments, the network interface 406 may be integrated with other components of electronic device 400. The network interface 406 can implement the functions of the communication unit in the above embodiments.
[0283] Electronic device 400 may further include input / output (I / O) devices 405. I / O 405 may include: a user interface designed to enable a user to interact with electronic device 400; a peripheral component interface designed to enable peripheral components to also interact with electronic device 400; and / or sensors designed to determine environmental conditions and / or location information related to electronic device 400.
[0284] It is worth noting that, Figure 25 This is merely an example. That is, although... Figure 25 The electronic device 400 shown includes multiple devices such as a processor 401, a controller hub 403, and a memory 404. However, in practical applications, devices using the methods of this application may include only a portion of the devices in the electronic device 400. For example, it may include only the processor 401 and the network interface 406. Figure 25 The properties of the optional devices are shown by dashed lines.
[0285] Now for reference Figure 26 The diagram shown is a block diagram of a System-on-Chip (SoC) 500 according to an embodiment of this application. Figure 26 In the diagram, similar components share the same reference numerals. Additionally, dashed boxes are an optional feature for more advanced SoCs. Figure 26In this SoC 500, the following components are included: an interconnect unit 550 coupled to the processor 510; a system proxy unit 580; a bus controller unit 590; an integrated memory controller unit 540; a group or one or more coprocessors 520, which may include integrated graphics logic, an image processor, an audio processor, and a video processor; a static random access memory (SRAM) unit 530; and a direct memory access (DMA) unit 560. In one embodiment, the coprocessor 520 includes a dedicated processor, such as, for example, a network or communication processor, a compression engine, general-purpose computing on graphics processing units (GPGPU), a high-throughput MIC processor, or an embedded processor.
[0286] Static random access memory unit 530 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. The computer-readable storage medium stores instructions, specifically, temporary and permanent copies of those instructions.
[0287] like Figure 26 The SoC shown can be installed in mobile devices, configuration devices, and IoT devices, respectively. When the SoC is installed in a mobile device, static random access memory unit 530 stores instructions that may include, when executed by at least one of the processors, cause the mobile device to perform, as Figure 9 , Figure 17 , Figure 20 , Figure 21 , Figure 22 , Figure 23 The instructions for the steps implemented by the mobile device in the method shown.
[0288] When the SoC is configured in a configuration device, static random access memory unit 530 stores instructions that may include, when executed by at least one of the processors, causing the configuration device to perform, as Figure 9 , Figure 17 , Figure 20 , Figure 21 , Figure 22 , Figure 23 The instructions for the steps implemented by the configuration in the method shown.
[0289] When the SoC is installed in an IoT device, the static random access memory unit 530 stores instructions that may include, when executed by at least one of the processors, causing the IoT device to perform, as Figure 9 , Figure 17 , Figure 20 , Figure 21 , Figure 22 , Figure 23 The instructions for the steps performed by the homeowner in the method shown.
[0290] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0291] All methods and implementations of this application can be implemented in the form of software, magnetic files, firmware, etc.
[0292] Program code can be applied to input instructions to perform the functions described herein and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application-specific integrated circuit (ASIC), or a microprocessor.
[0293] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this paper are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.
[0294] One or more aspects of at least one embodiment can be implemented by representational instructions stored on a computer-readable storage medium, the instructions representing various logics in a processor, which, when read by a machine, cause the machine to create logic for performing the techniques described herein. These representations, referred to as “Intellectual Property (IP) cores,” can be stored on a tangible computer-readable storage medium and provided to multiple customers or production facilities for loading into manufacturing machines that actually manufacture the logic or processor.
[0295] In some cases, an instruction translator can be used to translate instructions from a source instruction set to a target instruction set. For example, an instruction translator can transform (e.g., using static binary transformation, including dynamically compiled dynamic binary transformation), morph, emulate, or otherwise translate instructions into one or more other instructions that will be processed by the core. Instruction translators can be implemented in software, hardware, firmware, or a combination thereof. Instruction translators can be on the processor, off the processor, or partially on and partially off the processor.
Claims
1. A method for accessing a wireless local area network, used in a system including a mobile device, a configuration device, and at least one IoT device, wherein the at least one IoT device includes a first IoT device; characterized in that, The method includes: The configuration device determines a device whitelist, which includes device identifiers of one or more IoT devices. The first IoT device sends at least one broadcast frame in access point (AP) mode, the at least one broadcast frame including a first broadcast frame, the first broadcast frame including a first network identifier of the wireless local area network provided by the first IoT device; The mobile device receives the first broadcast frame and sends a response frame to the first IoT device in response to the first broadcast frame; In response to receiving the reply frame, the first IoT device switches from AP mode to STA mode; The first IoT device transmits a second broadcast frame on at least one wireless channel, the second broadcast frame including the device identifier of the first IoT device, and the at least one wireless channel including the working channel of the configured device; The configuration device receives the second broadcast frame, determines that the device identifier of the first IoT device matches the device whitelist based on the second broadcast frame, and provides the first IoT device with the network configuration information of the wireless local area network where the configuration device is located. The network configuration information is used for the first IoT device to access the wireless local area network.
2. The method according to claim 1, characterized in that, The at least one IoT device also includes a second IoT device; The method further includes: The second IoT device sends a third broadcast frame in AP mode, the third broadcast frame including a first network identifier of the wireless local area network provided by the second IoT device; The first IoT device, which has already switched to STA mode, receives the third broadcast frame; The first IoT device sends a response frame to the third broadcast frame to the second IoT device. The response frame sent by the first IoT device to the third broadcast frame is used to trigger the second IoT device to switch from AP mode to STA mode.
3. The method according to claim 1 or 2, characterized in that, The first network identifier is a string named according to a first rule, and the first network identifier includes random characters.
4. The method according to claim 3, characterized in that, The at least one broadcast frame further includes a fourth broadcast frame, which includes a second network identifier of the wireless local area network provided by the first IoT device. The second network identifier is a string named according to a second rule. The second network identifier is used by the first IoT device to access the wireless local area network using the Soft Access Point (SoftAP) method.
5. The method according to claim 1, characterized in that, The reply frame sent by the mobile device to the first broadcast frame includes a first message, which is a message determined according to the first network identifier.
6. The method according to claim 1, characterized in that, The configuration device determines the device whitelist, including: The configuration device receives device identifiers of one or more IoT devices sent by the mobile device, and determines the device whitelist based on the received device identifiers.
7. The method according to claim 1, characterized in that, The first broadcast frame is a beacon frame; and / or, The configuration information of the wireless local area network includes the network identifier (SSID) of the wireless local area network; and / or, The device identifier of the IoT device includes the MAC address of the IoT device.
8. A method for accessing a wireless local area network, used in a first IoT device, characterized in that, The method includes: In access point (AP) mode, at least one broadcast frame is sent, the at least one broadcast frame including a first broadcast frame, the first broadcast frame including a first network identifier of the wireless local area network provided by the first IoT device; The device receives a response frame from the mobile device to the first broadcast frame and switches from AP mode to STA mode. A second broadcast frame is transmitted on at least one wireless channel, the second broadcast frame including the device identifier of the first IoT device, the at least one wireless channel including the working channel for configuring the device; The first IoT device receives network configuration information in response to the second broadcast frame from the configuration device. This network configuration information is used for the first IoT device to access the wireless local area network where the configuration device is located.
9. The method according to claim 8, characterized in that, The method further includes: The first IoT device, which has switched to STA mode, receives a third broadcast frame from the second IoT device, which is in AP mode. The third broadcast frame includes a first network identifier of the network provided by the second IoT device. The first IoT device sends a response frame to the third broadcast frame, which triggers the second IoT device to switch from AP mode to STA mode.
10. The method according to claim 8 or 9, characterized in that, The first network identifier is a string named according to a first rule, and the first network identifier includes random characters.
11. The method according to claim 10, characterized in that, The at least one broadcast frame includes a fourth broadcast frame, which includes a second network identifier of the wireless local area network provided by the first IoT device. The second network identifier is a string named according to a second rule. The second network identifier is used by the first IoT device to access the wireless local area network using the Soft Access Point (SoftAP) method.
12. A method for accessing a wireless local area network, used for configuring a device, characterized in that, The method includes: A device whitelist is determined, which includes device identifiers of one or more IoT devices; A second broadcast frame is received from the first IoT device, the second broadcast frame including the device identifier of the first IoT device; Based on the second broadcast frame, the device identifier of the first IoT device is determined to match the device whitelist, and the configuration information of the wireless local area network where the configuration device is located is provided to the first IoT device. The configuration information is used for the first IoT device to access the wireless local area network. The second broadcast frame is sent by the first IoT device after it switches from AP mode to STA mode, and the method by which the first IoT device switches from AP mode to STA mode includes: The first IoT device sends at least one broadcast frame in AP mode, the at least one broadcast frame including a first broadcast frame, the first broadcast frame including a first network identifier of the wireless local area network provided by the first IoT device; The first IoT device receives a response frame from the mobile device in response to the first broadcast frame; In response to receiving the reply frame, the first IoT device switches from AP mode to STA mode.
13. A wireless local area network system, characterized in that, The system includes a mobile device, a configuration device, and at least one IoT device, wherein the at least one IoT device includes a first IoT device, wherein... The mobile device is used to perform the steps of the method described in any one of claims 1 to 7, the configuration device is used to perform the steps of the method described in any one of claims 1 to 7, and the first IoT device is used to perform the steps of the method described in any one of claims 1 to 7.
14. An electronic device, characterized in that, include: A memory for storing instructions executed by one or more processors of the electronic device; The processor, when executing the instructions in the memory, can cause the electronic device to perform the method of any one of claims 8 to 11, or the method of claim 12.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the method of any one of claims 1 to 7, or the method of any one of claims 8 to 11, or the method of claim 12.
Citation Information
Patent Citations
Rapid access method and system for wireless network and network supply equipment
CN108924907A
