WO2021017634A1 - 一种Wi-Fi接入点的SSID获取方法、装置、设备和*** - Google Patents

一种Wi-Fi接入点的SSID获取方法、装置、设备和*** Download PDF

Info

Publication number
WO2021017634A1
WO2021017634A1 PCT/CN2020/094322 CN2020094322W WO2021017634A1 WO 2021017634 A1 WO2021017634 A1 WO 2021017634A1 CN 2020094322 W CN2020094322 W CN 2020094322W WO 2021017634 A1 WO2021017634 A1 WO 2021017634A1
Authority
WO
WIPO (PCT)
Prior art keywords
distribution network
ssid
network
router
distribution
Prior art date
Application number
PCT/CN2020/094322
Other languages
English (en)
French (fr)
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 WO2021017634A1 publication Critical patent/WO2021017634A1/zh

Links

Images

Classifications

    • 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
    • H04W48/10Access restriction or access information delivery, e.g. discovery data delivery using broadcasted information
    • 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
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks

Definitions

  • the present invention relates to the field of communication technology, and in particular to a method, device, equipment and system for acquiring the SSID of a Wi-Fi access point.
  • WiFi Wireless Fidelity
  • smart sockets such as smart sockets, smart air conditioners, and smart air purifiers.
  • routers also called access points
  • the embodiment of the present invention provides a method, device, equipment and system for acquiring the SSID of a Wi-Fi access point, so as to improve the success rate of network configuration.
  • an embodiment of the present invention provides a method for obtaining an SSID of a router, which is applied to a device to be connected to the network, and the method includes:
  • beacon frame sent by a router, where the beacon frame includes the SSID and BSSID of the router;
  • an embodiment of the present invention provides a router SSID acquisition device, which is applied to a device to be connected to the network, and includes:
  • a receiving module configured to receive a beacon frame sent by a router, where the beacon frame includes the SSID and BSSID of the router;
  • a storage module for storing the correspondence between the SSID and the BSSID
  • the receiving module is further configured to receive a distribution network synchronization frame sent by a network distribution device, where the distribution network synchronization frame includes the BSSID of the router;
  • the obtaining module is configured to query the correspondence relationship according to the BSSID in the distribution network synchronization frame to obtain the SSID.
  • an embodiment of the present invention provides an electronic device that includes a first processor and a first memory, the first memory is configured to store one or more computer instructions, wherein the one or more When the computer instructions are executed by the first processor, the method for obtaining the SSID of the router in the first aspect is implemented.
  • the embodiment of the present invention provides a computer storage medium for storing a computer program that enables a computer to implement the SSID acquisition method of the router in the first aspect described above when the computer program is executed.
  • an embodiment of the present invention provides a method for obtaining an SSID of a router, which is applied to a network distribution device, and the method includes:
  • the distribution network synchronization frame includes the BSSID of the router, so that the device to be connected to the network that has received the distribution network synchronization frame determines that the BSSID is stored locally, according to the locally stored BSSID The corresponding relationship between the BSSID and the SSID is used to obtain the SSID.
  • an embodiment of the present invention provides a router SSID obtaining device, which is applied to a network distribution device, and includes:
  • connection module is used to establish a communication connection with the router
  • the sending module is configured to send a distribution network synchronization frame, which includes the BSSID of the router, so that the device to be connected to the network that receives the distribution network synchronization frame determines that the BSSID is stored locally, Obtain the SSID according to the correspondence between the BSSID and the SSID stored locally.
  • an embodiment of the present invention provides an electronic device that includes a second processor and a second memory, the second memory is used to store one or more computer instructions, wherein the one or more When the computer instructions are executed by the second processor, the method for obtaining the SSID of the router in the fourth aspect is implemented.
  • the embodiment of the present invention provides a computer storage medium for storing a computer program that enables a computer to implement the SSID acquisition method of the router in the fourth aspect when executed by a computer.
  • an embodiment of the present invention provides a router SSID acquisition system, including:
  • Network distribution equipment routers and equipment to be connected to the network
  • the router is configured to send a beacon frame, and the beacon frame includes the SSID and BSSID of the router;
  • the network distribution device is configured to send a distribution network synchronization frame, and the distribution network synchronization frame includes the BSSID of the router;
  • the device to be connected to the network is configured to store the correspondence between the SSID and the BSSID according to the received beacon frame, and to query the correspondence according to the BSSID in the distribution network synchronization frame to Obtain the SSID.
  • an embodiment of the present invention provides a method for obtaining a service set identifier, which is applied to a device to be connected to the network, and includes:
  • the beacon frame Acquiring a beacon frame according to the first channel information, the beacon frame including a second service set identifier and a second basic service set identifier;
  • the network name of the WiFi network corresponding to the router can be represented by the Service Set Identifier (SSID), and the address information of the router can be represented by the Basic Service Set Identifier (BSSID). Said.
  • the BSSID is the Media Access Control (MAC) address of the wireless router
  • the SSID is the network name of the wireless network.
  • the SSID of the router refers to the network name of the WiFi network corresponding to the router.
  • network distribution equipment such as mobile phones can be connected to the router in advance, that is, the network distribution equipment has been connected to the network, such as smart home appliances waiting to be connected to the network, the equipment is not connected to the network.
  • the device to be connected to the network needs to obtain the SSID of the router, that is, the network name of the WiFi network that the mobile phone is connected to.
  • the device to be connected to the network also needs to obtain information such as the network access password (PASSWD), but the information such as PASSWD can be used in traditional ways obtain.
  • the device to be connected to the network may also be the device to be configured.
  • the network devices to be distributed can be smart home devices (such as commonly used white appliances, small household appliances, lighting, etc. that need to be connected to the Internet), access points, various sensor devices, and so on.
  • the router can continuously broadcast and send out beacon frames at a certain time interval.
  • the beacon frame includes its own SSID and BSSID, so that the device to be connected to the network that receives the beacon frame parses the beacon Frames are used to store the correspondence between SSID and BSSID.
  • the network configuration equipment when the network configuration equipment is to be connected to the network device, it can broadcast the distribution network synchronization frame.
  • the distribution network synchronization frame includes the router that the network equipment accesses. The BSSID.
  • the network access device After the network access device receives the distribution network synchronization frame, it queries the locally stored corresponding relationships according to the BSSID contained therein. If the corresponding relationship corresponding to the BSSID is stored locally, it directly obtains the corresponding relationship of the BSSID according to the corresponding relationship. The SSID is sufficient. Therefore, even if the multiple bytes corresponding to the SSID are lost during the transmission process during the sequential transmission of multiple bytes of SSID and PASSWD based on the traditional network configuration scheme, the SSID can be obtained correctly based on this scheme. Avoid the problem of network configuration failure caused by the inability to obtain the SSID, thereby improving the success rate of network configuration.
  • Figure 1 is a schematic diagram of the composition of a router SSID obtaining system provided by an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for obtaining an SSID of a router according to an embodiment of the present invention
  • FIG. 3 is a flowchart of another method for obtaining an SSID of a router according to an embodiment of the present invention
  • Figure 4 is an interaction diagram of a network distribution process provided by an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a device for acquiring an SSID of a router according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of an electronic device corresponding to the SSID obtaining apparatus of the router provided in the embodiment shown in FIG. 5;
  • FIG. 7 is a schematic structural diagram of another device for obtaining SSID of a router according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of an electronic device corresponding to the SSID obtaining device of the router provided in the embodiment shown in FIG. 7;
  • FIG. 9 is a flowchart of a method for acquiring a service set identifier according to an embodiment of the present invention.
  • the words “if” and “if” as used herein can be interpreted as “when” or “when” or “in response to determination” or “in response to detection”.
  • the phrase “if determined” or “if detected (statement or event)” can be interpreted as “when determined” or “in response to determination” or “when detected (statement or event) )” or “in response to detection (statement or event)”.
  • the network distribution equipment can be, for example, a mobile phone, and the equipment to be connected to the network can be, for example, smart home appliances.
  • the network distribution equipment has established a connection with the router.
  • the distribution network equipment has been connected to the WiFi network, and the distribution network equipment needs to configure the network of the equipment to be connected as an information island, which will include the network name of the router (SSID), the access password (PASSWD), and some auxiliary information (such as SSID length, PASSWD)
  • the network distribution information such as the length, CRC, Flag, etc.
  • the device to be connected to the network accesses the router based on the network distribution information, that is, to access the WiFi network.
  • the SmartConfig mode mainly uses the Length field of 802.11 and 802.2 or the destination MAC address (Destination) field to transmit these distribution network information.
  • the Length field Taking the length field to transmit the distribution network information, it is limited by the number of bits (12 bits) that the Length field can carry. After the distribution network equipment encodes the distribution network information, the number of bits obtained after encoding is far It is much higher than the number of bits that the Length field can carry. Therefore, in order to complete the complete transmission of the distribution network information, the distribution network device needs to send several distribution network data frames, and each distribution network data frame contains a Length field. In fact, the 12 bits of the Length field are often not fully used for the transmission of network distribution information.
  • the embodiment of the present invention provides a solution for automatically obtaining the SSID of the router, which can effectively reduce the number of bytes to be transmitted during the network configuration process (if the SSID and PASSWD have the same length, the auxiliary information is not considered, which is equivalent to the bytes to be transmitted.
  • the length is reduced to 50% of the original length), thereby improving the efficiency and success rate of the distribution network.
  • FIG. 1 is a schematic diagram of the composition of a system for obtaining an SSID of a router according to an embodiment of the present invention.
  • the system may include: a network distribution device, a router, and a device to be connected to the network.
  • the beacon frame includes the router's SSID and BSSID.
  • the distribution network equipment is used to send the distribution network synchronization frame.
  • the distribution network synchronization frame includes the router's BSSID.
  • the device to be connected to the network is used to store the correspondence between the SSID and the BSSID according to the received beacon frame, and to query the correspondence according to the BSSID in the distribution network synchronization frame to obtain the SSID.
  • the network distribution device can be a user terminal such as a mobile phone.
  • the network distribution device can connect to the WiFi network by establishing a connection with a router, or the network distribution device can also be connected by connecting with other networked devices. Network, but the network distribution equipment has obtained the router information such as SSID and BSSID in some way.
  • the devices to be connected to the network can be terminals such as smart refrigerators, smart speakers, and robots.
  • An App corresponding to the device to be connected to the network is installed in the network distribution device. In daily applications, the user controls the device to be connected to the network through the App, such as switching control of the robot and controlling the walking route.
  • the user configures the network of the device to be connected to the network through the network configuration device
  • the user connects the network device to the WiFi network by operating the network configuration device to establish a connection with the router, and then triggers it by operating the App corresponding to the device to be connected to the network
  • For the network configuration of the device to be connected to the network for example, click the "Network Configuration" button in the App interface to trigger the network configuration process.
  • the distribution network device can broadcast one or more distribution network synchronization frames. Since multiple types of data frames are specified in the 802.11 MAC layer protocol, the distribution network synchronization frame in the embodiment of the present invention can be selected from any of the multiple types of data frames specified in the 802.11 MAC layer protocol. One is to fill the Length field or Destination field in the selected data frame with a character string used to identify the data frame as a distribution network synchronization frame. In other words, a data frame with a preset value, that is, a preset length, is filled in the Length field as a distribution network synchronization frame.
  • the distribution network synchronization frame since one of a variety of data frames is selected as the distribution network synchronization frame, in addition to the Length field filled with a preset character string, the distribution network synchronization frame also contains the original data frame It contains other fields, such as the source MAC address field, BSSID field, etc. Therefore, the distribution network synchronization frame will also include plain text information such as the BSSID of the router that the network distribution device accesses and the MAC address of the network distribution device.
  • the device to be connected to the network receives the distribution network synchronization frame sent by the distribution network device, according to the preset character string filled in the Length field, it knows that the received is the distribution network synchronization frame, so that the BSSID of the router and the distribution network device can be parsed from it The MAC address and other information.
  • the device to be connected to the network can lock the network distribution device, that is, know who the sender is.
  • the device to be connected to the network can lock the network device and know the BSSID of the router to which the network device is connected.
  • the router to which the network distribution device is connected will broadcast and send a beacon frame (beacon frame) at a certain time interval (for example, 100 milliseconds), and the beacon frame contains the BSSID and SSID of the router.
  • the device to be connected to the network that receives the beacon frame stores the SSID and BSSID of the received router correspondingly.
  • the device to be connected to the network can maintain a router list, which stores a pair of SSID and BSSID carried in each beacon frame received by the device to be connected to the network.
  • the device can search the current router list according to the BSSID. If the router list contains the BSSID and a certain SSID The corresponding relationship between the two, the SSID of the router can be obtained directly based on the corresponding relationship.
  • the devices to be connected to the network not only need to obtain the SSID of the router, but also at least need to obtain the PASSWD.
  • the acquisition process of the PASSWD can be implemented in the traditional SmartConfig mode, which is compatible with the traditional network distribution mode.
  • the traditional SmartConfig mode as mentioned above, is to encode the distribution network information, and then transmit the coded distribution network information by successively sending the distribution network data frames. The detailed transmission process will be described in subsequent embodiments.
  • the subsequent network distribution equipment still sends the distribution network information including SSID and PASSWD in the traditional way, if the distribution network information is transmitted during the transmission process, if multiple bytes corresponding to the SSID are lost or other abnormalities, it will not It will affect the correct acquisition of the SSID by the device to be connected to the network.
  • the subsequent network distribution equipment may not need to send the SSID when sending the network distribution information.
  • it is equivalent to only need to transmit the PASSWD field and auxiliary information to achieve the purpose of network distribution. If the length of the SSID and PASSWD are the same and the length of the auxiliary information is shorter, theoretically, the distribution efficiency will be nearly doubled, and the distribution success rate will also be significantly improved.
  • the method for obtaining the SSID of the router provided in the embodiment of the present invention will be described in detail below from the perspective of a network distribution device and a device to be connected to the network.
  • FIG. 2 is a flowchart of a method for obtaining an SSID of a router according to an embodiment of the present invention.
  • the method for obtaining the SSID of the router may be executed by the device to be connected to the network shown in FIG. 1. As shown in Figure 2, the method includes the following steps:
  • the 201 Receive a beacon frame sent by a router.
  • the beacon frame includes the SSID and BSSID of the router.
  • the length field (namely the Length field) or the destination MAC address field (namely the Destination field) in the distribution network synchronization frame is filled with a preset character string for identifying the distribution network synchronization frame. Therefore, the device to be connected to the network parses the preset character string and knows that the received is a distribution network synchronization frame, parses the BSSID of the router contained therein, and queries the locally stored correspondence based on the BSSID to obtain the corresponding SSID.
  • the aforementioned distribution network synchronization frame may also include the MAC address of the network distribution device, so that the device to be connected to the network can lock the network distribution device according to the MAC address of the network distribution device.
  • Locking the network distribution equipment means that the network equipment to be connected to record which network distribution equipment sent the network synchronization frame, and the network equipment can be uniquely identified by its MAC address, thus, it is equivalent to recording the MAC address of the network equipment and sending it The corresponding relationship between the BSSIDs in the distribution network synchronization frame.
  • the device to be connected to the network also knows who needs to receive the network distribution information sent by the network distribution device, that is, it needs to receive the network distribution information sent by the network distribution device.
  • the network distribution information sent by the subsequent network distribution equipment may include the router's SSID, PASSWD and auxiliary information. However, if compatibility issues are not considered, the network distribution information sent by subsequent network distribution equipment may only include PASSWD and auxiliary information, but not SSID.
  • the distribution network device when it sends the distribution network information, it can select one of the multiple data frames specified in the 802.11 MAC layer protocol to send the distribution network information.
  • select The outgoing data frames used for sending distribution network information are called distribution network data frames, and these distribution network information are transmitted in the Length field or Destination field of the distribution network data frame.
  • each distribution network data frame can only fill part of the information in the distribution network information. It is understandable that this part Information refers to the part of the complete bit string obtained after encoding the complete distribution network information. Therefore, the distribution network equipment will need to send multiple distribution network data frames in sequence to complete the transmission of the distribution network information.
  • the equipment to be connected to the network receives the distribution network data frames sequentially sent by the network distribution equipment according to the distribution network information corresponding to the router, and finally obtains the router’s information by analyzing part of the information in the distribution network information included in each distribution network data frame.
  • the distribution network information is connected to the network based on the obtained distribution network information.
  • the distribution network information contains the SSID corresponding to the router, and in the process of sending the SSID, multiple distribution network data frames may need to be used. If any one of the distribution network data frames is lost, There is no impact on the networked device, because the device to be connected to the network has already obtained the SSID corresponding to the router based on the distribution synchronization frame sent by the network distribution device and the beacon frame sent by the router. This means that even if the SSID of the router is included in the distribution network data frame, so that the device to be connected to the network can parse the SSID from it, the device to be connected to the network will replace the SSID obtained from the distribution network data frame with the SSID obtained from the BSSID query. SSID.
  • FIG. 3 is a flowchart of another method for obtaining an SSID of a router according to an embodiment of the present invention.
  • the method for obtaining the SSID of the router may be executed by the network distribution device shown in FIG. 1. As shown in Figure 3, the following steps can be included:
  • the distribution network synchronization frame includes the router's BSSID, so that the device to be connected to the network that receives the distribution network synchronization frame determines that the BSSID has been stored locally, according to the correspondence between the BSSID and the SSID stored locally Get the SSID.
  • the length field or the destination MAC address field in the distribution network synchronization frame is filled with a preset character string for identifying the distribution network synchronization frame, so that the equipment to be connected to the network can identify the distribution network synchronization frame accordingly.
  • each distribution network data frame includes part of the information in the distribution network information, so that the device to be connected
  • Each distribution network data frame is parsed to obtain distribution network information.
  • part of the information contained in each distribution network data frame is carried in the length field of the distribution network data frame, that is, the Length field or the destination MAC address field, that is, the Destination field.
  • the network distribution device may send it in the following manner:
  • the packet frame and multiple distribution network data frames corresponding to each packet are sent in turn.
  • the packet frame includes the group identifier of the corresponding packet.
  • the multiple distribution network data frames correspond to multiple character strings included in the corresponding packet one-to-one.
  • the character string is at least a part of the encoded distribution information;
  • the aforementioned distribution network synchronization frame is used as the first grouped packet frame.
  • the group identifier is carried in the Length field or the Destination field of the packet frame.
  • the Length field or the Destination field in each distribution network data frame includes the corresponding character string and the in-group offset of the corresponding character string. That is to say, take the Length field as an example.
  • the Length field occupies 12 bits.
  • the 12 bits can be divided into two parts. The first part is used to fill the offset within the group, and the second part is used to fill the configuration.
  • Part of the information in the web information is a character string of a certain length corresponding to the part of the information. In practical applications, the number of bits occupied by these two parts can be flexibly divided according to actual needs.
  • the complete bit sequence corresponding to the distribution network information is obtained.
  • the above-mentioned process of grouping the coded distribution network information is: according to the number of bits occupied by the second part, the result is obtained after encoding
  • the bit sequence is divided to obtain several strings, and each string needs to be transmitted by a distribution network data frame; in addition, in order to ensure that the equipment to be connected to the network can know the sending order of each distribution network data frame, it is necessary to determine the transmission sequence of each distribution network data frame.
  • Frames are marked with sequence numbers, and in this embodiment, the sequence number marking of the network distribution data frame through the group identifier and the offset within the group is to mark the character strings contained in the network distribution data frame.
  • the packet frame mentioned in this embodiment can also be selected from a variety of data frames specified by the 802.11 MAC layer protocol as the packet frame.
  • the Length field as an example, fill in the Length field of different packet frames
  • the group ID is different, where the first grouping frame is filled with the group ID of the first group, the second grouping frame is filled with the group ID of the second group, and so on. It is worth noting that the first packet frame can actually be the aforementioned delivery synchronization frame.
  • the following example is used to illustrate the sending process of the distribution network information of the distribution network device.
  • This example uses the Length field to transmit the distribution network information as an example, and assumes that the second part of the Length field of each distribution network data frame can be filled in
  • the number of characters in the string is 8 bits, which is one byte.
  • the offsets within the group are respectively expressed as: 0x100, 0x180, 0x200, 0x280, 0x300, 0x380, 0x400, 0x480, where:
  • 0x100 indicates the first byte in the group
  • 0x180 indicates the second byte in the group
  • the packet identifiers filled in the Length field of the packet frames sent in sequence are: 0x3E0, 0x3E1, 0x3E2,..., 0x3EF, where:
  • 0x3E0 indicates the first group
  • 0x3E1 indicates the second group
  • the first frame the distribution network synchronization frame is the first packet frame, and the Length field is filled with 0x3E0;
  • 10th frame 2nd packet frame, the Length field is filled with 0x3E1;
  • the 19th frame the 3rd packet frame, the Length field is filled with 0x3E2;
  • the sending can be repeated from the beginning to ensure correct reception.
  • each frame is received by the network-connected device, it parses out the corresponding character string according to the corresponding encoding rule, and replies with the position order of the character string.
  • FIG. 4 is an interaction diagram of a network distribution process provided by an embodiment of the present invention. As shown in FIG. 4, it may include the following steps:
  • the router sends a beacon frame, and the beacon frame includes the SSID and BSSID corresponding to the router.
  • the network-connected device After receiving the beacon frame, the network-connected device stores the correspondence between the SSID and the BSSID.
  • the distribution network device sends a distribution network synchronization frame, and the distribution network synchronization frame includes the MAC address of the distribution network device and the BSSID of the router accessed by the distribution network device.
  • the network access device After the network access device receives the distribution network synchronization frame, it queries the corresponding relationship stored locally according to the BSSID in the distribution network synchronization frame to obtain the corresponding SSID.
  • the network distribution equipment divides the encoded distribution network information into groups, and sequentially sends a grouping frame corresponding to each group and multiple distribution network data frames in the group.
  • the device to be connected to the network parses the received packet frames and network distribution data frames to obtain network distribution information, and connects to the network according to the obtained SSID and network distribution information.
  • the SSID obtaining apparatus of the router will be described in detail below. Those skilled in the art can understand that the SSID acquisition devices of these routers can all be configured by using commercially available hardware components through the steps taught in this solution.
  • FIG. 5 is a schematic structural diagram of a device for obtaining an SSID of a router according to an embodiment of the present invention. As shown in FIG. 5, the device includes: a receiving module 11, a storage module 12, and an obtaining module 13.
  • the receiving module 11 is configured to receive a beacon frame sent by a router, and the beacon frame includes the SSID and BSSID of the router.
  • the storage module 12 is configured to store the correspondence between the SSID and the BSSID.
  • the receiving module 11 is also configured to receive a distribution network synchronization frame sent by a network distribution device, where the distribution network synchronization frame includes the BSSID of the router.
  • the obtaining module 13 is configured to query the correspondence relationship according to the BSSID in the distribution network synchronization frame to obtain the SSID.
  • the length field or the destination MAC address field in the distribution network synchronization frame is filled with a preset character string for identifying the distribution network synchronization frame.
  • the network distribution synchronization frame further includes the MAC address of the network distribution equipment
  • the apparatus may further include: a locking module, configured to lock the network distribution equipment according to the MAC address of the network distribution equipment .
  • the receiving module 11 may also be used to: receive each distribution network data frame sequentially sent by the network distribution device according to the network distribution information corresponding to the router, and each distribution network data frame includes the distribution network At least part of the information in the information, the at least part of the information is carried in the length field or the destination MAC address field of the distribution network data frame.
  • the device may further include: a parsing module for parsing each of the distribution network data frames to obtain the distribution network information.
  • the network distribution information includes or does not include the SSID.
  • the obtaining module 13 is further configured to: replace the SSID parsed from each distribution network data frame with the SSID obtained by the query.
  • the device shown in FIG. 5 can execute the method of the embodiment shown in FIG. 2.
  • the structure of the SSID obtaining device of the router shown in Figure 5 can be implemented as an electronic device, which is a device to be connected to the network that needs to be connected to the network, such as smart home appliances and robots that do not have a network configuration interface. Wait.
  • the electronic device may include: a first processor 21 and a first memory 22.
  • the first memory 22 is used to store a program that supports the electronic device to execute the SSID obtaining method of the router provided in the embodiment shown in FIG. 2, and the first processor 21 is configured to execute the first Programs stored in the memory 22.
  • the program includes one or more computer instructions, wherein, when the one or more computer instructions are executed by the first processor 21, the following steps can be implemented:
  • beacon frame sent by a router, where the beacon frame includes the SSID and BSSID of the router;
  • the first processor 21 is further configured to execute all or part of the steps in the embodiment shown in FIG. 2.
  • the structure of the electronic device may further include a first communication interface 23 for the electronic device to communicate with other devices or a communication network.
  • an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by an electronic device, which includes a program for executing the SSID obtaining method of the router in the method embodiment shown in FIG. 2 above.
  • FIG. 7 is a schematic structural diagram of another device for acquiring an SSID of a router according to an embodiment of the present invention. As shown in FIG. 7, the device includes: a connecting module 31 and a sending module 32.
  • the connection module 31 is used to establish a communication connection with the router.
  • the sending module 32 is configured to send a distribution network synchronization frame, which includes the BSSID of the router, so that the device to be connected to the network that receives the distribution network synchronization frame determines that the BSSID is stored locally , Acquiring the SSID according to the correspondence between the BSSID and the SSID stored locally.
  • the length field or the destination MAC address field in the distribution network synchronization frame is filled with a preset character string for identifying the distribution network synchronization frame.
  • the sending module 32 may also be used to: send each distribution network data frame in turn according to the network distribution information corresponding to the router, and each distribution data frame includes part of the information in the distribution network information to The device to be accessed is allowed to parse the respective distribution network data frames to obtain the distribution network information, and the partial information is carried in the length field or the destination MAC address field of the distribution network data frame.
  • the device may further include: a preprocessing module, configured to encode the network distribution information according to a preset encoding format; and divide the encoded network distribution information into groups. Therefore, optionally, the sending module 32 may also be used to send a packet frame corresponding to each group and multiple distribution network data frames in the group in sequence, and the packet frame includes the group identifier of the corresponding group, and A plurality of distribution network data frames correspond one-to-one with a plurality of character strings included in the corresponding packet, and the plurality of character strings are at least part of the encoded distribution network information; wherein, the distribution network is synchronized
  • the frame is the packet frame of the first packet, and the packet identifier is carried in the length field or the destination MAC address field of the packet frame.
  • the length field or the destination MAC address field in each distribution network data frame includes a corresponding character string and an in-group offset of the corresponding character string.
  • FIG. 9 is a flowchart of a method for acquiring a service set identifier according to an embodiment of the present invention.
  • the method for acquiring a service set identifier may be executed by the device to be accessed as shown in FIG. 1. As shown in Figure 9, the method includes the following steps:
  • 501 Receive a first message sent by a network access device, where the first message includes first channel information and a first service set identifier;
  • the first message may be a terminal provisioning protocol (Device provisioning protocol, DPP) configuration response message (configuration response).
  • the first channel information may be the transmission or reception channel of the beacon frame.
  • the first message may also include an encoding processing identifier.
  • the encoding processing identifier is used to indicate whether the terminal processes the service set identifier (SSID).
  • the encoding process identifier can also be called an encoding status identifier or other names. For example, if the encoding process identifier is 1, the terminal will trigger the encoding process of the SSID. If the encoding process identifier is 0, the terminal does not trigger the encoding process of the SSID.
  • the meaning represented by the value of the encoding process identification can also be reversed.
  • beacon frame Acquire a beacon frame according to the first channel information, where the beacon frame includes a second service set identifier and a second basic service set identifier;
  • the network device to be distributed after receiving the DPP configuration response message sent by the network distribution device, the network device to be distributed will receive the beacon frame on the channel indicated by the first channel information.
  • the network device to be configured may also store the SSID and BSSID carried in the beacon frame in advance. In order to optimize the storage space, the network device to be configured may only save the SSID and BSSID in the latest primary beacon frame.
  • the first service set identifier is the SSID obtained from the DPP configuration response message.
  • the second service set identifier is the SSID obtained from the beacon frame. If the network device to be configured determines whether the coding formats of the first SSID and the second SSID are the same, if they are the same, the network device to be configured will send the same SSID during the process of associating with the access point. If the network device to be configured determines that the encoding format of the first SSID and the second SSID are different, the network device to be configured sends the second SSID during the process of associating with the access point. Optionally, the network device to be configured can find the same BSSID in the DPP configuration response message and in the beacon frame, and find the corresponding first SSID and second SSID through the BSSID.
  • the device shown in FIG. 7 can execute the method of the embodiment shown in FIG. 3, and for parts that are not described in detail in this embodiment, reference may be made to the related description of the embodiment shown in FIG. 3. For the implementation process and technical effects of this technical solution, refer to the description in the embodiment shown in FIG. 3, which will not be repeated here.
  • the structure of the SSID obtaining device of the router shown in FIG. 7 can be implemented as an electronic device, which can be a network distribution device such as a mobile phone, a tablet computer, etc. that has been connected to the network.
  • the electronic device may include: a second processor 41 and a second memory 42.
  • the second memory 42 is used to store a program that supports the electronic device to execute the SSID obtaining method of the router provided in the embodiment shown in FIG. 3, and the second processor 41 is configured to execute the second Programs stored in the memory 42.
  • the program includes one or more computer instructions, and when the one or more computer instructions are executed by the second processor 41, the following steps can be implemented:
  • the distribution network synchronization frame includes the BSSID of the router, so that the device to be connected to the network that has received the distribution network synchronization frame determines that the BSSID is stored locally, according to the locally stored BSSID The corresponding relationship between the BSSID and the SSID is used to obtain the SSID.
  • the second processor 41 is further configured to execute all or part of the steps in the embodiment shown in FIG. 3.
  • the structure of the electronic device may further include a second communication interface 43 for the electronic device to communicate with other devices or a communication network.
  • an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by an electronic device, which includes a program for executing the SSID obtaining method of the router in the method embodiment shown in FIG. 3.
  • the device embodiments described above are merely illustrative.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the objectives of the solutions of the embodiments. Those of ordinary skill in the art can understand and implement it without creative work.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device, and the instruction device implements A function specified in a flow or multiple flows in a flowchart and/or a block or multiple blocks in a block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so that the instructions executed on the computer or other programmable equipment provide Steps used to implement the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • the computing device includes one or more processors (CPU), input/output interfaces, network interfaces, and memory.
  • processors CPU
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-permanent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer readable media.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
  • the information can be computer-readable instructions, data structures, program modules, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices.
  • computer-readable media does not include transitory media, such as modulated data signals and carrier waves.

Landscapes

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

Abstract

本发明实施例提供一种Wi-Fi接入点的SSID获取方法、装置、设备和***,该方法包括:待入网设备接收路由器发送的信标帧,信标帧中包括路由器的SSID和BSSID;存储SSID和BSSID之间的对应关系;接收配网设备发送的配网同步帧,配网同步帧中包括路由器的BSSID;根据配网同步帧中的BSSID查询所述对应关系以获取SSID。从而,即使基于传统的网络配置方案进行SSID和PASSWD的多个字节的逐次发送过程中SSID对应的多个字节在传输过程中有丢失,基于本方案也能正确获得SSID,避免由于不能获取SSID而导致的配网失败问题,从而提高了网络配置的成功率。

Description

一种Wi-Fi接入点的SSID获取方法、装置、设备和***
本申请要求2019年07月30日递交的申请号为201910695885.4、发明名称为“路由器的SSID获取方法、装置、设备和***”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及通信技术领域,尤其涉及一种Wi-Fi接入点的SSID获取方法、装置、设备和***。
背景技术
现在的智能设备,以WiFi品类居多,比如智能插座、智能空调、智能空气净化器等。为保证这些智能设备的正常使用,首先需要将这些智能设备连接入网。由于家庭WiFi网络的普及,目前普遍采用WiFi网络与路由器(也可以称为接入点)完成连接,进而与手机/云端进行数据交互。
但是,由于这些智能设备没有人机交互界面,不具有像电脑、手机上可以展示的搜索、选择指定路由器以及输入连接密码的配置界面,从而不能自主地完成网络配置,因此,必须先解决智能设备正确连接路由器的问题。
发明内容
本发明实施例提供一种Wi-Fi接入点的SSID获取方法、装置、设备和***,用以提高网络配置的成功率。
第一方面,本发明实施例提供一种路由器的SSID获取方法,应用于待入网设备,该方法包括:
接收路由器发送的信标帧,所述信标帧中包括所述路由器的SSID和BSSID;
存储所述SSID和所述BSSID之间的对应关系;
接收配网设备发送的配网同步帧,所述配网同步帧中包括所述路由器的BSSID;
根据所述配网同步帧中的所述BSSID查询所述对应关系以获取所述SSID。
第二方面,本发明实施例提供一种路由器的SSID获取装置,应用于待入网设备,包括:
接收模块,用于接收路由器发送的信标帧,所述信标帧中包括所述路由器的SSID和 BSSID;
存储模块,用于存储所述SSID和所述BSSID之间的对应关系;
所述接收模块,还用于接收配网设备发送的配网同步帧,所述配网同步帧中包括所述路由器的BSSID;
获取模块,用于根据所述配网同步帧中的所述BSSID查询所述对应关系以获取所述SSID。
第三方面,本发明实施例提供一种电子设备,该电子设备包括第一处理器和第一存储器,所述第一存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述第一处理器执行时实现上述第一方面中的路由器的SSID获取方法。
本发明实施例提供了一种计算机存储介质,用于储存计算机程序,所述计算机程序使计算机执行时实现上述第一方面中的路由器的SSID获取方法。
第四方面,本发明实施例提供一种路由器的SSID获取方法,应用于配网设备,该方法包括:
与路由器建立通信连接;
发送配网同步帧,所述配网同步帧中包括所述路由器的BSSID,以使接收到所述配网同步帧的待入网设备在确定本地已存储有所述BSSID后,根据本地存储的所述BSSID和SSID的对应关系获取所述SSID。
第五方面,本发明实施例提供一种路由器的SSID获取装置,应用于配网设备,包括:
连接模块,用于与路由器建立通信连接;
发送模块,用于发送配网同步帧,所述配网同步帧中包括所述路由器的BSSID,以使接收到所述配网同步帧的待入网设备在确定本地已存储有所述BSSID后,根据本地存储的所述BSSID和SSID的对应关系获取所述SSID。
第六方面,本发明实施例提供一种电子设备,该电子设备包括第二处理器和第二存储器,所述第二存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述第二处理器执行时实现上述第四方面中的路由器的SSID获取方法。
本发明实施例提供了一种计算机存储介质,用于储存计算机程序,所述计算机程序使计算机执行时实现上述第四方面中的路由器的SSID获取方法。
第七方面,本发明实施例提供一种路由器的SSID获取***,包括:
配网设备、路由器和待入网设备;
所述路由器,用于发送信标帧,所述信标帧中包括所述路由器的SSID和BSSID;
所述配网设备,用于发送配网同步帧,所述配网同步帧中包括所述路由器的BSSID;
所述待入网设备,用于根据接收到的所述信标帧存储所述SSID和所述BSSID之间的对应关系,以及根据所述配网同步帧中的所述BSSID查询所述对应关系以获取所述SSID。
第八方面,本发明实施例提供一种服务集标识获取的方法,应用于待入网设备,包括:
接收入网设备发送的第一消息,所述第一消息包括第一信道信息以及第一服务集标识;
根据第一信道信息获取信标帧,所述信标帧包括第二服务集标识以及第二基础服务集标识;
根据所述第一服务集标识以及所述第二服务集标识确定目标服务集标识。
本发明实施例中,路由器对应的WiFi网络的网络名称可以用服务集标识(Service Set Identifier,简称SSID)来表示,路由器的地址信息可以用基础服务集标识(Basic Service Set Identifier,简称BSSID)来表示。在无线局域网中,BSSID即为无线路由器的介质访问控制(Media Access Control,简称MAC)地址,SSID即为无线网络的网络名称。本发明实施例中,路由器的SSID即是指路由器对应的WiFi网络的网络名称。
在本发明实施例中,诸如手机等配网设备可以与路由器预先建立连接,即配网设备已经联网,诸如智能家电等待入网设备还未联网,在配网设备对待入网设备进行网络配置的过程中,待入网设备需要获取该路由器的SSID亦即手机所接入的WiFi网络的网络名称,当然,待入网设备还需要获得网络的接入密码(PASSWD)等信息,只是PASSWD等信息可以采用传统方式获得。在本发明方案中,待入网设备也可以是待配网设备。待配网设备可以是智能家居设备(如常用的需要接入互联网的白电、小家电、照明等等),接入点,各种传感器设备等。针对路由器的SSID的获取,一方面,路由器可以以一定时间间隔不断广播发出信标帧,信标帧中包括自己的SSID和BSSID,从而,接收到该信标帧的待入网设备解析该信标帧以存储SSID和BSSID之间的对应关系,另一方面,配网设备在对待入网设备进行网络配置时,可以广播发送配网同步帧,配网同步帧中包括配网设备所接入的路由器的BSSID。基于此,待入网设备收到配网同步帧后,根据其中包含的BSSID查询本地存储的各对应关系,若本地存储有与该BSSID对应的对应关系,则根据该对应关系直接获取该BSSID对应的SSID即可,从而,即使基于传统的网络配置方案进行SSID和PASSWD的多个字节的逐次发送过程中SSID对应的多个字节在传输过程中有丢失,基于本方案也能正确获得SSID,避免由于不能获取SSID而导致的配网失败问题, 从而提高了网络配置的成功率。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种路由器的SSID获取***的组成示意图;
图2为本发明实施例提供的一种路由器的SSID获取方法的流程图;
图3为本发明实施例提供的另一种路由器的SSID获取方法的流程图;
图4为本发明实施例提供的一种配网过程的交互图;
图5为本发明实施例提供的一种路由器的SSID获取装置的结构示意图;
图6为与图5所示实施例提供的路由器的SSID获取装置对应的电子设备的结构示意图;
图7为本发明实施例提供的另一种路由器的SSID获取装置的结构示意图;
图8为与图7所示实施例提供的路由器的SSID获取装置对应的电子设备的结构示意图;
图9为本发明实施例提供了一种服务集标识获取方法的流程图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
在本发明实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明。在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义,“多种”一般包含至少两种,但是不排除包含至少一种的情况。
应当理解,本文中使用的术语“和/或”仅仅是一种描述关联对象的关联关系,表示 可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
取决于语境,如在此所使用的词语“如果”、“若”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的商品或者***不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种商品或者***所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的商品或者***中还存在另外的相同要素。
另外,下述各方法实施例中的步骤时序仅为一种举例,而非严格限定。
在介绍本发明实施例提供的网络配置方案之前,先对传统的采用SmartConfig模式进行网络配置的过程中容易导致的配网失败问题进行说明。
首先,在一种由配网设备、路由器、待入网设备构成的典型的配网***下,配网设备比如可以是手机、待入网设备比如可以是智能家电,配网设备已经与路由器建立连接,即配网设备已经接入WiFi网络,配网设备需要对作为信息孤岛的待入网设备进行网络配置,即将包含路由器的网络名称即SSID、接入密码即PASSWD以及一些辅助信息(比如SSID长度、PASSWD的长度、CRC、Flag等等)的配网信息传输给待入网设备,以使待入网设备基于这些配网信息接入路由器亦即接入WiFi网络。
目前,SmartConfig模式主要采用802.11和802.2的长度(Length)字段或目的MAC地址(Destination)字段来传输这些配网信息。以采用Length字段传输配网信息来说,受限于Length字段能够承载的比特位数(12个比特位),配网设备在对配网信息进行编码后,由于编码后得到的比特位数远远高于Length字段能够承载的位数,因此,为完成配网信息的完整传输,配网设备需要发送若干个配网数据帧才行,每个配网数据帧中包含一个Length字段。实际上,Length字段的12个比特位往往不能完全被用于进行配网信息的传输,为描述方面,假设每次只能传输8个比特即一个字节。假设SSID和PASSWD的长度都为12个字节,辅助信息长度为6个字节,那么至少需要发送30个配网数据帧才能完整地发送完配网信息。
但是,如果这30个字节中的任何一个字节在传输过程中丢失都将使得待入网设备无 法正确解析出路由器的SSID和PASSWD,从而无法接入网络,配网失败。由于每一个字节丢失的概率大致相同,所以理论上相同的时间内,SSID和PASSWD的长度越长,出错的概率越高,正确解析路由器的SSID和PASSWD的概率同样越低。
基于此,如果SSID可以自动补齐,相当于不传输SSID,可以有效减少真实的传输长度,进而提高配网成功率。从而,本发明实施例提供了一种自动获取路由器的SSID的方案,配网过程中可以有效减少需传输字节数(如果SSID和PASSWD长度相同,不考虑辅助信息,相当于将传输的字节长度减少为原来长度的50%),进而提高配网的效率和成功率。
下面结合如下的一些实施例对本发明实施例提供的自动获取路由器的SSID的方案进行介绍。
图1为本发明实施例提供的一种路由器的SSID获取***的组成示意图,如图1所示,该***可以包括:配网设备、路由器和待入网设备。
路由器,用于发送信标帧,信标帧中包括路由器的SSID和BSSID。
配网设备,用于发送配网同步帧,配网同步帧中包括路由器的BSSID。
待入网设备,用于根据接收到的信标帧存储SSID和BSSID之间的对应关系,以及根据配网同步帧中的BSSID查询该对应关系以获取SSID。
图1所示***中,配网设备可以是手机等用户终端,该配网设备可以通过与路由器建立连接而接入WiFi网络,或者,该配网设备也可以通过与其他入网设备连接而接入网络,但是该配网设备以某种方式获得了上述路由器的诸如SSID、BSSID等信息。待入网设备可以是诸如智能冰箱、智能音箱、机器人等终端。配网设备中安装有与待入网设备对应的App,在日常应用中,通过该App用户对该待入网设备进行控制,比如对机器人进行开关控制、行走路线控制等。
在用户通过配网设备对待入网设备进行网络配置的过程中,首先,用户通过操作配网设备将配网设备接入WiFi网络即与路由器建立连接,之后,通过操作待入网设备对应的App来触发对待入网设备的网络配置,比如点击App界面中的“网络配置”按钮以触发网络配置过程。
基于用户的触发,配网设备可以先广播发送一次或多次配网同步帧。由于在802.11的MAC层协议中规定了多种类型的数据帧,因此,本发明实施例中的配网同步帧可以选自802.11的MAC层协议中规定的多种类型的数据帧中的任一种,将选择出的数据帧中的Length字段或Destination字段填充用于标识该数据帧作为配网同步帧的字符串。也就 是说,将Length字段中填充为预设值亦即预设长度的数据帧作为配网同步帧。
可以理解的是,由于是从多种数据帧中选择一种作为配网同步帧的,配网同步帧中除了包含被填充有预设的字符串的Length字段外,还会包含数据帧中本来就包含的其他字段,比如源MAC地址字段、BSSID字段等等,因此,在配网同步帧中还会包括配网设备所接入的路由器的BSSID以及配网设备的MAC地址等明文信息。
当待入网设备接收到配网设备发送的配网同步帧后,根据Length字段中填充的预设字符串得知接收到的是配网同步帧,从而可以从中解析出路由器的BSSID、配网设备的MAC地址等信息。
其中,根据该配网设备的MAC地址,待入网设备可以锁定配网设备,即得知发送端是谁。
综上,基于接收到的配网同步帧,待入网设备可以锁定配网设备,并且知道该配网设备所接入的路由器的BSSID。
另一方面,配网设备所连接的路由器会按照一定的时间间隔(比如100毫秒)对外广播发送信标帧(beacon帧),该beacon帧中包含路由器的BSSID和SSID。接收到该信标帧的待入网设备把接收到的路由器的SSID和BSSID对应存储下来。比如,待入网设备可以维护一个路由器列表,该列表中存储有待入网设备接收的各个beacon帧中所携带的一对SSID和BSSID。
基于此,对于待入网设备来说,如果其一旦根据配网同步帧得到了某路由器的BSSID,就可以根据该BSSID去查找当前的路由器列表,如果路由器列表中包含了该BSSID与某个SSID之间的对应关系,则可以直接基于该对应关系获取到该路由器的SSID。
为实现待入网设备的入网,待入网设备不仅要获得路由器的SSID,至少还需要获取PASSWD,PASSWD的获取过程可以采用传统的SmartConfig模式实现,从而与传统配网方式兼容。传统的SmartConfig模式,如前文所述,就是对配网信息进行编码,之后通过逐次发送配网数据帧进行编码后的配网信息的传输。详细的传输过程后续实施例中介绍。
综上,一方面,即使后续配网设备还是按照传统的方式发送包含SSID和PASSWD等的配网信息,该配网信息在传输过程中如果SSID对应的多个字节发生丢失等异常,也不会影响待入网设备对SSID的正确获取。
另一方面,由于通过这种方式可以获得SSID,则可选地,后续配网设备在发送配网信息时,可以不用再发送SSID。也就是说,配网过程中相当于只需要传输PASSWD字段和辅助信息就可以达到配网的目的。如果SSID和PASSWD的长度相等,辅助信息的长度 较短,理论上配网效率会提升将近一倍,配网成功率也会得到显著提高。
下面分别以配网设备、待入网设备的角度对本发明实施例提供的路由器的SSID获取方法进行详细介绍。
图2为本发明实施例提供的一种路由器的SSID获取方法的流程图,该路由器的SSID获取方法可以由图1所示的待入网设备来执行。如图2所示,该方法包括如下步骤:
201、接收路由器发送的信标帧,信标帧中包括路由器的SSID和BSSID。
202、存储SSID和BSSID之间的对应关系。
203、接收配网设备发送的配网同步帧,配网同步帧中包括路由器的BSSID。
204、根据配网同步帧中的BSSID查询所述对应关系以获取SSID。
如前文所述,配网同步帧中的长度字段(即Length字段)或目的MAC地址字段(即Destination字段)填充有预设的用于标识配网同步帧的字符串。从而,待入网设备解析出该预设字符串得知接收到的是配网同步帧,解析出其中包含的路由器的BSSID,基于该BSSID查询本地存储的对应关系,得到对应的SSID。
上述步骤的执行过程的详细描述可以参加前文实施例中的说明,在此不赘述。
另外,如前文所述,上述配网同步帧中还可以包括配网设备的MAC地址,从而,待入网设备可以根据配网设备的MAC地址锁定配网设备。锁定配网设备是指待入网设备记录下是哪个配网设备发送的配网同步帧,而配网设备可以用其MAC地址来唯一标识,从而,相当于是记录下配网设备的MAC地址与其发送的配网同步帧中的BSSID之间的对应关系。另外,通过锁定配网设备,待入网设备也知道后续需要接收谁发送的配网信息,即需要接收该配网设备发送的配网信息。
如前文所述,如果考虑与现有的SmartConfig模式兼容,后续配网设备发送的配网信息中可以包括路由器的SSID、PASSWD以及辅助信息。但是,如果不考虑兼容问题,后续配网设备发送的配网信息中可以仅包括PASSWD以及辅助信息,而不包括SSID。
简单来说,配网设备在发送配网信息时,可以从802.11的MAC层协议中所规定的多种数据帧中选择一种用于进行配网信息的发送,本发明实施例中,将选择出的用于进行配网信息发送的数据帧称为配网数据帧,在配网数据帧的Length字段或Destination字段来传输这些配网信息。
以使用Length字段来传输配网信息为例,受限于该Length字段能够承载的比特位数,每个配网数据帧中仅能够填充配网信息中的部分信息,可以理解的是,该部分信息是指对完整的配网信息进行编码后得到的完整比特字符串中的部分,从而,配网设备将 需要依次发送多个配网数据帧才能完成配网信息的发送。
基于此,待入网设备接收配网设备根据路由器对应的配网信息依次发送的各配网数据帧,通过解析每个配网数据帧中包括的配网信息中的部分信息,最终获得该路由器的配网信息,基于得到的配网信息连接入网。
可以理解的是,如果该配网信息中包含有路由器对应的SSID,而在发送该SSID的过程中,可能需要使用多个配网数据帧,如果其中的任一配网数据帧丢失,对于待入网设备来说并无影响,因为待入网设备已经基于配网设备发送的配网同步帧和路由器发送的信标帧得到了路由器对应的SSID。这也就意味着,即使配网数据帧中包括路由器的SSID,使得待入网设备可以从中解析出该SSID,待入网设备也会以根据BSSID查询得到的SSID替换掉从配网数据帧中解析得到的SSID。
图3为本发明实施例提供的另一种路由器的SSID获取方法的流程图,该路由器的SSID获取方法可以由图1所示的配网设备来执行。如图3所示,可以包括如下步骤:
301、与路由器建立通信连接。
302、发送配网同步帧,配网同步帧中包括路由器的BSSID,以使接收到配网同步帧的待入网设备在确定本地已存储有该BSSID后,根据本地存储的该BSSID和SSID的对应关系获取该SSID。
其中,配网同步帧中的长度字段或目的MAC地址字段填充有预设的用于标识配网同步帧的字符串,以供待入网设备据此识别该配网同步帧。
配网设备发送配网同步帧的过程可以参加前文实施例中的说明,在此不赘述。
另外,配网设备在发送完配网同步帧后,根据路由器对应的配网信息依次发送各配网数据帧,每个配网数据帧中包括配网信息中的部分信息,以使待入网设备解析各配网数据帧以获得配网信息,其中,每个配网数据帧中包含的部分信息承载于配网数据帧的长度字段即Length字段或目的MAC地址字段即Destination字段。
其中,在进行配网数据帧的发送过程中,可选地,配网设备可以按照如下方式进行发送:
根据预设编码格式,对配网信息进行编码;
对编码后的配网信息进行分组划分;
依次发送每个分组对应的分组帧和多个配网数据帧,分组帧中包括对应分组的分组标识,多个配网数据帧与对应分组内包括的多个字符串一一对应,该多个字符串是编码后的配网信息中的至少一部分信息;
其中,前述配网同步帧作为第一个分组的分组帧。
其中,分组标识承载于分组帧的Length字段或Destination字段中。
其中,每个配网数据帧中的Length字段或Destination字段中包括对应字符串和所述对应字符串的组内偏移量。也就是说,以Length字段为例,Length字段占12比特位,可以将这12比特位划分为两个部分,其中的第一部分为用于填充组内偏移量,第二部分用于填充配网信息中的部分信息即对应于该部分信息的一定长度的字符串。实际应用中,可以根据实际需求灵活划分这两个部分各自占用的位数。
从而,编码配网信息后得到完整的配网信息对应的比特位序列,上述对编码后的配网信息进行分组的过程就是:根据上述第二部分所占用的比特位数对该编码后得到的比特位序列进行划分,得到若干字符串,每个字符串需要用一个配网数据帧来传输;另外,为了保证待入网设备能够知道各配网数据帧的发送顺序,需要对每个配网数据帧进行序号标记,而本实施例中,通过分组标识和组内偏移量来进行配网数据帧的序号标记亦即是对配网数据帧中包含的字符串进行序号标记。
其中,本实施例中提到的分组帧,也可以从802.11的MAC层协议所规定的多种数据帧中选择一种用作分组帧,以Length字段为例,不同分组帧的Length字段中填充的分组标识不同,其中,第一个分组帧中填充的是第一个分组的分组标识,第二个分组帧中填充的是第二个分组的分组标识,依次类推。值得说明的是,第一个分组帧其实就可以是前述配送同步帧。
下面以如下示例来示意配网设备的配网信息的发送过程,该示例以用Length字段来进行配网信息的传输为例,并且假设每个配网数据帧的Length字段中第二部分可以填充的字符串位数为8位即一个字节。
假设完整的配网信息经过编码后包括以下字节:
12 0F 0C 00 34 4D 41 4C 4C 00 32 4F 55 54 45 52 0D 08
假设每8个字节分成一组,那么总共分成如下三组:
第1组:12 0F 0C 00 34 4D 41 4C
第2组:00 32 4F 55 54 45 52 0D
第3组:08
组内偏移量分别表示为:0x100,0x180,0x200,0x280,0x300,0x380,0x400,0x480,其中:
0x100:表示组内第1个字节
0x180:表示组内第2个字节
……
以此类推。
另外,假设依次发送的分组帧的Length字段中各自填充的分组标识为:0x3E0,0x3E1,0x3E2,…….,0x3EF,其中:
0x3E0:表示第1个分组
0x3E1:表示第2个分组
……
以此类推。
基于上述假设情况,配网设备的发送过程为:
第1个帧:配网同步帧亦即第1个分组帧,Length字段中填充为0x3E0;
第2个帧:第1个分组内的第1个配网数据帧,Length字段中填充为0x100+0x12=0x112;其中,Length字段被划分为+号之前的第一部分和之后第二部分;
第3个帧:第1个分组内的第2个配网数据帧,Length字段中填充为0x180+0x0F=0x18F;
第4个帧:第1个分组内的第3个配网数据帧,Length字段中填充为0x200+0x0C=0x20C;
第5个帧:第1个分组内的第4个配网数据帧,Length字段中填充为0x280+0x00=0x280;
第6个帧:第1个分组内的第5个配网数据帧,Length字段中填充为0x300+0x34=0x334;
第7个帧:第1个分组内的第6个配网数据帧,Length字段中填充为0x380+0x4D=0x3CD;
第8个帧:第1个分组内的第7个配网数据帧,Length字段中填充为0x400+0x41=0x441;
第9个帧:第1个分组内的第8个配网数据帧,Length字段中填充为0x480+0x4C=0x4CC;
第10个帧:第2个分组帧,Length字段中填充为0x3E1;
第11个帧:第2个分组内的第1个配网数据帧,Length字段中填充为0x100+0x00=0x100;
第12个帧:第2个分组内的第2个配网数据帧,Length字段中填充为0x180+0x32=0x1B2;
第13个帧:第2个分组内的第3个配网数据帧,Length字段中填充为0x200+0x4F=0x24F;
第14个帧:第2个分组内的第4个配网数据帧,Length字段中填充为0x280+0x55=0x2D5;
第15个帧:第2个分组内的第5个配网数据帧,Length字段中填充为0x300+0x54=0x354;
第16个帧:第2个分组内的第6个配网数据帧,Length字段中填充为0x380+0x45=0x3C5;
第17个帧:第2个分组内的第7个配网数据帧,Length字段中填充为0x400+0x52=0x452;
第18个帧:第2个分组内的第8个配网数据帧,Length字段中填充为0x480+0x0D=0x48D;
第19个帧:第3个分组帧,Length字段中填充为0x3E2;
第20个帧:第3个分组内的第1个配网数据帧,Length字段中填充为0x100+0x08=0x108。
可选地,所有的字节发送完后,可以再从头重复发送,以保证正确接收。
基于该发送过程,待入网设备每接收到一帧后,按照相应的编码规则解析出相应的字符串,并回复字符串的位置顺序即可。
图4为本发明实施例提供的一种配网过程的交互图,如图4所示,可以包括如下步骤:
401、路由器发送信标帧,信标帧中包括路由器对应的SSID和BSSID。
402、待入网设备接收到信标帧后,存储SSID和BSSID之间的对应关系。
403、配网设备发送配网同步帧,配网同步帧中包括配网设备的MAC地址和配网设备接入的路由器的BSSID。
404、待入网设备接收到配网同步帧后,根据配网同步帧中的BSSID查询本地存储的对应关系以获得对应的SSID。
405、配网设备对编码后的配网信息进行分组划分,依次发送每个分组对应的分组帧和组内的多个配网数据帧。
406、待入网设备解析接收到的各分组帧和配网数据帧以获得配网信息,根据已获得的SSID和配网信息连接入网。
以下将详细描述本发明的一个或多个实施例的路由器的SSID获取装置。本领域技术人员可以理解,这些路由器的SSID获取装置均可使用市售的硬件组件通过本方案所教导的步骤进行配置来构成。
图5为本发明实施例提供的一种路由器的SSID获取装置的结构示意图,如图5所示,该装置包括:接收模块11、存储模块12、获取模块13。
接收模块11,用于接收路由器发送的信标帧,所述信标帧中包括所述路由器的SSID和BSSID。
存储模块12,用于存储所述SSID和所述BSSID之间的对应关系。
所述接收模块11,还用于接收配网设备发送的配网同步帧,所述配网同步帧中包括所述路由器的BSSID。
获取模块13,用于根据所述配网同步帧中的所述BSSID查询所述对应关系以获取所述SSID。
可选地,所述配网同步帧中的长度字段或目的MAC地址字段填充有预设的用于标识配网同步帧的字符串。
可选地,所述配网同步帧中还包括所述配网设备的MAC地址,所述装置还可以包括:锁定模块,用于根据所述配网设备的MAC地址,锁定所述配网设备。
可选地,所述接收模块11还可以用于:接收所述配网设备根据所述路由器对应的配网信息依次发送的各配网数据帧,每个配网数据帧中包括所述配网信息中的至少一部分信息,所述至少一部分信息承载于配网数据帧的长度字段或目的MAC地址字段。所述装置还可以包括:解析模块,用于解析所述各配网数据帧以获得所述配网信息。
可选地,所述配网信息中包括或不包括所述SSID。
可选地,所述获取模块13还用于:以查询获得的所述SSID替换从所述各配网数据帧中解析出的SSID。
图5所示装置可以执行图2所示实施例的方法,本实施例未详细描述的部分,可参考对图2所示实施例的相关说明。该技术方案的执行过程和技术效果参见图2所示实施例中的描述,在此不再赘述。
在一个可能的设计中,图5所示路由器的SSID获取装置的结构可实现为一电子设备,该电子设备是需要连接入网的待入网设备,比如可以是不具有入网配置界面的智能家电、 机器人等。如图6所示,该电子设备可以包括:第一处理器21和第一存储器22。其中,所述第一存储器22用于存储支持电子设备执行上述图2所示实施例中提供的路由器的SSID获取方法的程序,所述第一处理器21被配置为用于执行所述第一存储器22中存储的程序。
所述程序包括一条或多条计算机指令,其中,所述一条或多条计算机指令被所述第一处理器21执行时能够实现如下步骤:
接收路由器发送的信标帧,所述信标帧中包括所述路由器的SSID和BSSID;
存储所述SSID和所述BSSID之间的对应关系;
接收配网设备发送的配网同步帧,所述配网同步帧中包括所述路由器的BSSID;
根据所述配网同步帧中的所述BSSID查询所述对应关系以获取所述SSID。
可选地,所述第一处理器21还用于执行前述图2所示实施例中的全部或部分步骤。
其中,所述电子设备的结构中还可以包括第一通信接口23,用于电子设备与其他设备或通信网络通信。
另外,本发明实施例提供了一种计算机存储介质,用于储存电子设备所用的计算机软件指令,其包含用于执行上述图2所示方法实施例中路由器的SSID获取方法所涉及的程序。
图7为本发明实施例提供的另一种路由器的SSID获取装置的结构示意图,如图7所示,该装置包括:连接模块31、发送模块32。
连接模块31,用于与路由器建立通信连接。
发送模块32,用于发送配网同步帧,所述配网同步帧中包括所述路由器的BSSID,以使接收到所述配网同步帧的待入网设备在确定本地已存储有所述BSSID后,根据本地存储的所述BSSID和SSID的对应关系获取所述SSID。
可选地,所述配网同步帧中的长度字段或目的MAC地址字段填充有预设的用于标识配网同步帧的字符串。
可选地,所述发送模块32还可以用于:根据所述路由器对应的配网信息依次发送各配网数据帧,每个配网数据帧中包括所述配网信息中的部分信息,以使所述待入网设备解析所述各配网数据帧以获得所述配网信息,所述部分信息承载于配网数据帧的长度字段或目的MAC地址字段。
可选地,该装置还可以包括:预处理模块,用于根据预设编码格式,对所述配网信息进行编码;对编码后的配网信息进行分组划分。从而,可选地,所述发送模块32还可 以用于:依次发送每个分组对应的分组帧和组内的多个配网数据帧,所述分组帧中包括对应分组的分组标识,所述多个配网数据帧与所述对应分组内包括的多个字符串一一对应,所述多个字符串是所述编码后的配网信息中的至少一部分信息;其中,所述配网同步帧作为第一个分组的分组帧,所述分组标识承载于分组帧的长度字段或目的MAC地址字段中。
可选地,每个配网数据帧中的长度字段或目的MAC地址字段中包括对应字符串和所述对应字符串的组内偏移量。
图9为本发明实施例提供的一种服务集标识获取的方法的流程图,该服务集标识的获取方法可以由图1所示的待入网设备来执行。如图9所示,该方法包括如下步骤:
501、接收入网设备发送的第一消息,所述第一消息包括第一信道信息以及第一服务集标识;
具体的,第一消息可以是终端配网协议(Device provisioning protocol,DPP)配置应答消息(configuration response)。第一信道信息可以是信标帧的发送或者接收信道。可选的,第一消息还可以包括编码处理标识。编码处理标识用于指示终端是否对服务集标识(SSID)进行处理。编码处理标识也可以叫做编码状态标识或者其他名称。例如,如果编码处理标识为1,则终端将触发SSID的编码处理。如果编码处理标识为0,则终端不触发SSID的编码处理。可选的,编码处理标识的值代表的含义也可以相反。
502、根据第一信道信息获取信标帧,所述信标帧包括第二服务集标识以及第二基础服务集标识;
具体的,待配网设备在接收到配网设备发送的DPP配置应答消息后,将在第一信道信息所指示的信道来接收信标帧。可选的,待配网设备也可以事先存储信标帧中携带的SSID以及BSSID。为了优化的存储空间,待配网设备可以只保存最新的一次信标帧中的SSID以及BSSID。
503、根据所述第一服务集标识以及所述第二服务集标识确定目标服务集标识。
具体的,第一服务集标识为从DPP配置应答消息中获取的SSID。第二服务集标识为从信标帧中获取的SSID。如果待配网设备判断第一SSID和第二SSID的编码格式是否相同,如果相同,则待配网设备会在关联接入点的过程中发送相同的SSID。如果待配网设备判断第一SSID和第二SSID的编码格式不同,则待配网设备会在关联接入点的过程中发送第二SSID。可选的,待配网设备可以找到DPP配置应答消息中和在信标帧中相同的BSSID,并且通过BSSID来找到对应的第一SSID以及第二SSID。
图7所示装置可以执行图3所示实施例的方法,本实施例未详细描述的部分,可参考对图3所示实施例的相关说明。该技术方案的执行过程和技术效果参见图3所示实施例中的描述,在此不再赘述。
在一个可能的设计中,图7所示路由器的SSID获取装置的结构可实现为一电子设备,该电子设备可以是诸如手机、平板电脑等已经接入网络的配网设备等。如图8所示,该电子设备可以包括:第二处理器41和第二存储器42。其中,所述第二存储器42用于存储支持电子设备执行上述图3所示实施例中提供的路由器的SSID获取方法的程序,所述第二处理器41被配置为用于执行所述第二存储器42中存储的程序。
所述程序包括一条或多条计算机指令,其中,所述一条或多条计算机指令被所述第二处理器41执行时能够实现如下步骤:
与路由器建立通信连接;
发送配网同步帧,所述配网同步帧中包括所述路由器的BSSID,以使接收到所述配网同步帧的待入网设备在确定本地已存储有所述BSSID后,根据本地存储的所述BSSID和SSID的对应关系获取所述SSID。
可选地,所述第二处理器41还用于执行前述图3所示实施例中的全部或部分步骤。
其中,所述电子设备的结构中还可以包括第二通信接口43,用于电子设备与其他设备或通信网络通信。
另外,本发明实施例提供了一种计算机存储介质,用于储存电子设备所用的计算机软件指令,其包含用于执行上述图3所示方法实施例中路由器的SSID获取方法所涉及的程序。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助加必需的通用硬件平台的方式来实现,当然也可以通过硬件和软件结合的方式来实现。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以计算机产品的形式体现出来,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算 机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编设备的处理器以产生一个机器,使得通过计算机或其他可编程设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitorymedia),如调制的数据信号和载波。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管 参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (18)

  1. 一种路由器的SSID获取方法,其特征在于,应用于待入网设备,包括:
    接收路由器发送的信标帧,所述信标帧中包括所述路由器的SSID和BSSID;
    存储所述SSID和所述BSSID之间的对应关系;
    接收配网设备发送的配网同步帧,所述配网同步帧中包括所述路由器的BSSID;
    根据所述配网同步帧中的所述BSSID查询所述对应关系以获取所述SSID。
  2. 根据权利要求1所述的方法,其特征在于,所述配网同步帧中的长度字段或目的MAC地址字段填充有预设的用于标识配网同步帧的字符串。
  3. 根据权利要求1所述的方法,其特征在于,所述配网同步帧中还包括所述配网设备的MAC地址,所述方法还包括:
    根据所述配网设备的MAC地址,锁定所述配网设备。
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:
    接收所述配网设备根据所述路由器对应的配网信息依次发送的各配网数据帧,每个配网数据帧中包括所述配网信息中的至少一部分信息,所述至少一部分信息承载于配网数据帧的长度字段或目的MAC地址字段;
    解析所述各配网数据帧以获得所述配网信息。
  5. 根据权利要求4所述的方法,其特征在于,所述配网信息中包括或不包括所述SSID。
  6. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    以查询获得的所述SSID替换从所述配网设备发送的各配网数据帧中解析出的SSID。
  7. 一种路由器的SSID获取方法,其特征在于,应用于配网设备,包括:
    与路由器建立通信连接;
    发送配网同步帧,所述配网同步帧中包括所述路由器的BSSID,以使接收到所述配网同步帧的待入网设备在确定本地已存储有所述BSSID后,根据本地存储的所述BSSID和SSID的对应关系获取所述SSID。
  8. 根据权利要求7所述的方法,其特征在于,所述配网同步帧中的长度字段或目的MAC地址字段填充有预设的用于标识配网同步帧的字符串。
  9. 根据权利要求7所述的方法,其特征在于,所述方法还包括:
    根据所述路由器对应的配网信息依次发送各配网数据帧,每个配网数据帧中包括所 述配网信息中的部分信息,以使所述待入网设备解析所述各配网数据帧以获得所述配网信息,所述部分信息承载于配网数据帧的长度字段或目的MAC地址字段。
  10. 根据权利要求9所述的方法,其特征在于,所述根据所述路由器对应的配网信息依次发送各配网数据帧,包括:
    根据预设编码格式,对所述配网信息进行编码;
    对编码后的配网信息进行分组划分;
    依次发送每个分组对应的分组帧和组内的多个配网数据帧,所述分组帧中包括对应分组的分组标识,所述多个配网数据帧与所述对应分组内包括的多个字符串一一对应,所述多个字符串是所述编码后的配网信息中的至少一部分信息;
    其中,所述配网同步帧作为第一个分组的分组帧,所述分组标识承载于分组帧的长度字段或目的MAC地址字段中。
  11. 根据权利要求10所述的方法,其特征在于,每个配网数据帧中的长度字段或目的MAC地址字段中包括对应字符串和所述对应字符串的组内偏移量。
  12. 一种路由器的SSID获取装置,其特征在于,应用于待入网设备,所述装置包括:
    接收模块,用于接收路由器发送的信标帧,所述信标帧中包括所述路由器的SSID和BSSID;
    存储模块,用于存储所述SSID和所述BSSID之间的对应关系;
    所述接收模块,还用于接收配网设备发送的配网同步帧,所述配网同步帧中包括所述路由器的BSSID;
    获取模块,用于根据所述配网同步帧中的所述BSSID查询所述对应关系以获取所述SSID。
  13. 一种电子设备,其特征在于,包括:存储器、处理器;其中,
    所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行时实现如权利要求1至6中任一项所述的路由器的SSID获取方法。
  14. 一种路由器的SSID获取装置,其特征在于,应用于配网设备,所述装置包括:
    连接模块,用于与路由器建立通信连接;
    发送模块,用于发送配网同步帧,所述配网同步帧中包括所述路由器的BSSID,以使接收到所述配网同步帧的待入网设备在确定本地已存储有所述BSSID后,根据本地存储的所述BSSID和SSID的对应关系获取所述SSID。
  15. 一种服务集标识获取的方法,其特征在于,应用于待入网设备,包括:
    接收入网设备发送的第一消息,所述第一消息包括第一信道信息以及第一服务集标识;
    根据第一信道信息获取信标帧,所述信标帧包括第二服务集标识以及第二基础服务集标识;
    根据所述第一服务集标识以及所述第二服务集标识确定目标服务集标识。
  16. 根据权利要求15所述的方法,其特征在于,所述方法还包括:
    所述第一消息还包括第一基础服务集标识,所述待入网设备根据所述第一服务集标识,所述第一服务集标识,所述第二服务集标识以及所述第二服务集标识确定所述目标服务集标识。
  17. 一种电子设备,其特征在于,包括:存储器、处理器;其中,
    所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行时实现如权利要求7至11中任一项所述的路由器的SSID获取方法。
  18. 一种路由器的SSID获取***,其特征在于,包括:配网设备、路由器和待入网设备;
    所述路由器,用于发送信标帧,所述信标帧中包括所述路由器的SSID和BSSID;
    所述配网设备,用于发送配网同步帧,所述配网同步帧中包括所述路由器的BSSID;
    所述待入网设备,用于根据接收到的所述信标帧存储所述SSID和所述BSSID之间的对应关系,以及根据所述配网同步帧中的所述BSSID查询所述对应关系以获取所述SSID。
PCT/CN2020/094322 2018-11-26 2020-06-04 一种Wi-Fi接入点的SSID获取方法、装置、设备和*** WO2021017634A1 (zh)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN201811420026 2018-11-26
CN201910695885.4A CN111225429B (zh) 2018-11-26 2019-07-30 路由器的ssid获取方法、装置、设备和***
CN201910695885.4 2019-07-30

Publications (1)

Publication Number Publication Date
WO2021017634A1 true WO2021017634A1 (zh) 2021-02-04

Family

ID=70827516

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/094322 WO2021017634A1 (zh) 2018-11-26 2020-06-04 一种Wi-Fi接入点的SSID获取方法、装置、设备和***

Country Status (3)

Country Link
CN (2) CN111225429B (zh)
TW (1) TW202106072A (zh)
WO (1) WO2021017634A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108809737A (zh) * 2018-07-27 2018-11-13 杭州古北电子科技有限公司 设备配网装置、***以及方法
CN113766545A (zh) * 2021-09-30 2021-12-07 北京房江湖科技有限公司 无线网络的身份识别方法和装置
CN114245405A (zh) * 2021-12-16 2022-03-25 珠海格力电器股份有限公司 一种设备配网方法、电子设备及存储介质
CN114302425A (zh) * 2021-12-21 2022-04-08 深圳Tcl新技术有限公司 设备配网方法、装置、存储介质及电子设备
CN114630398A (zh) * 2022-03-04 2022-06-14 美智纵横科技有限责任公司 配网方法、配网设备、可读存储介质和扫地机器人
CN115175110A (zh) * 2022-06-23 2022-10-11 深圳市爱培科技术股份有限公司 一种基于组播的设备快速配网方法及***

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111225429B (zh) * 2018-11-26 2022-05-27 阿里巴巴集团控股有限公司 路由器的ssid获取方法、装置、设备和***
CN111865790B (zh) * 2020-07-10 2022-10-14 青岛海尔科技有限公司 用于采集路由器信息的方法、装置、物联设备和物联网***
CN112203339B (zh) * 2020-09-29 2022-12-27 中移(杭州)信息技术有限公司 智能家居设备的配网方法、智能家居设备及路由器
CN112788710B (zh) * 2020-12-30 2023-10-03 普联技术有限公司 一种终端设备的接入方法及接入装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104619040A (zh) * 2015-02-10 2015-05-13 福州瑞芯微电子有限公司 WiFi设备快速连接的方法和***
CN106686593A (zh) * 2016-12-28 2017-05-17 深圳Tcl智能家庭科技有限公司 一种基于wifi模块的智能设备配置入网的方法及装置
CN108243482A (zh) * 2017-12-25 2018-07-03 惠州Tcl移动通信有限公司 一种网络配置方法、存储介质以及电子设备
CN111225429A (zh) * 2018-11-26 2020-06-02 阿里巴巴集团控股有限公司 路由器的ssid获取方法、装置、设备和***

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301884B (zh) * 2014-10-29 2017-12-15 浙江宇视科技有限公司 一种配置网络摄像机接入无线路由器的方法
CN104660726B (zh) * 2015-02-03 2018-11-27 普联技术有限公司 智能设备的网络配置方法、装置及***
CN106412886A (zh) * 2015-08-13 2017-02-15 大唐半导体设计有限公司 智能设备安全接入无线网络的方法、装置和***
CN105933899B (zh) * 2016-04-14 2019-07-09 北京小米移动软件有限公司 无线接入点的接入方法和装置
CN106254147B (zh) * 2016-09-08 2019-06-28 珠海全志科技股份有限公司 一种用于Wi-Fi网络的配置方法、物联网终端和控制端
CN106162829A (zh) * 2016-09-19 2016-11-23 青岛海信电器股份有限公司 Wifi连接方法及装置
CN106488447A (zh) * 2016-09-27 2017-03-08 深圳Tcl智能家庭科技有限公司 一种智能设备接入网络的方法及***
CN107995671A (zh) * 2017-12-01 2018-05-04 海尔优家智能科技(北京)有限公司 连接无线访问接入点的方法、装置、设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104619040A (zh) * 2015-02-10 2015-05-13 福州瑞芯微电子有限公司 WiFi设备快速连接的方法和***
CN106686593A (zh) * 2016-12-28 2017-05-17 深圳Tcl智能家庭科技有限公司 一种基于wifi模块的智能设备配置入网的方法及装置
CN108243482A (zh) * 2017-12-25 2018-07-03 惠州Tcl移动通信有限公司 一种网络配置方法、存储介质以及电子设备
CN111225429A (zh) * 2018-11-26 2020-06-02 阿里巴巴集团控股有限公司 路由器的ssid获取方法、装置、设备和***
CN111225430A (zh) * 2018-11-26 2020-06-02 阿里巴巴集团控股有限公司 路由器的ssid获取方法、装置、设备和***

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108809737A (zh) * 2018-07-27 2018-11-13 杭州古北电子科技有限公司 设备配网装置、***以及方法
CN113766545A (zh) * 2021-09-30 2021-12-07 北京房江湖科技有限公司 无线网络的身份识别方法和装置
CN113766545B (zh) * 2021-09-30 2024-04-09 贝壳找房(北京)科技有限公司 无线网络的身份识别方法和装置
CN114245405A (zh) * 2021-12-16 2022-03-25 珠海格力电器股份有限公司 一种设备配网方法、电子设备及存储介质
CN114245405B (zh) * 2021-12-16 2023-09-08 珠海格力电器股份有限公司 一种设备配网方法、电子设备及存储介质
CN114302425A (zh) * 2021-12-21 2022-04-08 深圳Tcl新技术有限公司 设备配网方法、装置、存储介质及电子设备
CN114302425B (zh) * 2021-12-21 2024-06-04 深圳Tcl新技术有限公司 设备配网方法、装置、存储介质及电子设备
CN114630398A (zh) * 2022-03-04 2022-06-14 美智纵横科技有限责任公司 配网方法、配网设备、可读存储介质和扫地机器人
CN114630398B (zh) * 2022-03-04 2024-02-02 美智纵横科技有限责任公司 配网方法、配网设备、可读存储介质和扫地机器人
CN115175110A (zh) * 2022-06-23 2022-10-11 深圳市爱培科技术股份有限公司 一种基于组播的设备快速配网方法及***
CN115175110B (zh) * 2022-06-23 2023-11-03 深圳市爱培科技术股份有限公司 一种基于组播的设备快速配网方法及***

Also Published As

Publication number Publication date
CN111225429B (zh) 2022-05-27
TW202106072A (zh) 2021-02-01
CN111225429A (zh) 2020-06-02
CN111225430A (zh) 2020-06-02

Similar Documents

Publication Publication Date Title
WO2021017634A1 (zh) 一种Wi-Fi接入点的SSID获取方法、装置、设备和***
US6982970B2 (en) Data transfer method and radio terminal for executing transport layer protocol on radio network
CN102480462B (zh) 通用协议适配方法及装置
US20170244792A1 (en) Power-Line Carrier Terminal Control Apparatus, System, and Method
CN110198345B (zh) 一种数据请求方法、***及装置和存储介质
CN113765857A (zh) 报文转发方法、装置、设备及存储介质
CN102938794A (zh) 地址解析协议arp消息转发方法、交换机和控制器
WO2017012453A1 (zh) 用于数据传输的方法和设备
US11847091B2 (en) Data transmission method and device for network on chip and electronic apparatus
JP2016522627A (ja) パケット処理方法および装置
KR20220159456A (ko) 서비스 처리 방법, 장치, 설비 및 저장 매체
CN107733765B (zh) 映射方法、***和相关设备
KR102094041B1 (ko) IoT 단말 간 실시간으로 자율적인 상호작용을 위한 RDF 그래프 기반의 Semantic 엔진을 구비한 시스템
CN110839142B (zh) 监控目录的共享方法和装置
CN100484101C (zh) 一种以太网传输IPv6报文方法、***与装置
US8886913B2 (en) Apparatus and method for identifier management
CN112003685B (zh) 一种灵活以太网报文转发方法及装置
KR102226915B1 (ko) 소프트웨어 정의 네트워크에서 플로우 룰 데이터베이스를 운영하는 방법, 장치 및 컴퓨터 프로그램
CN105515995A (zh) 报文处理方法、流表生成方法及装置
CN111225393B (zh) 信道校正方法、装置、设备和***
US20160006809A1 (en) Method and device for centralized storage of photographs
CN112019357B (zh) 网络配置方法、装置、设备和***
CN110191202B (zh) 一种设备接入地址确定方法及装置
CN115968543A (zh) 资源映射方法、装置、设备及存储介质
CN110839140B (zh) 监控目录的生成方法和装置

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: 20847446

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: 20847446

Country of ref document: EP

Kind code of ref document: A1