Device network distribution method and device, apparatus, and storage medium
Patent Information
- Application Number
- CN202310692285.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-05
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2041-02-05
AI Technical Summary
然而,这样会导致配网设备当前的通讯连接断开,对配网设备的正常通讯产生不利影响
[0028] By broadcasting distribution network-related information to smart devices through distribution network equipment, rapid interaction of distribution network-related information between the two devices is achieved. In this embodiment, since the distribution network equipment can broadcast distribution network-related information to the smart devices without disconnecting the current communication connection, the stability of the current communication connection of the distribution network equipment is ensured. Furthermore, in this embodiment, since the smart devices only need to listen to obtain distribution network-related information without initiating a hotspot connection, there are no stringent requirements on the device capabilities of the smart devices, which can reduce the cost of the smart devices to a certain extent.
Smart Images

Figure CN116668964B_ABST
Abstract
Description
[0001] This application is a divisional application of Chinese application No. 202110164545.6, filed on February 5, 2021, entitled "Equipment Distribution Method, Apparatus, Equipment and Storage Medium". Technical Field
[0002] This application relates to the field of Internet of Things (IoT) technology, and in particular to a device network configuration method, apparatus, device, and storage medium. Background Technology
[0003] Intelligent devices include devices, instruments, and machines with computing and processing capabilities. Typically, when using an intelligent device for the first time or when changing its usage scenario (such as moving it from one network environment to another), it needs to be configured with a network configuration to connect it to the network and then control it via the network.
[0004] Related technologies provide various methods for configuring smart devices to join the network, including a network configuration method based on Access Point (AP) connections. The main process of the AP-based network configuration method is as follows: The smart device activates a soft AP and broadcasts its beacon; after scanning the soft AP's beacon, the network configuration device connects to the soft AP, thus placing the network configuration device and the smart device on the same local area network (the network service provided by the soft AP activated by the smart device); through the network service provided by the soft AP activated by the smart device, the network configuration device can send the network configuration information of the AP to be connected, such as the password of the AP, to the smart device; subsequently, the smart device deactivates the soft AP and connects to the AP according to the network configuration information sent by the network configuration device, thereby completing the network configuration process.
[0005] As can be seen from the above network configuration process, during the network configuration process for smart devices, the network configuration device needs to disconnect from its current network connection and connect to the soft AP started by the smart device in order to further send network configuration information to the smart device to configure the smart device to join the network. However, this will cause the current communication connection of the network configuration device to be disconnected, which will adversely affect the normal communication of the network configuration device. Summary of the Invention
[0006] This application provides a device distribution network method, apparatus, equipment, and storage medium, which can be used to enable rapid interaction of distribution network-related information between distribution network equipment and intelligent devices, while ensuring the stability of the current communication connection of the distribution network equipment. The technical solution is as follows:
[0007] On one hand, this application provides a device network configuration method applied to a first device, wherein the first device and a second device interact through n management frames, at least one of the n management frames includes a custom field, and n is a positive integer; the method includes:
[0008] A first management frame is broadcast, and the custom field of the first management frame carries the networking information of the first network. The networking information of the first network is used to configure the second device to access the first network.
[0009] On the other hand, embodiments of this application provide a device configuration method applied to a second device, wherein the second device and the first device interact through n management frames, at least one of the n management frames includes a custom field, and n is a positive integer; the method includes:
[0010] A first management frame is received from the first device. The custom field of the first management frame carries the networking information of the first network. The networking information of the first network is used to configure the second device to access the first network.
[0011] In another aspect, embodiments of this application provide a device configuration apparatus, installed in a first device, wherein the first device and a second device interact via n management frames, at least one of the n management frames including a custom field, and n being a positive integer; the apparatus includes:
[0012] The first broadcast module is used to broadcast a first management frame. The custom field of the first management frame carries the networking information of the first network. The networking information of the first network is used to configure the second device to access the first network.
[0013] In another aspect, embodiments of this application provide a device configuration apparatus, installed in a second device, wherein the second device and the first device interact via n management frames, at least one of the n management frames including a custom field, and n being a positive integer; the apparatus includes:
[0014] The first receiving module is configured to receive a first management frame from the first device, wherein the custom field of the first management frame carries network information of the first network, and the network information of the first network is used to configure the second device to access the first network.
[0015] In another aspect, embodiments of this application provide a first device, which interacts with a second device through n management frames, wherein at least one of the n management frames includes a custom field, and n is a positive integer;
[0016] The first device includes: a processor, and a transceiver connected to the processor; wherein:
[0017] The transceiver is used to broadcast a first management frame, the custom field of which carries networking information of a first network, and the networking information of the first network is used to configure the second device to access the first network.
[0018] In another aspect, embodiments of this application provide a second device that interacts with a first device through n management frames, wherein at least one of the n management frames includes a custom field, and n is a positive integer;
[0019] The second device includes: a processor, and a transceiver connected to the processor; wherein:
[0020] The transceiver is used to receive a first management frame from the first device. The custom field of the first management frame carries the networking information of the first network. The networking information of the first network is used to configure the second device to access the first network.
[0021] In another aspect, embodiments of this application provide a computer-readable storage medium storing a computer program, which is executed by the processor of a first device to implement the device network configuration method on the first device side described above.
[0022] In another aspect, embodiments of this application provide a computer-readable storage medium storing a computer program, which is executed by a processor of a second device to implement the aforementioned device network configuration method on the second device side.
[0023] In another aspect, embodiments of this application provide a chip, which includes programmable logic circuits and / or program instructions. When the chip is running on a first device, it is used to implement the device network distribution method on the first device side as described above.
[0024] In another aspect, embodiments of this application provide a chip, which includes programmable logic circuits and / or program instructions. When the chip is running on a second device, it is used to implement the device network configuration method on the second device side as described above.
[0025] In another aspect, embodiments of this application provide a computer program product, which, when executed by the processor of a first device, is used to implement the device network configuration method on the first device side.
[0026] In another aspect, embodiments of this application provide a computer program product, which, when executed by the processor of a second device, is used to implement the aforementioned device network configuration method on the second device side.
[0027] The technical solution provided in this application can bring the following beneficial effects:
[0028] By broadcasting distribution network-related information to smart devices through distribution network equipment, rapid interaction of distribution network-related information between the two devices is achieved. In this embodiment, since the distribution network equipment can broadcast distribution network-related information to the smart devices without disconnecting the current communication connection, the stability of the current communication connection of the distribution network equipment is ensured. Furthermore, in this embodiment, since the smart devices only need to listen to obtain distribution network-related information without initiating a hotspot connection, there are no stringent requirements on the device capabilities of the smart devices, which can reduce the cost of the smart devices to a certain extent. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 This is a schematic diagram of a power distribution network system provided in one embodiment of this application;
[0031] Figure 2 This is a flowchart of a network configuration method based on AP connection provided in one embodiment of this application;
[0032] Figure 3 This is a schematic diagram of the format of a detection management frame provided in one embodiment of this application;
[0033] Figure 4 This is a schematic diagram of the format of a two-layer message provided in one embodiment of this application;
[0034] Figure 5 This is a schematic diagram of the format of a Layer 2 message provided in another embodiment of this application;
[0035] Figure 6 This is a schematic diagram of the format of a two-layer message provided in another embodiment of this application;
[0036] Figure 7 This is a flowchart of a device network configuration method provided in one embodiment of this application;
[0037] Figure 8 This is a flowchart of a device network configuration method provided in another embodiment of this application;
[0038] Figure 9 This is a block diagram of a device distribution network device provided in one embodiment of this application;
[0039] Figure 10 This is a block diagram of a device distribution network provided in another embodiment of this application;
[0040] Figure 11 This is a block diagram of a device distribution network provided in another embodiment of this application;
[0041] Figure 12 This is a block diagram of a device distribution network provided in another embodiment of this application;
[0042] Figure 13 This is a block diagram of a first device provided in one embodiment of this application;
[0043] Figure 14 This is a block diagram of a second device provided in one embodiment of this application. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0045] The network architecture and business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0046] Please refer to Figure 1 The diagram illustrates a power distribution system provided in one embodiment of this application, which may include a second device 110 and a first device 120.
[0047] The second device 110 refers to a device with network access capability, such as a device with WiFi (Wireless Fidelity) access capability. Optionally, the second device 110 is a smart device (such as VR (Virtual Reality) glasses, smart wearable devices, smart robots, etc.), or other terminal devices with network access capability; this application embodiment does not limit this. In one example, such as Figure 1As shown, in the case of a power distribution network system applied to smart home living, the second device 110 can be a smart TV, smart speaker, smart air conditioner, smart light, smart door and window, smart curtain, smart socket, or other smart devices. Optionally, there may be one second device 110, or there may be multiple second devices 110. This application embodiment does not limit this. In practical applications, the number of second devices 110 can be determined based on application requirements or the maximum number of devices that the first device 120 can manage.
[0048] The first device 120 refers to a device with network access configuration capability, also known as a network distribution device. Optionally, the first device 120 can be a server, terminal device, router, mobile phone, tablet computer, wearable device, or other device with network access configuration capability. This application embodiment does not limit this; in practical applications, the implementation of the first device 120 can be determined based on the application scenario of the network distribution system. In one example, such as... Figure 1 As shown, when the distribution network system is applied to smart home living, considering the characteristics of a home environment such as small area and frequent activities, using a first device 120 that occupies a large space would affect normal home life. The first device 120 can be a router, terminal device, mobile phone, tablet computer, wearable device, etc. Optionally, for a certain distribution network system, the number of first devices corresponding to that distribution network system can be one or more. This application embodiment does not limit this. Usually, for considerations such as saving resources, the number of first devices corresponding to a certain distribution network system is one. Optionally, different distribution network systems correspond to different first devices, thus the second device 110 under a certain distribution network system is bound to the first device 120 under that distribution network system. For example, when the distribution network system is implemented for smart home living, the second device in a certain household is bound to the first device in that household.
[0049] In this embodiment, the first device 120 can configure the second device 110 to access the network provided by the AP, that is, configure the second device 110 to join the network. Related technologies provide various methods for configuring the second device to join the network, including a network configuration method based on AP connection. The following describes the network configuration method based on AP connection.
[0050] Please refer to Figure 2 This illustrates a flowchart of a network configuration method based on an AP connection provided in one embodiment of this application. Figure 2 As shown, the network configuration method based on AP connection mainly includes the following steps (steps 210 to 270).
[0051] Step 210: The second device starts the soft AP and broadcasts the soft AP beacon.
[0052] In this embodiment, the second device can activate the soft AP when entering network configuration mode. After activating the soft AP, the second device can broadcast a soft AP beacon. Optionally, the soft AP beacon includes at least one of the following: the device ID (identifier) of the second device, a user-defined network name, and the protocol name of the application protocol. The device ID can be the MAC (Media Access Control Address) address of the second device. Optionally, the soft AP beacon includes at least one of the following fields: BSSID (Basic Service Set Identifier), SSID (Service Set Identifier), and a vendor-specific field.
[0053] Step 220: When the first device detects the beacon of the soft AP, it connects to the network provided by the soft AP.
[0054] The first device can scan beacons broadcast by other devices on different channels. When the first device scans the beacon of the soft AP on the channel where the second device broadcasts the soft AP's beacon, it can access the network provided by the soft AP. Optionally, after scanning the soft AP's beacon, the first device checks whether the SSID field in the beacon conforms to a preset format. If the SSID field conforms to the preset format, it accesses the network provided by the soft AP.
[0055] Step 230: A communication connection is established between the first device and the second device.
[0056] After connecting to the network provided by the soft AP, the first device can establish a communication connection with the second device through the soft AP. Optionally, the communication between the first device and the second device conforms to the TCP (Transmission Control Protocol) protocol, and therefore, the communication connection between the first device and the second device can also be called a TCP connection; or, the communication between the first device and the second device conforms to the UDP (User Datagram Protocol) protocol, and therefore, the communication connection between the first device and the second device can also be called a UDP connection.
[0057] Step 240: The first device sends the network connection information of the first network to the second device.
[0058] After the first device accesses the network provided by the soft AP started by the second device and obtains information about the APs that the second device can access (i.e., accessible AP information), it can select the network provided by the AP that the second device can access, i.e., the first network, based on the accessible AP information. Optionally, the accessible AP information includes at least one of the following: the SSID field of the accessible AP and the signal strength of the accessible AP. In this embodiment, after entering the network configuration mode, the second device can scan the beacons of the AP at a certain period (e.g., 10 seconds) and determine whether it can access the network provided by the AP based on the SSID field in the beacon.
[0059] This application embodiment does not limit the method by which the first device selects the first network. Optionally, the first device determines the network provided by the AP with the highest signal strength indicated by the access AP information as the first network. After the first device selects the first network, it can send the network access information of the first network to the second device to configure the second device to access the first network. Optionally, the network access information of the first network includes at least one of the following: the SSID field of the first network and the password of the first network.
[0060] Step 250: The second device sends a configuration response message to the first device.
[0061] The configuration response message is used to respond to the networking information of the first network sent by the first device, instructing the first device whether the second device has received the networking information of the first network. Optionally, after sending the networking information of the first network to the second device, the first device assumes that the second device has received the networking information of the first network. If the second device successfully receives the networking information of the first network, it may not send a configuration response message to the first device; if the second device fails to receive the networking information of the first network, such as if the second device cannot parse the networking information of the first network, it may send a configuration response message to the first device.
[0062] Step 260: The first device cancels access to the network provided by the soft AP.
[0063] After the first device sends the network access information of the first network to the second device, it can disconnect from the soft AP started by the second device, that is, cancel access to the network provided by the soft AP. Optionally, the first device cancels access to the network provided by the soft AP after sending the network access information of the first network; or, the first device cancels access to the network provided by the soft AP after receiving the configuration response message. This application embodiment does not limit the timing of the first device canceling access to the network provided by the soft AP.
[0064] Step 270: The second device shuts down the soft AP.
[0065] Since the second device typically cannot simultaneously access the networks provided by two different access points (APs), it needs to disable the soft AP to access the first network. Optionally, the second device disables the soft AP after receiving network access information from the first network; or, the second device disables the soft AP after sending a configuration response message to the first device; or, the second device disables the soft AP after the first device cancels access to the network provided by the soft AP. This embodiment does not limit the timing of the second device disabling the soft AP.
[0066] After the second device disables the soft AP, it can access the first network using the password and other information from the first network's network connection details. Similarly, after the first device cancels its connection to the network provided by the soft AP, it can also access the first network to continue controlling and managing the second device. Thus, the first and second devices establish a communication connection through the first network.
[0067] Taking the first device as a distribution network device and the second device as a smart device as an example, based on the above... Figure 2 As seen in the example, during the process of configuring a network for a smart device, the distribution network device needs to disconnect from its current network and connect to the network provided by the soft AP activated by the smart device before it can send network access information to the first network to configure the smart device to access the first network, such as configuring the smart device to access the home WiFi network. However, this causes the distribution network device to disconnect its current communication connection during the configuration process, adversely affecting the normal communication of the distribution network device. Furthermore, since the distribution network device needs to connect to the network provided by the soft AP activated by the smart device, the smart device must broadcast the beacon of its activated soft AP, which places high demands on the device's capabilities.
[0068] Based on this, embodiments of this application provide a device network distribution method that can solve the above-mentioned technical problems. It should be understood that the first device described in the embodiments of this application can also be called a network distribution device, and the second device can also be called a smart device. The technical solutions provided by the embodiments of this application will be described below with reference to several examples.
[0069] Before describing the technical solutions provided in the embodiments of this application, the information interaction method between the first device and the second device in the embodiments of this application will be described first.
[0070] The first device and the second device interact via n management frames, where n is a positive integer. These management frames are used to monitor the network, and their main application scenarios include joining a network, leaving a network, and transferring between networks provided by different access points. Based on different application scenarios and the operations performed by different entities within those scenarios, management frames can be categorized into different types. In one example, the n management frames include at least one of the following types: Beacon frames, Probe frames, and Action frames.
[0071] In this embodiment of the application, at least one of the n management frames includes a custom field. In one example, the type of at least one management frame includes at least one of the following: a probe frame, an action frame, etc. Figure 3 The diagram illustrates the format of a management frame provided in one embodiment of this application. (In conjunction with...) Figure 3 In one example, the management frame includes at least one of the following fields: Frame Control, Duration, Destination Address (DA), Source Address (SA), Basic Service Set Identifier (BSSID), Sequence Control, Frame Body, and Frame Check Sequence (FCS). Optionally, the Frame Body field includes at least one of the following fields: Service Set Identifier (SSID), Supported Rate, Extended Supported Rate, and Vendor Specific (referred to as "custom" in this embodiment). Combined with... Figure 3 The management frame shown below includes descriptions of its various fields, which are shown in Table 1.
[0072] Table 1. Format Description of Detection Management Frames
[0073]
[0074]
[0075] Optionally, for the custom fields mentioned above, the custom fields may carry Layer 2 messages. In one example, the custom field includes at least one Information Element (IE), such as... Figure 4 As shown, it illustrates a schematic diagram of a custom field including an information element provided in an embodiment of this application; as Figure 5The diagram illustrates a custom field comprising multiple information elements provided in one embodiment of this application. Optionally, when a single information element cannot contain all the data of the Layer 2 message carried by the custom field, this embodiment supports multiple information elements. Subsequent information elements continue to fill in the remaining data after the tag number, thereby sequentially concatenating the data of all information elements with the same tag number together as complete data for parsing.
[0076] based on Figure 4 and Figure 5 The format diagram of the custom field shown illustrates that, in one example, the first information cell in at least one information cell includes at least one of the following subfields: Tag Number subfield, used to identify the custom field, which can carry a vendor-defined tag number, for example, tag number 221; Length subfield, used to identify the length of the first information cell; Organizationally Unique Identifier (OUI) subfield, used to identify the format standard corresponding to the first information cell, for example, the value of OUI is 0xFCA5D0; Type subfield, used to identify the type of the Layer 2 message, optionally, the definition of the Type subfield is shown in Table 2 below; Data subfield, used to describe the content information of the Layer 2 message.
[0077] Table 2 Definitions of Data Type Subfields
[0078] 0x00 Custom data pass-through by vendors 0x01 Device discovery request 0x02 Device detection response 0x03 Device network configuration request 0x04 Equipment distribution network response 0x05 Device synchronization password request 0x06 Device synchronization password response
[0079] Based on the data type subfield definitions shown in Table 2 above, when the type is 0x00, the data in the information cell is vendor-defined data. In this case, an additional Vendor Organization Unique Identifier (Vendor OUI) is added to identify the vendor. Based on this, the format of the custom field is as follows: Figure 6 As shown.
[0080] Please refer to Figure 7 It illustrates a flowchart of a device network configuration method provided in one embodiment of this application, which can be applied to... Figure 1 In the distribution network system shown, this method may include the following steps.
[0081] Step 710: The first device broadcasts a first management frame. The custom field of the first management frame carries the networking information of the first network. The networking information of the first network is used to configure the second device to access the first network.
[0082] The first management frame is a management frame broadcast by the first device when configuring the second device to access the first network. The first management frame includes custom fields; for details regarding these custom fields, please refer to the above embodiments, which will not be repeated here. In one example, the type of the first management frame includes an action frame or a probe frame. Optionally, to ensure that the second device can listen to the first management frame broadcast by the first device, the first device broadcasts the first management frame on the second device's operating channel. Optionally, to avoid the second device failing to receive the first management frame due to packet loss or other factors, the first device broadcasts the first management frame N times, where N is an integer greater than 1. For example, if N is 3, the first device broadcasts the first management frame 3 times.
[0083] To ensure that the second device can correctly parse the first management frame, in this embodiment, if the second device supports Layer 2 distribution network, the first device broadcasts the first management frame on the second device's working channel. Based on this, in one example, before step 710 above, the method further includes: the second device sending its device information to the first device. The device information includes at least one of the following: the second device's working channel, the second device's product identification information, the second device's capability information, and a random number; wherein the second device's capability information includes that the second device supports Layer 2 distribution network; and the random number is used to generate a shared key to encrypt the network connection information of the first network.
[0084] In this embodiment, the custom field of the first management frame carries the networking information of the first network, which is used to configure the second device to access the first network. As described above, before broadcasting the first management frame, i.e., during the device discovery phase, the first device can obtain a random number from the second device. This random number is used to generate a shared key to encrypt the networking information of the first network. Therefore, optionally, the networking information of the first network included in the first management frame is encrypted networking information. In one example, the Layer 2 message carried by the first management frame includes a device network configuration request; the value of the data type subfield corresponding to the device network configuration request is a first value (such as 0x03 above); the data subfield corresponding to the device network configuration request carries the networking information of the first network.
[0085] Step 720: The second device receives the first management frame.
[0086] The second device can receive the first management frame broadcast by the first device. In one example, step 720 above includes: the second device listening for the first management frame on its working channel. After entering the network configuration mode, the second device can listen for messages broadcast by other devices on its working channel. In this embodiment, the second device listens for the first management frame broadcast by the first device on its working channel. When the second device hears the first management frame, it means that the second device has received the first management frame, and then the second device can access the first network based on the network connection information of the first network carried in the first management frame.
[0087] In this embodiment of the application, the first network is the network selected by the user from at least one network provided by the first device. Based on this, in one example, the above method further includes: the first device displaying options corresponding to at least one network, wherein the at least one network includes the first network; in response to the selection operation of the option corresponding to the first network, obtaining the network information of the first network; and encrypting the network information of the first network using a shared key to obtain encrypted network information.
[0088] The first device can install and run a client with network configuration capabilities, allowing the first device to display at least one network option in the client's user interface. Optionally, at least one network satisfies a fourth condition, which includes: operating in a first frequency band, and / or, channel strength greater than a second strength threshold. For example, the first frequency band includes 2.4 GHz; the second strength threshold includes -70 dBm (decibel relative to one milliwatt), thus, at least one network is a network whose operating frequency band includes 2.4 GHz and / or whose channel strength is greater than -70 dBm. In this embodiment, at least one network includes a first network, optionally, which is a network accessed by the first device. Therefore, the display order of at least one network includes: prioritizing the display of the first network, that is, prioritizing the display of the network accessed by the first device.
[0089] When the user selects the first network, the client with network configuration capabilities responds to the user's selection of the option corresponding to the first network by sending an information retrieval request to the underlying layer of the first device to obtain the network connection information of the first network. Since the first network is the network that the first device is connected to, the underlying layer of the first device can directly obtain the network connection information of the first network based on its current connection, thus eliminating the need for the user to input network connection information and freeing the user from manual input operations.
[0090] After obtaining the network connection information of the first network, the first device can encrypt the network connection information to obtain encrypted network connection information, and then carry the encrypted network connection information in the first management frame. Optionally, the network connection information of the first network includes the password and SSID of the first network. Optionally, the shared key used to encrypt the network connection information of the first network can be obtained by processing a random number using ECDH (Elliptic Curve Diffie-Hellman Key Exchange), and this random number is the one sent to the first device by the second device during the device discovery phase. Optionally, when the first device encrypts the network connection information of the first network using the encryption key, it can use the AES (Advanced Encryption Standard) 128-CCM algorithm for encryption.
[0091] Based on this, in one example, the above method further includes: secondly, using a shared key to decrypt the encrypted network information to obtain the network information of the first network; and accessing the first network based on the network information of the first network.
[0092] To ensure the second device can parse the network access information of the first network, when the second device calculates the shared key using the ECDH method, it also uses the ECDH method to calculate the shared key and then uses this shared key to decrypt the encrypted network access information. In this embodiment, the second device uses ECDH to process a random number to obtain the shared key; this random number is a random number stored locally on the second device. If the shared keys calculated by the first and second devices are consistent, the second device can parse the network access information of the first network and then access the first network based on this network access information. This embodiment of the application, by encrypting the transmission of the network access information of the first network, avoids the leakage of network access information and improves the security of the first network.
[0093] To further ensure the security of the first network, this embodiment adds message verification before the second device accesses the first network. Access to the first network is only permitted if the message verification is successful. Based on this, in one example, the first management frame also carries a random number, which is used by the second device for message verification. This random number is sent by the second device to the first device during device discovery. Optionally, the first management frame also includes a Service Set Identifier (SSID) field, with the random number carried in the SSID field; alternatively, the random number is carried in a custom field of the first management frame. This embodiment does not limit the field carried by the random number. When the second device listens to and receives the first management frame, it can parse the random number from the first management frame and compare it with a locally stored random number. If the two random numbers match, the message verification is successful. By performing frame filtering based on the random number carried in the first management frame before the second device accesses the first network, it ensures that the first management frame listened to by the second device is for configuring the second device to join the network, rather than configuring other devices to join the network, thus preventing the second device from incorrectly connecting to other networks and improving the security of the distribution network system.
[0094] In summary, the technical solution provided in this application enables rapid interaction of distribution network-related information between the distribution network device and the smart device by broadcasting distribution network-related information to the smart device through the distribution network device. In this application embodiment, since the distribution network device can broadcast distribution network-related information to the smart device without disconnecting the current communication connection, the stability of the current communication connection of the distribution network device is ensured. Furthermore, in this application embodiment, since the smart device only needs to listen to obtain distribution network-related information without initiating a hotspot connection, there are no stringent requirements on the device capabilities of the smart device, which can reduce the cost of the smart device to a certain extent.
[0095] In addition, the technical solution provided in this application allows the distribution network device to filter networks according to certain conditions and display the available networks for the user to select. When the user selects the network currently connected to by the distribution network device, the distribution network device directly obtains the network access password and other network information based on the current connection through modifications at the system level, without requiring the user to manually input it, thus freeing the user from manual input operations and providing the user with a smooth distribution network experience.
[0096] In one example, the above method also includes the following steps.
[0097] Step 730: The first device broadcasts a third management frame on the channel corresponding to the first network. The custom field of the third management frame carries network distribution progress query information for the second device.
[0098] In order to enable the first device to promptly grasp the network distribution progress and provide feedback to the user after broadcasting the first management frame carrying the network connection information of the first network to the second device, in this embodiment of the application, the first device broadcasts a third management frame on the channel corresponding to the first network after broadcasting the first management frame. Because the second device switches its original working channel to the channel corresponding to the first network during the process of accessing the first network, the first device broadcasts the third management frame on the channel corresponding to the first network when querying the network distribution progress.
[0099] In this embodiment, the third management frame is initiated by the first device when querying the distribution progress for the second device. Therefore, the custom field of the third management frame carries distribution progress query information, which is used to request a query of the distribution progress for the second device. Optionally, the type of the third management frame includes an action frame or a probe frame. In one example, the Layer 2 message carried by the third management frame includes a device distribution request; the value of the data type subfield corresponding to the device distribution request is a first value (such as 0x03 mentioned above); the data subfield corresponding to the device distribution request carries the distribution progress query information.
[0100] To provide the second device with sufficient time to scan and parse the first management frame, in one example, step 730 includes: starting from the broadcast time of the first management frame, after a first duration, the first device broadcasts a third management frame on the channel corresponding to the first network. Optionally, the first duration is 5 seconds. Since the distribution network progress changes frequently, to ensure users are promptly aware of these changes, optionally, the first device broadcasting the third management frame on the channel corresponding to the first network includes: the first device continuously broadcasting the third management frame on the channel corresponding to the first network at a third duration interval. Optionally, the third duration is 1 second.
[0101] In this embodiment, the first device can also broadcast a third management frame using a combination of the two methods described above. That is, starting from the broadcast time of the first management frame, after a first duration, the first device continuously broadcasts the third management frame on the channel corresponding to the first network at a third duration interval. If the first device continues to send the third management frame even when network configuration is successful or has timed out, it will waste the processing overhead of the first device. Therefore, to reduce the processing overhead of the first device, in one example, the first device stops broadcasting the third management frame when the network configuration progress for the second device meets the fifth condition. Optionally, the fifth condition includes: successful network configuration, and / or, the network configuration duration exceeding the third duration.
[0102] Step 740: The second device sends a second management frame to the first device. The custom field of the second management frame carries the network distribution progress information of the second device.
[0103] After parsing the network connection information of the first network from the first management frame, the second device accesses the first network based on this information. The second device can then switch from its original operating channel to the channel corresponding to the first network. Afterward, the second device listens for messages broadcast by other devices on the channel corresponding to the first network. In this embodiment, the second device listens for the third management frame broadcast by the first device on the channel corresponding to the first network.
[0104] When the second device detects the third management frame, it means that the second device has received the third management frame. The second device can then parse the distribution network progress query information from the third management frame to clarify that the first device is requesting the distribution network progress for the second device. In response to the distribution network progress query information, the second device can send a second management frame to the first device. The custom field of this second management frame carries distribution network progress information, which indicates the distribution network progress for the second device. Optionally, the type of the second management frame includes an action frame or a probe frame. In one example, the second management frame carries a Layer 2 message including a device distribution network response; the data type subfield corresponding to the device distribution network response has a second value (such as 0x04 above); and the data subfield corresponding to the device distribution network response carries distribution network progress information. Optionally, step 740 includes: the second device sending a second management frame to the first device when the distribution network progress for the second device meets a first condition; wherein the first condition includes any one of the following: within a second time period after distribution network is in progress, distribution network is successful, or distribution network fails. Optionally, the second time period is 5 seconds.
[0105] In this embodiment, if the second device fails to scan the first management frame or fails to parse the network connection information of the first network, resulting in the second device not connecting to the first network, the second device will still listen for messages broadcast by other devices on its original working channel, thus preventing it from listening to the third management frame broadcast by the first device. Therefore, to ensure the first device can promptly detect and address any anomalies in the second device's operation, in one example, the method further includes: upon detecting the second network, the first device rebroadcasts the first management frame on its working channel. Here, the second network is the network initiated by the second device (such as the network provided by the aforementioned soft AP).
[0106] In summary, the technical solution provided in this application, when configuring a smart device to access a network, broadcasts a management frame carrying network distribution progress query information to the smart device on the channel corresponding to that network to request a query of the network distribution progress for the smart device, thereby enabling timely acquisition of the network distribution progress for the smart device. Simultaneously, the network distribution device can also detect the network started by the smart device to promptly grasp any abnormal situations during the network distribution process and take timely action to address these abnormalities, effectively improving the network distribution success rate for the network distribution device.
[0107] In one example, after step 720 above, there is any one of the following steps.
[0108] Step 752: The second device obtains the signal strength corresponding to the first device; if the signal strength meets the second condition, it accesses the first network based on the network connection information of the first network.
[0109] Considering factors such as the processing overhead and device capabilities of the second device, the second device can directly determine whether it can access the first network based on the signal strength corresponding to the first device. In this embodiment, the second device accesses the first network if the signal strength corresponding to the first device meets a second condition; the second device terminates network distribution if the signal strength corresponding to the first device does not meet the second condition. Optionally, the second condition includes: the signal strength corresponding to the first device is greater than a first strength threshold, for example, the first strength threshold is -40 dBm.
[0110] Step 754: The second device obtains the signal strength corresponding to the first device; based on the signal strength, it determines the distance between the first device and the second device; if the distance meets the third condition, it accesses the first network based on the network information of the first network.
[0111] The second device calculates the signal strength corresponding to the first device and, based on this signal strength, further determines the distance between the first and second devices to determine whether the second device can access the first network. The distance between the first and second devices provides a relatively intuitive indication of whether the second device is located within the distribution network system of the first network. In this embodiment, if the distance between the first and second devices meets a third condition, the second device accesses the first network; if the distance does not meet the third condition, the second device terminates its distribution connection. Optionally, the third condition includes: the distance between the first and second devices is less than a first distance threshold, for example, a first distance threshold of 5 meters.
[0112] Step 756: The second device obtains the distance between the first device and the second device; if the distance meets the third condition, it accesses the first network based on the network information of the first network.
[0113] In this embodiment, besides calculating the distance between the first and second devices based on the signal strength corresponding to the first device, the second device can also obtain the distance between the first and second devices using other methods, which are not limited in this embodiment. For example, during device discovery, the first device obtains the signal strength corresponding to the second device and calculates the distance between the first and second devices based on the signal strength corresponding to the second device. Subsequently, the first device carries the distance between the first and second devices in the first management frame, so that the second device can directly obtain the distance between the first and second devices without having to perform distance calculation.
[0114] In summary, the technical solution provided in this application, by obtaining the signal strength of the distribution network equipment before the smart device accesses the network, and determining whether it can access the network based on the signal strength or a distance further determined based on the signal strength, ensures that the network accessed by the smart device is a network suitable for it, rather than a network in other distribution network systems, thereby improving the security of the distribution network system.
[0115] The technical solution provided in the embodiments of this application will be described below with an example.
[0116] Please refer to Figure 8 It illustrates a flowchart of a device network configuration method provided in one embodiment of this application, which can be applied to... Figure 1 In the distribution network system shown, this method may include the following steps.
[0117] Step 801: The client displays the options corresponding to the second device. The client refers to the client within the first device that has network configuration capabilities. Its application interface can display the options corresponding to the second device. When the user needs to configure the second device to join the network, they can touch the options corresponding to the second device displayed in the user interface.
[0118] Step 802: The client displays options for networks operating at 2.4GHz with a signal strength greater than -70dBm, prioritizing the options for the network currently accessed by the first device. In response to the user's selection command for the option corresponding to the second device, the client displays the filtered network options in the user interface for the user to choose from, prioritizing the options for the network currently accessed by the first device to guide the user in selecting that option.
[0119] Step 803: The client sends an information retrieval request to the first device. When the user touches the option corresponding to the network currently accessed by the first device, the client sends an information retrieval request to the underlying layer of the first device to request network access information of the network currently accessed by the first device. Optionally, the network access information includes the network password and SSID.
[0120] Step 804: The first device sends network information to the client. The underlying layer of the first device can directly obtain the network information of the currently accessed network based on the current communication connection and send it to the client, eliminating the need for user input in the client's user interface and freeing up the user from manual input operations.
[0121] Step 805: The client sends a WiFi Layer 2 configuration request to the first device. During the discovery of the second device, the client can obtain relevant information about the second device, such as its operating channel and whether it supports Layer 2 configuration. Therefore, if the second device supports Layer 2 configuration, the client can send a WiFi Layer 2 configuration request to the underlying layer of the first device to request configuration for the second device to access the network currently accessed by the first device. Optionally, the WiFi Layer 2 configuration request carries configuration information such as the second device's operating channel.
[0122] Step 806: The first device broadcasts a first management frame on the second device's operating channel. The first management frame includes a custom field carrying network access information for the network the second device is connected to. Optionally, the network access information is encrypted using a shared key, which is calculated from a random number obtained during device discovery. The first management frame also includes a random number used by the second device for message verification.
[0123] Step 807: The second device performs frame filtering. The second device obtains the random number sent by the first device and also stores a random number locally. It can then perform frame filtering based on these two random numbers, i.e., message verification. If the two random numbers match, step 808 is executed; if they do not match, the second device continues to listen for the first management frame on its working channel.
[0124] Step 808: The second device calculates the distance between the first and second devices using signal strength and determines whether the distance meets the requirements. If the distance between the first and second devices is less than the set distance threshold, the requirements are met, and step 809 is executed. If the distance between the first and second devices is greater than the set distance threshold, the requirements are not met, and the second device terminates the network distribution process.
[0125] Step 809: The second device uses a shared key to decrypt the encrypted network information. The second device can calculate the shared key using locally stored random numbers, and further use the shared key to decrypt the encrypted network information to obtain the network information of the network currently accessed by the first device.
[0126] Step 810: The second device connects to the network currently connected to by the first device according to the network connection information.
[0127] Step 811: The first device broadcasts a third management frame on the channel corresponding to the currently accessed network. Five seconds after the first management frame is broadcast, the first device may broadcast a third management frame every second on the channel corresponding to the currently accessed network. This third management frame includes a custom field, which carries network distribution progress query information to request a query on the network distribution progress for the second device. During this period, if the first device detects that the hotspot started by the second device still exists, it rebroadcasts the first management frame to the second device on the second device's working channel.
[0128] Step 812: The second device sends a second management frame to the first device. This second management frame is used in response to the third management frame. The second management frame includes a custom field that carries network distribution progress information to indicate the network distribution progress to the first device. Optionally, the second device needs to respond to the third management frame in any of the following network distribution states: during network distribution, during successful network distribution, or within 5 seconds after a network distribution failure.
[0129] Step 813: The first device successfully connects to the network and completes network configuration.
[0130] In addition, this application embodiment also provides a specific broadcast design for the management frame for the device network distribution method, as shown below.
[0131] First, the management frames (e.g., probe request frames) sent by the first device are described.
[0132]
[0133] Secondly, the management frames (e.g., probe response frames) sent by the second device are described.
[0134]
[0135]
[0136]
[0137] It should be noted that the above embodiments describe the device network configuration method provided in this application from the perspective of the interaction between the first device and the second device. Each step implemented with the first device can be implemented independently as a device network configuration method on the first device side; similarly, each step implemented with the second device can be implemented independently as a device network configuration method on the second device side.
[0138] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0139] Please refer to Figure 9 This diagram illustrates a block diagram of a device distribution network apparatus according to an embodiment of this application. The apparatus has the functionality to implement the first device-side method example described above; this functionality can be implemented in hardware or by hardware executing corresponding software. The apparatus can be... Figure 1 The first device 120 in the distribution network system shown can also be set up... Figure 1 In the first device 120 of the power distribution network system shown, the first device and the second device interact through n management frames. At least one of the n management frames includes a custom field, where n is a positive integer. For example... Figure 9 As shown, the device 900 may include: a first broadcast module 910.
[0140] The first broadcast module 910 is used to broadcast a first management frame. The custom field of the first management frame carries the networking information of the first network. The networking information of the first network is used to configure the second device to access the first network.
[0141] In one example, the first broadcast module 910 is configured to broadcast the first management frame on the operating channel of the second device.
[0142] In one example, the custom field includes at least one information element, and the first information element in the at least one information element includes at least one of the following subfields: a tag number subfield for identifying the custom field; a length subfield for identifying the length of the first information element; an organization unique identifier subfield for identifying the format standard corresponding to the first information element; a data type subfield for identifying the type of the Layer 2 message; and a data subfield for describing the content information of the Layer 2 message.
[0143] In one example, the Layer 2 message carried by the first management frame includes a device network configuration request; the value of the data type subfield corresponding to the device network configuration request is a first value; and the data subfield corresponding to the device network configuration request carries the networking information of the first network.
[0144] In one example, such as Figure 10 As shown, the device 900 further includes: a second receiving module 920, used to receive a second management frame from the second device, wherein the custom field of the second management frame carries the network distribution progress information of the second device.
[0145] In one example, the second management frame carries a Layer 2 message including a device network configuration response; the data type subfield corresponding to the device network configuration response has a second value; and the data subfield corresponding to the device network configuration response carries the network configuration progress information.
[0146] In one example, such as Figure 10 As shown, the device 900 further includes a third broadcast module 930, used to broadcast a third management frame on the channel corresponding to the first network, wherein the custom field of the third management frame carries network distribution progress query information for the second device.
[0147] In one example, the Layer 2 message carried by the third management frame includes a device network configuration request; the value of the data type subfield corresponding to the device network configuration request is a first value; and the data subfield corresponding to the device network configuration request carries the network configuration progress query information.
[0148] In one example, such as Figure 10 As shown, the third broadcast module 930 is used to: broadcast the third management frame on the channel corresponding to the first network after a first duration, starting from the broadcast time of the first management frame.
[0149] In one example, the first broadcast module 910 is further configured to: if a second network is detected, broadcast the first management frame again on the working channel of the second device, wherein the second network is a network initiated by the second device.
[0150] In one example, such as Figure 10 As shown, the device 900 further includes: an information receiving module 940, used to acquire device information of the second device, the device information of the second device including at least one of the following: the working channel of the second device, the product identification information of the second device, the capability information of the second device, and a random number; wherein, the capability information of the second device includes that the second device supports Layer 2 distribution network; the random number is used to generate a shared key to encrypt the networking information of the first network.
[0151] In one example, the first management frame also carries the random number, which is used by the second device to perform message verification.
[0152] In one example, the type of the at least one management frame includes an action frame or a probe frame.
[0153] In summary, the technical solution provided in this application enables rapid interaction of distribution network-related information between the distribution network device and the smart device by broadcasting distribution network-related information to the smart device through the distribution network device. In this application embodiment, since the distribution network device can broadcast distribution network-related information to the smart device without disconnecting the current communication connection, the stability of the current communication connection of the distribution network device is ensured. Furthermore, in this application embodiment, since the smart device only needs to listen to obtain distribution network-related information without initiating a hotspot connection, there are no stringent requirements on the device capabilities of the smart device, which can reduce the cost of the smart device to a certain extent.
[0154] Please refer to Figure 11 This diagram illustrates a block diagram of a device distribution network apparatus according to an embodiment of this application. The apparatus has the functionality to implement the second device-side method example described above; this functionality can be implemented in hardware or by hardware executing corresponding software. The apparatus can be... Figure 1 The second device 110 in the power distribution network system shown can also be set up... Figure 1 In the second device 110 of the power distribution network system shown, the second device interacts with the first device through n management frames, at least one of the n management frames including a custom field, where n is a positive integer. Figure 11 As shown, the device 1100 may include: a first receiving module 1110.
[0155] The first receiving module 1110 is used to receive a first management frame from the first device. The custom field of the first management frame carries the networking information of the first network. The networking information of the first network is used to configure the second device to access the first network.
[0156] In one example, the first receiving module 1110 is configured to: listen for the first management frame on the working channel of the second device.
[0157] In one example, the custom field includes at least one information element, and the first information element in the at least one information element includes at least one of the following subfields: a tag number subfield for identifying the custom field; a length subfield for identifying the length of the first information element; an organization unique identifier subfield for identifying the format standard data type corresponding to the first information element; a subfield for identifying the type of the Layer 2 message; and a data subfield for describing the content information of the Layer 2 message.
[0158] In one example, the Layer 2 message carried by the first management frame includes a device network configuration request; the value of the data type subfield corresponding to the device network configuration request is a first value; and the data subfield corresponding to the device network configuration request carries the networking information of the first network.
[0159] In one example, such as Figure 12 As shown, the device 1100 further includes a second sending module 1120, used to send a second management frame to the first device, wherein the custom field of the second management frame carries the network distribution progress information of the second device.
[0160] In one example, the second management frame carries a Layer 2 message including a device network configuration response; the data type subfield corresponding to the device network configuration response has a second value; and the data subfield corresponding to the device network configuration response carries the network configuration progress information.
[0161] In one example, such as Figure 12 As shown, the second sending module 1120 is used to: send the second management frame to the first device when the network distribution progress of the second device meets the first condition; wherein, the first condition includes any one of the following: within a second time period after network distribution is in progress, network distribution is successful, or network distribution fails.
[0162] In one example, such as Figure 12 As shown, the device 1100 further includes: a third receiving module 1130, used to receive a third management frame broadcast by the first device on the channel corresponding to the first network, wherein the custom field of the third management frame carries network distribution progress query information for the second device.
[0163] In one example, the Layer 2 message carried by the third management frame includes a device network configuration request; the value of the data type subfield corresponding to the device network configuration request is a first value; and the data subfield corresponding to the device network configuration request carries the network configuration progress query information.
[0164] In one example, such as Figure 12 As shown, the device 1100 further includes: an information sending module 1140, used to send device information of the second device to the first device, the device information of the second device including at least one of the following: the working channel of the second device, the product identification information of the second device, the capability information of the second device, and a random number; wherein, the capability information of the second device includes that the second device supports Layer 2 distribution network; the random number is used to generate a shared key to encrypt the networking information of the first network.
[0165] In one example, the first management frame also carries the random number, which is used by the second device to perform message verification.
[0166] In one example, the type of the at least one management frame includes an action frame or a probe frame.
[0167] In one example, such as Figure 12 As shown, the device 1100 further includes a network access module 1150, configured to: acquire the signal strength corresponding to the first device; access the first network based on the network information of the first network when the signal strength meets a second condition; or, acquire the signal strength corresponding to the first device; determine the distance between the first device and the second device based on the signal strength; access the first network based on the network information of the first network when the distance meets a third condition; or, acquire the distance between the first device and the second device; access the first network based on the network information of the first network when the distance meets a third condition.
[0168] In one example, the second condition includes the signal strength being greater than a first strength threshold, and the third condition includes the distance being less than a first distance threshold.
[0169] In summary, the technical solution provided in this application enables rapid interaction of distribution network-related information between the distribution network device and the smart device by broadcasting distribution network-related information to the smart device through the distribution network device. In this application embodiment, since the distribution network device can broadcast distribution network-related information to the smart device without disconnecting the current communication connection, the stability of the current communication connection of the distribution network device is ensured. Furthermore, in this application embodiment, since the smart device only needs to listen to obtain distribution network-related information without initiating a hotspot connection, there are no stringent requirements on the device capabilities of the smart device, which can reduce the cost of the smart device to a certain extent.
[0170] It should be noted that the device provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules according to actual needs, that is, the content structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0171] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0172] Please refer to Figure 13 This illustration shows a schematic diagram of the structure of a first device 130 provided in one embodiment of this application. For example, the first device can be used to execute the device network distribution method described above on the first device side. Specifically, the first device 130 may include: a processor 131, and a transceiver 132 connected to the processor 131.
[0173] The processor 131 includes one or more processing cores. The processor 131 executes various functional applications and information processing by running software programs and modules.
[0174] Transceiver 132 includes a receiver and a transmitter. Optionally, transceiver 132 is a communication chip.
[0175] In one example, the first device 130 further includes a memory and a bus. The memory is connected to a processor via the bus. The memory can be used to store a computer program, which the processor uses to execute to implement the various steps performed by the first device in the above method embodiments.
[0176] Furthermore, the memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, including but not limited to: RAM (Random-Access Memory) and ROM (Read-Only Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory or other solid-state storage technologies, CD-ROM (Compact Disc Read-Only Memory), DVD (Digital Video Disc) or other optical storage, magnetic tape cassettes, magnetic tape, disk storage or other magnetic storage devices.
[0177] The transceiver 132 is used to broadcast a first management frame, wherein the custom field of the first management frame carries the networking information of the first network, and the networking information of the first network is used to configure the second device to access the first network.
[0178] In one example, the transceiver 132 is used to broadcast the first management frame on the operating channel of the second device.
[0179] In one example, the custom field includes at least one information element, and the first information element in the at least one information element includes at least one of the following subfields: a tag number subfield for identifying the custom field; a length subfield for identifying the length of the first information element; an organization unique identifier subfield for identifying the format standard corresponding to the first information element; a data type subfield for identifying the type of the Layer 2 message; and a data subfield for describing the content information of the Layer 2 message.
[0180] In one example, the Layer 2 message carried by the first management frame includes a device network configuration request; the value of the data type subfield corresponding to the device network configuration request is a first value; and the data subfield corresponding to the device network configuration request carries the networking information of the first network.
[0181] In one example, the transceiver 132 is configured to receive a second management frame from the second device, wherein the custom field of the second management frame carries the network configuration progress information of the second device.
[0182] In one example, the second management frame carries a Layer 2 message including a device network configuration response; the data type subfield corresponding to the device network configuration response has a second value; and the data subfield corresponding to the device network configuration response carries the network configuration progress information.
[0183] In one example, the transceiver 132 is configured to broadcast a third management frame on a channel corresponding to the first network, wherein the custom field of the third management frame carries network configuration progress query information for the second device.
[0184] In one example, the Layer 2 message carried by the third management frame includes a device network configuration request; the value of the data type subfield corresponding to the device network configuration request is a first value; and the data subfield corresponding to the device network configuration request carries the network configuration progress query information.
[0185] In one example, the transceiver 132 is configured to broadcast the third management frame on the channel corresponding to the first network after a first duration, starting from the broadcast time of the first management frame.
[0186] In one example, the transceiver 132 is configured to, upon detecting a second network, again broadcast the first management frame on the operating channel of the second device, the second network being a network initiated by the second device.
[0187] In one example, the transceiver 132 is used to obtain device information of the second device, which includes at least one of the following: the working channel of the second device, the product identification information of the second device, the capability information of the second device, and a random number; wherein, the capability information of the second device includes that the second device supports Layer 2 distribution network; the random number is used to generate a shared key to encrypt the networking information of the first network.
[0188] In one example, the first management frame also carries the random number, which is used by the second device to perform message verification.
[0189] In one example, the type of the at least one management frame includes an action frame or a probe frame.
[0190] Please refer to Figure 14 This illustration shows a schematic diagram of the structure of a second device 140 provided in one embodiment of this application. For example, the second device can be used to execute the device network configuration method described above on the second device side. Specifically, the second device 140 may include: a processor 141, and a transceiver 142 connected to the processor 141.
[0191] The processor 141 includes one or more processing cores, and the processor 141 executes various functional applications and information processing by running software programs and modules.
[0192] Transceiver 142 includes a receiver and a transmitter. Optionally, transceiver 142 is a communication chip.
[0193] In one example, the second device 140 further includes a memory and a bus. The memory is connected to the processor via the bus. The memory can be used to store a computer program, which the processor uses to execute to implement the various steps performed by the second device in the above method embodiments.
[0194] Furthermore, the memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, including but not limited to the following devices: RAM and ROM, EPROM, EEPROM, flash memory or other solid-state storage technologies, CD-ROM, DVD or other optical storage, magnetic tape cassette, magnetic tape, disk storage or other magnetic storage devices.
[0195] The transceiver 142 is used to receive a first management frame from the first device. The custom field of the first management frame carries the networking information of the first network, which is used to configure the second device to access the first network.
[0196] In one example, the transceiver 142 is used to listen for the first management frame on the operating channel of the second device.
[0197] In one example, the custom field includes at least one information element, and the first information element in the at least one information element includes at least one of the following subfields: a tag number subfield for identifying the custom field; a length subfield for identifying the length of the first information element; an organization unique identifier subfield for identifying the format standard data type corresponding to the first information element; a subfield for identifying the type of the Layer 2 message; and a data subfield for describing the content information of the Layer 2 message.
[0198] In one example, the Layer 2 message carried by the first management frame includes a device network configuration request; the value of the data type subfield corresponding to the device network configuration request is a first value; and the data subfield corresponding to the device network configuration request carries the networking information of the first network.
[0199] In one example, the transceiver 142 is used to send a second management frame to the first device, wherein the custom field of the second management frame carries the network configuration progress information of the second device.
[0200] In one example, the second management frame carries a Layer 2 message including a device network configuration response; the data type subfield corresponding to the device network configuration response has a second value; and the data subfield corresponding to the device network configuration response carries the network configuration progress information.
[0201] In one example, the transceiver 142 is configured to: send the second management frame to the first device when the network distribution progress of the second device meets a first condition; wherein the first condition includes any one of the following: within a second time period after network distribution is in progress, network distribution is successful, or network distribution fails.
[0202] In one example, the transceiver 142 is configured to receive a third management frame broadcast by the first device on a channel corresponding to the first network, wherein the custom field of the third management frame carries network configuration progress query information for the second device.
[0203] In one example, the Layer 2 message carried by the third management frame includes a device network configuration request; the value of the data type subfield corresponding to the device network configuration request is a first value; and the data subfield corresponding to the device network configuration request carries the network configuration progress query information.
[0204] In one example, the transceiver 142 is used to send device information of the second device to the first device. The device information of the second device includes at least one of the following: the working channel of the second device, the product identification information of the second device, the capability information of the second device, and a random number; wherein, the capability information of the second device includes that the second device supports Layer 2 distribution network; the random number is used to generate a shared key to encrypt the networking information of the first network.
[0205] In one example, the first management frame also carries the random number, which is used by the second device to perform message verification.
[0206] In one example, the type of the at least one management frame includes an action frame or a probe frame.
[0207] In one example, the processor 141 is configured to: acquire the signal strength corresponding to the first device; and, if the signal strength satisfies a second condition, access the first network based on the network information of the first network; or, acquire the signal strength corresponding to the first device; determine the distance between the first device and the second device based on the signal strength; and, if the distance satisfies a third condition, access the first network based on the network information of the first network; or, acquire the distance between the first device and the second device; and, if the distance satisfies a third condition, access the first network based on the network information of the first network.
[0208] In one example, the second condition includes the signal strength being greater than a first strength threshold, and the third condition includes the distance being less than a first distance threshold.
[0209] In an exemplary embodiment, a computer-readable storage medium is also provided, the storage medium storing a computer program for execution by a processor of a first device to implement the device network configuration method of the first device described above.
[0210] In an exemplary embodiment, a computer-readable storage medium is also provided, the storage medium storing a computer program for execution by a processor of a second device to implement the device network configuration method of the second device described above.
[0211] In an exemplary embodiment, a chip is also provided, the chip including programmable logic circuits and / or program instructions, which, when the chip is running on a first device, is used to implement the device network distribution method on the first device side as described above.
[0212] In an exemplary embodiment, a chip is also provided, the chip including programmable logic circuits and / or program instructions, which, when the chip is run on a second device, is used to implement the device network distribution method on the second device side as described above.
[0213] In an exemplary embodiment, a computer program product is also provided, which, when executed by the processor of a first device, is used to implement the device network configuration method on the first device side described above.
[0214] In an exemplary embodiment, a computer program product is also provided, which, when executed by the processor of a second device, is used to implement the device network configuration method on the second device side described above.
[0215] Those skilled in the art will recognize that the functions described in the embodiments of this application in one or more of the above examples can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transfer of a computer program from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0216] The above description is merely an exemplary embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for equipment network distribution, characterized in that, Applied in a first device, the first device and a second device interact via n management frames, at least one of the n management frames including a custom field, where n is a positive integer; the method includes: Without disconnecting from the current network, a first management frame is broadcast. The custom field of the first management frame carries the networking information of the first network, which is used to configure the second device to access the first network. The broadcasting of the first management frame includes broadcasting the first management frame on the working channel of the second device, whereby the working channel of the second device is obtained by the first device during the discovery of the second device. If a second network is detected, the first management frame is broadcast again on the operating channel of the second device, where the second network is the network initiated by the second device.
2. The method according to claim 1, characterized in that, Before broadcasting the first management frame on the operating channel of the second device, the method further includes: Obtain the device information of the second device, which includes at least one of the following: the working channel of the second device, the product identification information of the second device, the capability information of the second device, and a random number; The capability information of the second device includes that the second device supports Layer 2 distribution network; the random number is used to generate a shared key to encrypt the network connection information of the first network.
3. The method according to claim 2, characterized in that, The first management frame also carries the random number, which is used by the second device to perform message verification.
4. The method according to claim 1, characterized in that, Before the first management frame of the broadcast, it also includes: Display options corresponding to at least one network, the at least one network including a first network, which is the network accessed by the first device.
5. A method for equipment network distribution, characterized in that, Applied to a second device, the second device interacts with the first device through n management frames, at least one of the n management frames including a custom field, where n is a positive integer; the method includes: Receive at least one first management frame from the first device, wherein the custom field of the first management frame carries network information of the first network, and the network information of the first network is used to configure the second device to access the first network; Perform frame filtering on the first management frame; The step of receiving at least one first management frame from the first device includes: after entering the network distribution mode, listening to the first management frame on the working channel of the second device; Wherein, the first management frame is broadcast by the first device on the working channel of the second device when the second network is not detected, and / or, the first management frame is broadcast by the first device on the working channel of the second device when the second network is detected, wherein the second network is a network activated by the second device.
6. The method according to claim 5, characterized in that, Before receiving the first management frame from the first device, the method further includes: Send the device information of the second device to the first device. The device information of the second device includes at least one of the following: the working channel of the second device, the product identification information of the second device, the capability information of the second device, and a random number. The capability information of the second device includes that the second device supports Layer 2 distribution network; the random number is used to generate a shared key to encrypt the network connection information of the first network.
7. The method according to claim 6, characterized in that, The first management frame also carries the random number, which is used by the second device for message verification. The frame filtering of the first management frame includes: The first management frame is filtered based on the random number.
8. The method according to claim 5, characterized in that, After receiving the first management frame from the first device, the process further includes: Obtain the signal strength corresponding to the first device; if the signal strength meets the second condition, access the first network based on the network connection information of the first network; or, Obtain the signal strength corresponding to the first device; determine the distance between the first device and the second device based on the signal strength; if the distance meets a third condition, access the first network based on the network information of the first network; or, Obtain the distance between the first device and the second device; if the distance meets a third condition, access the first network based on the network information of the first network.
9. The method according to claim 8, characterized in that, The second condition includes the signal strength being greater than a first strength threshold, and the third condition includes the distance being less than a first distance threshold.
10. A device for power distribution, characterized in that, In a first device, the first device and a second device interact via n management frames, at least one of the n management frames including a custom field, where n is a positive integer; the device includes: The first broadcast module is used to broadcast a first management frame without disconnecting the communication connection with the current network. The custom field of the first management frame carries the networking information of the first network, which is used to configure the second device to access the first network. The first broadcast module is further configured to broadcast the first management frame on the working channel of the second device, wherein the working channel of the second device is obtained by the first device during the discovery of the second device; The first broadcast module is further configured to broadcast the first management frame again on the working channel of the second device when the second network is detected, wherein the second network is the network started by the second device.
11. A device for power distribution, characterized in that, The method is configured in a second device, which interacts with the first device via n management frames, at least one of the n management frames including a custom field, where n is a positive integer; the method includes: The first receiving module is configured to receive at least one first management frame from the first device, wherein the custom field of the first management frame carries network information of the first network, and the network information of the first network is used to configure the second device to access the first network. The frame filtering module is used to perform frame filtering on the first management frame; The first receiving module is also used to listen to the first management frame on the working channel of the second device after entering the distribution network mode. Wherein, the first management frame is broadcast by the first device on the working channel of the second device when the second network is not detected, and / or, the first management frame is broadcast by the first device on the working channel of the second device when the second network is detected, wherein the second network is a network activated by the second device.
12. A first device, characterized in that, The first device and the second device interact through n management frames, at least one of the n management frames including a custom field, where n is a positive integer; The first device includes: a processor, and a transceiver connected to the processor; wherein: The transceiver is configured to broadcast a first management frame without disconnecting the communication connection with the current network. The custom field of the first management frame carries the networking information of the first network, which is used to configure the second device to access the first network. The transceiver is further configured to broadcast the first management frame on the working channel of the second device, the working channel of the second device being acquired by the first device during the discovery of the second device; The transceiver is further configured to, upon detecting a second network, rebroadcast the first management frame on the operating channel of the second device, wherein the second network is a network initiated by the second device.
13. A second device, characterized in that, The second device interacts with the first device through n management frames, at least one of the n management frames including a custom field, where n is a positive integer; The second device includes: a processor, and a transceiver connected to the processor; wherein: The transceiver is used to receive a first management frame from the first device and perform frame filtering on the first management frame. The custom field of the first management frame carries the networking information of the first network. The networking information of the first network is used to configure the second device to access the first network. The transceiver is also used to listen to the first management frame on the working channel of the second device after entering the distribution network mode; Wherein, the first management frame is broadcast by the first device on the working channel of the second device when the second network is not detected, and / or, the first management frame is broadcast by the first device on the working channel of the second device when the second network is detected, wherein the second network is a network activated by the second device.
14. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which is executed by the processor of the first device to implement the device network configuration method as described in any one of claims 1 to 4; or the computer program is executed by the processor of the second device to implement the device network configuration method as described in any one of claims 5 to 9.
15. A computer program product, characterized in that, When the computer program product is executed by the processor of the first device, it is used to implement the device network configuration method as described in any one of claims 1 to 4; or when the computer program product is executed by the processor of the second device, it is used to implement the device network configuration method as described in any one of claims 5 to 9.
Citation Information
Patent Citations
Network configuration method and device of household appliances
CN106211264A
Method and apparatus for establishing wireless connection
CN106658665A
Method, device, system and equipment for connecting wireless network
CN109246797A