WO2019233310A1 - Method and apparatus for device to be configured with network to access network hotspot device - Google Patents

Method and apparatus for device to be configured with network to access network hotspot device Download PDF

Info

Publication number
WO2019233310A1
WO2019233310A1 PCT/CN2019/088715 CN2019088715W WO2019233310A1 WO 2019233310 A1 WO2019233310 A1 WO 2019233310A1 CN 2019088715 W CN2019088715 W CN 2019088715W WO 2019233310 A1 WO2019233310 A1 WO 2019233310A1
Authority
WO
WIPO (PCT)
Prior art keywords
network
information
target
user terminal
packet
Prior art date
Application number
PCT/CN2019/088715
Other languages
French (fr)
Chinese (zh)
Inventor
肖月振
于海龙
Original Assignee
阿里巴巴集团控股有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2019233310A1 publication Critical patent/WO2019233310A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/02Protecting privacy or anonymity, e.g. protecting personally identifiable information [PII]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/08Access security
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W80/00Wireless network protocols or protocol adaptations to wireless operation
    • H04W80/06Transport layer protocols, e.g. TCP [Transport Control Protocol] over wireless

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a method for a network device to be configured to access a network hotspot device and an apparatus for accessing a network device to be configured to access a network hotspot device.
  • the current network distribution scheme mainly includes two types, one is a WiFi broadcast network distribution scheme, and the other is a WiFi multicast network distribution.
  • the WiFi broadcast distribution network uses the Length field to transmit the router's SSID and Password, while the WiFi multicast distribution network uses the Destination field to transmit the router's SSID and Password.
  • the existing WiFi broadcast / multicast one-click network configuration first encodes the router's SSID and Password, and then the mobile phone sends these codes to the network device to be configured in turn. If any of these encodings is lost, the router's SSID and Password cannot be parsed correctly. Since the probability of losing each byte is about the same, theoretically the same time, the longer the SSID and Password length, the lower the probability of error, and the lower the probability of correctly parsing the router's SSID and Password.
  • an embodiment of the present application in order to provide a method for accessing a network hotspot device to be configured with a network device to be configured and a network device to be configured to access the network, which overcomes the above problems or at least partially solves the foregoing problems. Installation of hot equipment.
  • an embodiment of the present application discloses a method for a network device to be configured to access a network hotspot device, including:
  • the network device to be configured obtains the password information of the target network hotspot device and the target basic service set identifier BSSID sent by the user terminal;
  • the network device to be configured uses the password information and the target SSID to access the target network hotspot device.
  • the step of the network device to be configured to obtain the password information of the target network hotspot device and the target basic service set identifier BSSID sent by the user terminal includes:
  • the network device to be configured obtains the password information of the target network hotspot device and the target basic service set identifier BSSID from the UDP packet.
  • the step of the network device to be configured to receive several UDP packets sent by the user terminal includes:
  • the network equipment to be distributed receives multiple network distribution packets sent by a user terminal.
  • the step of obtaining, by the network device to be configured, the password information of the target network hotspot device from the UDP packet includes:
  • the network device to be distributed obtains encoding information from the multiple network distribution packages;
  • the encoding information includes: encryption mode information, password length information, and encrypted password information;
  • the network device to be distributed decrypts the encrypted password information according to the encryption method information to obtain password information.
  • the step of receiving the UDP packet sent by the user terminal by the network device to be configured further includes:
  • the network device Before receiving the plurality of network distribution packets sent by the user terminal, the network device to be configured receives at least one synchronization packet sent by the user terminal.
  • the step of the network device to be configured obtaining the target basic service set identifier BSSID from the UDP packet includes:
  • the network device to be configured obtains a target basic service set identifier BSSID from the synchronization packet.
  • the step of the network device to be configured obtaining the target basic service set identifier BSSID from the UDP packet includes:
  • the network device to be configured obtains a target basic service set identifier BSSID from the network configuration package.
  • the step of obtaining, by the network device to be configured, the encoding information from the multiple network distribution packages includes:
  • the network device to be distributed determines encoding information according to length fields of the multiple network distribution packets.
  • the step of obtaining, by the network device to be configured, the encoding information from the multiple network distribution packages includes:
  • the network device to be distributed determines encoding information according to a destination field Destination of the multiple network distribution packets.
  • it further includes:
  • the network device to be configured receives a beacon packet sent by a network hotspot device
  • the network device to be configured obtains a BSSID and an SSID of the network hotspot device from the beacon packet.
  • An embodiment of the present application further discloses a method for accessing a network device to be configured to a network hotspot device, including:
  • the user terminal obtains the password information and the target BSSID of the target network hotspot device; the password information and the target BSSID are used to access the target network hotspot device;
  • the user terminal sends the password information and the target BSSID of the target network hotspot device to the network device to be configured.
  • the step of the user terminal sending the password information and the target BSSID of the target network hotspot device to the network device to be configured includes:
  • the user terminal encodes the password information into a UDP packet; the UDP contains a target BSSID;
  • the step of the user terminal encoding the password information into a UDP packet includes:
  • the user terminal encrypts password information by using a preset encryption method
  • the user terminal encapsulates the encryption method information, password length information, and encrypted password information into encoded information
  • the user terminal encodes the encoding information into multiple distribution network packets.
  • the step of the user terminal sending the UDP packet to the network device to be configured includes:
  • the step of the user terminal sending the UDP packet to the network device to be configured further includes:
  • the user terminal sends at least one synchronization packet to the network device to be configured before sending a preset number of network configuration packets.
  • the step of the user terminal encoding the encoding information to a plurality of distribution network packets includes:
  • the user terminal encodes the encoding information into a length field Length of multiple distribution network packets.
  • the step of the user terminal encoding the encoding information to a plurality of distribution network packets includes:
  • the user terminal encodes the encoding information into destination fields of multiple distribution network packets.
  • An embodiment of the present application further discloses an apparatus for accessing a network hotspot device by a network device to be configured, including:
  • An access module located in the network device to be configured is configured to use the password information and the target SSID to access the target network hotspot device.
  • the distribution network information acquisition module includes:
  • a user datagram protocol packet receiving submodule configured to receive a user datagram protocol UDP packet sent by a user terminal
  • the network information acquisition submodule is configured to acquire the password information of the target network hotspot device and the target basic service set identifier BSSID from the UDP packet.
  • the user datagram protocol packet receiving submodule includes:
  • a distribution network packet receiving unit is configured to receive multiple distribution network packets sent by a user terminal.
  • the distribution network information acquisition submodule includes:
  • An encoding information obtaining unit configured to obtain encoding information from the multiple distribution network packages; the encoding information includes: encryption method information, password length information, and encrypted password information;
  • An encrypted password obtaining unit configured to determine the encrypted password information from the encoded information according to the password length information
  • a decryption unit is configured to decrypt the encrypted password information according to the encryption mode information to obtain password information.
  • the user datagram protocol packet receiving submodule further includes:
  • a synchronization packet receiving unit is configured to receive at least one synchronization packet sent by the user terminal before receiving multiple network distribution packets sent by the user terminal.
  • the distribution network information acquisition submodule includes:
  • the first target basic service set identifier acquiring unit is configured to acquire a target basic service set identifier BSSID from the synchronization package.
  • the distribution network information acquisition submodule includes:
  • the second target basic service set identifier acquiring unit is configured to obtain a target basic service set identifier BSSID from the distribution network package.
  • the encoding information obtaining unit includes:
  • Length field parsing subunit used to parse the length field Length of multiple received distribution packets
  • the first encoding information determination subunit is configured to determine encoding information according to length fields of the multiple distribution network packets.
  • the encoding information obtaining unit includes:
  • Destination field parsing subunit for parsing the destination field Destination of multiple received distribution network packets
  • the second encoding information determining subunit is configured to determine encoding information according to a destination field Destination of the multiple distribution network packets.
  • it further includes:
  • An embodiment of the present application further discloses an apparatus for accessing a network hotspot device by a network device to be configured, including:
  • a distribution network information acquisition module located at a user terminal, configured to acquire password information and a target BSSID of a target network hotspot device; the password information and the target BSSID are used to access the target network hotspot device;
  • the distribution network information sending module located in the user terminal is configured to send the password information and the target BSSID of the target network hotspot device to the network device to be configured.
  • the distribution network information sending module includes:
  • a password information encoding submodule configured to encode the password information into a UDP packet; the UDP contains a target BSSID;
  • the user datagram protocol packet sending submodule is configured to send the UDP packet to the network device to be configured.
  • the password information encoding sub-module includes:
  • a password information encryption unit configured to encrypt password information by using a preset encryption method
  • An encryption method information generating unit configured to generate encryption method information corresponding to the preset encryption method
  • a password length information determining unit configured to determine password length information of the encrypted password information
  • An encoding information encapsulating unit configured to encapsulate the encryption method information, password length information, and encrypted password information into encoding information
  • An encoding information encoding unit configured to encode the encoding information into multiple distribution network packets.
  • the user datagram protocol packet sending submodule includes:
  • a network packet sending unit is configured to send the multiple network packets to the network device to be configured.
  • the user datagram protocol packet sending submodule further includes:
  • a synchronization packet sending unit is configured to send at least one synchronization packet to the network device to be configured before each preset number of network distribution packets is sent.
  • the encoding information encoding unit includes:
  • the first encoding subunit is configured to encode the encoding information into a length field Length of multiple distribution network packets.
  • the encoding information encoding unit includes:
  • the second encoding subunit is configured to encode the encoding information into destination fields of multiple distribution network packets.
  • An embodiment of the present application further discloses an apparatus for accessing a network hotspot device by a network device to be configured, including:
  • One or more processors are One or more processors.
  • One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, cause the apparatus to perform one or more methods as described above.
  • Embodiments of the present application also disclose one or more machine-readable media having instructions stored thereon that, when executed by one or more processors, cause the processors to perform one or more of the methods described above.
  • the user terminal only needs to send the password information (Password) and the BSSID of the target network hotspot device to the network device to be configured, and does not need to send the SSID.
  • the network device to be configured can find the SSID of the corresponding target network hotspot device according to the BSSID, and then the network device to be configured accesses the target network hotspot device according to the SSID and password information. Since no SSID needs to be sent, there will be no error in transmitting the SSID, which will increase the success rate of the distribution network; meanwhile, the amount of data sent will be reduced, the time required to send the data will be reduced, and the efficiency of the distribution network will be improved.
  • FIG. 1 is a flowchart of steps in Embodiment 1 of a method for a network device to be configured to access a network hotspot device according to the present application;
  • FIG. 2 is a flowchart of steps in a second embodiment of a method for a network device to be configured to access a network hotspot device according to the present application;
  • FIG. 3 is a schematic diagram of encoding information in an embodiment of the present application.
  • FIG. 4 is a schematic diagram of sending encoded information in an embodiment of the present application.
  • Embodiment 5 is a flowchart of steps in Embodiment 3 of a method for a network device to be configured to access a network hotspot device according to the present application;
  • FIG. 6 is a flowchart of steps in Embodiment 4 of a method for a network device to be configured to access a network hotspot device according to the present application;
  • FIG. 7 is a structural block diagram of a first embodiment of an apparatus for accessing a network hotspot device to a network device to be configured according to the present application;
  • FIG. 8 is a structural block diagram of a second embodiment of a device for a network device to be configured to access a network hotspot device according to the present application.
  • Embodiment 1 a flowchart of steps in Embodiment 1 of a method for a network device to be configured to access a network hotspot device according to the present application, which may specifically include the following steps:
  • Step 101 The to-be-configured network device obtains the password information of the target network hotspot device and the target basic service set identifier BSSID sent by the user terminal;
  • the network hotspot device may be a router or a wireless access point (AccessPoint) without a routing function.
  • AccessPoint wireless access point
  • a network hotspot device is provided to provide WIFI hotspots for smart devices.
  • the network equipment to be distributed is a device that needs to access a WIFI hotspot, such as smart home appliances, cameras in the home, and various sensors and detectors in the factory.
  • the network equipment to be configured needs to use the password information and SSID (Service Set Identifier, generally referred to as the router hotspot name) of the network hotspot device to access the network hotspot device.
  • SSID Service Set Identifier
  • the user terminal sends the password information and the BSSID of the target network hotspot device to the network device to be configured without sending the SSID.
  • the password information is the password of the router's WIFI hotspot (Password).
  • the BSSID Basic Service Set Identifier
  • the basic service set is used to describe a set of mutual communication. device.
  • the user terminal may support wireless communication devices such as 802.11 and 802.2 communication protocols, such as mobile phones, tablet computers, and personal digital assistants.
  • the user terminal may have a network distribution application APP installed, and send the password information and the target BSSID of the target network hotspot device to the network device to be configured through the network distribution app.
  • Step 102 The network device to be configured searches for a target SSID corresponding to the target BSSID from the preset BSSIDs and service set identifiers SSIDs of multiple network hotspot devices.
  • the BSSIDs and SSIDs of multiple network hotspot devices are preset in the network devices to be configured.
  • the network equipment to be configured maintains a hotspot list, which records the BSSID and SSID of multiple network hotspots.
  • the BSSID of each network hotspot device corresponds to the SSID, that is, the unique corresponding SSID can be found according to the BSSID.
  • the network device to be configured searches for a target SSID corresponding to the target SSID from the hotspot list, and the target SSID is the SSID of the target network hotspot device.
  • the BSSID and SSID of the network hotspot device in the hotspot list may be input by the user into the network device to be configured, or may be obtained by the network to be configured device from a beacon Beacon packet sent by the network hotspot device.
  • a network hotspot device sends a Beacon packet to a network device to be configured at a certain interval, and the Beacon packet contains the BSSID and SSID of the network hotspot device.
  • Step 103 The network device to be configured uses the password information and the target SSID to access the target network hotspot device.
  • the network device to be configured may use the password information and SSID of the target network hotspot device to access the target network hotspot device.
  • the user terminal only needs to send the password information (Password) and the BSSID of the target network hotspot device to the network device to be configured, and does not need to send the SSID.
  • the network device to be configured can find the SSID of the corresponding target network hotspot device according to the BSSID, and then the network device to be configured accesses the target network hotspot device according to the SSID and password information. Since no SSID needs to be sent, there will be no error in transmitting the SSID, which will increase the success rate of the distribution network; meanwhile, the amount of data sent will be reduced, the time required to send the data will be reduced, and the efficiency of the distribution network will be improved.
  • Embodiment 2 a flowchart of steps in Embodiment 2 of a method for a network device to be configured to access a network hotspot device according to the present application is shown.
  • the method may specifically include the following steps:
  • Step 201 The network device to be configured receives a user datagram protocol UDP packet sent by a user terminal;
  • the user terminal may send a User Datagram Protocol (UDP) packet to a network device to be configured according to the 802.11 protocol or the 802.2 protocol.
  • UDP User Datagram Protocol
  • the header of each UDP packet contains the BSSID and is publicly disclosed.
  • the user terminal can encode the password information into a specific field of the UDP packet.
  • the UDP sent by the user terminal may include a network configuration packet, and the user terminal may encode the password information into multiple network configuration packets; the step 201 may include: the network device to be configured receives multiple network configurations sent by the user terminal package.
  • each distribution network package can encode is limited, and each distribution network package can only encode a part of the password information, so the user terminal can encode the password information into multiple distribution network packages.
  • the network equipment to be configured needs to parse the password information from multiple network configuration packages.
  • the UDP sent by the user terminal may further include a synchronization packet; the step 201 may further include: before receiving the multiple network distribution packets sent by the user terminal, the network device to be configured receives the At least one synchronization packet sent by the user terminal.
  • the user terminal may send at least one synchronization packet before sending several network distribution packets.
  • the network equipment to be configured can know that the network equipment is received later.
  • Step 202 The to-be-configured network device obtains the password information of the target network hotspot device and the target basic service set identifier BSSID from the UDP packet.
  • the network device to be configured performs air interface packet capture, and the BSSID in the header can be obtained after capturing the UDP packet. Since each UDP packet contains the BSSID, the network device to be configured can obtain the target BSSID from the synchronization packet. The BSSID can be obtained from the distribution network package.
  • the network device to be configured parses the password information from the captured multiple UDP packets. Specifically, the network device to be configured can parse the password information from multiple network configuration packages. In the embodiment of the present application, the network device to be configured may obtain the password information of the target network hotspot device from the multiple network configuration packages. It can include the following sub-steps:
  • Sub-step S11 the network device to be configured obtains encoding information from the multiple distribution network packages;
  • the encoding information includes: encryption mode information, password length information, and encrypted password information;
  • FIG. 3 is a schematic diagram of encoding information in an embodiment of the present application.
  • the encoding information may consist of encryption mode information, password length information, encrypted password information, and check code information in this order.
  • the arrangement order of various information in the encoded information can be agreed between the user terminal and the network equipment to be configured in advance. After the network equipment to be configured parses out the complete encoded information, it can determine various information from the agreed sequence.
  • the password information in order to increase the confidentiality of the password information, may be encrypted.
  • the encryption method information indicates which encryption method is used to encrypt the password information, such as AES128-CFB encryption method and AES128-OFB encryption method.
  • the encrypted password information can be decrypted in a corresponding decryption manner.
  • the encryption method information may be only a numerical value, and each numerical value corresponds to an encryption method, and the user terminal and the distribution network device have previously agreed on which value corresponds to which encryption method.
  • the password length information indicates the length of the encrypted password information.
  • the length of the encryption method information is fixed (for example, 1 Byte)
  • the length of the password length information is fixed (for example, 1 Byte)
  • the length of the check code information is also fixed (for example, 1 Byte)
  • the encrypted password The length of the message is not fixed (it can be nByte).
  • the network device to be configured needs to obtain the encrypted password information of the corresponding length from the encoded information according to the password length information.
  • the network equipment to be configured may use the check code information for verification; if the verification is incorrect, the network equipment to be configured will discard the encoded information parsed from multiple distribution network packets.
  • the sub-step S11 may further include:
  • Sub-step S111 the network equipment to be distributed parses the length fields Length of the received multiple distribution network packets
  • Sub-step S112 The network device to be distributed determines encoding information according to the length fields of the multiple network distribution packets.
  • Each distribution network packet has a length field Length, and the value of the length field corresponds to the length of the data portion Data in the distribution network packet. After the distribution network device receives the distribution network packet, it does not care about the content of the data portion of the distribution network packet, and only cares about the length of the data portion.
  • the length field of each distribution network packet can represent a coded value, and the coded information is actually a combination of multiple coded values.
  • the encoding information may include multiple bytes, and the byte length of the encoding value of each distribution network packet is limited, so multiple distribution network packets need to be sent in order to completely transmit the encoding information.
  • the user terminal can divide the distribution network packets into multiple groups. After receiving multiple groups of network distribution packets, the network equipment arranges the coding values of the distribution network packets in a specified order within the group, and arranges the groups in the order of the group The coded value of each group.
  • FIG. 4 is a schematic diagram of sending encoded information according to an embodiment of the present application.
  • the user terminal sends at least one synchronization packet before sending a group of network configuration packets.
  • the length of each synchronization packet reflects the order of the corresponding packets.
  • After the user terminal sends a group of network configuration packets it sends a synchronization packet corresponding to the next group of network configuration packets, and then sends the next group of network configuration packets.
  • the user terminal After the user terminal sends all the network distribution packets of the packet, it can repeatedly send the network distribution packets of all the packets.
  • the order of the distribution network packets in the packet can also be determined according to the length of the data part of each distribution network packet. Specifically, the length field of each distribution network packet is obtained by adding the offset within the group and the encoded value, and the offset within the group determines the order of the encoded values within the group. It is agreed in advance between the network device to be configured and the user terminal which bits in the length field are offsets and which bits are coded values. Therefore, the network equipment to be configured can determine the arrangement order and coding value of coding values in the group from the length field.
  • the first group 12 0F 0C 00 00 34 D 4 41 C
  • the second group 00, 32, 4F, 55, 54, 45, 52, 0D;
  • the offsets within the group are expressed as: 0x100, 0x180, 0x200, 0x280, 0x300, 0x380, 0x400, 0x480.
  • 0x100 the first byte in the group
  • the length of the synchronization packet corresponding to each packet is: 0x3E0, 0x3E1, 0x3E2, ...., 0x3EF,
  • 0x3E0 indicates the first packet
  • 0x3E1 indicates the second packet
  • the user terminal sends the sequence as follows:
  • the synchronization packet corresponding to the first packet the length of the data part is 0x3E0 (can be sent multiple times in succession to improve the success rate of synchronization),
  • the synchronization packet corresponding to the second packet the length of the data part is 0x3E1 (can be sent multiple times in succession to improve the success rate of synchronization),
  • the synchronization packet corresponding to the third packet the length of the data part is 0x3E2 (can be sent multiple times in succession to improve the success rate of synchronization),
  • the UDP packets received by the network device to be configured are as follows:
  • the first UDP packet the length of the data part is 0x3E0 (may be received multiple times), and it is synchronized to the first packet;
  • the second UDP packet the length of the data part is 0x112, the offset is 0x100, the first packet in the packet, the encoding value is 0x12;
  • the third UDP packet the length of the data part is 0x18F, the offset is 0x180, the second packet in the packet, the encoding value is 0x0F;
  • the fourth UDP packet the length of the data part is 0x20C, the offset is 0x200, the third packet in the packet, the encoding value is 0x0C;
  • the fifth UDP packet the length of the data part is 0x280, the offset is 0x280, the fourth packet in the packet, the encoding value is 0x00;
  • the sixth UDP packet the length of the data part is 0x334, the offset is 0x300, the fifth packet in the packet, the encoding value is 0x34;
  • the seventh UDP packet the length of the data part x3CD, the offset is 0x380, the sixth packet in the packet, the encoding value is 0x4D;
  • the 8th UDP packet the length of the data part is 0x441, the offset is 0x400, the 7th packet in the packet, the encoding value is 0x41;
  • the ninth UDP packet the length of the data part is 0x4CC, the offset is 0x480, the eighth packet in the packet, the encoding value is 0x4C;
  • the 10th UDP packet the length of the data part is 0x3E1 (may be received multiple times), and it is synchronized to the second packet;
  • the 11th UDP packet the length of the data part is 0x100, the offset is 0x100, the first packet in the packet, the encoding value is 0x00
  • the sub-step S11 may further include:
  • Sub-step S113 the network equipment to be distributed parses the destination fields of multiple received distribution network packets
  • Sub-step S114 The network device to be configured determines encoding information according to a destination field of the plurality of network configuration packets.
  • the header of each distribution network packet contains a destination field, and the Destination field indicates the destination MAC address.
  • the user terminal can encode information using the three bytes at the end of the destination MAC address.
  • the destination MAC address of each distribution network packet can represent a coded value.
  • the coded information is actually a combination of multiple coded values.
  • the encoded information may include multiple bytes, and the byte length of the encoded value of each distribution network packet is limited, so multiple distribution network packets need to be sent to completely transmit the encoded information.
  • the user terminal can divide the distribution network packets into multiple groups. After receiving multiple groups of network distribution packets, the network equipment arranges the coding values of the distribution network packets in a specified order within the group, and arranges the groups in the order of the group. The coded value of each group.
  • the user terminal sends at least one synchronization packet before each group of network configuration packets is sent.
  • the length of each synchronization packet reflects the order of the corresponding packets.
  • the order of the distribution network packets in the packet can also be determined according to the destination MAC address of each distribution network packet. Specifically, the destination MAC address of each distribution network packet is obtained by adding the offset within the group and the encoded value, and the offset within the group determines the order of the encoded values within the group. It is agreed in advance between the network device to be configured and the user terminal which bits in the destination MAC address are offsets and which bits are coded values. Therefore, the network device to be configured can determine the arrangement order and coding value of the coding values in the group from the destination MAC address.
  • Sub-step S12 the network device to be allocated determines the encrypted password information from the encoded information according to the password length information
  • Sub-step S13 The network device to be distributed decrypts the encrypted password information according to the encryption mode information to obtain the password information.
  • Step 203 The network device to be configured searches for a target SSID corresponding to the target BSSID from the preset BSSIDs and service set identifiers SSIDs of multiple network hotspot devices.
  • the BSSID and SSID of the network hotspot device may be entered by the user into the network device to be configured, or may be obtained by the network to be configured device from a beacon Beacon packet sent by the network hotspot device.
  • a network hotspot device sends a Beacon packet to a network device to be configured at a certain interval, and the Beacon packet contains the BSSID and SSID of the network hotspot device.
  • the network device to be configured uses the password information and the target SSID to access the target network hotspot device.
  • the network device to be configured may use the password information and SSID of the target network hotspot device to access the target network hotspot device.
  • the user terminal only needs to send the password information (Password) and the BSSID of the target network hotspot device to the network device to be configured, and does not need to send the SSID.
  • the network device to be configured can find the SSID of the corresponding target network hotspot device according to the BSSID, and then the network device to be configured accesses the target network hotspot device according to the SSID and password information. Since no SSID needs to be sent, there will be no error in transmitting the SSID, which will increase the success rate of the distribution network; meanwhile, the amount of data sent will be reduced, the time required to send the data will be reduced, and the efficiency of the distribution network will be improved.
  • Embodiment 3 a flowchart of steps in Embodiment 3 of a method for a network device to be configured to access a network hotspot device according to the present application is shown.
  • the method may specifically include the following steps:
  • Step 301 The user terminal obtains the password information and the target BSSID of the target network hotspot device; the password information and the target BSSID are used to access the target network hotspot device;
  • the network hotspot device may be a router or a wireless access point (AccessPoint) without a routing function.
  • AccessPoint wireless access point
  • the user terminal may support wireless communication devices such as 802.11 and 802.2 communication protocols, such as mobile phones, tablet computers, and personal digital assistants.
  • wireless communication devices such as 802.11 and 802.2 communication protocols, such as mobile phones, tablet computers, and personal digital assistants.
  • the user terminal can be installed with a distribution network application APP.
  • the password information and target BSSID of the target network hotspot device can be entered by the user into the distribution network APP of the user terminal, or after the user terminal establishes a connection with the target network hotspot device.
  • the distribution network APP sent by the target network hotspot device to the user terminal.
  • Step 302 The user terminal sends the password information and the target BSSID of the target network hotspot device to the network device to be configured.
  • the password information and the target BSSID of the target network hotspot device can be sent to the network device to be configured through the distribution network APP.
  • the to-be-configured network device may find the target SSID corresponding to the target BSSID from the preset BSSIDs and SSIDs of multiple network hotspot devices. Then the network device to be configured uses the password information and the target SSID to access the hotspot of the target network hotspot device.
  • the user terminal only needs to send the password information (Password) and the BSSID of the target network hotspot device to the network device to be configured, and does not need to send the SSID.
  • the network device to be configured can find the SSID of the corresponding target network hotspot device according to the BSSID, and then the network device to be configured accesses the target network hotspot device according to the SSID and password information. Since no SSID needs to be sent, there will be no error in transmitting the SSID, which will increase the success rate of the distribution network; meanwhile, the amount of data sent will be reduced, the time required to send the data will be reduced, and the efficiency of the distribution network will be improved.
  • Embodiment 4 a flowchart of steps in Embodiment 4 of a method for a network device to be configured to access a network hotspot device according to the present application is shown.
  • the method may specifically include the following steps:
  • Step 401 The user terminal obtains the password information and the target BSSID of the target network hotspot device; the password information and the target BSSID are used to access the target network hotspot device;
  • Step 402 the user terminal encodes the password information into a UDP packet; the UDP contains a target BSSID;
  • the UDP packet includes a network configuration packet; the step 402 may include the following sub-steps:
  • Sub-step S21 the user terminal encrypts the password information by using a preset encryption method
  • the user terminal encrypts the password information by using encryption methods such as AES128-CFB encryption method and AES128-OFB encryption method to obtain encrypted password information.
  • encryption methods such as AES128-CFB encryption method and AES128-OFB encryption method to obtain encrypted password information.
  • Sub-step S22 the user terminal generates encryption method information corresponding to the preset encryption method
  • the encryption method information may be only a numerical value, and each numerical value convention corresponds to an encryption method.
  • the user terminal and the network equipment have agreed in advance which value corresponds to which encryption method, which improves the confidentiality of the password information.
  • Sub-step S23 the user terminal determines password length information of the encrypted password information
  • the password length information indicates the length of the encrypted password information.
  • Sub-step S24 the user terminal encapsulates the encryption mode information, password length information, and encrypted password information into encoded information
  • the user terminal can arrange the encryption method information, password length information, and encrypted password information in the set order.
  • the encoding information may further include: check code information.
  • the user terminal can arrange the encryption method information, password length information, encrypted password information, and check code information in the set order.
  • Sub-step S25 the user terminal encodes the encoding information into multiple distribution network packets.
  • the sub-step S25 may further include: the user terminal encodes the encoding information into a length field Length of multiple distribution network packets.
  • the user terminal may divide the encoded information into multiple encoded values (for example, the encoded information includes multiple bytes, with one byte as one encoded value), and divide the encoded value into multiple encoded value groups; the user terminal Encoding the encoding values of one encoding value group into each distribution network packet belonging to a distribution network packet group.
  • the complete coding information can be coded into the distribution network packets grouped by multiple distribution network packets.
  • the corresponding intra-group offset is generated according to the order of the coded value in the coded value group; then the coded value and the corresponding intra-group offset are respectively encoded into a distribution network packet group.
  • the length field of each distribution packet is generated according to the order of the coded value in the coded value group.
  • the network device to be parsed After receiving multiple groups of network configuration packets, the network device to be parsed encodes the encoding value and the offset within the group from the length field of the network configuration packets. For the coding values of a distribution network packet group, the order of the coding values in the coding value group is determined according to the offset within the group, and then the coding values are arranged in this order. The coding values of different network packet groups are arranged in the order of the network packet groups.
  • the sub-step S25 may further include: the user terminal encodes the encoding information into a destination field of multiple distribution network packets.
  • the user terminal may divide the encoded information into multiple encoded values (for example, the encoded information includes multiple bytes, with one byte as one encoded value), and divide the encoded value into multiple encoded value groups; the user terminal Encoding the encoding values of one encoding value group into each distribution network packet belonging to a distribution network packet group.
  • the complete coding information can be coded into the distribution network packets grouped by multiple distribution network packets.
  • the corresponding intra-group offset is generated according to the order of the coded value in the coded value group; then the coded value and the corresponding intra-group offset are encoded into a distribution network packet group
  • the destination field of each distribution packet Specifically, the last three bytes of the destination MAC address of the destination field can be used for encoding.
  • the network device to be configured After receiving the plurality of groups of network configuration packets, the network device to be configured parses the encoding value and the offset within the group from the destination field of the network configuration packets. For the coding values of a distribution network packet group, the order of the coding values in the coding value group is determined according to the offset within the group, and then the coding values are arranged in this order. The coding values of different network packet groups are arranged in the order of the network packet groups.
  • Step 403 The user terminal sends the UDP packet to the network device to be configured.
  • the step 403 may include: the user terminal sending the multiple network configuration packets to the network device to be configured.
  • the step 403 may further include: before each time the user terminal sends a preset number of network configuration packets, the user terminal sends at least one synchronization packet to the network device to be configured.
  • the user terminal sends a distribution network packet in groups, and each distribution network packet group includes a preset number of distribution network packets. Before each user terminal sends a group of network configuration packets, it sends a group of synchronization packets. Each group of synchronization packets includes at least one synchronization packet. The length of the data part of the same group of synchronization packets is the same, that is to say, the length field of the same group of synchronization packets is the same, and the length field of the synchronization packet indicates the order of the distribution network packet grouping.
  • the user terminal only needs to send the password information (Password) and the BSSID of the target network hotspot device to the network device to be configured, and does not need to send the SSID.
  • the network device to be configured can find the SSID of the corresponding target network hotspot device according to the BSSID, and then the network device to be configured accesses the target network hotspot device according to the SSID and password information. Since no SSID needs to be sent, there will be no error in transmitting the SSID, which will increase the success rate of the distribution network; meanwhile, the amount of data sent will be reduced, the time required to send the data will be reduced, and the efficiency of the distribution network will be improved.
  • FIG. 7 there is shown a structural block diagram of a first embodiment of an apparatus for accessing a network hotspot device by a network device to be configured according to the present application, which may specifically include the following modules:
  • An access module 503 located in the network device to be configured is configured to access the target network hotspot device by using the password information and the target SSID.
  • the distribution network information acquisition module 501 may include:
  • a user datagram protocol packet receiving submodule configured to receive a user datagram protocol UDP packet sent by a user terminal
  • the network information acquisition submodule is configured to acquire the password information of the target network hotspot device and the target basic service set identifier BSSID from the UDP packet.
  • the user datagram protocol packet receiving submodule may include:
  • a distribution network packet receiving unit is configured to receive multiple distribution network packets sent by a user terminal.
  • the distribution network information acquisition submodule may include:
  • An encoding information obtaining unit configured to obtain encoding information from the multiple distribution network packages; the encoding information includes: encryption method information, password length information, and encrypted password information;
  • An encrypted password obtaining unit configured to determine the encrypted password information from the encoded information according to the password length information
  • a decryption unit is configured to decrypt the encrypted password information according to the encryption mode information to obtain password information.
  • the user datagram protocol packet receiving submodule may further include:
  • a synchronization packet receiving unit is configured to receive at least one synchronization packet sent by the user terminal before receiving multiple network distribution packets sent by the user terminal.
  • the distribution network information acquisition submodule may include:
  • the first target basic service set identifier acquiring unit is configured to acquire a target basic service set identifier BSSID from the synchronization package.
  • the distribution network information acquisition submodule may include:
  • the second target basic service set identifier acquiring unit is configured to obtain a target basic service set identifier BSSID from the distribution network package.
  • the encoding information obtaining unit specifically includes:
  • Length field parsing subunit used to parse the length field Length of multiple received distribution packets
  • the first encoding information determination subunit is configured to determine encoding information according to length fields of the multiple distribution network packets.
  • the encoding information obtaining unit may include:
  • Destination field parsing subunit for parsing the destination field Destination of multiple received distribution network packets
  • the second encoding information determining subunit is configured to determine encoding information according to a destination field Destination of the multiple distribution network packets.
  • the device may further include:
  • the user terminal only needs to send the password information (Password) and the BSSID of the target network hotspot device to the network device to be configured, and does not need to send the SSID.
  • the network device to be configured can find the SSID of the corresponding target network hotspot device according to the BSSID, and then the network device to be configured accesses the target network hotspot device according to the SSID and password information. Since no SSID needs to be sent, there will be no error in transmitting the SSID, which will increase the success rate of the distribution network; meanwhile, the amount of data sent will be reduced, the time required to send the data will be reduced, and the efficiency of the distribution network will be improved.
  • Embodiment 2 of an apparatus for accessing a network hotspot device by a network device to be configured according to the present application is shown, and may specifically include the following modules:
  • a distribution network information acquisition module 601 located at a user terminal, configured to acquire password information and a target BSSID of a target network hotspot device; the password information and the target BSSID are used to access the target network hotspot device;
  • the network configuration information sending module 602 located in the user terminal is configured to send the password information and the target BSSID of the target network hotspot device to the network device to be configured.
  • the distribution network information sending module 602 may include:
  • a password information encoding submodule configured to encode the password information into a UDP packet; the UDP contains a target BSSID;
  • the user datagram protocol packet sending submodule is configured to send the UDP packet to the network device to be configured.
  • the password information encoding sub-module may include:
  • a password information encryption unit configured to encrypt password information by using a preset encryption method
  • An encryption method information generating unit configured to generate encryption method information corresponding to the preset encryption method
  • a password length information determining unit configured to determine password length information of the encrypted password information
  • An encoding information encapsulating unit configured to encapsulate the encryption method information, password length information, and encrypted password information into encoding information
  • An encoding information encoding unit configured to encode the encoding information into multiple distribution network packets.
  • the user datagram protocol packet sending submodule may include:
  • a network packet sending unit is configured to send the multiple network packets to the network device to be configured.
  • the user datagram protocol packet sending submodule may further include:
  • a synchronization packet sending unit is configured to send at least one synchronization packet to the network device to be configured before each preset number of network distribution packets is sent.
  • the encoding information encoding unit may include:
  • the first encoding subunit is configured to encode the encoding information into a length field Length of multiple distribution network packets.
  • the encoding information encoding unit may include:
  • the second encoding subunit is configured to encode the encoding information into destination fields of multiple distribution network packets.
  • the user terminal only needs to send the password information (Password) and the BSSID of the target network hotspot device to the network device to be configured, and does not need to send the SSID.
  • the network device to be configured can find the SSID of the corresponding target network hotspot device according to the BSSID, and then the network device to be configured accesses the target network hotspot device according to the SSID and password information. Since no SSID needs to be sent, there will be no error in transmitting the SSID, which will increase the success rate of the distribution network; meanwhile, the amount of data sent will be reduced, the time required to send the data will be reduced, and the efficiency of the distribution network will be improved.
  • the description is relatively simple. For the relevant part, refer to the description of the method embodiment.
  • An embodiment of the present application further provides an apparatus for accessing a network hotspot device by a network device to be configured, including:
  • One or more processors are One or more processors.
  • One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, cause the apparatus to execute the method described in the embodiment of the present application.
  • the embodiments of the present application further provide one or more machine-readable media, on which instructions are stored, and when executed by one or more processors, cause the processors to execute the method described in the embodiments of the present application.
  • the embodiments of the embodiments of the present application may be provided as a method, an apparatus, or a computer program product. Therefore, the embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
  • computer-usable storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing terminal device Means are generated for implementing the functions specified in one or more flowcharts and / or one or more blocks of the block diagrams.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including the instruction means, the The instruction means implements the functions specified in one or more flowcharts and / or one or more blocks of the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing terminal device, so that a series of operation steps can be performed on the computer or other programmable terminal device to produce a computer-implemented process, so that the computer or other programmable terminal device can
  • the instructions executed on the steps provide steps for implementing the functions specified in one or more of the flowcharts and / or one or more of the block diagrams.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiments of the present application provide a method and an apparatus for a device to be configured with a network to access a network hotspot device. The method comprises: a device to be configured with a network acquiring password information and a target basic service set identifier (BSSID) of a target network hotspot device sent by a user terminal; the device to be configured with a network searching in preset BSSIDs and service set identifiers (SSIDs) of a plurality of network hotspot devices for a target SSID corresponding to the target BSSID; the device to be configured with a network using the password information and the target SSID to access the target network hotspot device. In the embodiments of the present application, as it is unnecessary to send an SSID, the situation of an error occurring in the transmission of the SSID is avoided, improving the success rate of network configuration; meanwhile, the amount of transmitted data is reduced, and the time required for transmitting data is also reduced, improving network configuration efficiency.

Description

一种待配网设备接入网络热点设备的方法和装置Method and device for network equipment to be connected to network hotspot equipment
本申请要求2018年06月08日递交的申请号为201810590238.2、发明名称为“一种待配网设备接入网络热点设备的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed on June 08, 2018 with the application number 201810590238.2 and the invention name "A method and device for accessing network hotspot equipment by a network device to be distributed", the entire contents of which are incorporated by reference In this application.
技术领域Technical field
本申请涉及通信技术领域,特别是涉及一种待配网设备接入网络热点设备的方法和一种待配网设备接入网络热点设备的装置。The present application relates to the field of communications technologies, and in particular, to a method for a network device to be configured to access a network hotspot device and an apparatus for accessing a network device to be configured to access a network hotspot device.
背景技术Background technique
随着物联网的发展,在物联网的智慧家庭场景中,越来越多的智能设备使用WiFi接入家庭路由器,来实现远程设备控制、场景联动等功能。With the development of the Internet of Things, in the smart home scene of the Internet of Things, more and more smart devices use WiFi to access home routers to implement functions such as remote device control and scene linkage.
智能设备接入互联网Internet之前需要先借助于配网方案获得路由器的SSID(Service Set Identifier,服务集标识)和密码Password。目前的配网方案主要包括两种,一种是WiFi广播配网方案,另一种是WiFi组播配网。Before a smart device accesses the Internet, it is necessary to obtain the SSID (Service Set Identifier, Service Set Identifier) and password of the router by means of a network distribution scheme. The current network distribution scheme mainly includes two types, one is a WiFi broadcast network distribution scheme, and the other is a WiFi multicast network distribution.
WiFi广播配网采用Length字段传输路由器的SSID和Password,而WiFi组播配网采用Destination字段传输路由器的SSID和Password。现有的WiFi广播/组播一键配网都先编码路由器的SSID和Password,然后再由手机依次将这些编码发送给待配网设备。其中这些编码中的任何一个字节丢失都将无法正确解析路由器的SSID和Password。由于每一个字节丢失的概率大致相同,所以理论上相同的时间内,SSID和Password的长度越长,出错的概率越低,正确解析路由器的SSID和Password的概率同样越低。The WiFi broadcast distribution network uses the Length field to transmit the router's SSID and Password, while the WiFi multicast distribution network uses the Destination field to transmit the router's SSID and Password. The existing WiFi broadcast / multicast one-click network configuration first encodes the router's SSID and Password, and then the mobile phone sends these codes to the network device to be configured in turn. If any of these encodings is lost, the router's SSID and Password cannot be parsed correctly. Since the probability of losing each byte is about the same, theoretically the same time, the longer the SSID and Password length, the lower the probability of error, and the lower the probability of correctly parsing the router's SSID and Password.
发明内容Summary of the Invention
鉴于上述问题,提出了本申请实施例以便提供一种克服上述问题或者至少部分地解决上述问题的一种待配网设备接入网络热点设备的方法和相应的一种待配网设备接入网络热点设备的装置。In view of the above problems, an embodiment of the present application is provided in order to provide a method for accessing a network hotspot device to be configured with a network device to be configured and a network device to be configured to access the network, which overcomes the above problems or at least partially solves the foregoing problems. Installation of hot equipment.
为了解决上述问题,本申请实施例公开了一种待配网设备接入网络热点设备的方法,包括:In order to solve the foregoing problem, an embodiment of the present application discloses a method for a network device to be configured to access a network hotspot device, including:
待配网设备获取用户终端发送的目标网络热点设备的密码信息和目标基本服务集标 识BSSID;The network device to be configured obtains the password information of the target network hotspot device and the target basic service set identifier BSSID sent by the user terminal;
所述待配网设备从预置的多个网络热点设备的BSSID和服务集标识SSID中,查找与所述目标BSSID对应的目标SSID;Searching for a target SSID corresponding to the target BSSID from the preset BSSIDs and service set identifiers SSIDs of multiple network hotspot devices by the network device to be configured;
所述待配网设备采用所述密码信息和所述目标SSID,接入所述目标网络热点设备。The network device to be configured uses the password information and the target SSID to access the target network hotspot device.
优选的,所述待配网设备获取用户终端发送的目标网络热点设备的密码信息和目标基本服务集标识BSSID的步骤包括:Preferably, the step of the network device to be configured to obtain the password information of the target network hotspot device and the target basic service set identifier BSSID sent by the user terminal includes:
所述待配网设备接收用户终端发送的用户数据报协议UDP包;Receiving, by the network device to be configured, a user datagram protocol UDP packet sent by a user terminal;
所述待配网设备从所述UDP包中获取目标网络热点设备的密码信息和目标基本服务集标识BSSID。The network device to be configured obtains the password information of the target network hotspot device and the target basic service set identifier BSSID from the UDP packet.
优选的,所述待配网设备接收用户终端发送的若干个UDP包的步骤包括:Preferably, the step of the network device to be configured to receive several UDP packets sent by the user terminal includes:
所述待配网设备接收用户终端发送的多个配网包。The network equipment to be distributed receives multiple network distribution packets sent by a user terminal.
优选的,所述待配网设备从所述UDP包中获取目标网络热点设备的密码信息的步骤包括:Preferably, the step of obtaining, by the network device to be configured, the password information of the target network hotspot device from the UDP packet includes:
所述待配网设备从所述多个配网包中获取编码信息;所述编码信息包括:加密方式信息、密码长度信息、经加密的密码信息;The network device to be distributed obtains encoding information from the multiple network distribution packages; the encoding information includes: encryption mode information, password length information, and encrypted password information;
所述待配网设备根据所述密码长度信息,从所述编码信息中确定经加密的密码信息;Determining, by the network device to be configured, encrypted password information from the encoded information according to the password length information;
所述待配网设备根据所述加密方式信息,对所述经加密的密码信息进行解密,得到密码信息。The network device to be distributed decrypts the encrypted password information according to the encryption method information to obtain password information.
优选的,所述待配网设备接收用户终端发送的UDP包的步骤还包括:Preferably, the step of receiving the UDP packet sent by the user terminal by the network device to be configured further includes:
所述待配网设备在接收所述用户终端发送的多个配网包之前,接收所述用户终端发送的至少一个同步包。Before receiving the plurality of network distribution packets sent by the user terminal, the network device to be configured receives at least one synchronization packet sent by the user terminal.
优选的,所述待配网设备从所述UDP包中获取目标基本服务集标识BSSID的步骤包括:Preferably, the step of the network device to be configured obtaining the target basic service set identifier BSSID from the UDP packet includes:
所述待配网设备从所述同步包中获取目标基本服务集标识BSSID。The network device to be configured obtains a target basic service set identifier BSSID from the synchronization packet.
优选的,所述待配网设备从所述UDP包中获取目标基本服务集标识BSSID的步骤包括:Preferably, the step of the network device to be configured obtaining the target basic service set identifier BSSID from the UDP packet includes:
所述待配网设备从所述配网包中获取目标基本服务集标识BSSID。The network device to be configured obtains a target basic service set identifier BSSID from the network configuration package.
优选的,所述待配网设备从所述多个配网包中获取编码信息的步骤包括:Preferably, the step of obtaining, by the network device to be configured, the encoding information from the multiple network distribution packages includes:
所述待配网设备解析接收到的多个配网包的长度字段Length;Analyzing, by the network device to be distributed, the length fields Length of the multiple distribution network packets received;
所述待配网设备根据所述多个配网包的长度字段,确定编码信息。The network device to be distributed determines encoding information according to length fields of the multiple network distribution packets.
优选的,所述待配网设备从所述多个配网包中获取编码信息的步骤包括:Preferably, the step of obtaining, by the network device to be configured, the encoding information from the multiple network distribution packages includes:
所述待配网设备确定接收到的多个配网包;Determining, by the network device to be distributed, a plurality of received distribution network packets;
所述待配网设备解析接收到的多个配网包的目的字段Destination;Analyzing, by the network device to be distributed, the destination fields of the multiple distribution network packets received;
所述待配网设备根据所述多个配网包的目的字段Destination,确定编码信息。The network device to be distributed determines encoding information according to a destination field Destination of the multiple network distribution packets.
优选的,还包括:Preferably, it further includes:
所述待配网设备接收网络热点设备发送的信标包;The network device to be configured receives a beacon packet sent by a network hotspot device;
所述待配网设备从所述信标包中获取所述网络热点设备的BSSID和SSID。The network device to be configured obtains a BSSID and an SSID of the network hotspot device from the beacon packet.
本申请实施例还公开了一种待配网设备接入网络热点设备的方法,包括:An embodiment of the present application further discloses a method for accessing a network device to be configured to a network hotspot device, including:
用户终端获取目标网络热点设备的密码信息和目标BSSID;所述密码信息和目标BSSID用于接入所述目标网络热点设备;The user terminal obtains the password information and the target BSSID of the target network hotspot device; the password information and the target BSSID are used to access the target network hotspot device;
所述用户终端向待配网设备发送所述目标网络热点设备的密码信息和目标BSSID。The user terminal sends the password information and the target BSSID of the target network hotspot device to the network device to be configured.
优选的,所述用户终端向待配网设备发送目标网络热点设备的密码信息和目标BSSID的步骤包括:Preferably, the step of the user terminal sending the password information and the target BSSID of the target network hotspot device to the network device to be configured includes:
所述用户终端将所述密码信息编码到UDP包;所述UDP包含有目标BSSID;The user terminal encodes the password information into a UDP packet; the UDP contains a target BSSID;
所述用户终端向所述待配网设备发送所述UDP包。Sending, by the user terminal, the UDP packet to the network device to be configured.
优选的,所述用户终端将所述密码信息编码到UDP包的步骤包括:Preferably, the step of the user terminal encoding the password information into a UDP packet includes:
所述用户终端采用预设加密方式对密码信息进行加密;The user terminal encrypts password information by using a preset encryption method;
所述用户终端生成与所述预设加密方式对应的加密方式信息;Generating, by the user terminal, encryption method information corresponding to the preset encryption method;
所述用户终端确定经加密的密码信息的密码长度信息;Determining, by the user terminal, password length information of the encrypted password information;
所述用户终端将所述加密方式信息、密码长度信息、经加密的密码信息封装为编码信息;The user terminal encapsulates the encryption method information, password length information, and encrypted password information into encoded information;
所述用户终端将所述编码信息编码到多个配网包。The user terminal encodes the encoding information into multiple distribution network packets.
优选的,所述用户终端向所述待配网设备发送所述UDP包的步骤包括:Preferably, the step of the user terminal sending the UDP packet to the network device to be configured includes:
所述用户终端向所述待配网设备发送所述多个配网包。Sending, by the user terminal, the multiple network configuration packets to the network device to be configured.
优选的,所述用户终端向所述待配网设备发送所述UDP包的步骤还包括:Preferably, the step of the user terminal sending the UDP packet to the network device to be configured further includes:
所述用户终端在每发送预设数目的配网包之前,向所述待配网设备发送至少一个同步包。The user terminal sends at least one synchronization packet to the network device to be configured before sending a preset number of network configuration packets.
优选的,所述用户终端将所述编码信息编码到多个配网包的步骤包括:Preferably, the step of the user terminal encoding the encoding information to a plurality of distribution network packets includes:
所述用户终端将所述编码信息,编码到多个配网包的长度字段Length。The user terminal encodes the encoding information into a length field Length of multiple distribution network packets.
优选的,所述用户终端将所述编码信息编码到多个配网包的步骤包括:Preferably, the step of the user terminal encoding the encoding information to a plurality of distribution network packets includes:
所述用户终端将所述编码信息,编码到多个配网包的目的字段Destination。The user terminal encodes the encoding information into destination fields of multiple distribution network packets.
本申请实施例还公开了一种待配网设备接入网络热点设备的装置,包括:An embodiment of the present application further discloses an apparatus for accessing a network hotspot device by a network device to be configured, including:
位于待配网设备的配网信息获取模块,用于获取用户终端发送的目标网络热点设备的密码信息和目标基本服务集标识BSSID;A distribution network information acquisition module located at a network device to be configured, configured to obtain password information of a target network hotspot device and a target basic service set identifier BSSID sent by a user terminal;
位于所述待配网设备的服务集标识查找模块,用于从预置的多个网络热点设备的BSSID和服务集标识SSID中,查找与所述目标BSSID对应的目标SSID;A service set identification search module located in the network device to be configured, configured to find a target SSID corresponding to the target BSSID from the preset BSSIDs and service set identifiers SSIDs of a plurality of network hotspot devices;
位于所述待配网设备的接入模块,用于采用所述密码信息和所述目标SSID,接入所述目标网络热点设备。An access module located in the network device to be configured is configured to use the password information and the target SSID to access the target network hotspot device.
优选的,所述配网信息获取模块包括:Preferably, the distribution network information acquisition module includes:
用户数据报协议包接收子模块,用于接收用户终端发送的用户数据报协议UDP包;A user datagram protocol packet receiving submodule, configured to receive a user datagram protocol UDP packet sent by a user terminal;
配网信息获取子模块,用于从所述UDP包中获取目标网络热点设备的密码信息和目标基本服务集标识BSSID。The network information acquisition submodule is configured to acquire the password information of the target network hotspot device and the target basic service set identifier BSSID from the UDP packet.
优选的,所述用户数据报协议包接收子模块包括:Preferably, the user datagram protocol packet receiving submodule includes:
配网包接收单元,用于接收用户终端发送的多个配网包。A distribution network packet receiving unit is configured to receive multiple distribution network packets sent by a user terminal.
优选的,所述配网信息获取子模块包括:Preferably, the distribution network information acquisition submodule includes:
编码信息获取单元,用于从所述多个配网包中获取编码信息;所述编码信息包括:加密方式信息、密码长度信息、经加密的密码信息;An encoding information obtaining unit, configured to obtain encoding information from the multiple distribution network packages; the encoding information includes: encryption method information, password length information, and encrypted password information;
加密密码获取单元,用于根据所述密码长度信息,从所述编码信息中确定经加密的密码信息;An encrypted password obtaining unit, configured to determine the encrypted password information from the encoded information according to the password length information;
解密单元,用于根据所述加密方式信息,对所述经加密的密码信息进行解密,得到密码信息。A decryption unit is configured to decrypt the encrypted password information according to the encryption mode information to obtain password information.
优选的,所述用户数据报协议包接收子模块还包括:Preferably, the user datagram protocol packet receiving submodule further includes:
同步包接收单元,用于在接收所述用户终端发送的多个配网包之前,接收所述用户终端发送的至少一个同步包。A synchronization packet receiving unit is configured to receive at least one synchronization packet sent by the user terminal before receiving multiple network distribution packets sent by the user terminal.
优选的,所述配网信息获取子模块包括:Preferably, the distribution network information acquisition submodule includes:
第一目标基本服务集标识获取单元,用于从所述同步包中获取目标基本服务集标识BSSID。The first target basic service set identifier acquiring unit is configured to acquire a target basic service set identifier BSSID from the synchronization package.
优选的,所述配网信息获取子模块包括:Preferably, the distribution network information acquisition submodule includes:
第二目标基本服务集标识获取单元,用于从所述配网包中获取目标基本服务集标识BSSID。The second target basic service set identifier acquiring unit is configured to obtain a target basic service set identifier BSSID from the distribution network package.
优选的,所述编码信息获取单元包括:Preferably, the encoding information obtaining unit includes:
长度字段解析子单元,用于解析接收到的多个配网包的长度字段Length;Length field parsing subunit, used to parse the length field Length of multiple received distribution packets;
第一编码信息确定子单元,用于根据所述多个配网包的长度字段,确定编码信息。The first encoding information determination subunit is configured to determine encoding information according to length fields of the multiple distribution network packets.
优选的,所述编码信息获取单元包括:Preferably, the encoding information obtaining unit includes:
目的字段解析子单元,用于解析接收到的多个配网包的目的字段Destination;Destination field parsing subunit, for parsing the destination field Destination of multiple received distribution network packets;
第二编码信息确定子单元,用于根据所述多个配网包的目的字段Destination,确定编码信息。The second encoding information determining subunit is configured to determine encoding information according to a destination field Destination of the multiple distribution network packets.
优选的,还包括:Preferably, it further includes:
位于所述待配网设备的信标包接收模块,用于接收网络热点设备发送的信标包;A beacon packet receiving module located at the network device to be configured, configured to receive a beacon packet sent by a network hotspot device;
位于所述待配网设备的设备信息获取模块,用于从所述信标包中获取所述网络热点设备的BSSID和SSID。A device information acquisition module located in the network device to be configured, configured to acquire a BSSID and an SSID of the network hotspot device from the beacon packet.
本申请实施例还公开了一种待配网设备接入网络热点设备的装置,包括:An embodiment of the present application further discloses an apparatus for accessing a network hotspot device by a network device to be configured, including:
位于用户终端的配网信息获取模块,用于获取目标网络热点设备的密码信息和目标BSSID;所述密码信息和目标BSSID用于接入所述目标网络热点设备;A distribution network information acquisition module located at a user terminal, configured to acquire password information and a target BSSID of a target network hotspot device; the password information and the target BSSID are used to access the target network hotspot device;
位于所述用户终端的配网信息发送模块,用于向待配网设备发送所述目标网络热点设备的密码信息和目标BSSID。The distribution network information sending module located in the user terminal is configured to send the password information and the target BSSID of the target network hotspot device to the network device to be configured.
优选的,所述配网信息发送模块包括:Preferably, the distribution network information sending module includes:
密码信息编码子模块,用于将所述密码信息编码到UDP包;所述UDP包含有目标BSSID;A password information encoding submodule, configured to encode the password information into a UDP packet; the UDP contains a target BSSID;
用户数据报协议包发送子模块,用于向所述待配网设备发送所述UDP包。The user datagram protocol packet sending submodule is configured to send the UDP packet to the network device to be configured.
优选的,所述密码信息编码子模块包括:Preferably, the password information encoding sub-module includes:
密码信息加密单元,用于采用预设加密方式对密码信息进行加密;A password information encryption unit, configured to encrypt password information by using a preset encryption method;
加密方式信息生成单元,用于生成与所述预设加密方式对应的加密方式信息;An encryption method information generating unit, configured to generate encryption method information corresponding to the preset encryption method;
密码长度信息确定单元,用于确定经加密的密码信息的密码长度信息;A password length information determining unit, configured to determine password length information of the encrypted password information;
编码信息封装单元,用于将所述加密方式信息、密码长度信息、经加密的密码信息封装为编码信息;An encoding information encapsulating unit, configured to encapsulate the encryption method information, password length information, and encrypted password information into encoding information;
编码信息编码单元,用于将所述编码信息编码到多个配网包。An encoding information encoding unit, configured to encode the encoding information into multiple distribution network packets.
优选的,所述用户数据报协议包发送子模块包括:Preferably, the user datagram protocol packet sending submodule includes:
配网包发送单元,用于向所述待配网设备发送所述多个配网包。A network packet sending unit is configured to send the multiple network packets to the network device to be configured.
优选的,所述用户数据报协议包发送子模块还包括:Preferably, the user datagram protocol packet sending submodule further includes:
同步包发送单元,用于在每发送预设数目的配网包之前,向所述待配网设备发送至少一个同步包。A synchronization packet sending unit is configured to send at least one synchronization packet to the network device to be configured before each preset number of network distribution packets is sent.
优选的,所述编码信息编码单元包括:Preferably, the encoding information encoding unit includes:
第一编码子单元,用于将所述编码信息,编码到多个配网包的长度字段Length。The first encoding subunit is configured to encode the encoding information into a length field Length of multiple distribution network packets.
优选的,所述编码信息编码单元包括:Preferably, the encoding information encoding unit includes:
第二编码子单元,用于将所述编码信息,编码到多个配网包的目的字段Destination。The second encoding subunit is configured to encode the encoding information into destination fields of multiple distribution network packets.
本申请实施例还公开了一种待配网设备接入网络热点设备的装置,包括:An embodiment of the present application further discloses an apparatus for accessing a network hotspot device by a network device to be configured, including:
一个或多个处理器;和One or more processors; and
其上存储有指令的一个或多个机器可读介质,当由所述一个或多个处理器执行时,使得所述装置执行如上所述的一个或多个的方法。One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, cause the apparatus to perform one or more methods as described above.
本申请实施例还公开了一个或多个机器可读介质,其上存储有指令,当由一个或多个处理器执行时,使得所述处理器执行如上所述的一个或多个的方法。Embodiments of the present application also disclose one or more machine-readable media having instructions stored thereon that, when executed by one or more processors, cause the processors to perform one or more of the methods described above.
本申请实施例包括以下优点:The embodiments of the present application include the following advantages:
在本申请实施例中,用户终端只需要向待配网设备发送目标网络热点设备的密码信息(Password)和BSSID,而不需要发送SSID。待配网设备可以根据BSSID查找到对应的目标网络热点设备的SSID,然后待配网设备根据SSID和密码信息接入到目标网络热点设备。由于不需要发送SSID,不会出现传输SSID出错的情况,提高配网成功率;同时减少了发送的数据量,减少了发送数据所需要的时间,提升了配网效率。In the embodiment of the present application, the user terminal only needs to send the password information (Password) and the BSSID of the target network hotspot device to the network device to be configured, and does not need to send the SSID. The network device to be configured can find the SSID of the corresponding target network hotspot device according to the BSSID, and then the network device to be configured accesses the target network hotspot device according to the SSID and password information. Since no SSID needs to be sent, there will be no error in transmitting the SSID, which will increase the success rate of the distribution network; meanwhile, the amount of data sent will be reduced, the time required to send the data will be reduced, and the efficiency of the distribution network will be improved.
另外,目前Android App和iOS App都无法自动获得中文SSID的编码格式(万国码UTF-8或汉字内码扩展规范GBK),APP默认SSID为UTF-8编码,导致GBK编码的SSID按照UTF-8格式发送,导致目前的GBK编码的中文SSID热点配网失败。而本申请实施例不需要传输SSID,而是根据BSSID查找对应的SSID,可以有效解决GBK编码的中文SSID配网失败的问题。In addition, at present, neither Android App nor iOS App can automatically obtain the Chinese SSID encoding format (Universal Code UTF-8 or Chinese Character Internal Code Extension Specification GBK). The default SSID of the APP is UTF-8 encoding, resulting in GBK encoded SSID according to UTF-8. Send in format, causing the current GBK-encoded Chinese SSID hotspot distribution network to fail. The embodiment of the present application does not need to transmit the SSID, but searches for the corresponding SSID according to the BSSID, which can effectively solve the problem of GBK-encoded Chinese SSID network distribution failure.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本申请的一种待配网设备接入网络热点设备的方法实施例一的步骤流程图;FIG. 1 is a flowchart of steps in Embodiment 1 of a method for a network device to be configured to access a network hotspot device according to the present application; FIG.
图2是本申请的一种待配网设备接入网络热点设备的方法实施例二的步骤流程图;2 is a flowchart of steps in a second embodiment of a method for a network device to be configured to access a network hotspot device according to the present application;
图3是本申请实施例中编码信息的示意图;3 is a schematic diagram of encoding information in an embodiment of the present application;
图4是本申请实施例中发送编码信息的示意图;4 is a schematic diagram of sending encoded information in an embodiment of the present application;
图5是本申请的一种待配网设备接入网络热点设备的方法实施例三的步骤流程图;5 is a flowchart of steps in Embodiment 3 of a method for a network device to be configured to access a network hotspot device according to the present application;
图6是本申请的一种待配网设备接入网络热点设备的方法实施例四的步骤流程图;6 is a flowchart of steps in Embodiment 4 of a method for a network device to be configured to access a network hotspot device according to the present application;
图7是本申请的一种待配网设备接入网络热点设备的装置实施例一的结构框图;7 is a structural block diagram of a first embodiment of an apparatus for accessing a network hotspot device to a network device to be configured according to the present application;
图8是本申请的一种待配网设备接入网络热点设备的装置实施例二的结构框图。FIG. 8 is a structural block diagram of a second embodiment of a device for a network device to be configured to access a network hotspot device according to the present application.
具体实施方式Detailed ways
为使本申请的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。In order to make the foregoing objects, features, and advantages of the present application more comprehensible, the present application is further described in detail below with reference to the accompanying drawings and specific embodiments.
参照图1,示出了本申请的一种待配网设备接入网络热点设备的方法实施例一的步骤流程图,具体可以包括如下步骤:Referring to FIG. 1, there is shown a flowchart of steps in Embodiment 1 of a method for a network device to be configured to access a network hotspot device according to the present application, which may specifically include the following steps:
步骤101,待配网设备获取用户终端发送的目标网络热点设备的密码信息和目标基本服务集标识BSSID;Step 101: The to-be-configured network device obtains the password information of the target network hotspot device and the target basic service set identifier BSSID sent by the user terminal;
在本申请实施例中,网络热点设备可以是路由器,也可以是不具备路由功能的无线访问接入点AP(AccessPoint)。In the embodiment of the present application, the network hotspot device may be a router or a wireless access point (AccessPoint) without a routing function.
在物联网场景中,设置有网络热点设备为智能设备提供WIFI热点。待配网设备是需要接入WIFI热点的设备,例如家庭中的智能家电、摄像头,工厂中的各种传感器、探测器。In the Internet of Things scenario, a network hotspot device is provided to provide WIFI hotspots for smart devices. The network equipment to be distributed is a device that needs to access a WIFI hotspot, such as smart home appliances, cameras in the home, and various sensors and detectors in the factory.
一般情况下,待配网设备需要采用网络热点设备的密码信息和SSID(服务集标识,Service Set Identifier,一般指路由器热点的名字)来接入网络热点设备。在本申请实施例中,用户终端向待配网设备发送目标网络热点设备的密码信息和BSSID,而不发送SSID。Generally, the network equipment to be configured needs to use the password information and SSID (Service Set Identifier, generally referred to as the router hotspot name) of the network hotspot device to access the network hotspot device. In the embodiment of the present application, the user terminal sends the password information and the BSSID of the target network hotspot device to the network device to be configured without sending the SSID.
密码信息为路由器WIFI热点的密码(Password),BSSID(基本服务集标识,Basic Service Set Identifier)是一个BSS(基本服务集,Basic Service Set)的标识,基本服务集用于描述一组相互通信的设备。The password information is the password of the router's WIFI hotspot (Password). The BSSID (Basic Service Set Identifier) is a BSS (Basic Service Set) identifier. The basic service set is used to describe a set of mutual communication. device.
在本申请实施例中,用户终端可以支持802.11和802.2通信协议的无线通信设备, 例如手机、平板电脑、个人数字助理等设备。用户终端中可以安装有配网应用程序APP,通过配网APP将目标网络热点设备的密码信息和目标BSSID发送给待配网设备。In the embodiment of the present application, the user terminal may support wireless communication devices such as 802.11 and 802.2 communication protocols, such as mobile phones, tablet computers, and personal digital assistants. The user terminal may have a network distribution application APP installed, and send the password information and the target BSSID of the target network hotspot device to the network device to be configured through the network distribution app.
步骤102,所述待配网设备从预置的多个网络热点设备的BSSID和服务集标识SSID中,查找与所述目标BSSID对应的目标SSID;Step 102: The network device to be configured searches for a target SSID corresponding to the target BSSID from the preset BSSIDs and service set identifiers SSIDs of multiple network hotspot devices.
在本申请实施例中,待配网设备中预置有多个网络热点设备的BSSID和SSID。In the embodiment of the present application, the BSSIDs and SSIDs of multiple network hotspot devices are preset in the network devices to be configured.
具体的,待配网设备维护有一个热点列表,该列表中记录了多个网络热点设备的BSSID和SSID。其中,每个网络热点设备的BSSID都和SSID一一对应,也就是说根据BSSID可以找到唯一对应SSID。待配网设备从热点列表中,查找与目标SSID对应的目标SSID,该目标SSID就是目标网络热点设备的SSID。Specifically, the network equipment to be configured maintains a hotspot list, which records the BSSID and SSID of multiple network hotspots. Among them, the BSSID of each network hotspot device corresponds to the SSID, that is, the unique corresponding SSID can be found according to the BSSID. The network device to be configured searches for a target SSID corresponding to the target SSID from the hotspot list, and the target SSID is the SSID of the target network hotspot device.
热点列表中的网络热点设备的BSSID和SSID可以由用户输入到待配网设备中,也可以是由待配网设备从网络热点设备发送的信标Beacon包中提取得到。一般的,网络热点设备会按照一定的时间间隔向待配网设备发送Beacon包,Beacon包中含有该网络热点设备的BSSID和SSID。The BSSID and SSID of the network hotspot device in the hotspot list may be input by the user into the network device to be configured, or may be obtained by the network to be configured device from a beacon Beacon packet sent by the network hotspot device. Generally, a network hotspot device sends a Beacon packet to a network device to be configured at a certain interval, and the Beacon packet contains the BSSID and SSID of the network hotspot device.
步骤103,所述待配网设备采用所述密码信息和所述目标SSID,接入所述目标网络热点设备。Step 103: The network device to be configured uses the password information and the target SSID to access the target network hotspot device.
待配网设备可以采用目标网络热点设备的密码信息和SSID接入目标网络热点设备的热点。The network device to be configured may use the password information and SSID of the target network hotspot device to access the target network hotspot device.
在本申请实施例中,用户终端只需要向待配网设备发送目标网络热点设备的密码信息(Password)和BSSID,而不需要发送SSID。待配网设备可以根据BSSID查找到对应的目标网络热点设备的SSID,然后待配网设备根据SSID和密码信息接入到目标网络热点设备。由于不需要发送SSID,不会出现传输SSID出错的情况,提高配网成功率;同时减少了发送的数据量,减少了发送数据所需要的时间,提升了配网效率。In the embodiment of the present application, the user terminal only needs to send the password information (Password) and the BSSID of the target network hotspot device to the network device to be configured, and does not need to send the SSID. The network device to be configured can find the SSID of the corresponding target network hotspot device according to the BSSID, and then the network device to be configured accesses the target network hotspot device according to the SSID and password information. Since no SSID needs to be sent, there will be no error in transmitting the SSID, which will increase the success rate of the distribution network; meanwhile, the amount of data sent will be reduced, the time required to send the data will be reduced, and the efficiency of the distribution network will be improved.
另外,目前Android App和iOS App都无法自动获得中文SSID的编码格式(万国码UTF-8或汉字内码扩展规范GBK),APP默认SSID为UTF-8编码,导致GBK编码的SSID按照UTF-8格式发送,导致目前的GBK编码的中文SSID热点配网失败。而本申请实施例不需要传输SSID,而是根据BSSID查找对应的SSID,可以有效解决GBK编码的中文SSID配网失败的问题。In addition, at present, neither Android App nor iOS App can automatically obtain the Chinese SSID encoding format (Universal Code UTF-8 or Chinese Character Internal Code Extension Specification GBK). The default SSID of the APP is UTF-8 encoding, resulting in GBK encoded SSID according to UTF-8. Send in format, causing the current GBK-encoded Chinese SSID hotspot distribution network to fail. The embodiment of the present application does not need to transmit the SSID, but searches for the corresponding SSID according to the BSSID, which can effectively solve the problem of GBK-encoded Chinese SSID network distribution failure.
参照图2,示出了本申请的一种待配网设备接入网络热点设备的方法实施例二的步骤流程图,具体可以包括如下步骤:Referring to FIG. 2, a flowchart of steps in Embodiment 2 of a method for a network device to be configured to access a network hotspot device according to the present application is shown. The method may specifically include the following steps:
步骤201,待配网设备接收用户终端发送的用户数据报协议UDP包;Step 201: The network device to be configured receives a user datagram protocol UDP packet sent by a user terminal;
在本申请实施例中,用户终端可以按照802.11协议或802.2协议向待配网设备发送用户数据报协议UDP(User Datagram Protocol)包。每个UDP包的包头都包含有BSSID,是明文公开的。用户终端可以将密码信息编码到UDP包的特定字段。In the embodiment of the present application, the user terminal may send a User Datagram Protocol (UDP) packet to a network device to be configured according to the 802.11 protocol or the 802.2 protocol. The header of each UDP packet contains the BSSID and is publicly disclosed. The user terminal can encode the password information into a specific field of the UDP packet.
具体的,用户终端发送的UDP可以包括配网包,用户终端可以将密码信息编码到多个配网包;所述步骤201可以包括:所述待配网设备接收用户终端发送的多个配网包。Specifically, the UDP sent by the user terminal may include a network configuration packet, and the user terminal may encode the password information into multiple network configuration packets; the step 201 may include: the network device to be configured receives multiple network configurations sent by the user terminal package.
在本申请实施例中,每个配网包能编码的信息量是有限的,每个配网包只能编码一部分的密码信息,因此用户终端可以将密码信息编码到多个配网包中。待配网设备需要从多个配网包中解析出密码信息。In the embodiment of the present application, the amount of information that each distribution network package can encode is limited, and each distribution network package can only encode a part of the password information, so the user terminal can encode the password information into multiple distribution network packages. The network equipment to be configured needs to parse the password information from multiple network configuration packages.
在本申请实施例中,用户终端发送的UDP还可以包括同步包;所述步骤201还可以包括:所述待配网设备在接收所述用户终端发送的多个配网包之前,接收所述用户终端发送的至少一个同步包。In the embodiment of the present application, the UDP sent by the user terminal may further include a synchronization packet; the step 201 may further include: before receiving the multiple network distribution packets sent by the user terminal, the network device to be configured receives the At least one synchronization packet sent by the user terminal.
具体的,用户终端可以在每发送若干个配网包之前,发送至少一个同步包。待配网设备在接收到同步包之后,可以知道之后接收到的是配网包。Specifically, the user terminal may send at least one synchronization packet before sending several network distribution packets. After receiving the synchronization packet, the network equipment to be configured can know that the network equipment is received later.
步骤202,所述待配网设备从所述UDP包中获取目标网络热点设备的密码信息和目标基本服务集标识BSSID。Step 202: The to-be-configured network device obtains the password information of the target network hotspot device and the target basic service set identifier BSSID from the UDP packet.
待配网设备进行空口抓包,在抓取到UDP包中就可以获得包头中的BSSID,由于每个UDP包中都包含有BSSID,因此待配网设备可以从同步包中获取目标BSSID,也可以从配网包中获取BSSID。The network device to be configured performs air interface packet capture, and the BSSID in the header can be obtained after capturing the UDP packet. Since each UDP packet contains the BSSID, the network device to be configured can obtain the target BSSID from the synchronization packet. The BSSID can be obtained from the distribution network package.
待配网设备从抓到的多个UDP包中解析出密码信息。具体的,待配网设备可以从多个配网包中解析出密码信息。在本申请实施例中,所述待配网设备可以从所述多个配网包中获取目标网络热点设备的密码信息。具体可以包括如下子步骤:The network device to be configured parses the password information from the captured multiple UDP packets. Specifically, the network device to be configured can parse the password information from multiple network configuration packages. In the embodiment of the present application, the network device to be configured may obtain the password information of the target network hotspot device from the multiple network configuration packages. It can include the following sub-steps:
子步骤S11,所述待配网设备从所述多个配网包中获取编码信息;所述编码信息包括:加密方式信息、密码长度信息、经加密的密码信息;Sub-step S11, the network device to be configured obtains encoding information from the multiple distribution network packages; the encoding information includes: encryption mode information, password length information, and encrypted password information;
参照图3所示为本申请实施例中编码信息的示意图。编码信息可以由加密方式信息、密码长度信息、经加密的密码信息以及检验码信息依次组成。用户终端与待配网设备之间,可以预先约定编码信息中各种信息的排列顺序,待配网设备在解析出完整的编码信息后,可以从按照约定的顺序确定各种信息。FIG. 3 is a schematic diagram of encoding information in an embodiment of the present application. The encoding information may consist of encryption mode information, password length information, encrypted password information, and check code information in this order. The arrangement order of various information in the encoded information can be agreed between the user terminal and the network equipment to be configured in advance. After the network equipment to be configured parses out the complete encoded information, it can determine various information from the agreed sequence.
在本申请实施例中,为增加密码信息的保密性,可以对密码信息进行加密。加密方式信息表示了密码信息是采用那种加密方式进行加密的,例如AES128-CFB加密方式、 AES128-OFB加密方式。根据这种加密信息可以采用相应的解密方式对经加密的密码信息进行解密。具体的,加密方式信息可以只是一个数值,每一个数值约定对应一种加密方式,用户终端与配网设备之间预先约定了哪个数值对应哪种加密方式。In the embodiment of the present application, in order to increase the confidentiality of the password information, the password information may be encrypted. The encryption method information indicates which encryption method is used to encrypt the password information, such as AES128-CFB encryption method and AES128-OFB encryption method. According to this encrypted information, the encrypted password information can be decrypted in a corresponding decryption manner. Specifically, the encryption method information may be only a numerical value, and each numerical value corresponds to an encryption method, and the user terminal and the distribution network device have previously agreed on which value corresponds to which encryption method.
密码长度信息表示了经加密的密码信息的长度。在编码信息中,加密方式信息的长度是固定的(例如1Byte),密码长度信息的长度是固定的(例如1Byte),校验码信息的长度也是固定的(例如1Byte),而经加密的密码信息的长度则不是固定的(可以为nByte)。待配网设备需要根据密码长度信息,从编码信息中获取相应长度的经加密的密码信息。The password length information indicates the length of the encrypted password information. In the encoded information, the length of the encryption method information is fixed (for example, 1 Byte), the length of the password length information is fixed (for example, 1 Byte), the length of the check code information is also fixed (for example, 1 Byte), and the encrypted password The length of the message is not fixed (it can be nByte). The network device to be configured needs to obtain the encrypted password information of the corresponding length from the encoded information according to the password length information.
待配网设备可以采用校验码信息进行校验;若校验出错,则待配网设备将从多个配网包中解析的到的编码信息丢弃。The network equipment to be configured may use the check code information for verification; if the verification is incorrect, the network equipment to be configured will discard the encoded information parsed from multiple distribution network packets.
在本申请实施例的一种示例中,所述子步骤S11可以进一步包括:In an example of an embodiment of the present application, the sub-step S11 may further include:
子步骤S111,所述待配网设备解析接收到的多个配网包的长度字段Length;Sub-step S111, the network equipment to be distributed parses the length fields Length of the received multiple distribution network packets;
子步骤S112,所述待配网设备根据所述多个配网包的长度字段,确定编码信息。Sub-step S112: The network device to be distributed determines encoding information according to the length fields of the multiple network distribution packets.
每个配网包都有一个长度字段Length,长度字段的值对应了配网包中的数据部分Data的长度。待配网设备接收到配网包后,不关心配网包数据部分的内容,只关心数据部分的长度。Each distribution network packet has a length field Length, and the value of the length field corresponds to the length of the data portion Data in the distribution network packet. After the distribution network device receives the distribution network packet, it does not care about the content of the data portion of the distribution network packet, and only cares about the length of the data portion.
每个配网包的长度字段可以表示一个编码值,编码信息实际上是由多个编码值组合而成的。The length field of each distribution network packet can represent a coded value, and the coded information is actually a combination of multiple coded values.
在本示例中,编码信息可以包括多个字节,而每个配网包的编码值的字节长度是有限的,因此需要发送多个配网包才能将编码信息完整发送出去。In this example, the encoding information may include multiple bytes, and the byte length of the encoding value of each distribution network packet is limited, so multiple distribution network packets need to be sent in order to completely transmit the encoding information.
用户终端可以将配网包分成多组,待配网设备在接收到多组配网包后,在组内按照指定的顺序排列配网包的编码值,在组之间按在组的顺序排列各组的编码值。The user terminal can divide the distribution network packets into multiple groups. After receiving multiple groups of network distribution packets, the network equipment arranges the coding values of the distribution network packets in a specified order within the group, and arranges the groups in the order of the group The coded value of each group.
参照图4所示为本申请实施例中发送编码信息的示意图。用户终端在每发送一组配网包之前,先发送至少一个同步包。每个同步包的长度反应了对应分组的顺序。用户终端在发送完一组配网包之后,发送下一组配网包对应的同步包,然后再发送下一组配网包。用户终端在发送完所有分组的配网包后,可以重复发送所有分组的配网包。FIG. 4 is a schematic diagram of sending encoded information according to an embodiment of the present application. The user terminal sends at least one synchronization packet before sending a group of network configuration packets. The length of each synchronization packet reflects the order of the corresponding packets. After the user terminal sends a group of network configuration packets, it sends a synchronization packet corresponding to the next group of network configuration packets, and then sends the next group of network configuration packets. After the user terminal sends all the network distribution packets of the packet, it can repeatedly send the network distribution packets of all the packets.
配网包在分组中的顺序,也可以根据每个配网包的数据部分的长度来确定。具体的,每个配网包的长度字段是由组内偏移量offset和编码值相加得到的,组内偏移量确定了编码值在组内的顺序。待配网设备与用户终端之间预先约定了长度字段中哪些位(bit)是偏移量,哪些位是编码值。因此待配网设备可以从长度字段中确定编码值在组内的排 列顺序和编码值。The order of the distribution network packets in the packet can also be determined according to the length of the data part of each distribution network packet. Specifically, the length field of each distribution network packet is obtained by adding the offset within the group and the encoded value, and the offset within the group determines the order of the encoded values within the group. It is agreed in advance between the network device to be configured and the user terminal which bits in the length field are offsets and which bits are coded values. Therefore, the network equipment to be configured can determine the arrangement order and coding value of coding values in the group from the length field.
为了使本领域技术人员能够更好地理解本申请实施例中编码信息的发送方式,下面通过一个例子加以说明:In order to enable those skilled in the art to better understand the sending manner of the encoded information in the embodiments of the present application, an example is used below to explain:
假设完整的配网数据包括以下字节:Assume that the complete distribution network data includes the following bytes:
十六进制数:12 0F 0C 00 34 4D 41 4C 00 32 4F 55 54 45 52 0D 08。Hexadecimal number: 12 0F 0C 00 34 4D 41C 4 00F 32 55 4 54 52 0D 08
每8个字节分成一组,那么分成三组:Every 8 bytes are divided into a group, then divided into three groups:
第1组:12 0F 0C 00 34 4D 41 4C;The first group: 12 0F 0C 00 00 34 D 4 41 C
第2组:00 32 4F 55 54 45 52 0D;The second group: 00, 32, 4F, 55, 54, 45, 52, 0D;
第3组:08。Group 3: 08.
组内偏移量分别表示为:0x100,0x180,0x200,0x280,0x300,0x380,0x400,0x480。The offsets within the group are expressed as: 0x100, 0x180, 0x200, 0x280, 0x300, 0x380, 0x400, 0x480.
0x100:表示组内第1个字节;0x100: the first byte in the group;
0x180:表示组内第2个字节;0x180: the second byte in the group;
0x200,表示组内第3个字节;0x200, the third byte in the group;
……...
以此类推;And so on;
每个分组对应的同步包长度为:0x3E0,0x3E1,0x3E2,…….,0x3EF,The length of the synchronization packet corresponding to each packet is: 0x3E0, 0x3E1, 0x3E2, ...., 0x3EF,
0x3E0:表示第1个分组;0x3E0: indicates the first packet;
0x3E1:表示第2个分组;0x3E1: indicates the second packet;
……...
以此类推;And so on;
用户终端发送顺序如下:The user terminal sends the sequence as follows:
第1分组对应的同步包:数据部分长度为0x3E0(可以连续发多次,提高同步的成功率),The synchronization packet corresponding to the first packet: the length of the data part is 0x3E0 (can be sent multiple times in succession to improve the success rate of synchronization),
第1分组的第1个配网包:数据部分长度为0x100+0x12=0x112;The first network distribution packet of the first packet: the length of the data part is 0x100 + 0x12 = 0x112;
第1分组的第2个配网包:数据部分长度为0x180+0x0F=0x18F;The second network distribution packet of the first packet: the length of the data part is 0x180 + 0x0F = 0x18F;
第1分组的第3个配网包:数据部分长度为0x200+0x0C=0x20C;The third distribution network packet of the first packet: the length of the data part is 0x200 + 0x0C = 0x20C;
第1分组的第4个配网包:数据部分长度为0x280+0x00=0x280;The fourth distribution network packet of the first packet: the length of the data part is 0x280 + 0x00 = 0x280;
第1分组的第5个配网包:数据部分长度为0x300+0x34=0x334;The fifth distribution network packet of the first packet: the length of the data part is 0x300 + 0x34 = 0x334;
第1分组的第6个配网包:数据部分长度为0x380+0x4D=0x3CD;The sixth distribution network packet of the first packet: the length of the data part is 0x380 + 0x4D = 0x3CD;
第1分组的第7个配网包:数据部分长度为0x400+0x41=0x441;The seventh distribution network packet of the first packet: the length of the data part is 0x400 + 0x41 = 0x441;
第1分组的第8个配网包:数据部分长度为0x480+0x4C=0x4CC。The eighth distribution network packet of the first packet: The length of the data part is 0x480 + 0x4C = 0x4CC.
第2分组对应的同步包:数据部分长度为0x3E1(可以连续发多次,提高同步的成功率),The synchronization packet corresponding to the second packet: the length of the data part is 0x3E1 (can be sent multiple times in succession to improve the success rate of synchronization),
第2分组的第1个配网包:数据部分长度为0x100+0x00=0x100;The first distribution network packet of the second packet: the length of the data part is 0x100 + 0x00 = 0x100;
第2分组的第2个配网包:数据部分长度为0x180+0x32=0x1B2;The second distribution network packet of the second packet: the length of the data part is 0x180 + 0x32 = 0x1B2;
第2分组的第3个配网包:数据部分长度为0x200+0x4F=0x24F;The third distribution network packet of the second packet: the length of the data part is 0x200 + 0x4F = 0x24F;
第2分组的第4个配网包:数据部分长度为0x280+0x55=0x2D5;The fourth distribution network packet of the second packet: the length of the data part is 0x280 + 0x55 = 0x2D5;
第2分组的第5个配网包:数据部分长度为0x300+0x54=0x354;The fifth distribution network packet of the second packet: the length of the data part is 0x300 + 0x54 = 0x354;
第2分组的第6个配网包:数据部分长度为0x380+0x45=0x3C5;The sixth distribution network packet of the second packet: the length of the data part is 0x380 + 0x45 = 0x3C5;
第2分组的第7个配网包:数据部分长度为0x400+0x52=0x452;The seventh distribution network packet of the second packet: the length of the data part is 0x400 + 0x52 = 0x452;
第2分组的第8个配网包:数据部分长度为0x480+0x0D=0x48D。The eighth distribution network packet of the second packet: The length of the data part is 0x480 + 0x0D = 0x48D.
第3分组对应的同步包:数据部分长度为0x3E2(可以连续发多次,提高同步的成功率),The synchronization packet corresponding to the third packet: the length of the data part is 0x3E2 (can be sent multiple times in succession to improve the success rate of synchronization),
第3分组的第1个配网包:数据部分长度为0x100+0x08=0x108。The first distribution network packet of the third packet: The length of the data part is 0x100 + 0x08 = 0x108.
所有的字节发送完后,再从头重复发送。After all the bytes have been sent, they are sent repeatedly from the beginning.
待配网设备收到的UDP包如下:The UDP packets received by the network device to be configured are as follows:
第1个UDP包:数据部分长度为0x3E0(可能收到多次),同步到第1个分组;The first UDP packet: the length of the data part is 0x3E0 (may be received multiple times), and it is synchronized to the first packet;
第2个UDP包:数据部分长度0x112,偏移为0x100,分组内第1个包,编码值为0x12;The second UDP packet: the length of the data part is 0x112, the offset is 0x100, the first packet in the packet, the encoding value is 0x12;
第3个UDP包:数据部分长度0x18F,偏移为0x180,分组内第2个包,编码值为0x0F;The third UDP packet: the length of the data part is 0x18F, the offset is 0x180, the second packet in the packet, the encoding value is 0x0F;
第4个UDP包:数据部分长度0x20C,偏移为0x200,分组内第3个包,编码值为0x0C;The fourth UDP packet: the length of the data part is 0x20C, the offset is 0x200, the third packet in the packet, the encoding value is 0x0C;
第5个UDP包:数据部分长度0x280,偏移为0x280,分组内第4个包,编码值为0x00;The fifth UDP packet: the length of the data part is 0x280, the offset is 0x280, the fourth packet in the packet, the encoding value is 0x00;
第6个UDP包:数据部分长度0x334,偏移为0x300,分组内第5个包,编码值为0x34;The sixth UDP packet: the length of the data part is 0x334, the offset is 0x300, the fifth packet in the packet, the encoding value is 0x34;
第7个UDP包:数据部分长度x3CD,偏移为0x380,分组内第6个包,编码值为0x4D;The seventh UDP packet: the length of the data part x3CD, the offset is 0x380, the sixth packet in the packet, the encoding value is 0x4D;
第8个UDP包:数据部分长度0x441,偏移为0x400,分组内第7个包,编码值为0x41;The 8th UDP packet: the length of the data part is 0x441, the offset is 0x400, the 7th packet in the packet, the encoding value is 0x41;
第9个UDP包:数据部分长度0x4CC,偏移为0x480,分组内第8个包,编码值为0x4C;The ninth UDP packet: the length of the data part is 0x4CC, the offset is 0x480, the eighth packet in the packet, the encoding value is 0x4C;
第10个UDP包:数据部分长度为0x3E1(可能收到多次),同步到第2个分组;The 10th UDP packet: the length of the data part is 0x3E1 (may be received multiple times), and it is synchronized to the second packet;
第11个UDP包:数据部分长度0x100,偏移为0x100,分组内第1个包,编码值为0x00The 11th UDP packet: the length of the data part is 0x100, the offset is 0x100, the first packet in the packet, the encoding value is 0x00
……...
以此类推。And so on.
在本申请实施例的另一种示例中,所述子步骤S11可以进一步包括:In another example of the embodiment of the present application, the sub-step S11 may further include:
子步骤S113,所述待配网设备解析接收到的多个配网包的目的Destination字段;Sub-step S113, the network equipment to be distributed parses the destination fields of multiple received distribution network packets;
子步骤S114,所述待配网设备根据所述多个配网包的目的字段Destination,确定编码信息。Sub-step S114: The network device to be configured determines encoding information according to a destination field of the plurality of network configuration packets.
每个配网包的包头中都含有目的字段Destination,Destination字段指示了目的MAC地址。The header of each distribution network packet contains a destination field, and the Destination field indicates the destination MAC address.
用户终端可以采用目的MAC地址末尾的三个字节编码信息。The user terminal can encode information using the three bytes at the end of the destination MAC address.
每个配网包的目的MAC地址可以表示一个编码值,编码信息实际上是由多个编码值组合而成的。The destination MAC address of each distribution network packet can represent a coded value. The coded information is actually a combination of multiple coded values.
在本示例中,编码信息可以包括多个字节,而每个配网包的编码值的字节长度是有限的,因此需要发送多个配网包才能将编码信息完整发送出去。In this example, the encoded information may include multiple bytes, and the byte length of the encoded value of each distribution network packet is limited, so multiple distribution network packets need to be sent to completely transmit the encoded information.
用户终端可以将配网包分成多组,待配网设备在接收到多组配网包后,在组内按照指定的顺序排列配网包的编码值,在组之间按在组的顺序排列各组的编码值。The user terminal can divide the distribution network packets into multiple groups. After receiving multiple groups of network distribution packets, the network equipment arranges the coding values of the distribution network packets in a specified order within the group, and arranges the groups in the order of the group. The coded value of each group.
用户终端在每发送一组配网包之前,发送至少一个同步包。每个同步包的长度反应了对应分组的顺序。The user terminal sends at least one synchronization packet before each group of network configuration packets is sent. The length of each synchronization packet reflects the order of the corresponding packets.
配网包在分组中的顺序,也可以根据每个配网包的目的MAC地址来确定。具体的,每个配网包的目的MAC地址是由组内偏移量offset和编码值相加得到的,组内偏移量确定了编码值在组内的顺序。待配网设备与用户终端之间预先约定了目的MAC地址中哪些位(bit)是偏移量,哪些位是编码值。因此待配网设备可以从目的MAC地址中确定编码值在组内的排列顺序和编码值。The order of the distribution network packets in the packet can also be determined according to the destination MAC address of each distribution network packet. Specifically, the destination MAC address of each distribution network packet is obtained by adding the offset within the group and the encoded value, and the offset within the group determines the order of the encoded values within the group. It is agreed in advance between the network device to be configured and the user terminal which bits in the destination MAC address are offsets and which bits are coded values. Therefore, the network device to be configured can determine the arrangement order and coding value of the coding values in the group from the destination MAC address.
子步骤S12,所述待配网设备根据所述密码长度信息,从所述编码信息中确定经加 密的密码信息;Sub-step S12, the network device to be allocated determines the encrypted password information from the encoded information according to the password length information;
子步骤S13,所述待配网设备根据所述加密方式信息,对所述经加密的密码信息进行解密,得到密码信息。Sub-step S13: The network device to be distributed decrypts the encrypted password information according to the encryption mode information to obtain the password information.
步骤203,所述待配网设备从预置的多个网络热点设备的BSSID和服务集标识SSID中,查找与所述目标BSSID对应的目标SSID;Step 203: The network device to be configured searches for a target SSID corresponding to the target BSSID from the preset BSSIDs and service set identifiers SSIDs of multiple network hotspot devices.
在本申请实施例中,网络热点设备的BSSID和SSID可以由用户输入到待配网设备中,也可以是由待配网设备从网络热点设备发送的信标Beacon包中获取得到。一般的,网络热点设备会按照一定的时间间隔向待配网设备发送Beacon包,Beacon包中含有该网络热点设备的BSSID和SSID。In the embodiment of the present application, the BSSID and SSID of the network hotspot device may be entered by the user into the network device to be configured, or may be obtained by the network to be configured device from a beacon Beacon packet sent by the network hotspot device. Generally, a network hotspot device sends a Beacon packet to a network device to be configured at a certain interval, and the Beacon packet contains the BSSID and SSID of the network hotspot device.
步骤204,所述待配网设备采用所述密码信息和所述目标SSID,接入所述目标网络热点设备。In step 204, the network device to be configured uses the password information and the target SSID to access the target network hotspot device.
待配网设备可以采用目标网络热点设备的密码信息和SSID接入目标网络热点设备。The network device to be configured may use the password information and SSID of the target network hotspot device to access the target network hotspot device.
在本申请实施例中,用户终端只需要向待配网设备发送目标网络热点设备的密码信息(Password)和BSSID,而不需要发送SSID。待配网设备可以根据BSSID查找到对应的目标网络热点设备的SSID,然后待配网设备根据SSID和密码信息接入到目标网络热点设备。由于不需要发送SSID,不会出现传输SSID出错的情况,提高配网成功率;同时减少了发送的数据量,减少了发送数据所需要的时间,提升了配网效率。In the embodiment of the present application, the user terminal only needs to send the password information (Password) and the BSSID of the target network hotspot device to the network device to be configured, and does not need to send the SSID. The network device to be configured can find the SSID of the corresponding target network hotspot device according to the BSSID, and then the network device to be configured accesses the target network hotspot device according to the SSID and password information. Since no SSID needs to be sent, there will be no error in transmitting the SSID, which will increase the success rate of the distribution network; meanwhile, the amount of data sent will be reduced, the time required to send the data will be reduced, and the efficiency of the distribution network will be improved.
另外,目前Android App和iOS App都无法自动获得中文SSID的编码格式(万国码UTF-8或汉字内码扩展规范GBK),APP默认SSID为UTF-8编码,导致GBK编码的SSID按照UTF-8格式发送,导致目前的GBK编码的中文SSID热点配网失败。而本申请实施例不需要传输SSID,而是根据BSSID查找对应的SSID,可以有效解决GBK编码的中文SSID配网失败的问题。In addition, at present, neither Android App nor iOS App can automatically obtain the Chinese SSID encoding format (Universal Code UTF-8 or Chinese Character Internal Code Extension Specification GBK). The default SSID of the APP is UTF-8 encoding, resulting in GBK encoded SSID according to UTF-8. Send in format, causing the current GBK-encoded Chinese SSID hotspot distribution network to fail. The embodiment of the present application does not need to transmit the SSID, but searches for the corresponding SSID according to the BSSID, which can effectively solve the problem of GBK-encoded Chinese SSID network distribution failure.
参照图5,示出了本申请的一种待配网设备接入网络热点设备的方法实施例三的步骤流程图,具体可以包括如下步骤:Referring to FIG. 5, a flowchart of steps in Embodiment 3 of a method for a network device to be configured to access a network hotspot device according to the present application is shown. The method may specifically include the following steps:
步骤301,用户终端获取目标网络热点设备的密码信息和目标BSSID;所述密码信息和目标BSSID用于接入所述目标网络热点设备;Step 301: The user terminal obtains the password information and the target BSSID of the target network hotspot device; the password information and the target BSSID are used to access the target network hotspot device;
在本申请实施例中,网络热点设备可以是路由器,也可以是不具备路由功能的无线访问接入点AP(AccessPoint)。In the embodiment of the present application, the network hotspot device may be a router or a wireless access point (AccessPoint) without a routing function.
在本申请实施例中,用户终端可以支持802.11和802.2通信协议的无线通信设备, 例如手机、平板电脑、个人数字助理等设备。In the embodiment of the present application, the user terminal may support wireless communication devices such as 802.11 and 802.2 communication protocols, such as mobile phones, tablet computers, and personal digital assistants.
用户终端中可以安装有配网应用程序APP,目标网络热点设备的密码信息和目标BSSID可以由用户输入到用户终端的配网APP,也可以是在用户终端与目标网络热点设备建立连接后,由目标网络热点设备发送给用户终端的配网APP。The user terminal can be installed with a distribution network application APP. The password information and target BSSID of the target network hotspot device can be entered by the user into the distribution network APP of the user terminal, or after the user terminal establishes a connection with the target network hotspot device. The distribution network APP sent by the target network hotspot device to the user terminal.
步骤302,所述用户终端向待配网设备发送所述目标网络热点设备的密码信息和目标BSSID。Step 302: The user terminal sends the password information and the target BSSID of the target network hotspot device to the network device to be configured.
可以通过配网APP将目标网络热点设备的密码信息和目标BSSID发送给待配网设备。The password information and the target BSSID of the target network hotspot device can be sent to the network device to be configured through the distribution network APP.
待配网设备在接收到目标BSSID后,可以从预置的多个网络热点设备的BSSID和SSID中,查找与所述目标BSSID对应的目标SSID。然后待配网设备采用密码信息和目标SSID接入目标网络热点设备的热点。After receiving the target BSSID, the to-be-configured network device may find the target SSID corresponding to the target BSSID from the preset BSSIDs and SSIDs of multiple network hotspot devices. Then the network device to be configured uses the password information and the target SSID to access the hotspot of the target network hotspot device.
在本申请实施例中,用户终端只需要向待配网设备发送目标网络热点设备的密码信息(Password)和BSSID,而不需要发送SSID。待配网设备可以根据BSSID查找到对应的目标网络热点设备的SSID,然后待配网设备根据SSID和密码信息接入到目标网络热点设备。由于不需要发送SSID,不会出现传输SSID出错的情况,提高配网成功率;同时减少了发送的数据量,减少了发送数据所需要的时间,提升了配网效率。In the embodiment of the present application, the user terminal only needs to send the password information (Password) and the BSSID of the target network hotspot device to the network device to be configured, and does not need to send the SSID. The network device to be configured can find the SSID of the corresponding target network hotspot device according to the BSSID, and then the network device to be configured accesses the target network hotspot device according to the SSID and password information. Since no SSID needs to be sent, there will be no error in transmitting the SSID, which will increase the success rate of the distribution network; meanwhile, the amount of data sent will be reduced, the time required to send the data will be reduced, and the efficiency of the distribution network will be improved.
另外,目前Android App和iOS App都无法自动获得中文SSID的编码格式(万国码UTF-8或汉字内码扩展规范GBK),APP默认SSID为UTF-8编码,导致GBK编码的SSID按照UTF-8格式发送,导致目前的GBK编码的中文SSID热点配网失败。而本申请实施例不需要传输SSID,而是根据BSSID查找对应的SSID,可以有效解决GBK编码的中文SSID配网失败的问题。In addition, at present, neither Android App nor iOS App can automatically obtain the Chinese SSID encoding format (Universal Code UTF-8 or Chinese Character Internal Code Extension Specification GBK). The default SSID of the APP is UTF-8 encoding, resulting in GBK encoded SSID according to UTF-8. Send in format, causing the current GBK-encoded Chinese SSID hotspot distribution network to fail. The embodiment of the present application does not need to transmit the SSID, but searches for the corresponding SSID according to the BSSID, which can effectively solve the problem of GBK-encoded Chinese SSID network distribution failure.
参照图6,示出了本申请的一种待配网设备接入网络热点设备的方法实施例四的步骤流程图,具体可以包括如下步骤:Referring to FIG. 6, a flowchart of steps in Embodiment 4 of a method for a network device to be configured to access a network hotspot device according to the present application is shown. The method may specifically include the following steps:
步骤401,用户终端获取目标网络热点设备的密码信息和目标BSSID;所述密码信息和目标BSSID用于接入所述目标网络热点设备;Step 401: The user terminal obtains the password information and the target BSSID of the target network hotspot device; the password information and the target BSSID are used to access the target network hotspot device;
步骤402,所述用户终端将所述密码信息编码到UDP包;所述UDP包含有目标BSSID;Step 402: the user terminal encodes the password information into a UDP packet; the UDP contains a target BSSID;
在本申请实施例中,UDP包包括配网包;所述步骤402可以包括如下子步骤:In the embodiment of the present application, the UDP packet includes a network configuration packet; the step 402 may include the following sub-steps:
子步骤S21,所述用户终端采用预设加密方式对密码信息进行加密;Sub-step S21, the user terminal encrypts the password information by using a preset encryption method;
例如,用户终端采用AES128-CFB加密方式、AES128-OFB加密方式等加密方式对密码信息进行加密,得到经加密的密码信息。For example, the user terminal encrypts the password information by using encryption methods such as AES128-CFB encryption method and AES128-OFB encryption method to obtain encrypted password information.
子步骤S22,所述用户终端生成与所述预设加密方式对应的加密方式信息;Sub-step S22, the user terminal generates encryption method information corresponding to the preset encryption method;
具体的,加密方式信息可以只是一个数值,每一个数值约定对应一种加密方式。用户终端与配网设备之间预先约定了哪个数值对应哪种加密方式,提高了密码信息的保密性。Specifically, the encryption method information may be only a numerical value, and each numerical value convention corresponds to an encryption method. The user terminal and the network equipment have agreed in advance which value corresponds to which encryption method, which improves the confidentiality of the password information.
子步骤S23,所述用户终端确定经加密的密码信息的密码长度信息;Sub-step S23, the user terminal determines password length information of the encrypted password information;
密码长度信息表示了经加密的密码信息的长度。The password length information indicates the length of the encrypted password information.
子步骤S24,所述用户终端将所述加密方式信息、密码长度信息、经加密的密码信息封装为编码信息;Sub-step S24, the user terminal encapsulates the encryption mode information, password length information, and encrypted password information into encoded information;
在封装时,用户终端可以按照设定的顺序排列加密方式信息、密码长度信息,以及经加密的密码信息。During encapsulation, the user terminal can arrange the encryption method information, password length information, and encrypted password information in the set order.
进一步的,编码信息还可以包括:校验码信息。用户终端可以按照设定的顺序排列加密方式信息、密码长度信息、经加密的密码信息,以及校验码信息。Further, the encoding information may further include: check code information. The user terminal can arrange the encryption method information, password length information, encrypted password information, and check code information in the set order.
子步骤S25,所述用户终端将所述编码信息编码到多个配网包。Sub-step S25, the user terminal encodes the encoding information into multiple distribution network packets.
在本申请实施例中的一种示例中,所述子步骤S25可以进一步包括:所述用户终端将所述编码信息,编码到多个配网包的长度字段Length。In an example in the embodiment of the present application, the sub-step S25 may further include: the user terminal encodes the encoding information into a length field Length of multiple distribution network packets.
具体的,用户终端可以将编码信息的划分为多个编码值(例如,编码信息包括多个字节,将一个字节作为一个编码值),将编码值划分成多个编码值分组;用户终端将一个编码值分组的编码值,分别编码到属于一个配网包分组的各个配网包中。也就是说,完整的编码信息可以编码到多个配网包分组的配网包中。Specifically, the user terminal may divide the encoded information into multiple encoded values (for example, the encoded information includes multiple bytes, with one byte as one encoded value), and divide the encoded value into multiple encoded value groups; the user terminal Encoding the encoding values of one encoding value group into each distribution network packet belonging to a distribution network packet group. In other words, the complete coding information can be coded into the distribution network packets grouped by multiple distribution network packets.
对于一个编码值分组的编码值,根据编码值在编码值分组内的顺序,生成对应的组内偏移量;然后将编码值和对应的组内偏移量,分别编码到一个配网包分组的各个配网包的长度字段。For the coded value of a coded value group, the corresponding intra-group offset is generated according to the order of the coded value in the coded value group; then the coded value and the corresponding intra-group offset are respectively encoded into a distribution network packet group. The length field of each distribution packet.
待配网设备在接收到多组配网包后,从配网包的长度字段中解析出编码值和组内偏移量。对于一个配网包分组的编码值,按照组内偏移量确定编码值在编码值分组的顺序,然后按照该顺序排列各个编码值。对于不同配网包分组的编码值,按照配网包分组的顺序进行排列。After receiving multiple groups of network configuration packets, the network device to be parsed encodes the encoding value and the offset within the group from the length field of the network configuration packets. For the coding values of a distribution network packet group, the order of the coding values in the coding value group is determined according to the offset within the group, and then the coding values are arranged in this order. The coding values of different network packet groups are arranged in the order of the network packet groups.
在本申请实施例中的另一种示例中,所述子步骤S25可以进一步包括:所述用户终端将所述编码信息,编码到多个配网包的目的字段Destination。In another example in the embodiment of the present application, the sub-step S25 may further include: the user terminal encodes the encoding information into a destination field of multiple distribution network packets.
具体的,用户终端可以将编码信息的划分为多个编码值(例如,编码信息包括多个字节,将一个字节作为一个编码值),将编码值划分成多个编码值分组;用户终端将一个编码值分组的编码值,分别编码到属于一个配网包分组的各个配网包中。也就是说,完整的编码信息可以编码到多个配网包分组的配网包中。Specifically, the user terminal may divide the encoded information into multiple encoded values (for example, the encoded information includes multiple bytes, with one byte as one encoded value), and divide the encoded value into multiple encoded value groups; the user terminal Encoding the encoding values of one encoding value group into each distribution network packet belonging to a distribution network packet group. In other words, the complete coding information can be coded into the distribution network packets grouped by multiple distribution network packets.
对于一个编码值分组的编码值,根据编码值在编码值分组内的顺序,生成对应的组内偏移量;然后将编码值和对应的组内偏移量,分别编码到一个配网包分组的各个配网包的目的字段。具体的,可以采用目的字段的目的MAC地址的末尾三个字节来编码。For the coded value of a coded value group, the corresponding intra-group offset is generated according to the order of the coded value in the coded value group; then the coded value and the corresponding intra-group offset are encoded into a distribution network packet group The destination field of each distribution packet. Specifically, the last three bytes of the destination MAC address of the destination field can be used for encoding.
待配网设备在接收到多组配网包后,从配网包的目的字段中解析出编码值和组内偏移量。对于一个配网包分组的编码值,按照组内偏移量确定编码值在编码值分组的顺序,然后按照该顺序排列各个编码值。对于不同配网包分组的编码值,按照配网包分组的顺序进行排列。After receiving the plurality of groups of network configuration packets, the network device to be configured parses the encoding value and the offset within the group from the destination field of the network configuration packets. For the coding values of a distribution network packet group, the order of the coding values in the coding value group is determined according to the offset within the group, and then the coding values are arranged in this order. The coding values of different network packet groups are arranged in the order of the network packet groups.
步骤403,所述用户终端向所述待配网设备发送所述UDP包。Step 403: The user terminal sends the UDP packet to the network device to be configured.
在本申请实施例中,所述步骤403可以包括:所述用户终端向所述待配网设备发送所述多个配网包。In the embodiment of the present application, the step 403 may include: the user terminal sending the multiple network configuration packets to the network device to be configured.
在本申请实施例中,所述步骤403还可以包括:所述用户终端在每发送预设数目的配网包之前,向所述待配网设备发送至少一个同步包。In the embodiment of the present application, the step 403 may further include: before each time the user terminal sends a preset number of network configuration packets, the user terminal sends at least one synchronization packet to the network device to be configured.
具体的,用户终端将配网包分组发送,每一个配网包分组包括预设数目的配网包。用户终端在每发送一组配网包之前,都发送一组同步包,每组的同步包至少包括一个同步包。同一组同步包的数据部分的长度都是相同的,也就是说同一组同步包的长度字段都是相同的,同步包的长度字段表示了配网包分组的顺序。Specifically, the user terminal sends a distribution network packet in groups, and each distribution network packet group includes a preset number of distribution network packets. Before each user terminal sends a group of network configuration packets, it sends a group of synchronization packets. Each group of synchronization packets includes at least one synchronization packet. The length of the data part of the same group of synchronization packets is the same, that is to say, the length field of the same group of synchronization packets is the same, and the length field of the synchronization packet indicates the order of the distribution network packet grouping.
在本申请实施例中,用户终端只需要向待配网设备发送目标网络热点设备的密码信息(Password)和BSSID,而不需要发送SSID。待配网设备可以根据BSSID查找到对应的目标网络热点设备的SSID,然后待配网设备根据SSID和密码信息接入到目标网络热点设备。由于不需要发送SSID,不会出现传输SSID出错的情况,提高配网成功率;同时减少了发送的数据量,减少了发送数据所需要的时间,提升了配网效率。In the embodiment of the present application, the user terminal only needs to send the password information (Password) and the BSSID of the target network hotspot device to the network device to be configured, and does not need to send the SSID. The network device to be configured can find the SSID of the corresponding target network hotspot device according to the BSSID, and then the network device to be configured accesses the target network hotspot device according to the SSID and password information. Since no SSID needs to be sent, there will be no error in transmitting the SSID, which will increase the success rate of the distribution network; meanwhile, the amount of data sent will be reduced, the time required to send the data will be reduced, and the efficiency of the distribution network will be improved.
另外,目前Android App和iOS App都无法自动获得中文SSID的编码格式(万国码UTF-8或汉字内码扩展规范GBK),APP默认SSID为UTF-8编码,导致GBK编码的SSID按照UTF-8格式发送,导致目前的GBK编码的中文SSID热点配网失败。而本申请实施例不需要传输SSID,而是根据BSSID查找对应的SSID,可以有效解决GBK编码的中文SSID配网失败的问题。In addition, at present, neither Android App nor iOS App can automatically obtain the Chinese SSID encoding format (Universal Code UTF-8 or Chinese Character Internal Code Extension Specification GBK). The default SSID of the APP is UTF-8 encoding, resulting in GBK encoded SSID according to UTF-8. Send in format, causing the current GBK-encoded Chinese SSID hotspot distribution network to fail. The embodiment of the present application does not need to transmit the SSID, but searches for the corresponding SSID according to the BSSID, which can effectively solve the problem of GBK-encoded Chinese SSID network distribution failure.
需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请实施例并不受所描述的动作顺序的限制,因为依据本申请实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本申请实施例所必须的。It should be noted that, for the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of the present application are not limited by the described action sequence because According to the embodiment of the present application, some steps may be performed in other orders or simultaneously. Secondly, a person skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.
参照图7,示出了本申请的一种待配网设备接入网络热点设备的装置实施例一的结构框图,具体可以包括如下模块:Referring to FIG. 7, there is shown a structural block diagram of a first embodiment of an apparatus for accessing a network hotspot device by a network device to be configured according to the present application, which may specifically include the following modules:
位于待配网设备的配网信息获取模块501,用于获取用户终端发送的目标网络热点设备的密码信息和目标基本服务集标识BSSID;A distribution network information acquisition module 501 located in a network device to be configured, configured to acquire password information of a target network hotspot device and a target basic service set identifier BSSID sent by a user terminal;
位于所述待配网设备的服务集标识查找模块502,用于从预置的多个网络热点设备的BSSID和服务集标识SSID中,查找与所述目标BSSID对应的目标SSID;A service set identification search module 502 located in the network device to be deployed, configured to find a target SSID corresponding to the target BSSID from the preset BSSIDs and service set identifiers SSIDs of a plurality of network hotspot devices;
位于所述待配网设备的接入模块503,用于采用所述密码信息和所述目标SSID,接入所述目标网络热点设备。An access module 503 located in the network device to be configured is configured to access the target network hotspot device by using the password information and the target SSID.
在本申请实施例中,所述配网信息获取模块501可以包括:In the embodiment of the present application, the distribution network information acquisition module 501 may include:
用户数据报协议包接收子模块,用于接收用户终端发送的用户数据报协议UDP包;A user datagram protocol packet receiving submodule, configured to receive a user datagram protocol UDP packet sent by a user terminal;
配网信息获取子模块,用于从所述UDP包中获取目标网络热点设备的密码信息和目标基本服务集标识BSSID。The network information acquisition submodule is configured to acquire the password information of the target network hotspot device and the target basic service set identifier BSSID from the UDP packet.
在本申请实施例中,所述用户数据报协议包接收子模块可以包括:In the embodiment of the present application, the user datagram protocol packet receiving submodule may include:
配网包接收单元,用于接收用户终端发送的多个配网包。A distribution network packet receiving unit is configured to receive multiple distribution network packets sent by a user terminal.
在本申请实施例中,所述配网信息获取子模块可以包括:In the embodiment of the present application, the distribution network information acquisition submodule may include:
编码信息获取单元,用于从所述多个配网包中获取编码信息;所述编码信息包括:加密方式信息、密码长度信息、经加密的密码信息;An encoding information obtaining unit, configured to obtain encoding information from the multiple distribution network packages; the encoding information includes: encryption method information, password length information, and encrypted password information;
加密密码获取单元,用于根据所述密码长度信息,从所述编码信息中确定经加密的密码信息;An encrypted password obtaining unit, configured to determine the encrypted password information from the encoded information according to the password length information;
解密单元,用于根据所述加密方式信息,对所述经加密的密码信息进行解密,得到密码信息。A decryption unit is configured to decrypt the encrypted password information according to the encryption mode information to obtain password information.
在本申请实施例中,所述用户数据报协议包接收子模块还可以包括:In the embodiment of the present application, the user datagram protocol packet receiving submodule may further include:
同步包接收单元,用于在接收所述用户终端发送的多个配网包之前,接收所述用户 终端发送的至少一个同步包。A synchronization packet receiving unit is configured to receive at least one synchronization packet sent by the user terminal before receiving multiple network distribution packets sent by the user terminal.
在本申请实施例中,所述配网信息获取子模块可以包括:In the embodiment of the present application, the distribution network information acquisition submodule may include:
第一目标基本服务集标识获取单元,用于从所述同步包中获取目标基本服务集标识BSSID。The first target basic service set identifier acquiring unit is configured to acquire a target basic service set identifier BSSID from the synchronization package.
在本申请实施例中,所述配网信息获取子模块可以包括:In the embodiment of the present application, the distribution network information acquisition submodule may include:
第二目标基本服务集标识获取单元,用于从所述配网包中获取目标基本服务集标识BSSID。The second target basic service set identifier acquiring unit is configured to obtain a target basic service set identifier BSSID from the distribution network package.
在本申请实施例的一种示例中,所述编码信息获取单元具体包括:In an example of an embodiment of the present application, the encoding information obtaining unit specifically includes:
长度字段解析子单元,用于解析接收到的多个配网包的长度字段Length;Length field parsing subunit, used to parse the length field Length of multiple received distribution packets;
第一编码信息确定子单元,用于根据所述多个配网包的长度字段,确定编码信息。The first encoding information determination subunit is configured to determine encoding information according to length fields of the multiple distribution network packets.
在本申请实施例的另一种示例中,所述编码信息获取单元可以包括:In another example of the embodiment of the present application, the encoding information obtaining unit may include:
目的字段解析子单元,用于解析接收到的多个配网包的目的字段Destination;Destination field parsing subunit, for parsing the destination field Destination of multiple received distribution network packets;
第二编码信息确定子单元,用于根据所述多个配网包的目的字段Destination,确定编码信息。The second encoding information determining subunit is configured to determine encoding information according to a destination field Destination of the multiple distribution network packets.
在本申请实施例中,所述的装置还可以包括:In the embodiment of the present application, the device may further include:
位于所述待配网设备的信标包接收模块,用于接收网络热点设备发送的信标包;A beacon packet receiving module located at the network device to be configured, configured to receive a beacon packet sent by a network hotspot device;
位于所述待配网设备的设备信息获取模块,用于从所述信标包中获取所述网络热点设备的BSSID和SSID。A device information acquisition module located in the network device to be configured, configured to acquire a BSSID and an SSID of the network hotspot device from the beacon packet.
在本申请实施例中,用户终端只需要向待配网设备发送目标网络热点设备的密码信息(Password)和BSSID,而不需要发送SSID。待配网设备可以根据BSSID查找到对应的目标网络热点设备的SSID,然后待配网设备根据SSID和密码信息接入到目标网络热点设备。由于不需要发送SSID,不会出现传输SSID出错的情况,提高配网成功率;同时减少了发送的数据量,减少了发送数据所需要的时间,提升了配网效率。In the embodiment of the present application, the user terminal only needs to send the password information (Password) and the BSSID of the target network hotspot device to the network device to be configured, and does not need to send the SSID. The network device to be configured can find the SSID of the corresponding target network hotspot device according to the BSSID, and then the network device to be configured accesses the target network hotspot device according to the SSID and password information. Since no SSID needs to be sent, there will be no error in transmitting the SSID, which will increase the success rate of the distribution network; meanwhile, the amount of data sent will be reduced, the time required to send the data will be reduced, and the efficiency of the distribution network will be improved.
另外,目前Android App和iOS App都无法自动获得中文SSID的编码格式(万国码UTF-8或汉字内码扩展规范GBK),APP默认SSID为UTF-8编码,导致GBK编码的SSID按照UTF-8格式发送,导致目前的GBK编码的中文SSID热点配网失败。而本申请实施例不需要传输SSID,而是根据BSSID查找对应的SSID,可以有效解决GBK编码的中文SSID配网失败的问题。In addition, at present, neither Android App nor iOS App can automatically obtain the Chinese SSID encoding format (Universal Code UTF-8 or Chinese Character Internal Code Extension Specification GBK). The default SSID of the APP is UTF-8 encoding, resulting in GBK encoded SSID according to UTF-8. Send in format, causing the current GBK-encoded Chinese SSID hotspot distribution network to fail. The embodiment of the present application does not need to transmit the SSID, but searches for the corresponding SSID according to the BSSID, which can effectively solve the problem of GBK-encoded Chinese SSID network distribution failure.
参照图8,示出了本申请的一种待配网设备接入网络热点设备的装置实施例二的结 构框图,具体可以包括如下模块:Referring to FIG. 8, a structural block diagram of Embodiment 2 of an apparatus for accessing a network hotspot device by a network device to be configured according to the present application is shown, and may specifically include the following modules:
位于用户终端的配网信息获取模块601,用于获取目标网络热点设备的密码信息和目标BSSID;所述密码信息和目标BSSID用于接入所述目标网络热点设备;A distribution network information acquisition module 601 located at a user terminal, configured to acquire password information and a target BSSID of a target network hotspot device; the password information and the target BSSID are used to access the target network hotspot device;
位于所述用户终端的配网信息发送模块602,用于向待配网设备发送所述目标网络热点设备的密码信息和目标BSSID。The network configuration information sending module 602 located in the user terminal is configured to send the password information and the target BSSID of the target network hotspot device to the network device to be configured.
在本申请实施例中,所述配网信息发送模块602可以包括:In the embodiment of the present application, the distribution network information sending module 602 may include:
密码信息编码子模块,用于将所述密码信息编码到UDP包;所述UDP包含有目标BSSID;A password information encoding submodule, configured to encode the password information into a UDP packet; the UDP contains a target BSSID;
用户数据报协议包发送子模块,用于向所述待配网设备发送所述UDP包。The user datagram protocol packet sending submodule is configured to send the UDP packet to the network device to be configured.
在本申请实施例中,所述密码信息编码子模块可以包括:In the embodiment of the present application, the password information encoding sub-module may include:
密码信息加密单元,用于采用预设加密方式对密码信息进行加密;A password information encryption unit, configured to encrypt password information by using a preset encryption method;
加密方式信息生成单元,用于生成与所述预设加密方式对应的加密方式信息;An encryption method information generating unit, configured to generate encryption method information corresponding to the preset encryption method;
密码长度信息确定单元,用于确定经加密的密码信息的密码长度信息;A password length information determining unit, configured to determine password length information of the encrypted password information;
编码信息封装单元,用于将所述加密方式信息、密码长度信息、经加密的密码信息封装为编码信息;An encoding information encapsulating unit, configured to encapsulate the encryption method information, password length information, and encrypted password information into encoding information;
编码信息编码单元,用于将所述编码信息编码到多个配网包。An encoding information encoding unit, configured to encode the encoding information into multiple distribution network packets.
在本申请实施例中,所述用户数据报协议包发送子模块可以包括:In the embodiment of the present application, the user datagram protocol packet sending submodule may include:
配网包发送单元,用于向所述待配网设备发送所述多个配网包。A network packet sending unit is configured to send the multiple network packets to the network device to be configured.
在本申请实施例中,所述用户数据报协议包发送子模块还可以包括:In the embodiment of the present application, the user datagram protocol packet sending submodule may further include:
同步包发送单元,用于在每发送预设数目的配网包之前,向所述待配网设备发送至少一个同步包。A synchronization packet sending unit is configured to send at least one synchronization packet to the network device to be configured before each preset number of network distribution packets is sent.
在本申请实施例的一种示例中,所述编码信息编码单元可以包括:In an example of an embodiment of the present application, the encoding information encoding unit may include:
第一编码子单元,用于将所述编码信息,编码到多个配网包的长度字段Length。The first encoding subunit is configured to encode the encoding information into a length field Length of multiple distribution network packets.
在本申请实施例的另一种示例中,所述编码信息编码单元可以包括:In another example of the embodiment of the present application, the encoding information encoding unit may include:
第二编码子单元,用于将所述编码信息,编码到多个配网包的目的字段Destination。The second encoding subunit is configured to encode the encoding information into destination fields of multiple distribution network packets.
在本申请实施例中,用户终端只需要向待配网设备发送目标网络热点设备的密码信息(Password)和BSSID,而不需要发送SSID。待配网设备可以根据BSSID查找到对应的目标网络热点设备的SSID,然后待配网设备根据SSID和密码信息接入到目标网络热点设备。由于不需要发送SSID,不会出现传输SSID出错的情况,提高配网成功率;同时减少了发送的数据量,减少了发送数据所需要的时间,提升了配网效率。In the embodiment of the present application, the user terminal only needs to send the password information (Password) and the BSSID of the target network hotspot device to the network device to be configured, and does not need to send the SSID. The network device to be configured can find the SSID of the corresponding target network hotspot device according to the BSSID, and then the network device to be configured accesses the target network hotspot device according to the SSID and password information. Since no SSID needs to be sent, there will be no error in transmitting the SSID, which will increase the success rate of the distribution network; meanwhile, the amount of data sent will be reduced, the time required to send the data will be reduced, and the efficiency of the distribution network will be improved.
另外,目前Android App和iOS App都无法自动获得中文SSID的编码格式(万国码UTF-8或汉字内码扩展规范GBK),APP默认SSID为UTF-8编码,导致GBK编码的SSID按照UTF-8格式发送,导致目前的GBK编码的中文SSID热点配网失败。而本申请实施例不需要传输SSID,而是根据BSSID查找对应的SSID,可以有效解决GBK编码的中文SSID配网失败的问题。In addition, at present, neither Android App nor iOS App can automatically obtain the Chinese SSID encoding format (Universal Code UTF-8 or Chinese Character Internal Code Extension Specification GBK). The default SSID of the APP is UTF-8 encoding, resulting in GBK encoded SSID according to UTF-8. Send in format, causing the current GBK-encoded Chinese SSID hotspot distribution network to fail. The embodiment of the present application does not need to transmit the SSID, but searches for the corresponding SSID according to the BSSID, which can effectively solve the problem of GBK-encoded Chinese SSID network distribution failure.
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For the relevant part, refer to the description of the method embodiment.
本申请实施例还提供了一种待配网设备接入网络热点设备的装置,包括:An embodiment of the present application further provides an apparatus for accessing a network hotspot device by a network device to be configured, including:
一个或多个处理器;和One or more processors; and
其上存储有指令的一个或多个机器可读介质,当由所述一个或多个处理器执行时,使得所述装置执行本申请实施例所述的方法。One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, cause the apparatus to execute the method described in the embodiment of the present application.
本申请实施例还提供了一个或多个机器可读介质,其上存储有指令,当由一个或多个处理器执行时,使得所述处理器执行本申请实施例所述的方法。The embodiments of the present application further provide one or more machine-readable media, on which instructions are stored, and when executed by one or more processors, cause the processors to execute the method described in the embodiments of the present application.
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。Each embodiment in this specification is described in a progressive manner. Each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments may refer to each other.
本领域内的技术人员应明白,本申请实施例的实施例可提供为方法、装置、或计算机程序产品。因此,本申请实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the embodiments of the present application may be provided as a method, an apparatus, or a computer program product. Therefore, the embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
本申请实施例是参照根据本申请实施例的方法、终端设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方 框或多个方框中指定的功能的装置。The embodiments of the present application are described with reference to flowcharts and / or block diagrams of the method, the terminal device (system), and the computer program product according to the embodiments of the present application. It should be understood that each process and / or block in the flowcharts and / or block diagrams, and combinations of processes and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing terminal device Means are generated for implementing the functions specified in one or more flowcharts and / or one or more blocks of the block diagrams.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including the instruction means, the The instruction means implements the functions specified in one or more flowcharts and / or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing terminal device, so that a series of operation steps can be performed on the computer or other programmable terminal device to produce a computer-implemented process, so that the computer or other programmable terminal device can The instructions executed on the steps provide steps for implementing the functions specified in one or more of the flowcharts and / or one or more of the block diagrams.
尽管已描述了本申请实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请实施例范围的所有变更和修改。Although the preferred embodiments of the embodiments of the present application have been described, those skilled in the art can make other changes and modifications to these embodiments once they know the basic inventive concepts. Therefore, the appended claims are intended to be construed to include the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。Finally, it should be noted that in this article, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these entities. There is any such actual relationship or order between OR operations. Moreover, the terms "including", "comprising", or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements but also those that are not explicitly listed Other elements, or elements inherent to such a process, method, article, or terminal. Without more restrictions, the elements defined by the sentence "including a ..." do not exclude the existence of other identical elements in the process, method, article, or terminal device including the elements.
以上对本申请所提供的一种待配网设备接入网络热点设备的方法和一种待配网设备接入网络热点设备的装置,进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The method for accessing a network hotspot device and the device for accessing a network hotspot device provided by the present application and the device for accessing the network hotspot device provided by the present application have been described in detail above. Specific examples are applied to the principle of this application in this article. The descriptions of the above embodiments are only used to help understand the methods and core ideas of the present application. At the same time, for those of ordinary skill in the art, according to the ideas of the present application, in the specific implementation and application scope There will be changes. In summary, the content of this specification should not be construed as a limitation on this application.

Claims (36)

  1. 一种待配网设备接入网络热点设备的方法,其特征在于,包括:A method for a network device to be connected to a network hotspot device, which is characterized by including:
    待配网设备获取用户终端发送的目标网络热点设备的密码信息和目标基本服务集标识BSSID;The network device to be configured obtains the password information of the target network hotspot device and the target basic service set identifier BSSID sent by the user terminal;
    所述待配网设备从预置的多个网络热点设备的BSSID和服务集标识SSID中,查找与所述目标BSSID对应的目标SSID;Searching for a target SSID corresponding to the target BSSID from the preset BSSIDs and service set identifiers SSIDs of multiple network hotspot devices by the network device to be configured;
    所述待配网设备采用所述密码信息和所述目标SSID,接入所述目标网络热点设备。The network device to be configured uses the password information and the target SSID to access the target network hotspot device.
  2. 根据权利要求1所述的方法,其特征在于,所述待配网设备获取用户终端发送的目标网络热点设备的密码信息和目标基本服务集标识BSSID的步骤包括:The method according to claim 1, wherein the step of obtaining, by the network device to be configured, the password information of the target network hotspot device and the target basic service set identifier BSSID sent by the user terminal comprises:
    所述待配网设备接收用户终端发送的用户数据报协议UDP包;Receiving, by the network device to be configured, a user datagram protocol UDP packet sent by a user terminal;
    所述待配网设备从所述UDP包中获取目标网络热点设备的密码信息和目标基本服务集标识BSSID。The network device to be configured obtains the password information of the target network hotspot device and the target basic service set identifier BSSID from the UDP packet.
  3. 根据权利要求2所述的方法,其特征在于,所述待配网设备接收用户终端发送的若干个UDP包的步骤包括:The method according to claim 2, characterized in that the step of the network device to be configured to receive several UDP packets sent by the user terminal comprises:
    所述待配网设备接收用户终端发送的多个配网包。The network equipment to be distributed receives multiple network distribution packets sent by a user terminal.
  4. 根据权利要求3所述的方法,其特征在于,所述待配网设备从所述UDP包中获取目标网络热点设备的密码信息的步骤包括:The method according to claim 3, wherein the step of obtaining, by the network device to be configured, the password information of the target network hotspot device from the UDP packet comprises:
    所述待配网设备从所述多个配网包中获取编码信息;所述编码信息包括:加密方式信息、密码长度信息、经加密的密码信息;The network device to be distributed obtains encoding information from the multiple network distribution packages; the encoding information includes: encryption mode information, password length information, and encrypted password information;
    所述待配网设备根据所述密码长度信息,从所述编码信息中确定经加密的密码信息;Determining, by the network device to be configured, encrypted password information from the encoded information according to the password length information;
    所述待配网设备根据所述加密方式信息,对所述经加密的密码信息进行解密,得到密码信息。The network device to be distributed decrypts the encrypted password information according to the encryption method information to obtain password information.
  5. 根据权利要求3所述的方法,其特征在于,所述待配网设备接收用户终端发送的UDP包的步骤还包括:The method according to claim 3, wherein the step of receiving the UDP packet sent by the user terminal by the network device to be configured further comprises:
    所述待配网设备在接收所述用户终端发送的多个配网包之前,接收所述用户终端发送的至少一个同步包。Before receiving the plurality of network distribution packets sent by the user terminal, the network device to be configured receives at least one synchronization packet sent by the user terminal.
  6. 根据权利要求5所述的方法,其特征在于,所述待配网设备从所述UDP包中获取目标基本服务集标识BSSID的步骤包括:The method according to claim 5, wherein the step of obtaining the target basic service set identifier (BSSSID) from the UDP packet by the network device to be configured comprises:
    所述待配网设备从所述同步包中获取目标基本服务集标识BSSID。The network device to be configured obtains a target basic service set identifier BSSID from the synchronization packet.
  7. 根据权利要求5所述的方法,其特征在于,所述待配网设备从所述UDP包中获取目标基本服务集标识BSSID的步骤包括:The method according to claim 5, wherein the step of obtaining the target basic service set identifier (BSSSID) from the UDP packet by the network device to be configured comprises:
    所述待配网设备从所述配网包中获取目标基本服务集标识BSSID。The network device to be configured obtains a target basic service set identifier BSSID from the network configuration package.
  8. 根据权利要求4所述的方法,其特征在于,所述待配网设备从所述多个配网包中获取编码信息的步骤包括:The method according to claim 4, wherein the step of obtaining, by the network device to be coded, the coding information from the multiple distribution network packets comprises:
    所述待配网设备解析接收到的多个配网包的长度字段Length;Analyzing, by the network device to be distributed, the length fields Length of the multiple distribution network packets received;
    所述待配网设备根据所述多个配网包的长度字段,确定编码信息。The network device to be distributed determines encoding information according to length fields of the multiple network distribution packets.
  9. 根据权利要求4所述的方法,其特征在于,所述待配网设备从所述多个配网包中获取编码信息的步骤包括:The method according to claim 4, wherein the step of obtaining, by the network device to be coded, the coding information from the multiple distribution network packets comprises:
    所述待配网设备确定接收到的多个配网包;Determining, by the network device to be distributed, a plurality of received distribution network packets;
    所述待配网设备解析接收到的多个配网包的目的字段Destination;Analyzing, by the network device to be distributed, the destination fields of the multiple distribution network packets received;
    所述待配网设备根据所述多个配网包的目的字段Destination,确定编码信息。The network device to be distributed determines encoding information according to a destination field Destination of the multiple network distribution packets.
  10. 根据权利要求1所述的方法,其特征在于,还包括:The method according to claim 1, further comprising:
    所述待配网设备接收网络热点设备发送的信标包;The network device to be configured receives a beacon packet sent by a network hotspot device;
    所述待配网设备从所述信标包中获取所述网络热点设备的BSSID和SSID。The network device to be configured obtains a BSSID and an SSID of the network hotspot device from the beacon packet.
  11. 一种待配网设备接入网络热点设备的方法,其特征在于,包括:A method for a network device to be connected to a network hotspot device, which is characterized by including:
    用户终端获取目标网络热点设备的密码信息和目标BSSID;所述密码信息和目标BSSID用于接入所述目标网络热点设备;The user terminal obtains the password information and the target BSSID of the target network hotspot device; the password information and the target BSSID are used to access the target network hotspot device;
    所述用户终端向待配网设备发送所述目标网络热点设备的密码信息和目标BSSID。The user terminal sends the password information and the target BSSID of the target network hotspot device to the network device to be configured.
  12. 根据权利要求11所述的方法,其特征在于,所述用户终端向待配网设备发送目标网络热点设备的密码信息和目标BSSID的步骤包括:The method according to claim 11, wherein the step of the user terminal sending the password information and the target BSSID of the target network hotspot device to the network device to be configured comprises:
    所述用户终端将所述密码信息编码到UDP包;所述UDP包含有目标BSSID;The user terminal encodes the password information into a UDP packet; the UDP contains a target BSSID;
    所述用户终端向所述待配网设备发送所述UDP包。Sending, by the user terminal, the UDP packet to the network device to be configured.
  13. 根据权利要求12所述的方法,其特征在于,所述用户终端将所述密码信息编码到UDP包的步骤包括:The method according to claim 12, wherein the step of the user terminal encoding the password information into a UDP packet comprises:
    所述用户终端采用预设加密方式对密码信息进行加密;The user terminal encrypts password information by using a preset encryption method;
    所述用户终端生成与所述预设加密方式对应的加密方式信息;Generating, by the user terminal, encryption method information corresponding to the preset encryption method;
    所述用户终端确定经加密的密码信息的密码长度信息;Determining, by the user terminal, password length information of the encrypted password information;
    所述用户终端将所述加密方式信息、密码长度信息、经加密的密码信息封装为编码 信息;The user terminal encapsulates the encryption mode information, password length information, and encrypted password information into encoded information;
    所述用户终端将所述编码信息编码到多个配网包。The user terminal encodes the encoding information into multiple distribution network packets.
  14. 根据权利要求13所述的方法,其特征在于,所述用户终端向所述待配网设备发送所述UDP包的步骤包括:The method according to claim 13, wherein the step of the user terminal sending the UDP packet to the network device to be configured comprises:
    所述用户终端向所述待配网设备发送所述多个配网包。Sending, by the user terminal, the multiple network configuration packets to the network device to be configured.
  15. 根据权利要求14所述的方法,其特征在于,所述用户终端向所述待配网设备发送所述UDP包的步骤还包括:The method according to claim 14, wherein the step of the user terminal sending the UDP packet to the network device to be configured further comprises:
    所述用户终端在每发送预设数目的配网包之前,向所述待配网设备发送至少一个同步包。The user terminal sends at least one synchronization packet to the network device to be configured before sending a preset number of network configuration packets.
  16. 根据权利要求13所述的方法,其特征在于,所述用户终端将所述编码信息编码到多个配网包的步骤包括:The method according to claim 13, wherein the step of the user terminal encoding the encoding information into multiple distribution network packets comprises:
    所述用户终端将所述编码信息,编码到多个配网包的长度字段Length。The user terminal encodes the encoding information into a length field Length of multiple distribution network packets.
  17. 根据权利要求13所述的方法,其特征在于,所述用户终端将所述编码信息编码到多个配网包的步骤包括:The method according to claim 13, wherein the step of the user terminal encoding the encoding information into multiple distribution network packets comprises:
    所述用户终端将所述编码信息,编码到多个配网包的目的字段Destination。The user terminal encodes the encoding information into destination fields of multiple distribution network packets.
  18. 一种待配网设备接入网络热点设备的装置,其特征在于,包括:An apparatus for accessing a network hotspot device to a network device to be distributed, which is characterized by comprising:
    位于待配网设备的配网信息获取模块,用于获取用户终端发送的目标网络热点设备的密码信息和目标基本服务集标识BSSID;A distribution network information acquisition module located at a network device to be configured, configured to obtain password information of a target network hotspot device and a target basic service set identifier BSSID sent by a user terminal;
    位于所述待配网设备的服务集标识查找模块,用于从预置的多个网络热点设备的BSSID和服务集标识SSID中,查找与所述目标BSSID对应的目标SSID;A service set identification search module located in the network device to be configured, configured to find a target SSID corresponding to the target BSSID from the preset BSSIDs and service set identifiers SSIDs of a plurality of network hotspot devices;
    位于所述待配网设备的接入模块,用于采用所述密码信息和所述目标SSID,接入所述目标网络热点设备。An access module located in the network device to be configured is configured to use the password information and the target SSID to access the target network hotspot device.
  19. 根据权利要求18所述的装置,其特征在于,所述配网信息获取模块包括:The device according to claim 18, wherein the distribution network information acquisition module comprises:
    用户数据报协议包接收子模块,用于接收用户终端发送的用户数据报协议UDP包;A user datagram protocol packet receiving submodule, configured to receive a user datagram protocol UDP packet sent by a user terminal;
    配网信息获取子模块,用于从所述UDP包中获取目标网络热点设备的密码信息和目标基本服务集标识BSSID。The network information acquisition submodule is configured to acquire the password information of the target network hotspot device and the target basic service set identifier BSSID from the UDP packet.
  20. 根据权利要求19所述的装置,其特征在于,所述用户数据报协议包接收子模块包括:The apparatus according to claim 19, wherein the user datagram protocol packet receiving submodule comprises:
    配网包接收单元,用于接收用户终端发送的多个配网包。A distribution network packet receiving unit is configured to receive multiple distribution network packets sent by a user terminal.
  21. 根据权利要求20所述的装置,其特征在于,所述配网信息获取子模块包括:The device according to claim 20, wherein the distribution network information acquisition submodule comprises:
    编码信息获取单元,用于从所述多个配网包中获取编码信息;所述编码信息包括:加密方式信息、密码长度信息、经加密的密码信息;An encoding information obtaining unit, configured to obtain encoding information from the multiple distribution network packages; the encoding information includes: encryption method information, password length information, and encrypted password information;
    加密密码获取单元,用于根据所述密码长度信息,从所述编码信息中确定经加密的密码信息;An encrypted password obtaining unit, configured to determine the encrypted password information from the encoded information according to the password length information;
    解密单元,用于根据所述加密方式信息,对所述经加密的密码信息进行解密,得到密码信息。A decryption unit is configured to decrypt the encrypted password information according to the encryption mode information to obtain password information.
  22. 根据权利要求20所述的装置,其特征在于,所述用户数据报协议包接收子模块还包括:The device according to claim 20, wherein the user datagram protocol packet receiving submodule further comprises:
    同步包接收单元,用于在接收所述用户终端发送的多个配网包之前,接收所述用户终端发送的至少一个同步包。A synchronization packet receiving unit is configured to receive at least one synchronization packet sent by the user terminal before receiving multiple network distribution packets sent by the user terminal.
  23. 根据权利要求22所述的装置,其特征在于,所述配网信息获取子模块包括:The device according to claim 22, wherein the distribution network information acquisition submodule comprises:
    第一目标基本服务集标识获取单元,用于从所述同步包中获取目标基本服务集标识BSSID。The first target basic service set identifier acquiring unit is configured to acquire a target basic service set identifier BSSID from the synchronization package.
  24. 根据权利要求22所述的装置,其特征在于,所述配网信息获取子模块包括:The device according to claim 22, wherein the distribution network information acquisition submodule comprises:
    第二目标基本服务集标识获取单元,用于从所述配网包中获取目标基本服务集标识BSSID。The second target basic service set identifier acquiring unit is configured to obtain a target basic service set identifier BSSID from the distribution network package.
  25. 根据权利要求21所述的装置,其特征在于,所述编码信息获取单元包括:The apparatus according to claim 21, wherein the encoding information obtaining unit comprises:
    长度字段解析子单元,用于解析接收到的多个配网包的长度字段Length;Length field parsing subunit, used to parse the length field Length of multiple received distribution packets;
    第一编码信息确定子单元,用于根据所述多个配网包的长度字段,确定编码信息。The first encoding information determination subunit is configured to determine encoding information according to length fields of the multiple distribution network packets.
  26. 根据权利要求21所述的装置,其特征在于,所述编码信息获取单元包括:The apparatus according to claim 21, wherein the encoding information obtaining unit comprises:
    目的字段解析子单元,用于解析接收到的多个配网包的目的字段Destination;Destination field parsing subunit, for parsing the destination field Destination of multiple received distribution network packets;
    第二编码信息确定子单元,用于根据所述多个配网包的目的字段Destination,确定编码信息。The second encoding information determining subunit is configured to determine encoding information according to a destination field Destination of the multiple distribution network packets.
  27. 根据权利要求18所述的装置,其特征在于,还包括:The apparatus according to claim 18, further comprising:
    位于所述待配网设备的信标包接收模块,用于接收网络热点设备发送的信标包;A beacon packet receiving module located at the network device to be configured, configured to receive a beacon packet sent by a network hotspot device;
    位于所述待配网设备的设备信息获取模块,用于从所述信标包中获取所述网络热点设备的BSSID和SSID。A device information acquisition module located in the network device to be configured, configured to acquire a BSSID and an SSID of the network hotspot device from the beacon packet.
  28. 一种待配网设备接入网络热点设备的装置,其特征在于,包括:An apparatus for accessing a network hotspot device to a network device to be distributed, which is characterized by comprising:
    位于用户终端的配网信息获取模块,用于获取目标网络热点设备的密码信息和目标BSSID;所述密码信息和目标BSSID用于接入所述目标网络热点设备;A distribution network information acquisition module located at a user terminal, configured to acquire password information and a target BSSID of a target network hotspot device; the password information and the target BSSID are used to access the target network hotspot device;
    位于所述用户终端的配网信息发送模块,用于向待配网设备发送所述目标网络热点设备的密码信息和目标BSSID。The distribution network information sending module located in the user terminal is configured to send the password information and the target BSSID of the target network hotspot device to the network device to be configured.
  29. 根据权利要求28所述的装置,其特征在于,所述配网信息发送模块包括:The device according to claim 28, wherein the distribution network information sending module comprises:
    密码信息编码子模块,用于将所述密码信息编码到UDP包;所述UDP包含有目标BSSID;A password information encoding submodule, configured to encode the password information into a UDP packet; the UDP contains a target BSSID;
    用户数据报协议包发送子模块,用于向所述待配网设备发送所述UDP包。The user datagram protocol packet sending submodule is configured to send the UDP packet to the network device to be configured.
  30. 根据权利要求29所述的装置,其特征在于,所述密码信息编码子模块包括:The device according to claim 29, wherein the password information encoding sub-module comprises:
    密码信息加密单元,用于采用预设加密方式对密码信息进行加密;A password information encryption unit, configured to encrypt password information by using a preset encryption method;
    加密方式信息生成单元,用于生成与所述预设加密方式对应的加密方式信息;An encryption method information generating unit, configured to generate encryption method information corresponding to the preset encryption method;
    密码长度信息确定单元,用于确定经加密的密码信息的密码长度信息;A password length information determining unit, configured to determine password length information of the encrypted password information;
    编码信息封装单元,用于将所述加密方式信息、密码长度信息、经加密的密码信息封装为编码信息;An encoding information encapsulating unit, configured to encapsulate the encryption method information, password length information, and encrypted password information into encoding information;
    编码信息编码单元,用于将所述编码信息编码到多个配网包。An encoding information encoding unit, configured to encode the encoding information into multiple distribution network packets.
  31. 根据权利要求30所述的装置,其特征在于,所述用户数据报协议包发送子模块包括:The apparatus according to claim 30, wherein the user datagram protocol packet sending submodule comprises:
    配网包发送单元,用于向所述待配网设备发送所述多个配网包。A network packet sending unit is configured to send the multiple network packets to the network device to be configured.
  32. 根据权利要求31所述的装置,其特征在于,所述用户数据报协议包发送子模块还包括:The apparatus according to claim 31, wherein the user datagram protocol packet sending submodule further comprises:
    同步包发送单元,用于在每发送预设数目的配网包之前,向所述待配网设备发送至少一个同步包。A synchronization packet sending unit is configured to send at least one synchronization packet to the network device to be configured before each preset number of network distribution packets is sent.
  33. 根据权利要求30所述的装置,其特征在于,所述编码信息编码单元包括:The apparatus according to claim 30, wherein the encoding information encoding unit comprises:
    第一编码子单元,用于将所述编码信息,编码到多个配网包的长度字段Length。The first encoding subunit is configured to encode the encoding information into a length field Length of multiple distribution network packets.
  34. 根据权利要求30所述的装置,其特征在于,所述编码信息编码单元包括:The apparatus according to claim 30, wherein the encoding information encoding unit comprises:
    第二编码子单元,用于将所述编码信息,编码到多个配网包的目的字段Destination。The second encoding subunit is configured to encode the encoding information into destination fields of multiple distribution network packets.
  35. 一种待配网设备接入网络热点设备的装置,其特征在于,包括:An apparatus for accessing a network hotspot device to a network device to be distributed, which is characterized by comprising:
    一个或多个处理器;和One or more processors; and
    其上存储有指令的一个或多个机器可读介质,当由所述一个或多个处理器执行时, 使得所述装置执行如权利要求1-10或11-17所述的一个或多个的方法。One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, cause the apparatus to execute one or more of claims 1-10 or 11-17 Methods.
  36. 一个或多个机器可读介质,其上存储有指令,当由一个或多个处理器执行时,使得所述处理器执行如权利要求1-10或11-17所述的一个或多个的方法。One or more machine-readable media having stored thereon instructions which, when executed by one or more processors, cause said processors to execute one or more of the claims 1-10 or 11-17 method.
PCT/CN2019/088715 2018-06-08 2019-05-28 Method and apparatus for device to be configured with network to access network hotspot device WO2019233310A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810590238.2 2018-06-08
CN201810590238.2A CN110582082B (en) 2018-06-08 2018-06-08 Method and device for accessing network to be configured to network hotspot equipment

Publications (1)

Publication Number Publication Date
WO2019233310A1 true WO2019233310A1 (en) 2019-12-12

Family

ID=68770021

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/088715 WO2019233310A1 (en) 2018-06-08 2019-05-28 Method and apparatus for device to be configured with network to access network hotspot device

Country Status (3)

Country Link
CN (1) CN110582082B (en)
TW (1) TW202002712A (en)
WO (1) WO2019233310A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113055973A (en) * 2021-03-08 2021-06-29 读书郎教育科技有限公司 Electronic equipment hotspot sharing method
CN113573313A (en) * 2021-08-10 2021-10-29 海宁奕斯伟集成电路设计有限公司 Intelligent equipment network distribution method and device
CN114745259A (en) * 2020-12-23 2022-07-12 深圳Tcl新技术有限公司 Intelligent device batch network distribution method and device and computer readable storage medium
CN114980101A (en) * 2022-06-07 2022-08-30 中移(杭州)信息技术有限公司 Access method, device, equipment and storage medium of wireless network
CN116016004A (en) * 2022-12-12 2023-04-25 宁波奥克斯电气股份有限公司 Equipment network distribution method, device and system

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111372297B (en) * 2020-03-17 2022-02-22 展讯通信(上海)有限公司 Odd-even packet-based WiFi network distribution method, equipment, device and storage medium
CN111478802B (en) * 2020-03-30 2023-04-28 芯海科技(深圳)股份有限公司 Distribution network processing method, device, system, computer equipment and storage medium
CN111586591A (en) * 2020-05-21 2020-08-25 四川虹美智能科技有限公司 Network distribution method and system, intelligent terminal and Internet of things equipment
CN111757421A (en) * 2020-06-09 2020-10-09 四川虹美智能科技有限公司 Method and device for intelligent equipment network distribution
CN111867001B (en) * 2020-07-24 2022-02-15 深圳创维数字技术有限公司 Intelligent equipment batch network distribution method, system and storage medium
CN112564942A (en) * 2020-11-19 2021-03-26 深圳市晨北科技有限公司 Distribution network control method and device of Internet of things equipment, equipment and storage medium
CN113630727B (en) * 2021-07-09 2023-04-07 珠海荣邦智能科技有限公司 Intelligent household network distribution method, device and system, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105933899A (en) * 2016-04-14 2016-09-07 北京小米移动软件有限公司 Access method and device of wireless access point
CN106657234A (en) * 2016-10-09 2017-05-10 美的智慧家居科技有限公司 Household electrical appliance, distribution network method and system thereof, and mobile terminal
CN106686593A (en) * 2016-12-28 2017-05-17 深圳Tcl智能家庭科技有限公司 WIFI-module-based network-access configuration method and apparatus for smart devices
CN106949603A (en) * 2017-04-05 2017-07-14 新联合众(北京)科技有限公司 The O2O implementation methods of Intelligent air purifier
WO2017161361A2 (en) * 2016-03-18 2017-09-21 Plume Design, Inc. Cloud-based control of a wi-fi network

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6977934B1 (en) * 1998-10-30 2005-12-20 British Telecommunications Data transport
JP5526747B2 (en) * 2009-12-04 2014-06-18 パナソニック株式会社 Decryption device, encryption device, decryption method, encryption method, and communication system
US8351354B2 (en) * 2010-09-30 2013-01-08 Intel Corporation Privacy control for wireless devices
CN104618900B (en) * 2015-02-02 2019-01-11 青岛海尔智能家电科技有限公司 A kind of method for network access of smart machine, smart machine and mobile terminal
CN105392133A (en) * 2015-11-26 2016-03-09 北京奇虎科技有限公司 Method and system for wireless function device to automatically access to wireless access point
CN105682183B (en) * 2016-01-14 2017-06-16 美的集团股份有限公司 The method and apparatus that control home appliance networks
CN107135548B (en) * 2016-02-26 2020-10-30 新华三技术有限公司 Method and device for updating BSSID and connecting network
CN106792707A (en) * 2016-12-13 2017-05-31 迈普通信技术股份有限公司 The detection method and device of counterfeit WAP

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017161361A2 (en) * 2016-03-18 2017-09-21 Plume Design, Inc. Cloud-based control of a wi-fi network
CN105933899A (en) * 2016-04-14 2016-09-07 北京小米移动软件有限公司 Access method and device of wireless access point
CN106657234A (en) * 2016-10-09 2017-05-10 美的智慧家居科技有限公司 Household electrical appliance, distribution network method and system thereof, and mobile terminal
CN106686593A (en) * 2016-12-28 2017-05-17 深圳Tcl智能家庭科技有限公司 WIFI-module-based network-access configuration method and apparatus for smart devices
CN106949603A (en) * 2017-04-05 2017-07-14 新联合众(北京)科技有限公司 The O2O implementation methods of Intelligent air purifier

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114745259A (en) * 2020-12-23 2022-07-12 深圳Tcl新技术有限公司 Intelligent device batch network distribution method and device and computer readable storage medium
CN114745259B (en) * 2020-12-23 2024-02-06 深圳Tcl新技术有限公司 Intelligent equipment batch network distribution method, equipment and computer readable storage medium
CN113055973A (en) * 2021-03-08 2021-06-29 读书郎教育科技有限公司 Electronic equipment hotspot sharing method
CN113055973B (en) * 2021-03-08 2022-10-21 读书郎教育科技有限公司 Electronic equipment hotspot sharing method
CN113573313A (en) * 2021-08-10 2021-10-29 海宁奕斯伟集成电路设计有限公司 Intelligent equipment network distribution method and device
CN114980101A (en) * 2022-06-07 2022-08-30 中移(杭州)信息技术有限公司 Access method, device, equipment and storage medium of wireless network
CN116016004A (en) * 2022-12-12 2023-04-25 宁波奥克斯电气股份有限公司 Equipment network distribution method, device and system

Also Published As

Publication number Publication date
TW202002712A (en) 2020-01-01
CN110582082A (en) 2019-12-17
CN110582082B (en) 2022-06-10

Similar Documents

Publication Publication Date Title
WO2019233310A1 (en) Method and apparatus for device to be configured with network to access network hotspot device
JP6817174B2 (en) Propagation of data frames across communication networks using incompatible network routing protocols
US10666451B2 (en) Method and apparatus for controlling access of household appliance device to network
US10880817B2 (en) Wi-fi configuration method, Wi-Fi mobile terminal, and Wi-Fi device
WO2019233311A1 (en) Method and apparatus for device to be configured with network to access network hotspot device
RU2411672C2 (en) Transportation of control traffic through cellular network with multiple network segments
US9918250B2 (en) Data communication via data packet headers
US20050281211A1 (en) Data transfer method and radio terminal for executing transport layer protocol on radio network
CN103765848A (en) Apparatus and methods for media access control replacement
WO2013104287A1 (en) Method, device, and system for data communication
CN104703176A (en) Configuration method of wireless network, intelligent terminal and wireless network equipment
JP4344750B2 (en) Method and apparatus for in-line encryption and decryption of radio station
WO2015096410A1 (en) Method and device for sending and receiving radio parameter
CN105119900A (en) Information secure transmission method, network access method and corresponding terminals
CN113518315B (en) Method, device and system for configuring radio bearer
WO2018077129A1 (en) Data processing method and apparatus
CN105120454A (en) Information transmission method, network access method and corresponding terminals
EP3220584A1 (en) Wifi sharing method and system, home gateway and wireless local area network gateway
CN111225393B (en) Channel correction method, device, equipment and system
CN109639627B (en) Encryption mode switching method and device
CN113329349A (en) Communication method between mobile terminal and intelligent device in Wi-Fi mode and mobile terminal
CN113596742A (en) Data transmission method and device
WO2015103856A1 (en) Http chunked encoding and ip packet encapsulation and parsing methods
CN108390847B (en) Wireless private network real-time communication service encryption method and system
US10484871B2 (en) Method and device for transmitting verification information

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19814088

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19814088

Country of ref document: EP

Kind code of ref document: A1