WO2022228190A1 - 一种WiFi连接方法及装置 - Google Patents
一种WiFi连接方法及装置 Download PDFInfo
- Publication number
- WO2022228190A1 WO2022228190A1 PCT/CN2022/087477 CN2022087477W WO2022228190A1 WO 2022228190 A1 WO2022228190 A1 WO 2022228190A1 CN 2022087477 W CN2022087477 W CN 2022087477W WO 2022228190 A1 WO2022228190 A1 WO 2022228190A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- wifi
- sta
- protocol
- wifi protocol
- connection
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 117
- 239000000523 sample Substances 0.000 claims abstract description 62
- 238000012545 processing Methods 0.000 claims description 52
- 238000005516 engineering process Methods 0.000 claims description 37
- 230000008569 process Effects 0.000 claims description 26
- 238000004590 computer program Methods 0.000 claims description 19
- 230000005540 biological transmission Effects 0.000 claims description 6
- 230000009977 dual effect Effects 0.000 claims description 3
- 238000004891 communication Methods 0.000 description 46
- 238000013461 design Methods 0.000 description 36
- 230000006870 function Effects 0.000 description 30
- 238000010586 diagram Methods 0.000 description 20
- 238000010295 mobile communication Methods 0.000 description 12
- 238000007726 management method Methods 0.000 description 9
- 230000003993 interaction Effects 0.000 description 4
- 230000004044 response Effects 0.000 description 4
- 229920001621 AMOLED Polymers 0.000 description 3
- 230000008901 benefit Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000003190 augmentative effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 238000010168 coupling process Methods 0.000 description 2
- 238000005859 coupling reaction Methods 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 230000008520 organization Effects 0.000 description 2
- 238000003672 processing method Methods 0.000 description 2
- 239000000047 product Substances 0.000 description 2
- 239000002096 quantum dot Substances 0.000 description 2
- 230000011664 signaling Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000010835 comparative analysis Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 229920001690 polydopamine Polymers 0.000 description 1
- 230000005855 radiation Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001568 sexual effect Effects 0.000 description 1
- 230000005236 sound signal Effects 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
- 238000001356 surgical procedure Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W48/00—Access restriction; Network selection; Access point selection
- H04W48/16—Discovering, processing access restriction or access information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/14—Direct-mode setup
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/15—Setup of multiple wireless link connections
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/18—Management of setup rejection or failure
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/19—Connection re-establishment
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/30—Connection release
- H04W76/34—Selective release of ongoing connections
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W8/00—Network data management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W8/00—Network data management
- H04W8/005—Discovery of network devices, e.g. terminals
Definitions
- the present application relates to the field of communication technologies, and in particular, to a WiFi connection method and device.
- WiFi 6 technology is a wireless local area network technology created by the WiFi Alliance in the IEEE 802.11 standard. Most of the current mobile phones support WiFi 6 technology and work as a station (Station, STA) or an access point (Access Point, AP) device.
- STA station
- AP access point
- the WiFi protocol version adopted by the STA may not support WiFi 6 technology. Therefore, the STA may have serious compatibility problems when accessing the AP, which prevents the STA from establishing a good communication connection with the AP. For example, in the scenario where the mobile phone is used as an AP and the laptop is used as a STA, after the mobile phone turns on the WiFi 6 hotspot, many laptops currently cannot scan the hotspot turned on by the mobile phone. These laptops can scan for hotspots that are turned on by the phone.
- the above compatibility problem can be solved by manually configuring the WiFi technology version or opening the maximum compatibility mode, so as to enable the STA and the AP to establish a communication connection as much as possible.
- the above-mentioned compatibility problem may still exist in the method of manually configuring the WiFi technology version, and the mode of opening the maximum compatibility will greatly limit the available frequency band and protocol version when the STA and AP are connected. Therefore, the compatibility problem in the above-mentioned manner is less effective, and there may be problems such as STA access failure, and STA or AP performance being affected.
- the present application provides a WiFi connection method, which is used to improve the success rate of a STA accessing an AP, reduce compatibility problems, and reduce the impact on the performance of the STA and the AP.
- the present application provides a WiFi connection method, which is applied to an AP.
- the method includes: in a state where a WiFi hotspot is enabled using a first WiFi protocol, receiving a probe request from a first site STA, where the probe request is used for request to establish a WiFi connection with the AP; determine the second WiFi protocol adopted by the first STA; determine whether the first STA supports the use of the first WiFi protocol according to the first WiFi protocol and the second WiFi protocol
- the WiFi protocol establishes a WiFi connection with the AP; if it is determined that the first STA supports using the first WiFi protocol to establish a WiFi connection with the AP, the first WiFi protocol is used to establish a WiFi connection with the first STA ; If it is determined that the first STA does not support establishing a WiFi connection with the AP by using the first WiFi protocol, establish a WiFi connection with the first STA using the second WiFi protocol.
- the AP when the AP establishes a WiFi connection with the STA, the AP can determine the WiFi protocol supported by the STA according to the WiFi protocol adopted by itself and the WiFi protocol adopted by the STA, so as to adjust the WiFi protocol adopted when establishing the WiFi connection with the STA. In this way, the AP can establish a WiFi connection with the STA using the WiFi protocol that the STA is compatible with, thereby ensuring the basic access function of the STA, improving the success rate of the STA accessing the AP, reducing compatibility problems, and ensuring the performance of the STA and the AP to the greatest extent. .
- the method further includes: when receiving a probe request sent by a second STA, using the second STA A WiFi protocol establishes a WiFi connection with the second STA, where the second STA is a STA that requests to establish a WiFi connection with the AP after the first STA.
- the AP uses the second WiFi protocol to establish a WiFi connection with the STA, and also uses the second WiFi protocol to establish a WiFi connection with the STA that subsequently requests access, which can realize that when the STA using a lower version of the WiFi protocol accesses , switch to the mode of working with a lower version of the WiFi protocol to ensure the basic access functions of these STAs.
- the method further includes: notifying a third STA to communicate with the AP using the second WiFi protocol, wherein , the third STA is a STA that has established a WiFi connection with the AP by using the first WiFi protocol before the first STA; or disconnects the WiFi connection with the third STA, and uses the first WiFi protocol to establish a WiFi connection with the AP;
- the second WiFi protocol establishes a WiFi connection with the third STA.
- the AP uses the second WiFi protocol to establish a WiFi connection with the STA, it notifies the STA that previously used the first WiFi protocol to establish a WiFi connection with the AP to switch to the second WiFi protocol, which can avoid the need for the AP to switch the WiFi protocol used after the switch. , which affects the access function of the STA that previously accessed the AP.
- the probe request carries indication information used to indicate the second WiFi protocol; and determining the second WiFi protocol adopted by the first STA includes: obtaining the data from the probe request. the indication information; determine the second WiFi protocol indicated by the indication information.
- the AP can simply and quickly determine the WiFi protocol adopted by the STA according to the indication information in the STA probe request, and then obtain the protocol capability of the STA.
- the first WiFi protocol is a fifth-generation WiFi protocol or a sixth-generation WiFi protocol
- the second WiFi protocol is a fifth-generation WiFi protocol or a sixth-generation WiFi protocol.
- the compatibility problems existing in the process of STA accessing the AP are mostly the compatibility problems between WiFi 6 technology and WiFi 5 technology. Therefore, the method provided in this application can be applied to an AP using WiFi 6 technology or WiFi 5 technology to solve the compatibility problem between WiFi 6 technology and WiFi 5 technology.
- determining the second WiFi protocol adopted by the first STA includes: determining a reference field included in the packet carrying the probe request, where the reference field is used to indicate the first STA Whether the WiFi protocol of the preset version is supported; if the value of the reference field is the first value, it is determined that the second WiFi protocol is the WiFi protocol of the preset version; if the value of the reference field is the first value If the value is two, it is determined that the second WiFi protocol is a WiFi protocol that is one version lower than the set version.
- the AP can perform field analysis according to the message carrying the STA probe request, and can identify the WiFi protocol adopted by the STA according to various field information, thereby obtaining the protocol capability of the STA.
- the reference field includes at least one of the following: target wake-up time requester support field; target wake-up time responder support field; broadcast target wake-up time field; buffer status report support field; Multiple Access Random Access Support Field; Supported Channel Bandwidth Setting Field; Censored Preamble Receive Field; Low Density Parity Check Code Field in Payload; Full Bandwidth Uplink Multi-User Multiple Input Multiple Output Field; Uplink multi-user multiple-input multiple-output field; dual-carrier modulation technology maximum constellation group reception field; dual-carrier modulation technology maximum constellation group transmission field; multi-user beamformer field.
- determining, according to the first WiFi protocol and/or the second WiFi protocol, whether the first STA supports establishing a WiFi connection with the AP using the first WiFi protocol including: If the versions of the first WiFi protocol and the second WiFi protocol are the same, it is determined that the first STA supports establishing a WiFi connection with the AP using the first WiFi protocol; or if the first WiFi protocol is of the same version If the version is higher than the version of the second WiFi protocol, it is determined that the first STA does not support establishing a WiFi connection with the AP using the first WiFi protocol; or if the version of the first WiFi protocol is higher than the The second version of the WiFi protocol performs at least one connection process, and if the number of failures to establish a WiFi connection with the first STA is less than a set threshold, it is determined that the first STA supports the use of the first WiFi protocol to communicate with the AP establishing a WiFi connection; if the number of times that the WiFi connection fails to be established with the first STA exceeds the set threshold, it is determined
- the AP can more accurately judge the access capability of the STA according to the WiFi protocol adopted by itself and the WiFi protocol adopted by the STA, and the AP can determine the WiFi protocol adopted when establishing a WiFi connection with the STA in various ways.
- the flexibility of implementation is high, and it can adapt to the WiFi connection process in many different scenarios.
- the method further includes: storing the device identification of the first STA in the database.
- the AP can supplement or update the information in the database according to the access result of the STA, so as to continuously enrich the contents of the database and ensure the accuracy of the contents in the database.
- the device identification of the first STA is the medium access control MAC address of the first STA.
- the method further includes:
- the AP after the AP establishes a WiFi connection with the STA, it can communicate with the STA, wherein the WiFi protocol used when the AP communicates with the STA is the WiFi protocol used when the STA requests access, which can ensure the normal operation between the STA and the AP. communication.
- the first WiFi protocol is the highest version of the WiFi protocol supported and adopted by the AP
- the second WiFi protocol is the highest version of the WiFi protocol supported and adopted by the first STA.
- the present application provides an apparatus, the apparatus includes: a transceiver unit configured to receive a probe request from a first site STA in a state in which a WiFi hotspot is enabled using a first WiFi protocol, where the probe request is used to request establishing a WiFi connection with the AP; a processing unit configured to determine the second WiFi protocol adopted by the first STA; and determining whether the first STA supports the adoption of the first WiFi protocol and the second WiFi protocol according to the first WiFi protocol and the second WiFi protocol
- the first WiFi protocol establishes a WiFi connection with the AP; if it is determined that the first STA supports establishing a WiFi connection with the AP using the first WiFi protocol, then the first WiFi protocol is used to establish a WiFi connection with the first STA.
- the STA establishes a WiFi connection; if it is determined that the first STA does not support establishing a WiFi connection with the AP using the first WiFi protocol, the second WiFi protocol is used to establish a WiFi connection with the first STA.
- the processing unit is further configured to: when receiving the probe request sent by the second STA, use the A second WiFi protocol establishes a WiFi connection with the second STA, where the second STA is a STA that requests to establish a WiFi connection with the AP after the first STA.
- the processing unit is further configured to: notify a third STA to use the second WiFi protocol to communicate with the AP , wherein the third STA is a STA that has established a WiFi connection with the AP by using the first WiFi protocol before the first STA; or disconnects the WiFi connection with the third STA, and uses the The second WiFi protocol establishes a WiFi connection with the third STA.
- the probe request carries indication information for indicating the second WiFi protocol; when the processing unit determines the second WiFi protocol adopted by the first STA, it is specifically configured to: The indication information is obtained in the probe request; and the second WiFi protocol indicated by the indication information is determined.
- the first WiFi protocol is a fifth-generation WiFi protocol or a sixth-generation WiFi protocol
- the second WiFi protocol is a fifth-generation WiFi protocol or a sixth-generation WiFi protocol.
- the processing unit when the processing unit determines the second WiFi protocol adopted by the first STA, the processing unit is specifically configured to: determine a reference field included in the packet carrying the probe request, where the reference field uses is used to indicate whether the first STA supports the WiFi protocol of the set version; if the value of the reference field is the first value, it is determined that the second WiFi protocol is the WiFi protocol of the set version; if the If the value of the reference field is the second value, it is determined that the second WiFi protocol is a WiFi protocol that is one version lower than the set version.
- the reference field includes at least one of the following: target wake-up time requester support field; target wake-up time responder support field; broadcast target wake-up time field; buffer status report support field; Multiple Access Random Access Support Field; Supported Channel Bandwidth Setting Field; Censored Preamble Receive Field; Low Density Parity Check Code Field in Payload; Full Bandwidth Uplink Multi-User Multiple Input Multiple Output Field; Uplink multi-user multiple-input multiple-output field; dual-carrier modulation technology maximum constellation group reception field; dual-carrier modulation technology maximum constellation group transmission field; multi-user beamformer field.
- the processing unit determines, according to the first WiFi protocol and/or the second WiFi protocol, whether the first STA supports establishing WiFi with the AP using the first WiFi protocol When connecting, it is specifically used to: if the first WiFi protocol and the second WiFi protocol have the same version, determine that the first STA supports establishing a WiFi connection with the AP by using the first WiFi protocol; or if If the version of the first WiFi protocol is higher than the version of the second WiFi protocol, it is determined that the first STA does not support using the first WiFi protocol to establish a WiFi connection with the AP; or if the first WiFi The version of the protocol is higher than the version of the second WiFi protocol, and at least one connection process is performed.
- a WiFi protocol establishes a WiFi connection with the AP; if the number of failures to establish a WiFi connection with the first STA exceeds the set threshold, it is determined that the first STA does not support using the first WiFi protocol to communicate with the AP.
- each connection process includes the following steps: using the first WiFi protocol to establish a WiFi connection with the first STA; or if the device identifier of the first STA is stored in the database, determining the The first STA does not support establishing a WiFi connection with the AP using the first WiFi protocol; otherwise, it is determined that the first STA supports establishing a WiFi connection with the AP using the first WiFi protocol; wherein, the database It is used to store the device identifier of the target STA, where the target STA is a STA that does not support establishing a WiFi connection with the AP by using the first WiFi protocol.
- the processing unit is further configured to: store the device identification of the first STA in the database .
- the device identification of the first STA is the medium access control MAC address of the first STA.
- the processing unit is further configured to: after establishing a WiFi connection with the first STA using the first WiFi protocol, use the first WiFi protocol or the second WiFi protocol to communicate with the first STA.
- the first STA communicates; after a WiFi connection is established with the first STA using the second WiFi protocol, the second WiFi protocol is used to communicate with the first STA.
- the first WiFi protocol is the highest version of the WiFi protocol supported and adopted by the AP
- the second WiFi protocol is the highest version of the WiFi protocol supported and adopted by the first STA.
- the present application provides an apparatus comprising a transceiver, a memory and a processor; the transceiver is configured to receive signals from other apparatuses other than the apparatus and transmit to the processor or transfer signals from the processor The signal of the processor is sent to other devices other than the device; the memory is used for storing programs; the processor is used for executing the programs stored in the memory, so as to realize the first aspect or any possible possibility of the first aspect. Design the method described.
- the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed on an apparatus, the apparatus causes the apparatus to execute the first aspect or the first The method described in any possible design of the aspect.
- the present application provides a computer program product, the computer program product comprising a computer program or instructions, when the computer program or instructions are run on an apparatus, the apparatus causes the apparatus to perform the above-mentioned first aspect or the first aspect Any possible design of the described method.
- 1a is a statistical diagram of the distribution of the number of devices accessing a hotspot under different WiFi hotspot frequencies according to an embodiment of the present application
- FIG. 1b is a statistical diagram of the distribution of device types that access hotspots under different WiFi hotspot frequencies according to an embodiment of the present application
- 2a is a schematic diagram of a mobile phone interface for manually configuring a WiFi technology version
- Figure 2b is a schematic diagram of a mobile phone interface with a configuration maximum compatibility
- FIG. 3 is a schematic diagram of a traditional method for STA to access an AP
- Fig. 4a is an example diagram of a kind of Beacon frame message broadcast by AP
- Figure 4b is an example diagram of another Beacon frame message broadcast by the AP
- 5a is a schematic diagram of a hardware architecture of an electronic device provided by an embodiment of the present application.
- 5b is a schematic diagram of a software architecture of an electronic device provided by an embodiment of the application.
- FIG. 6 is a schematic diagram of a WiFi connection method provided by an embodiment of the present application.
- FIG. 7 is a schematic diagram of the format of an HE capability information field provided by an embodiment of the present application.
- FIG. 8 is a schematic flowchart of a WiFi connection method provided by an embodiment of the present application.
- FIG. 9 is a schematic diagram of a WiFi connection method provided by an embodiment of the present application.
- FIG. 10 is a schematic flowchart of another WiFi connection method provided by an embodiment of the present application.
- FIG. 11 is a schematic diagram of a device provided by an embodiment of the present application.
- FIG. 12 is a schematic structural diagram of an apparatus provided by an embodiment of the present application.
- Station also called wireless station, STA refers to devices connected to the wireless network, and these devices can communicate with other devices inside the wireless network or with the outside of the wireless network through the access point.
- the STA may be an electronic device that supports WiFi connection.
- Electronic devices may also be referred to as terminal devices, or terminals, including but not limited to mobile phones (Mobile Phones), tablet computers, notebook computers, PDAs, Mobile Internet Devices (MIDs), wearable devices (such as smart watches, Smart bracelets, pedometers, etc.), vehicles, in-vehicle equipment (such as cars, bicycles, electric vehicles, airplanes, ships, trains, high-speed trains, etc.), virtual reality (Virtual Reality, VR) equipment, Augmented Reality (Augmented Reality, AR) equipment, wireless terminals in industrial control (Industrial Control), smart home equipment (such as refrigerators, TVs, air conditioners, electricity meters, etc.), intelligent robots, workshop equipment, wireless terminals in self-driving (Self Driving), remote Wireless Terminals in Remote Medical Surgery, Wireless Terminals in Smart Grid, Wireless Terminals in Transportation Safety, Wireless Terminals in Smart City, or Smart Home ) in wireless terminals, flying equipment (for example, intelligent robots,
- MIDs
- the electronic devices in the embodiments of the present application include but are not limited to carrying or other operating systems.
- Access Point also known as access node, wireless access point or hotspot, etc.
- AP Access Point
- Communication is the core equipment for forming a wireless local area network.
- the AP can be an access point in a WiFi system, or it can be a module or unit that completes some functions of the access point.
- it can be a centralized unit (Central Unit, CU) or a distributed unit (Distributed Unit, DU). ); it can also be a router, a bridge, a wireless gateway, etc.
- This application does not limit the specific technology and specific device form adopted by the AP.
- the AP may be a router, or may be other electronic devices with a WiFi access function.
- Beacon (Beacon) frame The Beacon frame is periodically broadcast and sent by the AP to notify the existence of the AP. During the process of establishing a communication connection between the STA and the AP, the STA may determine the existence of the AP by scanning the Beacon frame. In addition, the STA can also detect whether the AP exists by actively sending a probe request (Probe Request) during scanning.
- Probe Request a probe request
- At least one refers to one or more, and "a plurality” refers to two or more.
- And/or which describes the association relationship of the associated objects, means that there can be three kinds of relationships, for example, A and/or B, it can mean that A exists alone, A and B exist at the same time, and B exists alone, where A, B can be singular or plural.
- the character “/” generally indicates that the associated objects are an “or” relationship.
- At least one (item) of the following or its similar expression refers to any combination of these items, including any combination of single item (item) or plural item (item).
- At least one (a) of a, b or c may represent: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c Can be single or multiple.
- the protocol adopted by the WiFi 6 technical standard is the WiFi 6 protocol. Therefore, it can be considered that the "WiFi 6 technical standard” is equivalent to the “WiFi 6 protocol”.
- WiFi 6 technical standard or “WiFi 6 protocol” is abbreviated as “WiFi 6” hereinafter
- WiFi 5 technical standard or “WiFi 5 protocol” is abbreviated as "WiFi 5".
- a serious compatibility problem may be caused due to the different versions of the WiFi protocol adopted by the STA and the AP, so that the STA cannot successfully establish a connection with the AP.
- the current WiFi 6 mobile phone products are gradually promoted.
- the hotspots opened can be based on WiFi 6, but many laptops currently use the old version of WiFi technology standards such as WiFi 5, so these laptops
- there may be serious compatibility problems resulting in possible access failure.
- Figure 1a is a statistical diagram of the distribution of the number of devices accessing the hotspot under different WiFi hotspot frequencies.
- the statistical proportion of WiFi hotspots connecting to a device reaches 85%; in the 5GHz frequency band, the statistical proportion of WiFi hotspots connecting to a device reaches 96% , it can be seen that the proportion of WiFi hotspots connected to a device is relatively large.
- the 5GHz frequency band has more obvious advantages than the 2.4GHz frequency band. Therefore, users may prefer to use 5GHz to access WiFi hotspots to exert better device performance.
- Figure 1b is a statistical diagram of the distribution of device types accessing the hotspot under different WiFi hotspot frequencies.
- the personal computers (PCs) that use the 5GHz frequency band to access hotspots account for 13% of the total number of statistical devices, and currently there are very few PCs that can support WiFi 6, so PCs access WiFi There is a high risk of compatibility issues with 6 hotspots.
- Solution 1 Manually configure the WiFi technology version.
- a control switch of "supporting the sixth generation technical standard" is added to the hotspot configuration interface of the mobile phone.
- the user can operate the control switch to set the WiFi technology standard adopted by the mobile phone. Version.
- the mobile phone is set to WiFi 6 mode, and can be connected to the connected STA based on WiFi 6; STA to connect.
- Processing method 2 The AP opens the maximum compatibility.
- a control switch for enabling the maximum compatibility is added to the hotspot configuration interface of the mobile phone.
- the user can set the mobile phone to turn on the maximum compatibility by operating the control switch.
- the control switch When the user turns on the control switch, the mobile phone turns on the maximum compatibility, which can ensure that the STA can successfully establish a connection with the AP.
- this method will greatly limit the available frequency bands and protocol versions for STA access.
- the mobile phone hotspot frequency is 2.4GHz
- 802.11n protocol the mainstream protocol standard supported by wireless router products
- the hotspot frequency is 5GHz.
- 802.11ax protocol wherein the version of the 802.11ax protocol is higher than the 802.11n protocol.
- the mobile phone hotspot supports the 2.4GHz hotspot frequency and only supports the 802.11n protocol, but the protocol version supported by the STA may be higher than the 802.11n protocol, so the available frequency band and protocol version when the STA receives the mobile phone hotspot will be limited. , which affects the performance of the STA and the AP and the connection and communication effect between the STA and the AP.
- the present application provides a WiFi connection method to flexibly control the communication connection between the STA and the AP, to ensure that the STA can successfully access the AP, and to minimize the impact on the performance of the STA and the AP.
- FIG. 3 is a schematic diagram of a traditional method for a STA to access an AP.
- the AP opens the WiFi hotspot, it will periodically broadcast the Beacon frame, so that the STA can discover the WiFi hotspot.
- a STA accesses a WiFi hotspot, it can determine the existing WiFi hotspot by scanning Beacon frames or sending a probe request. If the STA successfully scans the Beacon frame broadcast by the AP, or receives the Probe Response (Probe Response) returned by the AP after sending the probe request, the STA can automatically perform the connection process with the AP, and the STA can communicate with the AP after establishing a connection. If the STA cannot scan the Beacon frame broadcast by the AP, or cannot receive the probe response from the AP, it cannot successfully access the AP.
- Probe Response Probe Response
- FIG. 4a is an example diagram of a Beacon frame packet broadcast by an AP
- FIG. 4b is an example diagram of another Beacon frame packet broadcast by the AP.
- the AP shown in Figure 4a uses WiFi 6
- the AP in Figure 4b uses WiFi 5.
- a STA using WiFi 5 scans the Beacon frame broadcast by the AP, it cannot scan the Beacon frame shown in Figure 4a, but can scan the Beacon frame shown in Figure 4b.
- the STA using WiFi 5 cannot parse and identify the WiFi 6-based Beacon frame broadcast by the AP when scanning the hotspot, and the STA thinks that it cannot scan the Beacn frame broadcast by the AP, so it cannot accurately and timely determine the existence of the WiFi 6 hotspot LAN111.
- the WiFi technology standards adopted by the STA and the AP are consistent as much as possible.
- the AP may first determine the access status or protocol capability information of the STA to be accessed, and then adjust the way it establishes a connection with the STA according to the access status or protocol capability information of the STA, so as to take into account WiFi 6
- the high performance of the hotspot and the basic access function of the STA using WiFi 5 solve the compatibility problem.
- FIG. 5a shows a schematic diagram of the hardware architecture of an electronic device.
- the electronic device 500 may include a processor 510, an external memory interface 520, an internal memory 521, a USB interface 530, a charging management module 540, a power management module 541, a battery 542, an antenna 1, a wireless communication module 560, an audio Module 570, speaker 570A, receiver 570B, microphone 570C, headphone jack 570D, sensor module 580, key 590, motor 591, indicator 592, camera 593, display screen 594, etc.
- the electronic device 500 may further include an antenna 2, a mobile communication module 550, a SIM interface 595, and the like.
- the electronic device shown in FIG. 5a is only an example, and does not constitute a limitation to the electronic device, and the electronic device may have more or less components than those shown in the figure, and two components may be combined. one or more components, or may have different component configurations.
- the various components shown in Figure 5a may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
- the processor 510 may include one or more processing units, for example, the processor 510 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or Neural-network Processing Unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
- the controller may be the nerve center and command center of the electronic device 500 . The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
- a memory may also be provided in the processor 510 for storing instructions and data.
- the memory in processor 510 is cache memory.
- the memory may hold instructions or data that have just been used or recycled by the processor 510 . If the processor 510 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the waiting time of the processor 510 is reduced, thereby increasing the efficiency of the system.
- the execution of the WiFi connection method provided by the embodiment of the present application may be completed by the processor 510 controlling or calling other components, for example, calling the processing program of the embodiment of the present application stored in the internal memory 521 to control the wireless communication module 560 to communicate with other electronic devices
- the device communicates data for WiFi connection and subsequent communication.
- the processor 510 may include different devices. For example, when a CPU and a GPU are integrated, the CPU and the GPU may cooperate to execute the WiFi connection method provided by the embodiments of the present application. For example, some algorithms in the WiFi connection method are executed by the CPU, and another part of the algorithms are executed by the GPU. for faster processing efficiency.
- Display screen 594 is used to display images, videos, and the like.
- Display screen 594 includes a display panel.
- the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light).
- LED organic light-emitting diode
- AMOLED organic light-emitting diode
- FLED flexible light-emitting diode
- Miniled MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
- the electronic device 500 may include 1 or N display screens 594 , where N is a positive integer greater than 1.
- the display screen 594 may be used to display information entered by or provided to the user as well as various graphical user interfaces (GUIs).
- GUIs graphical user interfaces
- display screen 594 may display photos, videos, web pages, or documents, and the like.
- the display screen 594 may be an integrated flexible display screen, or a spliced display screen composed of two rigid screens and a flexible screen located between the two rigid screens.
- the processor 510 may control the display screen 594 to display relevant results.
- Camera 593 front or rear camera, or a camera that can be both front and rear camera is used to capture still images or video.
- Internal memory 521 may be used to store computer executable program code, which includes instructions.
- the processor 510 executes various functional applications and data processing of the electronic device 500 by executing the instructions stored in the internal memory 521 .
- the internal memory 521 may include a storage program area and a storage data area.
- the storage program area may store operating system, codes of application programs (such as WiFi connection function, WiFi communication function, etc.), and the like.
- the storage data area may store data created during the use of the electronic device 500 (such as information, data, etc. that need to be exchanged between devices when executing the WiFi connection method provided by the embodiments of the present application).
- the internal memory 521 may also store one or more computer programs corresponding to the algorithms of the WiFi connection methods provided in the embodiments of the present application.
- the one or more computer programs are stored in the aforementioned internal memory 521 and configured to be executed by the one or more processors 510, and the one or more computer programs include instructions that can be used to perform the following embodiments each step.
- the internal memory 521 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
- non-volatile memory such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
- the algorithm code of the WiFi connection method may also be stored in an external memory.
- the processor 510 may execute the code of the WiFi connection algorithm stored in the external memory through the external memory interface 520.
- the sensor module 580 may include a fingerprint sensor, a touch sensor, a pressure sensor, a magnetic sensor, an ambient light sensor, an air pressure sensor, a bone conduction sensor, and the like.
- the electronic device 500 may be a STA, and the electronic device 500 may not include the antenna 2, the mobile communication module 550, the SIM interface 595, etc., then the wireless communication function of the electronic device 500 may be through the antenna 1, the wireless communication module 560, The modem processor and baseband processor are implemented.
- the electronic device 500 may be an AP, and the electronic device 500 may include an antenna 2, a mobile communication module 550, a SIM interface 595, etc., then the wireless communication function of the electronic device 500 can be performed through the antenna 1, the antenna 2, the mobile communication module, etc. 550.
- the wireless communication module 560 is implemented by a modulation and demodulation processor, a baseband processor, and the like.
- Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
- Each antenna in electronic device 500 may be used to cover a single or multiple communication frequency bands, such as the 2.4GHz frequency band or the 5GHz frequency band. Different antennas can also be reused to improve antenna utilization.
- the antenna 2 can be multiplexed into a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
- the mobile communication module 550 may provide a wireless communication solution including 2G/3G/4G/5G, etc. applied on the electronic device 500 .
- the mobile communication module 550 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
- the mobile communication module 550 can receive electromagnetic waves from the antenna 2, filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
- the mobile communication module 550 can also amplify the signal modulated by the modulation and demodulation processor, and then convert it into electromagnetic waves and radiate it out through the antenna 2 .
- at least part of the functional modules of the mobile communication module 550 may be provided in the processor 510 .
- At least part of the functional modules of the mobile communication module 550 may be provided in the same device as at least part of the modules of the processor 510 .
- the mobile communication module 550 may also be used for information interaction with other electronic devices.
- the modem processor may include a modulator and a demodulator.
- the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
- the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
- the low frequency baseband signal is processed by the baseband processor and passed to the application processor.
- the application processor outputs a sound signal through an audio device (not limited to the speaker 570A, the receiver 570B, etc.), or displays an image or video through the display screen 594 .
- the modem processor may be a stand-alone device.
- the modulation and demodulation processor may be independent of the processor 510, and be provided in the same device as the mobile communication module 550 or other functional modules.
- the wireless communication module 560 can provide applications on the electronic device 500 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites System (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
- WLAN wireless local area networks
- BT wireless fidelity
- GNSS global navigation satellites System
- frequency modulation frequency modulation, FM
- NFC near field communication technology
- IR infrared technology
- the wireless communication module 560 may be one or more devices integrating at least one communication processing module.
- the wireless communication module 560 receives electromagnetic waves via the antenna 5 , modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 510 .
- the wireless communication module 560 can also receive the signal to be sent from the processor 510 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 5 .
- the wireless communication module 560 is configured to establish a communication connection with other electronic devices to perform data interaction.
- the wireless communication module 560 may be used to access the AP, and send messages and data to the AP, or receive instructions or data from the AP during the access process.
- the wireless communication module 560 can be used to establish a WiFi connection with a STA requesting access, and receive messages and data from the STA or send instructions or data to the STA during the access process.
- the electronic device 500 may implement audio functions through an audio module 570, a speaker 570A, a receiver 570B, a microphone 570C, an earphone interface 570D, an application processor, and the like. Such as music playback, recording, etc.
- the electronic device 500 may receive key 590 inputs and generate key signal inputs related to user settings and function control of the electronic device 500 .
- the electronic device 500 may use the motor 591 to generate vibration alerts (eg, vibration alerts for incoming calls).
- the indicator 592 in the electronic device 500 may be an indicator light, which may be used to indicate a charging state, a change in power, or may be used to indicate a message, a notification, or the like.
- the SIM card interface 595 in the electronic device 500 is used to connect the SIM card.
- the SIM card can be contacted and separated from the electronic device 500 by being inserted into the SIM card interface 595 or pulled out from the SIM card interface 595 .
- the electronic device 500 shown in FIG. 5a may function as an AP or a STA.
- the electronic device 500 shown in FIG. 5a is only an example, and the electronic device 500 may have more or less components than those shown in the figure, and two or more components may be combined components, or may have different component configurations.
- the various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
- the software system of the electronic device 500 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
- the embodiments of the present invention take an Android system with a layered architecture as an example to illustrate the software structure of an electronic device.
- the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces. As shown in Figure 5b, the software architecture can be divided into four layers, from top to bottom, the application layer, the application framework layer (framework, FWK), the Android runtime and system library, and the Linux kernel layer.
- the software architecture can be divided into four layers, from top to bottom, the application layer, the application framework layer (framework, FWK), the Android runtime and system library, and the Linux kernel layer.
- the application layer is the top layer of the operating system and includes the native applications of the operating system, such as camera, gallery, calendar, bluetooth, music, video, messaging, and more.
- the application program involved in the embodiments of the present application is referred to as an application (application, APP), which is a software program capable of implementing one or more specific functions.
- application application, APP
- multiple applications may be installed in an electronic device.
- the application mentioned below may be a system application installed when the electronic device leaves the factory, or may be a third-party application downloaded from the network or acquired from other electronic devices by the user during the use of the electronic device.
- the application can be developed in the Java language by calling the Application Programming Interface (API) provided by the application framework layer.
- API Application Programming Interface
- the developer can communicate with the operating system through the application framework. interact with the underlying layers (such as the kernel layer, etc.) to develop their own applications.
- the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
- the application framework layer can include some predefined functions.
- the application framework layer can include window managers, content providers, view systems, telephony managers, resource managers, notification managers, etc.
- a window manager is used to manage window programs.
- the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
- Content providers are used to store and retrieve data and make these data accessible to applications.
- the data may include information such as files (eg, documents, videos, images, audio), text, and the like.
- the view system includes visual controls, such as controls for displaying text, pictures, documents, and so on. View systems can be used to build applications.
- the interface in the display window can consist of one or more views.
- the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
- the phone manager is used to provide the communication function of the electronic device.
- the notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction.
- the Android runtime includes core libraries and a virtual machine.
- the Android runtime is responsible for the scheduling and management of the Android system.
- the core library of the Android system consists of two parts: one is the function functions that the Java language needs to call, and the other is the core library of the Android system.
- the application layer and the application framework layer run in virtual machines. Taking Java as an example, the virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
- a system library can include multiple functional modules. For example: surface manager, media library, 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), image processing library, etc.
- the Surface Manager manages the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
- the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
- the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.564, MP3, AAC, AMR, JPG, PNG, etc.
- the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
- a 2D graphics engine is a drawing engine for 2D drawing.
- the kernel (Kernel) layer provides the core system services of the operating system, such as security, memory management, process management, network protocol stack and driver model, all based on the kernel layer.
- the kernel layer also acts as an abstraction layer between the hardware and software stacks.
- the WiFi connection method provided by the embodiment of the present application includes:
- the AP receives a probe request from a first station STA in a state in which the WiFi hotspot is enabled by using the first WiFi protocol, where the probe request is used to request to establish a WiFi connection with the AP.
- the AP after the AP opens the WiFi hotspot, it can work by default using the first WiFi protocol.
- the AP first determines whether the STA supports the first WiFi protocol. If so, the AP can use the first WiFi protocol and the first WiFi protocol. The STA establishes the connection, otherwise, the AP may further determine the manner of establishing the connection with the STA according to the protocol capabilities of itself and the STA.
- the STA may send probe request information to the AP to request access to the AP, so as to establish a WiFi connection with the AP and communicate.
- the first WiFi protocol may be WiFi 5 or WiFi 6.
- the first WiFi protocol may be the current latest version of the WiFi protocol, namely WiFi 6.
- the STA supporting the adoption of the first WiFi protocol in the embodiments of the present application means that the STA is compatible with the first WiFi protocol without any problem, and can successfully establish a WiFi connection with the AP when the AP adopts the first WiFi protocol. , and there will be no access failure caused by incompatible WiFi protocols.
- the AP determines the second WiFi protocol adopted by the first STA.
- the AP when the AP determines whether the STA supports the adoption of the first WiFi protocol, it may first determine the second WiFi protocol adopted by the STA, and then compare the first WiFi protocol with the second WiFi protocol. The version of the protocol determines whether the STA supports the adoption of the first WiFi protocol.
- the AP may use the result of the STA's previous access process as a reference. If the AP uses the first WiFi protocol and the STA successfully accesses in the previous access process, it is determined that the STA supports the use of The first WiFi protocol, otherwise, it is considered that the STA does not support the adoption of the first WiFi protocol.
- the information may be stored in a database, and when the STA requests access, the AP may determine whether the STA supports the use of the first WiFi protocol by querying the database.
- the AP may determine whether the STA supports (adopts) the first WiFi protocol according to at least one of the following methods:
- Manner 1 The AP determines whether the STA supports the first WiFi protocol according to the indication information carried in the probe request sent by the STA.
- the probe request sent by the STA to the AP may carry indication information for indicating the second WiFi protocol adopted by the STA, where the probe request is used to request access to the AP, that is, to establish a WiFi connection with the AP.
- the AP can determine the second WiFi protocol adopted by the STA according to the instruction information obtained therefrom, and then judge whether the STA supports the first WiFi protocol according to the first WiFi protocol and the second WiFi protocol.
- the probe request sent by the STA to the AP may carry indication information that directly indicates whether the STA supports the first WiFi protocol, and the AP can directly and quickly determine whether the STA supports the WiFi protocol currently adopted by the AP according to the probe request received.
- Manner 2 The AP determines whether the STA supports the first WiFi protocol according to the reference information in the message carrying the probe request sent by the STA.
- the reference information includes information such as HE capability information and manufacturer identification in the probe request message sent by the STA.
- the vendor identifier may be a vendor-specific organization unique identifier (Organization Unique Identifier, OUI) type, ie vendor specific OUI type.
- OUI Organization Unique Identifier
- the HE capability information includes HE MAC layer capability information and HE physical layer (Physical Layer, PHY) layer capability information.
- the probe request or association request (Association Request) message sent by the STA to the AP includes the HE capability information field.
- the HE capability information The format of the fields is shown in Figure 7.
- the HE capability information field includes the HE MAC layer capability field information and the HE PHY layer capability information field. Further, the subfields contained in the HE MAC layer capability information field and the HE PHY layer capability information field can be used as reference information for judging whether the STA supports the first WiFi protocol.
- the reference field and the value of the reference field contained in the HE capability information field can be used to indicate whether the WiFi protocol adopted by the STA is a certain version of the WiFi protocol. Therefore, the AP can The value of the reference field determines whether the STA supports the WiFi protocol of the set version. For example, if the AP determines that the value of the reference field is the first value, it may determine that the second WiFi protocol is the WiFi protocol of the set version; if it determines that the value of the reference field is the second value, Then, it can be determined that the second WiFi protocol is a WiFi protocol that is one version lower than the set version.
- the WiFi protocol of the set version may be WiFi 6, the first value may be 1, and the second value may be 0. Then, when the AP determines that the value of the reference field is 1, it determines that the STA adopts WiFi 6, and when it determines that the value of the reference field is 0, it determines that the STA adopts WiFi 5.
- the reference information when the WiFi protocol of the set version is WiFi 6, includes at least one of the following reference fields in the HE MAC layer capability information field:
- TWT Requester Supprot Target Wake Time
- TWT Responder Supprot field used to identify whether TWT RX responder is supported
- Broadcast TWT Broadcast TWT field: used to identify whether the broadcast TWT function is supported
- BSR Buffer Status Report
- OFDMA Orthogonal Frequency Division Multiple Access
- OFDMA random access Random Access, RA
- OFDMA RA Support OFDMA random access support field
- the reference information further includes at least one of the following reference fields in the HE PHY layer capability information field:
- Supported Channel Width Set used to indicate the type of bandwidth supported by the 2.4GHz and 5GHz frequency bands, including whether the 5GHz frequency band supports 160MHz or 80+80MHz bandwidth;
- Censored preamble Rx (Punctured Preamble Rx): used to identify whether to support censored preamble, and the type of preamble censoring;
- DPC coding in the payload (LDPC Coding In Payload): used to identify whether LDPC codec is supported;
- Full Bandwidth Full Bandwidth (Full Bandwidth) Uplink (Uplingk, UL) Multi-User Multiple-Input Multiple-Output (ULMU-MIMO) field: used to identify whether UL MU-MIMO is supported;
- Partial bandwidth (pritical UL MU-MIMO Full Bandwidth): used to identify whether UL MU-MIMO in OFDMA is supported;
- Dual Carrier Modulation DCM
- Maximum constellation group Max Constellation
- DCM largest constellation group RX used to identify whether Rx supports DCM, and the type of DCM supported
- Multi-User Muti-User, MU
- Beamformer used to identify whether the beamformer is supported, that is, a single-user (Single-User, SU) is supported.
- the AP judges whether the STA supports the first WiFi protocol, it can judge according to at least one reference field provided in Table 1 and/or Table 2 above.
- the reference field when it is determined that there is at least one field with a value of 1, it is determined that the STA supports the first WiFi protocol.
- the AP can accurately identify the protocol capability of the STA according to the related packets during the STA's access process, and then accurately determine whether the currently used WiFi protocol needs to be adjusted.
- Manner 3 The AP determines whether the STA supports the first WiFi protocol by querying a local or cloud database.
- the AP can set up a database locally or in the cloud, and the database is used to store the information of the STA accessing the AP.
- the information of the STA includes information such as the STA's device identifier and protocol capability.
- the STA's device identifier can be stored in the database. , whether the STA supports the first WiFi protocol, the latest WiFi protocol supported by the STA, etc., where the device identification of the STA is used to identify the STA, for example, the device identification of the STA can be the medium access control (Medium Access Control, MAC) address of the STA , the device model that can uniquely identify the STA, and other information.
- Medium Access Control Medium Access Control
- the initial information in the database can be set by the user.
- the AP can write the information of the STA into the database.
- the AP when the AP works in the first WiFi protocol, if the STA fails to access the AP, the AP can write the STA's MAC address into the database and mark the STA as not supporting the first WiFi protocol; if the STA successfully accesses the AP, Then the AP can write the MAC address of the STA into the database, and mark that the STA supports the first WiFi protocol, that is, the STA is compatible with WiFi 6 without any problem.
- the AP can update the historical information of the STA in the database with the newly determined information of the STA. If the AP can determine the maximum protocol capability of the STA, that is, the latest WiFi protocol that the STA can support, the AP can write the STA's MAC address and the latest WiFi protocol version that the STA can support into the database for storage.
- the AP can quickly and accurately determine whether the accessing STA can establish a connection with the AP using a certain WiFi protocol according to the information in the database, and then determine whether the WiFi protocol used needs to be adjusted when connecting with the STA.
- the AP can also combine some of the above methods to determine whether the STA supports the first WiFi protocol. For example, the AP can first use the above method 2 to determine the WiFi protocol used by the STA requesting access. If the WiFi protocol is the same as the first WiFi protocol. If the WiFi protocol version is the same, the AP can use the first WiFi protocol to establish a WiFi connection with the STA. Otherwise, the AP can use the above method 3 to query the protocol capability of the STA from the database to determine whether the first WiFi protocol can be used with the STA. A WiFi connection is established, so as to more accurately determine whether the STA supports the first WiFi protocol.
- the AP can choose a method for judging the STA protocol capability according to the actual scenario requirements or user requirements, and the solution implementation is more flexible.
- the AP determines, according to the first WiFi protocol and the second WiFi protocol, whether the first STA supports establishing a WiFi connection with the AP using the first WiFi protocol.
- the AP may use at least one of the following methods to determine whether the STA supports the first WiFi protocol:
- the version of the first WiFi protocol is higher than the version of the second WiFi protocol, it is determined that the first STA does not support establishing a WiFi connection with the AP using the first WiFi protocol.
- the AP can establish a WiFi connection with the STA using the WiFi protocol used by the STA to request access to ensure that the STA can access successfully.
- the WiFi protocol adopted when establishing a WiFi connection with the STA can be dynamically adjusted according to the WiFi protocol adopted by each STA.
- the version of the first WiFi protocol is higher than the version of the second WiFi protocol, perform a connection process at least once, and if the number of times that the WiFi connection fails to be established with the first STA is less than a set threshold, determine the The first STA supports establishing a WiFi connection with the AP using the first WiFi protocol; if the number of failures to establish a WiFi connection with the first STA exceeds the set threshold, it is determined that the first STA does not support using the first STA.
- the first WiFi protocol establishes a WiFi connection with the AP; wherein, each connection process includes the following steps: using the first WiFi protocol to establish a WiFi connection with the first STA.
- the STA sends a probe request to the AP to request access to the AP, but when it does not receive the probe response returned by the AP, the STA can repeatedly send a probe request to the AP within a short period of time according to user operations to request access.
- AP so after the AP receives the probe request for the first time, it directly uses the first WiFi protocol to establish a WiFi connection with the STA.
- the AP can receive the first WiFi Within the set time period after the probe request, each time a probe request is received, a WiFi connection is established with the STA using the first WiFi protocol, until the connection is successfully established or the number of failed connection establishments within the set time period exceeds the set up to the threshold.
- the AP determines that the connection establishment is successful, it determines that the first STA supports the establishment of a WiFi connection with the AP using the first WiFi protocol, and when the AP determines that the number of failures to establish a connection within a set time period exceeds the set threshold , determining that the first STA does not support establishing a WiFi connection with the AP by using the first WiFi protocol.
- the device identifier of the first STA is stored in the database, it is determined that the first STA does not support using the first WiFi protocol to establish a WiFi connection with the AP; otherwise, it is determined that the first STA supports using the first WiFi protocol.
- the first WiFi protocol establishes a WiFi connection with the AP; wherein, the database is used to store a device identifier of a target STA, and the target STA is a STA that does not support establishing a WiFi connection with the AP using the first WiFi protocol.
- the AP determines that the first STA supports establishing a WiFi connection with the AP using the first WiFi protocol, then the AP establishes a WiFi connection with the first STA using the first WiFi protocol; If the STA does not support using the first WiFi protocol to establish a WiFi connection with the AP, the second WiFi protocol is used to establish a WiFi connection with the first STA.
- the above-mentioned AP can determine whether the STA supports the first WiFi protocol according to the first WiFi protocol adopted by itself and the second WiFi protocol adopted by the STA, and can determine the method of establishing a WiFi connection with the STA, thereby ensuring that the WiFi protocol supported by the STA can be adopted, Establish a WiFi connection with the STA.
- the AP can use the latest WiFi protocol by default after the hotspot is turned on, and supports the hotspot function of the latest technical standard, which can ensure the high performance advantage.
- the AP can automatically switch to The lower version of the WiFi protocol, or dynamically adjusting the WiFi protocol adopted by the hotspot according to the STA's protocol capabilities, can ensure the basic access function of the STA, solve the compatibility problem, and maximize the performance of the STA and the AP.
- the WiFi connection method provided by the present application will be exemplarily described below with reference to specific examples.
- the STA may request to access the AP multiple times in a short period of time.
- a WiFi protocol mode each time a STA requests access, if the STA access authentication or association fails, add 1 to the number of access failures of the STA.
- the AP switches to the working mode using the second WiFi protocol, and then connects to the STA, and can use the second WiFi protocol to connect with other STAs that will be accessed later.
- the AP can also notify the previous connection.
- the incoming STA switches to use the second WiFi protocol for communication.
- the AP may switch back to the mode of using the first WiFi protocol.
- the version of the first WiFi protocol is higher than the version of the second WiFi protocol, and the second WiFi protocol is the latest version of the WiFi protocol supported and adopted by the STA.
- the AP can use the first WiFi protocol to work by default, and when the STA that does not support the first WiFi protocol accesses, it starts to monitor the access status information of the STA. Status statistics whether the STA is successfully connected. If it is determined that the STA fails to connect, add 1 to the number of access failures of the STA. If it is determined that the STA access is successful, the recorded number of access failures of the STA is cleared to zero. In order to re-record the number of access failures when the STA accesses next time. Each time the STA accesses, the AP records the number of times that the STA fails to access, and until the number of times reaches the failure threshold, the AP switches to the mode that uses the second WiFi protocol to work.
- the AP when the AP switches to the mode that uses the second WiFi protocol to work, if there is an STA that has established a connection with the AP using the first WiFi mode, the AP can notify the connected The STA switches to use the first WiFi protocol to communicate with the AP. Further, when the STA switches to communicate with the AP in the first WiFi mode, if there is a compatibility problem such as one of the AP and the connected STA cannot receive or identify the message of the other party, the AP cuts off the communication connection with the connected STA. After the disassociation is realized, the STA uses the second WiFi protocol to access the AP again.
- the AP when the AP switches to the mode that uses the second WiFi protocol to work, if there is a STA that has established a connection with the AP using the first WiFi mode, the AP can directly disconnect the STA with the connected STA. After the communication connection is disassociated, the STA uses the second WiFi protocol to access the AP again.
- the AP after the AP opens the hotspot, it supports the hotspot function using the first WiFi protocol by default. In the scenario where the STA device cannot be connected due to compatibility issues, the AP automatically switches the hotspot using the first WiFi protocol to the one using the second WiFi protocol.
- the WiFi hotspot can realize both the high performance of the WiFi hotspot using the first WiFi protocol and the basic access function of the STA using the second WiFi protocol, and solve the compatibility problem.
- the first WiFi protocol adopted by the AP is WiFi 6
- the latest WiFi protocol that the STA can support is WiFi 5 or WiFi 6 as an example to illustrate the WiFi connection method.
- a flow of a WiFi connection method provided by an embodiment of the present application may include:
- S801 The AP turns on the WiFi hotspot and uses the WiFi 6 protocol to work.
- step S802 The AP determines whether the STA adopts the WiFi6 protocol, and if so, executes step S803, otherwise, executes step S804.
- the AP determines whether the STA requesting access adopts the WiFi 6 protocol.
- the WiFi protocol adopted by the STA can be obtained according to the three methods provided in the above embodiment to determine whether the STA adopts the WiFi 6 protocol. Here No longer.
- the AP establishes a connection with the STA by using the WiFi 6 protocol, and communicates with the STA by using the latest version of the WiFi protocol supported by the STA after the connection is established.
- S804 The AP uses the WiFi 6 protocol to establish a connection with the STA.
- the AP when the AP determines that the STA does not use the WiFi 6 protocol, it can first use the WiFi 6 protocol to try to establish a connection with the STA. If the connection is established successfully, the AP can use the WiFi protocol that the STA can support to communicate with the STA. If the connection fails, then The AP can perform subsequent adjustment of the WiFi protocol.
- step S805 The AP determines whether the connection is successfully established with the STA, if yes, executes step S806, otherwise, executes step S807.
- S806 The AP uses the latest version of the WiFi protocol supported by the STA to communicate with the STA.
- the AP adds 1 to the number of times that the AP fails to establish a connection with the STA.
- step S808 The AP determines whether the number of times of failure to establish a connection with the STA reaches a set threshold, and if so, executes step S809; otherwise, executes step S804.
- the AP switches to work using the WiFi 5 protocol, establishes a connection with the STA using the WiFi 5 protocol, and uses the WiFi 5 protocol to communicate with the STA after the connection is established.
- the AP determines that the STA is the first STA to access the AP, after the AP switches to use the WiFi 5 protocol, the subsequent STA accesses use the WiFi 5 protocol. If the AP determines that the STA is not the first STA to access the AP, the AP notifies the STA that previously accessed the AP to switch to using the WiFi 5 protocol for communication.
- the AP may send a WiFi protocol switching instruction to each STA that previously accessed the AP, to instruct these STAs to use signaling, data, etc. based on the WiFi 5 protocol to interact with the AP .
- the AP may send a broadcast message to notify the STA that previously accessed the AP to switch to using the WiFi 5 protocol for communication. If the STA that receives the broadcast message uses WiFi 6 The protocol can be switched to the WiFi 5 protocol, so that the signaling, data, etc. based on the WiFi 5 protocol are used to interact with the AP. If the STA that receives the broadcast message adopts the WiFi 5 protocol, the broadcast message can be ignored.
- the AP After the STA that accesses the AP before the AP notification switches to use the WiFi 5 protocol for communication, if there is a compatibility problem when the STA after switching the WiFi protocol communicates with the AP, the AP cuts off the connection with the STA, and the STA From the WiFi protocol switching instruction or broadcast message from the AP, it can be determined that the WiFi protocol currently adopted by the AP is WiFi 5, and the STA uses the WiFi 5 protocol to re-send a probe request to the AP, thereby re-establishing a connection with the AP.
- the AP adopts the maximum protocol capability, that is, the WiFi 6 protocol capability, when the AP opens the WiFi hotspot.
- the maximum protocol capability that is, the WiFi 6 protocol capability
- the AP opens the WiFi hotspot.
- the STA access authentication and association fail, the number of STA connection failures is accumulated.
- the back-off is to use WiFi 5. Hotspot status, so the AP can dynamically adjust the protocol capability according to the access success rate of the STA, thereby ensuring the basic access function of the STA.
- the AP when the AP accesses the STA each time, if it is determined according to the protocol capability information of the STA that the STA supports the first WiFi protocol, the AP adopts the first WiFi protocol. Establish a connection with the STA, and after the connection is successfully established with the STA, use the first WiFi protocol to communicate with the STA; if it is determined according to the STA's protocol capability information that the STA does not support the first WiFi protocol, the AP First determine the latest WiFi protocol supported by the STA, that is, the second WiFi protocol, then use the second WiFi protocol to establish a connection with the STA, and after the connection is successfully established with the STA, use the second WiFi protocol to communicate with the STA. to communicate with the STA.
- the AP when the STA accessing the AP supports the first WiFi protocol, the AP can use the first WiFi protocol to connect and respond to the STA; when the STA accessing the AP does not support the first WiFi protocol, the AP can use the STA capable of The supported second WiFi protocol connects and responds to the STA, and can dynamically adjust the WiFi protocol adopted by the AP, so that the protocol capability of the AP to open a WiFi hotspot varies with the protocol capability of the STA. Therefore, each STA accessing the AP can It uses the latest protocol capabilities it supports to access the AP, which solves the compatibility problem and ensures that the performance of the AP and STA is not affected.
- the AP after the AP turns on the WiFi hotspot, it works in the mode using the WiFi 6 protocol by default.
- the AP can extract the WiFi 6 compatibility based on the scan access information from the STA.
- the key influencing factors include the probe request described in the above embodiment, the reference field in the connection request, and the like.
- the AP can determine whether the STA supports the WiFi 6 protocol according to the extracted key factor of WiFi 6 compatibility.
- the AP can further use the access information from the STA (such as the probe request shown in the figure) Query the database to determine the maximum access capability of the STA, that is, the latest compatible WiFi protocol version when the STA can establish a connection with the AP. Then the AP can adjust the WiFi protocol used according to the maximum access capability supported by the STA, and then use the adjusted WiFi protocol to reply to the STA. Specifically, for STAs that have compatibility problems with WiFi 6 hotspots, the AP can use the WiFi 5 protocol to respond, and for STAs that are compatible with WiFi 6 hotspots without problems, the AP can use the WiFi 6 protocol to respond. Among them, the database can be queried through the local database or cloud data information, and the AP can also refresh the local or cloud database according to the STA's access status feedback.
- a flow of a WiFi connection method provided by an embodiment of the present application may include:
- S1001 The AP turns on the WiFi hotspot and uses the WiFi 6 protocol to work.
- step S1002 The AP determines whether the STA adopts the WiFi 6 protocol, and if so, executes step S1003, otherwise, executes step S1004.
- the AP determines whether the STA requesting access adopts the WiFi 6 protocol according to the probe request from the STA.
- the WiFi protocol adopted by the STA can be obtained according to the three methods provided in the above embodiment to determine whether the STA is used.
- the WiFi 6 protocol is used, which will not be repeated here.
- the AP establishes a connection with the STA by using the WiFi 6 protocol, and communicates with the STA by using the latest version of the WiFi protocol supported by the STA after the connection is established.
- the AP determines the protocol capability of the STA by querying the database.
- the AP determines whether the STA is compatible with the first WiFi protocol by querying the database. For details, refer to the method in the above embodiment, which will not be repeated here.
- step S1005 The AP determines whether the STA supports access using the WiFi 6 protocol, and if so, executes step S1003, otherwise, executes step S1006.
- the AP uses the WiFi 5 protocol to establish a connection with the STA, and uses the WiFi 5 protocol to communicate with the STA after the connection is established.
- the AP adopts the maximum protocol capability, namely the WiFi 6 protocol capability, when enabling the WiFi hotspot.
- the AP can dynamically adjust the protocol capability adopted by the WiFi hotspot according to the STA's authentication access information and the association result, corresponding to the The STAs interact with each other, which ensures the best performance of STA access and avoids the compatibility problem that may exist in the STA access process.
- the apparatus 1100 may include: a transceiver unit 1101 and a processing unit 1102;
- the transceiver unit 1101 is configured to receive a probe request from the first site STA in a state where the WiFi hotspot is enabled by using the first WiFi protocol, and the probe request is used to request to establish a WiFi connection with the AP; the processing The unit 1102 is configured to determine the second WiFi protocol adopted by the first STA; according to the first WiFi protocol and the second WiFi protocol, determine whether the first STA supports the use of the first WiFi protocol and the second WiFi protocol.
- the AP establishes a WiFi connection; if it is determined that the first STA supports establishing a WiFi connection with the AP using the first WiFi protocol, then the first WiFi protocol is used to establish a WiFi connection with the first STA; If the first STA does not support establishing a WiFi connection with the AP using the first WiFi protocol, the second WiFi protocol is used to establish a WiFi connection with the first STA.
- the processing unit 1102 is further configured to: when receiving the probe request sent by the second STA, use the The second WiFi protocol establishes a WiFi connection with the second STA, where the second STA is a STA that requests to establish a WiFi connection with the AP after the first STA.
- the processing unit 1102 is further configured to: notify a third STA to use the second WiFi protocol to perform a connection with the AP communication, wherein the third STA is a STA that has established a WiFi connection with the AP using the first WiFi protocol before the first STA; or disconnects the WiFi connection with the third STA, and uses the first WiFi protocol to establish a WiFi connection with the AP;
- the second WiFi protocol establishes a WiFi connection with the third STA.
- the probe request carries indication information for indicating the second WiFi protocol; when the processing unit 1102 determines the second WiFi protocol adopted by the first STA, it is specifically used for: Obtain the indication information from the probe request; and determine the second WiFi protocol indicated by the indication information.
- the first WiFi protocol is a fifth-generation WiFi protocol or a sixth-generation WiFi protocol
- the second WiFi protocol is a fifth-generation WiFi protocol or a sixth-generation WiFi protocol.
- the processing unit 1102 determines the second WiFi protocol adopted by the first STA
- the processing unit 1102 is specifically configured to: determine a reference field included in the packet carrying the probe request, the reference field It is used to indicate whether the first STA supports the WiFi protocol of the set version; if the value of the reference field is the first value, it is determined that the second WiFi protocol is the WiFi protocol of the set version; If the value of the reference field is the second value, it is determined that the second WiFi protocol is a WiFi protocol that is one version lower than the set version.
- the reference field includes at least one of the following: target wake-up time requester support field; target wake-up time responder support field; broadcast target wake-up time field; buffer status report support field; Multiple Access Random Access Support Field; Supported Channel Bandwidth Setting Field; Censored Preamble Receive Field; Low Density Parity Check Code Field in Payload; Full Bandwidth Uplink Multi-User Multiple Input Multiple Output Field; Uplink multi-user multiple-input multiple-output field; dual-carrier modulation technology maximum constellation group reception field; dual-carrier modulation technology maximum constellation group transmission field; multi-user beamformer field.
- the processing unit 1102 determines, according to the first WiFi protocol and/or the second WiFi protocol, whether the first STA supports establishing with the AP using the first WiFi protocol During WiFi connection, it is specifically used to: if the first WiFi protocol and the second WiFi protocol have the same version, determine that the first STA supports establishing a WiFi connection with the AP using the first WiFi protocol; or If the version of the first WiFi protocol is higher than the version of the second WiFi protocol, it is determined that the first STA does not support using the first WiFi protocol to establish a WiFi connection with the AP; or if the first WiFi protocol is used to establish a WiFi connection with the AP; The version of the WiFi protocol is higher than the version of the second WiFi protocol, and at least one connection process is performed.
- the first WiFi protocol establishes a WiFi connection with the AP; if the number of failures to establish a WiFi connection with the first STA exceeds the set threshold, it is determined that the first STA does not support the use of the first WiFi protocol to communicate with the AP.
- each connection process includes the following steps: using the first WiFi protocol to establish a WiFi connection with the first STA; or if the device identifier of the first STA is stored in the database, determining The first STA does not support establishing a WiFi connection with the AP using the first WiFi protocol; otherwise, it is determined that the first STA supports establishing a WiFi connection with the AP using the first WiFi protocol; wherein, the The database is used to store the device identifier of the target STA, where the target STA is a STA that does not support establishing a WiFi connection with the AP by using the first WiFi protocol.
- the processing unit 1102 is further configured to: store the device identifier of the first STA in the database middle.
- the device identification of the first STA is the medium access control MAC address of the first STA.
- processing unit 1102 is also used for:
- the first WiFi protocol is the highest version of the WiFi protocol supported and adopted by the AP
- the second WiFi protocol is the highest version of the WiFi protocol supported and adopted by the first STA.
- the transceiving unit 1101 may be an interface circuit of the apparatus 1100, and is used for receiving data from other apparatuses, for example, receiving a message or data from a STA.
- the transceiver unit 1101 may be an interface circuit used by the chip to receive data from or send data to other chips or devices.
- the processing unit 1102 may be a processor or a controller, such as a general-purpose central processing unit (CPU), general-purpose processor, digital signal processing (digital signal processing, DSP), application specific integrated circuit (application specific integrated circuit) circuits, ASIC), field programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logical blocks, modules, etc. described in connection with this disclosure.
- the processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
- the division of units in the embodiments of the present application is schematic, and is only a logical function division. In actual implementation, there may be other division methods.
- the functional units in the various embodiments of the present application may be integrated into one processing unit. In the device, it can also exist physically alone, or two or more units can be integrated into one unit.
- the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
- the software or firmware includes, but is not limited to, computer program instructions or code, and can be executed by a hardware processor.
- the hardware includes, but is not limited to, various types of integrated circuits, such as a central processing unit (CPU), a digital signal processor (DSP), a field programmable gate array (FPGA), or an application specific integrated circuit (ASIC).
- CPU central processing unit
- DSP digital signal processor
- FPGA field programmable gate array
- ASIC application specific integrated circuit
- the embodiments of the present application further provide an apparatus for implementing the WiFi connection method provided by the embodiments of the present application.
- the apparatus 1200 may be an AP, or may be a chip or a chip system in the AP.
- the apparatus 1200 may also be an electronic device capable of executing the WiFi connection method provided by the present application, or a structure such as a chip or an integrated circuit.
- the apparatus 1200 includes a transceiver 1201 , a memory 1202 and at least one processor 1203 .
- the processor 1203 is coupled with the transceiver 1201, and the coupling in this embodiment of the present application is an indirect coupling or a communication connection between devices, units, or modules, which may be electrical, mechanical, or other forms, for Information exchange between devices, units or modules.
- the transceiver 1201 can be a circuit, a bus, a communication interface, or any other module that can be used for information interaction, and can be used to receive or send information.
- the memory 1202 is coupled to the transceiver 1201 and the processor 1203 for storing program instructions.
- the processor 1203 is configured to invoke the program instructions stored in the memory 1202, so that the apparatus 1200 executes the steps performed by the AP in the WiFi connection method provided in the embodiments of the present application, so as to realize the establishment of a WiFi connection between the AP and the STA requesting access.
- the transceiver 1201 is used for receiving and transmitting radio frequency signals, and is coupled to the receiver and the transmitter of the device 1200 .
- the transceiver 1201 communicates with the communication network and other communication devices through radio frequency signals, such as Ethernet (Ethernet), Radio Access Technology (RAN), Wireless Local Area Networks (WLAN) and the like.
- the communication protocol supported by the transceiver 1201 includes at least a WiFi protocol, and may also include: 2G/3G, Long Term Evolution (Long Term Evolution, LTE), 5G New Radio (New Radio, NR) and the like.
- the memory 1202 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices.
- the memory 1202 may store an operating system (hereinafter referred to as a system), such as an embedded operating system such as ANDROID, IOS, WINDOWS, or LINUX.
- the memory 1202 may be used to store the implementation programs of the embodiments of the present application.
- the memory 1202 may also store a network communication program that can be used to communicate with one or more additional devices, one or more user devices, and one or more network devices.
- the processor 1203 may be a general-purpose central processing unit (Central Processing Unit, CPU), a microprocessor, an application-specific integrated circuit (Application-Specific Integrated Circuit, ASIC), or one or more programs for controlling the solution of the present application. implemented integrated circuits.
- CPU Central Processing Unit
- ASIC Application-Specific Integrated Circuit
- the transceiver 1201, the memory 1202, and the processor 1203 may be connected to each other through a communication line 1204;
- the communication line 1204 may be a Peripheral Component Interconnect (PCI for short) bus or an extension Industry standard structure (Extended Industry Standard Architecture, referred to as EISA) bus and so on.
- PCI Peripheral Component Interconnect
- EISA Extended Industry Standard Architecture
- the communication line 1204 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in FIG. 12, but it does not mean that there is only one bus or one type of bus.
- FIG. 12 is only an implementation manner of the embodiment of the present application.
- the apparatus 1200 may further include more or less components, which is not limited here.
- the methods provided in the embodiments of the present application may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
- software When implemented in software, it can be implemented in whole or in part in the form of a computer program product.
- the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated.
- the computer may be a general purpose computer, a special purpose computer, a computer network, network equipment, user equipment, or other programmable apparatus.
- the computer instructions may be stored in or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server or data center Transmission to another website site, computer, server or data center by means of wired (such as coaxial cable, optical fiber, digital subscriber line, DSL for short) or wireless (such as infrared, wireless, microwave, etc.)
- a computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media.
- the available media can be magnetic media (eg, floppy disks, hard disks, magnetic tape), optical media (eg, digital video disc (DVD) for short), or semiconductor media (eg, SSD), and the like.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Databases & Information Systems (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
本申请提供一种WiFi连接方法及装置,该方法包括:在采用第一WiFi协议开启WiFi热点的状态下,接收来自第一站点STA的探测请求;确定第一STA采用的第二WiFi协议;根据第一WiFi协议和第二WiFi协议,判断第一STA是否支持采用第一WiFi协议与AP建立WiFi连接;若确定第一STA支持采用第一WiFi协议与AP建立WiFi连接,则采用第一WiFi协议与第一STA建立WiFi连接;若确定第一STA不支持采第一WiFi协议与AP建立WiFi连接,则采用第二WiFi协议与第一STA建立WiFi连接。本申请提供的方案,能够提高STA接入AP的成功率,减少兼容性问题。
Description
相关申请的交叉引用
本申请要求在2021年04月30日提交中国专利局、申请号为202110478869.7、申请名称为“一种WiFi连接方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及通信技术领域,尤其涉及一种WiFi连接方法及装置。
第六代无线保真(Wireless Fidelity,WiFi)技术即WiFi 6技术,是WiFi联盟创建于IEEE 802.11标准的无线局域网技术。当前大部分手机都支持采用WiFi 6技术,并作为站点(Station,STA)或接入点(Access Point,AP)设备进行工作。
在AP采用WiFi 6技术的情况下,STA采用的WiFi协议版本可能无法支持WiFi 6技术,因此STA在接入AP时可能会存在较为严重的兼容问题,导致STA无法与AP建立良好的通信连接。例如,手机作为AP,笔记本电脑作为STA的场景下,在手机开启WiFi 6热点后,当前很多笔记本电脑都无法扫描到手机开启的热点,而在手机开启第五代WiFi(WiFi 5)热点后,这些笔记本电脑是可以扫描到手机开启的热点的。
目前可以通过手动配置WiFi技术版本或者打开最大兼容的方式,尽可能使STA与AP能够建立通信连接,来解决上述兼容性问题。但是,手动配置WiFi技术版本的方式仍然可能存在上述兼容问题,而打开最大兼容的方式则会造成STA和AP连接时可用的频段和协议版本受到较大限制。因此上述方式的兼容性问题解决效果较差,且可能存在STA接入失败、STA或AP性能受影响等问题。
发明内容
本申请提供一种WiFi连接方法,用以提高STA接入AP的成功率,减少兼容性问题,并降低对STA和AP性能的影响。
第一方面,本申请提供一种WiFi连接方法,应用于AP,该方法包括:在采用第一WiFi协议开启WiFi热点的状态下,接收来自第一站点STA的探测请求,所述探测请求用于请求与所述AP建立WiFi连接;确定所述第一STA采用的第二WiFi协议;根据所述第一WiFi协议和所述第二WiFi协议,判断所述第一STA是否支持采用所述第一WiFi协议与所述AP建立WiFi连接;若确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接,则采用所述第一WiFi协议与所述第一STA建立WiFi连接;若确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接,则采用所述第二WiFi协议与所述第一STA建立WiFi连接。
在该方法中,AP在与STA建立WiFi连接时,AP可以根据自身采用的WiFi协议和STA采用的WiFi协议,确定STA所支持的WiFi协议,从而调整与STA建立WiFi连接时 所采用的WiFi协议,这样AP可以采用STA能够兼容的WiFi协议与STA建立WiFi连接,进而保证STA的基本接入功能,并提高STA接入AP的成功率,减少兼容性问题,同时最大程度保证STA和AP的性能。
在一种可能的设计中,在采用所述第二WiFi协议与所述第一STA建立WiFi连接之后,所述方法还包括:在接收到第二STA发送的探测请求时,采用所述第二WiFi协议与所述第二STA建立WiFi连接,其中,所述第二STA为在所述第一STA之后请求与所述AP建立WiFi连接的STA。
在该方法中,AP采用第二WiFi协议与STA建立WiFi连接,同时也采用该第二WiFi协议与后续请求接入的STA建立WiFi连接,能够实现在采用较低版本WiFi协议的STA接入时,切换为采用较低版本WiFi协议工作的模式,保证这些STA的基本接入功能。
在一种可能的设计中,在采用所述第二WiFi协议与所述第一STA建立WiFi连接之后,所述方法还包括:通知第三STA采用第二WiFi协议与所述AP进行通信,其中,所述第三STA为在所述第一STA之前已采用所述第一WiFi协议与所述AP建立WiFi连接的STA;或者断开与所述第三STA的WiFi连接,并采用所述第二WiFi协议与所述第三STA建立WiFi连接。
在该方法中,AP采用第二WiFi协议与STA建立WiFi连接后,通知之前采用第一WiFi协议与AP建立WiFi连接的STA切换为采用第二WiFi协议,能够避免因AP切换采用的WiFi协议后,影响之前接入AP的STA的接入功能。
在一种可能的设计中,所述探测请求中携带用于指示所述第二WiFi协议的指示信息;确定所述第一STA采用的第二WiFi协议,包括:从所述探测请求中获取所述指示信息;确定所述指示信息所指示的所述第二WiFi协议。
在该方法中,AP能够根据STA探测请求中的指示信息,简便快速的确定STA所采用的WiFi协议,进而得到STA的协议能力。
在一种可能的设计中,所述第一WiFi协议为第五代WiFi协议或第六代WiFi协议,所述第二WiFi协议为第五代WiFi协议或第六代WiFi协议。
在该方法中,由于目前应用比较广泛的WiFi技术标准是当前最新的WiFi 6技术,造成STA接入AP过程中存在的兼容问题也大多是WiFi 6技术与WiFi 5技术之间的兼容性问题,因此,本申请提供的方法可以应用到采用WiFi 6技术或WiFi 5技术的AP中,解决WiFi 6技术与WiFi 5技术之间的兼容性问题。
在一种可能的设计中,确定所述第一STA采用的第二WiFi协议,包括:确定承载所述探测请求的报文中包含的参考字段,所述参考字段用于指示所述第一STA是否支持设定版本的WiFi协议;若所述参考字段的取值为第一值,则确定所述第二WiFi协议为所述设定版本的WiFi协议;若所述参考字段的取值为第二值,则确定所述第二WiFi协议为比所述设定版本低一个版本的WiFi协议。
在该方法中,AP可以根据承载STA探测请求的报文进行字段分析,能够根据多种字段信息,自行识别STA所采用的WiFi协议,进而得到STA的协议能力。
在一种可能的设计中,所述参考字段包括以下至少一项:目标唤醒时间请求端支持字段;目标唤醒时间应答端支持字段;广播目标唤醒时间字段;缓存状态报告持字段;正交频分多址接入随机接入支持字段;支持的信道带宽设置字段;删失前导接收字段;有效载荷中的低密度奇偶校验码字段;全带宽上行链路多用户多输入多输出字段;部分带宽上行 链路多用户多输入多输出字段;双载波调制技术最大星座群接收字段;双载波调制技术最大星座群发送字段;多用户波束成形器字段。
在一种可能的设计中,根据所述第一WiFi协议和/或所述第二WiFi协议,判断所述第一STA是否支持采用所述第一WiFi协议与所述AP建立WiFi连接,包括:若所述第一WiFi协议与所述第二WiFi协议的版本相同,则确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接;或者若所述第一WiFi协议的版本高于所述第二WiFi协议的版本,则确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接;或者若所述第一WiFi协议的版本高于所述第二WiFi协议的版本,执行至少一次连接过程,若与所述第一STA建立WiFi连接失败的次数小于设定阈值,则确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接;若与所述第一STA建立WiFi连接失败的次数超过所述设定阈值,则确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接;其中,每次连接过程包括以下步骤:采用所述第一WiFi协议与所述第一STA建立WiFi连接;或者若数据库中存储有所述第一STA的设备标识,则确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接;否则,确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接;其中,所述数据库用于存储目标STA的设备标识,所述目标STA为不支持采用所述第一WiFi协议与AP建立WiFi连接的STA。
在该方法中,AP能够根据自身采用的WiFi协议和STA采用的WiFi协议,更准确的判断STA的接入能力,且AP可以通过多种方式确定与STA建立WiFi连接时采用的WiFi协议,方案实施的灵活性较高,能够适应多种不同场景下的WiFi连接过程。
在一种可能的设计中,在采用所述第二WiFi协议与所述第一STA建立WiFi连接之后,所述方法还包括:将所述第一STA的设备标识存储到所述数据库中。
在该方法中,AP可以根据STA的接入结果,补充或更新数据库中的信息,能够不断丰富数据库内容,并保证数据库中内容的准确性。
在一种可能的设计中,所述第一STA的设备标识为所述第一STA的介质访问控制MAC地址。
在一种可能的设计中,所述方法还包括:
在采用所述第一WiFi协议与所述第一STA建立WiFi连接后,采用所述第一WiFi协议或所述第二WiFi协议与所述第一STA进行通信;在采用所述第二WiFi协议与所述第一STA建立WiFi连接后,采用所述第二WiFi协议与所述第一STA进行通信。
在该方法中,AP与STA建立WiFi连接后,可以与STA进行通信,其中,AP与STA进行通信时采用的WiFi协议为STA请求接入时所采用的WiFi协议,可以保证STA与AP的正常通信。
在一种可能的设计中,所述第一WiFi协议为所述AP支持采用的最高版本的WiFi协议,所述第二WiFi协议为所述第一STA支持采用的最高版本的WiFi协议。
第二方面,本申请提供一种装置,该装置包括:收发单元,用于在采用第一WiFi协议开启WiFi热点的状态下,接收来自第一站点STA的探测请求,所述探测请求用于请求与所述AP建立WiFi连接;处理单元,用于确定所述第一STA采用的第二WiFi协议;根据所述第一WiFi协议和所述第二WiFi协议,判断所述第一STA是否支持采用所述第一WiFi协议与所述AP建立WiFi连接;若确定所述第一STA支持采用所述第一WiFi协议与 所述AP建立WiFi连接,则采用所述第一WiFi协议与所述第一STA建立WiFi连接;若确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接,则采用所述第二WiFi协议与所述第一STA建立WiFi连接。
在一种可能的设计中,在采用所述第二WiFi协议与所述第一STA建立WiFi连接之后,所述处理单元还用于:在接收到第二STA发送的探测请求时,采用所述第二WiFi协议与所述第二STA建立WiFi连接,其中,所述第二STA为在所述第一STA之后请求与所述AP建立WiFi连接的STA。
在一种可能的设计中,在采用所述第二WiFi协议与所述第一STA建立WiFi连接之后,所述处理单元还用于:通知第三STA采用第二WiFi协议与所述AP进行通信,其中,所述第三STA为在所述第一STA之前已采用所述第一WiFi协议与所述AP建立WiFi连接的STA;或者断开与所述第三STA的WiFi连接,并采用所述第二WiFi协议与所述第三STA建立WiFi连接。
在一种可能的设计中,所述探测请求中携带用于指示所述第二WiFi协议的指示信息;所述处理单元确定所述第一STA采用的第二WiFi协议时,具体用于:从所述探测请求中获取所述指示信息;确定所述指示信息所指示的所述第二WiFi协议。
在一种可能的设计中,所述第一WiFi协议为第五代WiFi协议或第六代WiFi协议,所述第二WiFi协议为第五代WiFi协议或第六代WiFi协议。
在一种可能的设计中,所述处理单元确定所述第一STA采用的第二WiFi协议时,具体用于:确定承载所述探测请求的报文中包含的参考字段,所述参考字段用于指示所述第一STA是否支持设定版本的WiFi协议;若所述参考字段的取值为第一值,则确定所述第二WiFi协议为所述设定版本的WiFi协议;若所述参考字段的取值为第二值,则确定所述第二WiFi协议为比所述设定版本低一个版本的WiFi协议。
在一种可能的设计中,所述参考字段包括以下至少一项:目标唤醒时间请求端支持字段;目标唤醒时间应答端支持字段;广播目标唤醒时间字段;缓存状态报告持字段;正交频分多址接入随机接入支持字段;支持的信道带宽设置字段;删失前导接收字段;有效载荷中的低密度奇偶校验码字段;全带宽上行链路多用户多输入多输出字段;部分带宽上行链路多用户多输入多输出字段;双载波调制技术最大星座群接收字段;双载波调制技术最大星座群发送字段;多用户波束成形器字段。
在一种可能的设计中,所述处理单元根据所述第一WiFi协议和/或所述第二WiFi协议,判断所述第一STA是否支持采用所述第一WiFi协议与所述AP建立WiFi连接时,具体用于:若所述第一WiFi协议与所述第二WiFi协议的版本相同,则确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接;或者若所述第一WiFi协议的版本高于所述第二WiFi协议的版本,则确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接;或者若所述第一WiFi协议的版本高于所述第二WiFi协议的版本,执行至少一次连接过程,若与所述第一STA建立WiFi连接失败的次数小于设定阈值,则确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接;若与所述第一STA建立WiFi连接失败的次数超过所述设定阈值,则确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接;其中,每次连接过程包括以下步骤:采用所述第一WiFi协议与所述第一STA建立WiFi连接;或者若数据库中存储有所述第一STA的设备标识,则确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接;否则, 确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接;其中,所述数据库用于存储目标STA的设备标识,所述目标STA为不支持采用所述第一WiFi协议与AP建立WiFi连接的STA。
在一种可能的设计中,所述处理单元在采用所述第二WiFi协议与所述第一STA建立WiFi连接之后,还用于:将所述第一STA的设备标识存储到所述数据库中。
在一种可能的设计中,所述第一STA的设备标识为所述第一STA的介质访问控制MAC地址。
在一种可能的设计中,所述处理单元还用于:在采用所述第一WiFi协议与所述第一STA建立WiFi连接后,采用所述第一WiFi协议或所述第二WiFi协议与所述第一STA进行通信;在采用所述第二WiFi协议与所述第一STA建立WiFi连接后,采用所述第二WiFi协议与所述第一STA进行通信。
在一种可能的设计中,所述第一WiFi协议为所述AP支持采用的最高版本的WiFi协议,所述第二WiFi协议为所述第一STA支持采用的最高版本的WiFi协议。
第三方面,本申请提供一种装置,包括收发器、存储器和处理器;所述收发器用于接收来自所述装置之外的其它装置的信号并传输至所述处理器或将来自所述处理器的信号发送给所述装置之外的其它装置;所述存储器用于存储程序;所述处理器用于执行所述存储器中存储的程序,实现上述第一方面或第一方面的任一可能的设计所描述的方法。
第四方面,本申请提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,当所述计算机程序在装置上运行时,使得所述装置执行上述第一方面或第一方面的任一可能的设计所描述的方法。
第五方面,本申请提供一种计算机程序产品,所述计算机程序产品包括计算机程序或指令,当所述计算机程序或指令在装置上运行时,使得所述装置执行上述第一方面或第一方面的任一可能的设计所描述的方法。
上述第二方面到第五方面的有益效果,请参见上述第一方面的有益效果的描述,这里不再重复赘述。
图1a为本申请实施例提供的一种在不同WiFi热点频率下接入热点的设备数量的分布统计图;
图1b为本申请实施例提供的一种在不同WiFi热点频率下接入热点的设备类型的分布统计图;
图2a为一种手动配置WiFi技术版本的手机界面示意图;
图2b为一种配置最大兼容的手机界面示意图;
图3为一种传统的STA接入AP的方法示意图;
图4a为AP广播的一种Beacon帧报文的示例图;
图4b为AP广播的另一种Beacon帧报文的示例图;
图5a为本申请实施例提供的一种电子设备的硬件架构的示意图;
图5b为本申请实施例提供的一种电子设备的软件架构的示意图;
图6为本申请实施例提供的一种WiFi连接方法的示意图;
图7为本申请实施例提供的一种HE能力信息字段的格式示意图;
图8为本申请实施例提供的一种WiFi连接方法的流程示意图;
图9为本申请实施例提供的一种WiFi连接方法的示意图;
图10为本申请实施例提供的另一种WiFi连接方法的流程示意图;
图11为本申请实施例提供的一种装置的示意图;
图12为本申请实施例提供的一种装置的结构示意图。
为了使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施例作进一步地详细描述。其中,在本申请实施例的描述中,以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。
为了便于理解,示例性的给出了与本申请相关概念的说明以供参考。
1)、站点(Station,STA):也称为无线工作站,STA指连接到无线网络中的设备,这些设备可以通过接入点与无线网络内部的其它设备或者与无线网络外部通信。
本申请实施例中,STA可以是支持WiFi连接的电子设备。电子设备还可以称为终端设备,或终端,包括但不限于手机(Mobile Phone)、平板电脑、笔记本电脑、掌上电脑、移动互联网设备(Mobile Internet Device,MID)、可穿戴设备(例如智能手表、智能手环、计步器等),车辆、车载设备(例如,汽车、自行车、电动车、飞机、船舶、火车、高铁等)、虚拟现实(Virtual Reality,VR)设备、增强现实(Augmented Reality,AR)设备、工业控制(Industrial Control)中的无线终端、智能家居设备(例如,冰箱、电视、空调、电表等)、智能机器人、车间设备、无人驾驶(Self Driving)中的无线终端、远程手术(Remote Medical Surgery)中的无线终端、智能电网(Smart Grid)中的无线终端、运输安全(Transportation Safety)中的无线终端、智慧城市(Smart City)中的无线终端,或智慧家庭(Smart Home)中的无线终端、飞行设备(例如,智能机器人、热气球、无人机、飞机)等。
2)、接入点(Access Point,AP):也称为访问节点、无线接入点或热点等,是用于将STA接入无线网络的设备;AP能够实现无线网和有线网之间的通信,是组建无线局域网的核心设备。
AP可以为WiFi***中的接入点等,也可以是完成接入点部分功能的模块或单元,例如,可以是集中式单元(CentralUnit,CU),也可以是分布式单元(Distributed Unit,DU);还也可以是路由器、网桥、无线网关等。本申请对AP所采用的具体技术和具体设备形态不做限定。
本申请实施例中,AP可以为路由器,也可以为具有WiFi接入功能的其它电子设备。
3)、信标(Beacon)帧:Beacon帧是由AP定时广播发送的,用于通知AP的存在性。在STA与AP建立通信连接的过程中,STA可以通过扫描到Beacon帧来确定AP的存在。此外,STA也可以在扫描时通过主动发送探测请求(Probe Request)来探测AP是否存在。
应理解,本申请实施例中“至少一个”是指一个或者多个,“多个”是指两个或两个以上。 “和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一(项)个”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a、b或c中的至少一项(个),可以表示:a,b,c,a和b,a和c,b和c,或a、b和c,其中a、b、c可以是单个,也可以是多个。
本申请实施例中,WiFi 6技术标准采用的协议即为WiFi 6协议,因此,可以认为“WiFi 6技术标准”等同于“WiFi 6协议”。为便于描述,以下将“WiFi 6技术标准”或“WiFi 6协议”简称为“WiFi 6”,将“WiFi 5技术标准”或“WiFi 5协议”简称为“WiFi 5”。
当前STA在接入AP时,可能由于STA与AP采用的WiFi协议版本不同,造成较为严重的兼容性问题,使得STA无法成功与AP建立连接。例如,当前WiFi 6手机产品逐步推广,在手机采用WiFi 6时,其开启的热点可以是基于WiFi 6的,但是当前很多笔记本电脑采用的仍然是旧版的WiFi技术标准如WiFi 5,因此这些笔记本电脑在接入手机开启的WiFi 6热点时,可能会存在的较为严重的兼容问题,导致可能接入失败。
图1a为在不同WiFi热点频率下接入热点的设备数量的分布统计图。如图1a中所示,根据实验统计结果,在2.4GHz频段下,WiFi热点接入一个设备的统计占比达到85%;在5GHz频段下,WiFi热点接入一个设备的统计占比达到96%,可知WiFi热点接入一个设备的占比较大。此外,目前设备接入WiFi热点时可采用的频段中,相对2.4GHz频段,5GHz频段的优势更为明显,因此用户可能更期望通过5GHz接入WiFi热点来发挥设备更佳的性能。
图1b为在不同WiFi热点频率下接入热点的设备类型的分布统计图。如图1b中所示,采用5GHz频段接入热点的个人计算机(Personal Computer,PC)占总统计设备数的比例达到13%,而当前能够支持WiFi 6的PC还很少,因此PC接入WiFi 6热点时存在兼容性问题的风险很高。
综上,当前支持WiFi 6热点的设备越来越多,但也存在很多不支持WiFi 6的STA设备,因此,如何解决不支持WiFi 6的STA设备与支持WiFi 6的AP设备连接时存在的兼容性问题,是很有必要的。对此,当前主要有如下两种处理方式:
处理方式一:手动配置WiFi技术版本。
例如,以手机作为AP时,如图2a所示,手机的热点配置界面中增加“支持第六代技术标准”的控制开关,用户可以通过操作该控制开关,来设置手机采用的WiFi技术标准的版本。在用户打开该控制开关时,手机设置为WiFi 6模式,可以基于WiFi 6与接入的STA进行连接;在用户关闭该控制开关时,手机设置为WiFi 5模式,可以基于WiFi 5与接入的STA进行连接。
但是该方式中,控制开关在关闭状态下,多个STA接入时,只能按照WiFi 5规格与AP建立连接,无法兼顾STA的最佳性能,而控制开关在开启状态下,还是可能会出现上述的兼容性问题,导致STA接入AP失败。
处理方式二:AP打开最大兼容。
例如,以手机作为AP时,如图2b所示,手机的热点配置界面中增加打开最大兼容的控制开关,用户可以通过操作该控制开关,来设置手机打开最大兼容。在用户打开该控制 开关时,手机打开最大兼容,可以保证STA能够与AP成功建立连接。
但是该方式会造成STA接入时可用的频段和协议版本受到较大限制,例如手机热点频率为2.4GHz时仅支持802.11n协议(无线路由器产品支持的主流协议标准),热点频率为5GHz时支持802.11ax协议,其中802.11ax协议的版本高于802.11n协议。在打开最大兼容后,手机热点就支持2.4GHz热点频率且仅支持到802.11n协议,但STA支持的协议版本可能会高于802.11n协议,因此会限制STA接收手机热点时可用的频段和协议版本,影响STA及AP的性能以及STA与AP间的连接通信效果。
综上,上述处理方式的兼容性问题解决效果较差,可能存在STA接入失败、STA或AP性能受影响等问题。
鉴于此,本申请提供一种WiFi连接方法,用以对STA与AP之间的通信连接进行灵活控制,保证STA能够成功接入AP,并尽可能降低对STA和AP的性能的影响。
图3为传统的STA接入AP的方法示意图。参考图3所示,AP开启WiFi热点后,会周期性的广播Beacon帧,以便STA能够发现WiFi热点。STA在接入WiFi热点时,可以通过扫描Beacon帧或发送探测请求的方式,确定存在的WiFi热点。STA若成功扫描到AP广播的Beacon帧,或者STA发送探测请求后接收到AP返回的探测响应(Probe Response),则STA可以自动进行与AP的连接流程,STA与AP建立连接后可以进行通信。STA若扫描不到AP广播的Beacon帧,或者接收不到来自AP的探测响应,则无法成功接入AP。
通过抓取不同WiFi热点对应的AP广播的Beacon帧,并进行对比分析,可以确定造成兼容性问题的原因。具体的,图4a为AP广播的一种Beacon帧报文的示例图,图4b为AP广播的另一种Beacon帧报文的示例图。其中,图4a所示的AP采用的为WiFi 6,图4b中AP采用的为WiFi 5。采用WiFi 5的STA在扫描AP广播的Beacon帧时,是扫描不到图4a所示的Beacon帧的,但是能扫描到图4b所示的Beacon帧。对比抓取到的图4a、图4b所示的报文可知,图4a对应的AP所开启的WiFi热点名称为LAN111,图4b对应的AP所开启的WiFi热点名称为p30p,两个AP广播的Beacon帧之间的差异主要在于图4a中虚线框标记的高效率(High Efficiency,HE)字段,根据该字段可以确定对应的WiFi热点LAN111采用的是WiFi 6,而采用WiFi 5的STA不支持WiFi6,因此采用WiFi 5的STA在扫描热点时无法解析识别AP广播的基于WiFi 6的Beacon帧,则STA认为扫描不到AP广播的Beacn帧,也就无法准确及时的确定WiFi 6热点LAN111的存在。若要保证STA能够接入AP,则需尽可能保证STA与AP采用的WiFi技术标准是一致的。
因此,本申请实施例中,AP可以先确定接入的STA的接入状态或协议能力信息,再根据STA的接入状态或协议能力信息,调整自身与STA建立连接的方式,从而兼顾WiFi 6热点的高性能和采用WiFi 5的STA的基本接入功能,解决兼容性问题。
示例性的,图5a示出了一种电子设备的硬件架构示意图。如图5a所示,电子设备500可以包括处理器510,外部存储器接口520,内部存储器521,USB接口530,充电管理模块540,电源管理模块541,电池542,天线1,无线通信模块560,音频模块570,扬声器570A,受话器570B,麦克风570C,耳机接口570D,传感器模块580,按键590,马达591,指示器592,摄像头593,显示屏594等。
可选的,该电子设备500还可以包括天线2、移动通信模块550,SIM接口595等。
可以理解的是,图5a所示的电子设备仅仅是一个范例,并不构成对电子设备的限定,并且电子设备可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图5a中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。
处理器510可以包括一个或多个处理单元,例如:处理器510可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(Neural-network Processing Unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。其中,控制器可以是电子设备500的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器510中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器510中的存储器为高速缓冲存储器。该存储器可以保存处理器510刚用过或循环使用的指令或数据。如果处理器510需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器510的等待时间,因而提高了***的效率。
本申请实施例提供的WiFi连接方法的执行可以由处理器510来控制或调用其他部件来完成,比如调用内部存储器521中存储的本申请实施例的处理程序,来控制无线通信模块560向其他电子设备进行数据通信,以实现WiFi连接及后续通信。处理器510可以包括不同的器件,比如集成CPU和GPU时,CPU和GPU可以配合执行本申请实施例提供的WiFi连接方法,比如WiFi连接方法中部分算法由CPU执行,另一部分算法由GPU执行,以得到较快的处理效率。
显示屏594用于显示图像,视频等。显示屏594包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备500可以包括1个或N个显示屏594,N为大于1的正整数。显示屏594可用于显示由用户输入的信息或提供给用户的信息以及各种图形用户界面(graphical user interface,GUI)。例如,显示屏594可以显示照片、视频、网页、或者文件等。
在本申请实施例中,显示屏594可以是一个一体的柔性显示屏,也可以采用两个刚性屏以及位于两个刚性屏之间的一个柔性屏组成的拼接显示屏。当处理器510运行本申请实施例提供的WiFi连接方法后,处理器510可以控制显示屏594对相关结果进行显示。
摄像头593(前置摄像头或者后置摄像头,或者一个摄像头既可作为前置摄像头,也可作为后置摄像头)用于捕获静态图像或视频。
内部存储器521可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器510通过运行存储在内部存储器521的指令,从而执行电子设备500的各种功能应用以及数据处理。内部存储器521可以包括存储程序区和存储数据区。其中,存储程序区可存储操作***,应用程序(比如WiFi连接功能、WiFi通信功能等)的代码等。存储数据区可存储电子设备500使用过程中所创建的数据(比如执行本申请实施例提供的WiFi连接方法时设备间需要交互的信息、数据等)等。
内部存储器521还可以存储本申请实施例提供的WiFi连接方法的算法对应的一个或多个计算机程序。该一个或多个计算机程序被存储在上述内部存储器521中并被配置为被一个或多个处理器510执行,该一个或多个计算机程序包括指令,上述指令可以用于执行以下实施例中的各个步骤。
此外,内部存储器521可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
当然,本申请实施例提供的WiFi连接方法的算法代码还可以存储在外部存储器中。这种情况下,处理器510可以通过外部存储器接口520运行存储在外部存储器中的WiFi连接算法的代码。
传感器模块580可以包括指纹传感器、触摸传感器、压力传感器、磁传感器、环境光传感器、气压传感器、骨传导传感器等。
可选的,电子设备500可以为STA,该电子设备500中可以不包括天线2、移动通信模块550及SIM接口595等,则电子设备500的无线通信功能可以通过天线1,无线通信模块560,调制解调处理器以及基带处理器等实现。
可选的,电子设备500可以为AP,该电子设备500中可以包括天线2、移动通信模块550及SIM接口595等,则电子设备500的无线通信功能可以通过天线1,天线2,移动通信模块550,无线通信模块560,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备500中的每个天线可用于覆盖单个或多个通信频带,例如2.4GHz频带或5GHz频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线2复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块550可以提供应用在电子设备500上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块550可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块550可以由天线2接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块550还可以对经调制解调处理器调制后的信号放大,经天线2转为电磁波辐射出去。在一些实施例中,移动通信模块550的至少部分功能模块可以被设置于处理器510中。在一些实施例中,移动通信模块550的至少部分功能模块可以与处理器510的至少部分模块被设置在同一个器件中。在本申请实施例中,移动通信模块550还可以用于与其它电子设备进行信息交互。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频装置(不限于扬声器570A,受话器570B等)输出声音信号,或通过显示屏594显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器510,与移动通信模块550或其他功能模块设置在同一个器件中。
无线通信模块560可以提供应用在电子设备500上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星***(global navigation satellite system,GNSS),调频(frequency modulation, FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块560可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块560经由天线5接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器510。无线通信模块560还可以从处理器510接收待发送的信号,对其进行调频,放大,经天线5转为电磁波辐射出去。本申请实施例中,无线通信模块560,用于与其它电子设备建立通信连接,进行数据交互。例如,电子设备500作为STA时,无线通信模块560可以用于接入AP,并在接入过程中向AP发送消息和数据,或者接收来自AP的指令或数据等。再例如,电子设备500作为AP时,无线通信模块560可以用于与请求接入的STA建立WiFi连接,并在接入过程中接收来自STA的消息和数据或者向STA发送指令或数据等。
另外,电子设备500可以通过音频模块570,扬声器570A,受话器570B,麦克风570C,耳机接口570D,以及应用处理器等实现音频功能。例如音乐播放,录音等。电子设备500可以接收按键590输入,产生与电子设备500的用户设置以及功能控制有关的键信号输入。电子设备500可以利用马达591产生振动提示(比如来电振动提示)。电子设备500中的指示器592可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,通知等。
电子设备500中的SIM卡接口595用于连接SIM卡。SIM卡可以通过***SIM卡接口595,或从SIM卡接口595拔出,实现和电子设备500的接触和分离。
本申请实施例中,图5a所示的电子设备500可以作为AP,也可以作为STA。
应理解,在实际应用中,图5a所示的电子设备500仅是一个范例,并且电子设备500可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。
示例性的,电子设备500的软件***可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android***为例,示例性说明电子设备的软件结构。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。如图5b所示,该软件架构可以分为四层,从上至下分别为应用程序层,应用程序框架层(framework,FWK),安卓运行时和***库,以及Linux内核层。
应用程序层是操作***的最上一层,包括操作***的原生应用程序,例如相机、图库、日历、蓝牙、音乐、视频、信息等等。本申请实施例涉及的应用程序简称应用(application,APP),为能够实现某项或多项特定功能的软件程序。通常,电子设备中可以安装多个应用。比如,相机应用、邮箱应用、智能家居控制应用等。下文中提到的应用,可以是电子设备出厂时已安装的***应用,也可以是用户在使用电子设备的过程中从网络下载或从其他电子设备获取的第三方应用。
当然,对于开发者来说,开发者可以编写应用程序并安装到该层。一种可能的实现方式中,应用程序可以使用Java语言开发,通过调用应用程序框架层所提供的应用程序编程接口(Application Programming Interface,API)来完成,开发者可以通过应用程序框架来与操作***的底层(例如内核层等)进行交互,开发自己的应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层可以包括一些预先定义的函数。应用程序框架层可以包括窗口管理器,内容提供器,视图***,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括文件(例如文档、视频、图像、音频),文本等信息。
视图***包括可视控件,例如显示文字、图片、文档等内容的控件等。视图***可用于构建应用程序。显示窗口中的界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供电子设备的通信功能。通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。
安卓运行时包括核心库和虚拟机。安卓运行时负责安卓***的调度和管理。
安卓***的核心库包含两部分:一部分是Java语言需要调用的功能函数,另一部分是安卓***的核心库。应用程序层和应用程序框架层运行在虚拟机中。以Java举例,虚拟机将应用程序层和应用程序框架层的Java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
***库可以包括多个功能模块。例如:表面管理器,媒体库,三维图形处理库(例如:OpenGL ES),二维图形引擎(例如:SGL)、图像处理库等。表面管理器用于对显示子***进行管理,并且为多个应用程序提供了二维和三维图层的融合。媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.564,MP3,AAC,AMR,JPG,PNG等。三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。二维图形引擎是二维绘图的绘图引擎。
内核(Kernel)层提供操作***的核心***服务,如安全性、内存管理、进程管理、网络协议栈和驱动模型等都基于内核层实现。内核层同时也作为硬件和软件栈之间的抽象层。该层有许多与电子设备相关的驱动程序,主要的驱动有:显示驱动;作为输入设备的键盘驱动;基于内存技术设备的Flash驱动;照相机驱动;音频驱动;蓝牙驱动;WiFi驱动等。
需要理解的是,如上所述的功能服务只是一种示例,在实际应用中,电子设备也可以按照其他因素来划分为更多或更少的功能服务,或者可以按照其他方式来划分各个服务的功能,或者也可以不划分功能服务,而是按照整体来工作。
下面结合具体实施例,对本申请提供的方法进行详细说明。
参阅图6,本申请实施例提供的WiFi连接方法,包括:
S601:AP在采用第一WiFi协议开启WiFi热点的状态下,接收来自第一站点STA的探测请求,所述探测请求用于请求与所述AP建立WiFi连接。
本申请实施例中,AP开启WiFi热点后可以默认采用第一WiFi协议工作,在STA请求接入时,AP首先确定该STA是否支持第一WiFi协议,若是,则AP可以采用第一WiFi协议与该STA建立连接,否则,AP可以根据自身及STA的协议能力,进一步确定与该STA建立连接的方式。
本申请实施例中,STA可以向AP发送探测请求信息来向AP请求接入,从而与AP建立WiFi连接后进行通信。
可选的,所述第一WiFi协议可以为WiFi 5或WiFi 6。例如,所述第一WiFi协议可以为当前最新版本的WiFi协议即WiFi 6。
需要说明的是,本申请实施例中所述的STA支持采用第一WiFi协议是指STA对第一WiFi协议兼容无问题,可以在AP采用第一WiFi协议的情况下,成功与AP建立WiFi连接,而不会存在WiFi协议不兼容导致的接入失败问题。
S602:AP确定所述第一STA采用的第二WiFi协议。
本申请实施例中,作为一种可选的实施方式,AP确定STA是否支持采用第一WiFi协议时,可以先确定STA所采用的第二WiFi协议,再通过比较第一WiFi协议与第二WiFi协议的版本,确定STA是否支持采用第一WiFi协议。
作为另一种可选的实施方式,AP可以将STA先前接入过程的结果作为参考,若AP采用第一WiFi协议时,STA在先前的接入过程中接入成功,则确定STA是支持采用第一WiFi协议的,否则,认为STA是不支持采用第一WiFi协议的。该信息可以存储在数据库,则AP在STA请求接入时,可以通过查询数据库的方式确定STA是否支持采用第一WiFi协议。
下面进行具体介绍。
本申请实施例中,AP可根据如下至少一种方式,判断STA是否支持(采用)第一WiFi协议:
方式一、AP根据STA发送的探测请求中携带的指示信息,确定STA是否支持第一WiFi协议。
该方式中,STA向AP发送的探测请求中可以携带用于指示STA采用的第二WiFi协议的指示信息,其中,该探测请求用于请求接入AP,即与所述AP建立WiFi连接。则AP接收到STA的探测请求后,可以根据从中获取到的指示信息,确定STA所采用的第二WiFi协议,进而根据第一WiFi协议和第二WiFi协议判断STA是否支持第一WiFi协议。或者,STA向AP发送的探测请求中可以携带直接指示STA是否支持第一WiFi协议的指示信息,AP根据接收到的探测请求可以直接快速的确定STA是否支持AP当前采用的WiFi协议。
方式二、AP根据STA发送的承载探测请求的报文中的参考信息,确定STA是否支持第一WiFi协议。
其中,所述参考信息包括STA发送的探测请求报文中的HE能力信息、厂家标识等信息。厂家标识可以是供应商特定组织唯一标识符(Organization Unique Identifier,OUI)类型即vender specific OUI type。HE能力信息包括HE MAC层能力信息和HE物理(Physical Layer,PHY)层能力信息。
具体的,基于图3所示的STA接入AP的方法,STA在与AP建立连接时,向AP发送的探测请求或连接请求(Association Request)报文中包含HE能力信息字段,该HE能力信息字段的格式如图7中所示。该HE能力信息字段中包含HE MAC层能力字段信息和HE PHY层能力信息字段。进一步的,HE MAC层能力信息字段和HE PHY层能力信息字段中包含的子字段可作为判断STA是否支持第一WiFi协议的参考信息。
具体的,HE能力信息字段中包含的参考字段及参考字段的取值可以用于指示STA采用的WiFi协议是否为某一个设定版本的WiFi协议,因此AP可以根据承载STA探测请求 的报文中的参考字段的取值,确定STA是否支持设定版本的WiFi协议。例如,AP若确定所述参考字段的取值为第一值,则可以确定所述第二WiFi协议为所述设定版本的WiFi协议;若确定所述参考字段的取值为第二值,则可以确定所述第二WiFi协议为比所述设定版本低一个版本的WiFi协议。
例如,所述设定版本的WiFi协议可以为WiFi 6,所述第一值可以为1,所述第二值可以为0。则AP在确定参考字段的取值为1时,确定STA采用的为WiFi 6,在确定参考字段的取值为0时,确定STA采用的为WiFi 5。
在本申请一些实施例中,所述设定版本的WiFi协议为WiFi 6时,所述参考信息包含HE MAC层能力信息字段中的如下至少一项参考字段:
目标唤醒时间(Target Wake Time,TWT)请求端支持(TWT Requester Supprot)字段:用于标识是否支持TWT发送请求端(TWT transmit requester);
TWT应答端支持(TWT Responder Supprot)字段:用于标识是否支持TWT接收应答端(TWT RX responder);
广播TWT(Broadcast TWT)字段:用于标识是否支持广播TWT功能;
缓存状态报告(Buffer Status Report,BSR)支持字段(BSR Support):用于标识是否支持缓存状态,还可用于正交频分多址接入(Orthogonal frequency Division Multiple Access,OFDMA)带宽的分配协商;
OFDMA随机接入(Random Access,RA)支持字段(OFDMA RA Support):用于标识是否支持OFDMA随机接入功能。
上述各字段的相关解释可参考如下表1。
表1 HE MAC能力字段中选择的参考字段
在本申请一些实施例中,所述参考信息还包含HE PHY层能力信息字段中的如下至少一项参考字段:
支持的信道带宽设置(Supported Channel Width Set):用于指示2.4GHz、5GHz频段支持的带宽类型,包括5GHz频段是否支持160MHz或80+80MHz频宽;
删失前导Rx(Punctured Preamble Rx):用于标识是否支持删失前导,以及前导删失的类型;
有效载荷中的DPC编码(LDPC Coding In Payload):用于标识是否支持LDPC编解码;
全带宽(Full Bandwidth)上行链路(Uplingk,UL)多用户多输入多输出(Multi-User Multiple-Input Multiple-Output,ULMU-MIMO)字段:用于标识是否支持UL MU-MIMO;
部分带宽(pritical UL MU-MIMO Full Bandwidth):用于标识是否支持UL MU-MIMO in OFDMA;
双载波调制技术(Dual Carrier Modulation,DCM)最大星座群(Max Constellation)Tx:用于标识Tx是否支持DCM,以及支持DCM的类型;
DCM最大星座群RX:用于标识Rx是否支持DCM,以及支持DCM的类型;
多用户(Muti-User,MU)波束成形器(Beamformer):用于标识是否支持波束成形器,是支持单用户(Single-User,SU)。
上述各字段的相关解释可参考如下表2。
表2 HE PHY能力字段中选择的参考字段
AP在判断STA是否支持第一WiFi协议时,可以根据如上表1和/或表2提供的至少一种参考字段进行判断,具体的,AP在如上表1和/或表2提供的至少一种参考字段中,确定存在至少一个字段的取值为1时,确定STA支持第一WiFi协议。
根据该方式,AP可以根据STA接入过程中相关的报文,准确识别STA的协议能力,进而准确的确定是否需要调整当前采用的WiFi协议。
方式三、AP通过查询本地或云端数据库,确定STA是否支持第一WiFi协议。
具体的,AP可以在本地或云端设置数据库,该数据库用于存储接入该AP的STA的信息,STA的信息包括STA的设备标识、协议能力等信息,例如,数据库中可以存储STA的设备标识、STA是否支持第一WiFi协议、STA支持的最新的WiFi协议等信息,其中STA的设备标识用于识别STA,例如,STA的设备标识可以为STA的介质访问控制(Medium Access Control,MAC)地址、能够唯一标识STA的设备型号等信息。
初始时数据库中的信息可以是用户设置的。后续当某STA接入时,AP可以将该STA的信息写入数据库中。
例如,AP采用第一WiFi协议工作的模式下,若STA接入AP失败,则AP可以将STA的MAC地址写入数据库,并标记该STA不支持第一WiFi协议;若STA成功接入AP,则AP可以将STA的MAC地址写入数据库,并标记该STA支持第一WiFi协议,即该STA对WiFi 6兼容无问题。
再例如,若AP确定STA的信息并写入数据库时,数据库中已存储有该STA的历史信息,则AP可以利用新确定的STA的信息更新数据库中该STA的历史信息。若AP能够确定STA的最大协议能力即STA能够支持的最新的WiFi协议,则AP可以将STA的MAC地址以及STA能够支持的最新的WiFi协议版本一并写入数据库进行存储。
通过上述方式,AP可以根据数据库中信息,快速准确的确定接入的STA是否能够与采用某一WiFi协议的AP建立连接,进而确定在与STA连接时是否需要调整采用的WiFi 协议。
可选的,AP也可以组合上述部分方式,来确定STA是否支持第一WiFi协议,例如,AP可以先采用上述方式二确定请求接入的STA所采用的WiFi协议,若该WiFi协议与第一WiFi协议版本相同,则AP后续可以采用第一WiFi协议与该STA建立WiFi连接,否则,AP可以采用上述方式三,从数据库中查询STA的协议能力,来判断是否能够采用第一WiFi协议与STA建立WiFi连接,从而更准确的确定STA是否支持第一WiFi协议。
基于以上提供的各种方式,AP可以根据实际场景需求或用户需求,选择判断STA协议能力的方式,方案实施的灵活性较强。
S603:AP根据所述第一WiFi协议和所述第二WiFi协议,判断所述第一STA是否支持采用所述第一WiFi协议与所述AP建立WiFi连接。
其中,AP可以采用如下至少一种方式,确定STA是否支持第一WiFi协议:
1)、若所述第一WiFi协议与所述第二WiFi协议的版本相同,则确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接。
2)若所述第一WiFi协议的版本高于所述第二WiFi协议的版本,则确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接。
在AP结合采用上述两种方式时,AP可以采用STA请求接入时所采用的WiFi协议与STA建立WiFi连接,保证STA能够接入成功,同时,对于多个STA请求接入的情况,AP也可以根据每个STA所采用的WiFi协议,动态调整与STA建立WiFi连接时采用的WiFi协议。
3)若所述第一WiFi协议的版本高于所述第二WiFi协议的版本,执行至少一次连接过程,若与所述第一STA建立WiFi连接失败的次数小于设定阈值,则确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接;若与所述第一STA建立WiFi连接失败的次数超过所述设定阈值,则确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接;其中,每次连接过程包括以下步骤:采用所述第一WiFi协议与所述第一STA建立WiFi连接。
该方式中,STA向AP发送探测请求来请求接入AP,但是未收到AP返回的探测响应时,STA可以根据用户操作在较短时间段内重复多次向AP发送探测请求来请求接入AP,因此AP在第一次接收到探测请求后,直接采用第一WiFi协议与STA建立WiFi连接,若建立连接失败,且AP再次收到该STA的探测请求,则AP可以在第一次接收到探测请求后的设定时间段内,每次接收到探测请求都采用第一WiFi协议与STA建立WiFi连接,直至建立连接成功或该设定时间段内建立连接失败的次数超过所述设定阈值为止。其中,AP确定建立连接成功时,确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接,AP确定设定时间段内建立连接失败的次数超过所述设定阈值时,确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接。
4)若数据库中存储有所述第一STA的设备标识,则确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接;否则,确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接;其中,所述数据库用于存储目标STA的设备标识,所述目标STA为不支持采用所述第一WiFi协议与AP建立WiFi连接的STA。
S604:AP若确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接,则采用所述第一WiFi协议与所述第一STA建立WiFi连接;若确定所述第一STA不 支持采用所述第一WiFi协议与所述AP建立WiFi连接,则采用所述第二WiFi协议与所述第一STA建立WiFi连接。
上述AP可以根据自身采用的第一WiFi协议、STA采用的第二WiFi协议,确定STA是否支持第一WiFi协议后,可以确定与STA建立WiFi连接的方式,从而保证能够采用STA支持的WiFi协议,与STA建立WiFi连接。
上述实施例中,AP可以在开启热点后默认采用最新的WiFi协议,支持最新技术标准的热点功能,能保证高性能优势,在STA因为兼容性问题无法连接的场景下,AP则可以自动切换为较低版本的WiFi协议,或者根据STA的协议能力,动态调整热点采用的WiFi协议,能够保证STA的基本接入功能,解决兼容性问题,同时最大程度保证STA和AP的性能。
下面结合具体实例,对本申请提供的WiFi连接方法进行示例性说明。
基于以上实施例中的介绍,作为一种可执行的方案,由于兼容性问题导致STA接入AP失败时,STA可能在短时间内会多次请求接入AP,则AP可以默认工作在采用第一WiFi协议的模式,在STA每次请求接入时,若出现STA接入认证、关联失败的情况,将所述STA的接入失败的次数累计加1,当记录的接入失败次数达到设定阈值时,AP切换为采用第二WiFi协议进行工作的模式,再与所述STA进行连接,并可以采用第二WiFi协议与之后接入的其它STA进行连接,同时,AP还可以通知之前接入的STA切换为采用第二WiFi协议进行通信。后续当AP确定已连接的STA均支持采用第一WiFi协议,或者确定无连接的STA时,可以切换回采用第一WiFi协议工作的模式。
其中,所述第一WiFi协议的版本高于所述第二WiFi协议的版本,所述第二WiFi协议为STA支持采用的最新版本的WiFi协议。
具体的,AP开启热点后,可以默认采用第一WiFi协议进行工作,并在不支持第一WiFi协议的STA接入时,开始对该STA的接入状态信息进行监控,根据STA扫描接入的状态统计该STA是否连接成功,若确定该STA连接失败,则将该STA的接入失败次数加1,若确定该STA接入成功,则将已记录的该STA接入失败的次数清零,以便该STA下次接入时重新记录接入失败次数。AP在该STA每次接入时,均记录该STA接入失败的次数,直至该次数达到失败阈值,AP切换为采用第二WiFi协议的模式进行工作。
本申请实施例中,作为一种可选的实施方式,AP切换为采用第二WiFi协议的模式进行工作时,若存在已采用第一WiFi模式与AP建立连接的STA,则AP可以通知已连接的STA切换为采用第一WiFi协议与所述AP进行通信。进一步的,STA切换为采用第一WiFi模式与AP通信时,若存在兼容性问题例如AP和已连接STA中的一方无法收到或识别另一方的消息,则AP切断与已连接STA的通信连接实现去关联后,该STA再重新采用第二WiFi协议接入所述AP。作为另一种可选的实施方式,AP切换为采用第二WiFi协议的模式进行工作时,若存在已采用第一WiFi模式与AP建立连接的STA,则AP可以直接断开与已连接STA的通信连接实现去关联后,该STA再重新采用第二WiFi协议接入所述AP。
该方法中,AP打开热点后,默认支持采用第一WiFi协议的热点功能,在STA设备因为兼容性问题无法连接的场景,AP自动将采用第一WiFi协议的热点切换为采用第二WiFi协议的WiFi热点,能够实现同时兼顾采用第一WiFi协议的WiFi热点的高性能和采用第二WiFi协议的STA的基本接入功能,解决兼容性问题。
上述方案的具体实施流程可参照以下实例一。
以下实例一中,以AP采用的第一WiFi协议为WiFi 6,STA能够支持的最新的WiFi协议为WiFi 5或WiFi 6为例,对WiFi连接方法进行说明。
实例一
参照图8所示,本申请实施例提供的一种WiFi连接方法的流程可以包括:
S801:AP开启WiFi热点,并采用WiFi 6协议工作。
S802:AP确定STA是否采用WiFi6协议,若是,则执行步骤S803,否则,执行步骤S804。
在STA请求接入AP时,AP判断请求接入的STA是否采用WiFi 6协议,具体可根据上述实施例提供的三种方式得到STA采用的WiFi协议,来确定STA是否采用WiFi 6协议,此处不再赘述。
S803:AP采用WiFi 6协议与所述STA建立连接,并在建立连接后采用STA支持的最新版本的WiFi协议与STA进行通信。
S804:AP采用WiFi 6协议与所述STA建立连接。
其中,AP在确定STA未采用WiFi 6协议时,可以先采用WiFi 6协议尝试与STA建立连接,若建立连接成功,则AP可以采用STA能够支持的WiFi协议与STA通信,若建立连接失败,则AP可以进行后续调整WiFi协议的处理。
S805:AP确定是否与所述STA成功建立连接,若是,则执行步骤S806,否则,执行步骤S807。
S806:AP采用STA支持的最新版本的WiFi协议与所述STA进行通信。
S807:AP将与所述STA建立连接失败的次数加1。
S808:AP确定与所述STA建立连接失败的次数是否达到设定阈值,若是,则执行步骤S809,否则,执行步骤S804。
S809:AP切换为采用WiFi 5协议工作,并采用WiFi 5协议与所述STA建立连接及在建立连接后采用WiFi 5协议与STA进行通信。
可选的,若AP确定所述STA为第一个接入所述AP的STA,则AP切换为采用WiFi 5协议后,在后续STA接入时均采用WiFi 5协议。若AP确定所述STA并非第一个接入所述AP的STA,则AP通知之前接入所述AP的STA切换为采用WiFi 5协议进行通信。
作为一种可选的实施方式,AP可以分别向之前接入所述AP的每个STA发送WiFi协议切换指示,来指示这些STA采用基于WiFi 5协议的信令、数据等与所述AP进行交互。
作为另一种可选的实施方式,AP可以采用发送广播消息的方式进行通知之前接入所述AP的STA切换为采用WiFi 5协议进行通信,接收到该广播消息的STA若采用的是WiFi 6协议,可以切换为WiFi 5协议,从而采用基于WiFi 5协议的信令、数据等与所述AP进行交互,接收到该广播消息的STA若采用的是WiFi 5协议,则可以忽略该广播消息。
在AP通知之前接入所述AP的STA切换为采用WiFi 5协议进行通信后,若切换WiFi协议后的STA与AP通信时存在兼容问题,则AP切断与STA的连接,STA根据之前收到的来自AP的WiFi协议切换指示或广播消息,可以确定AP当前采用的WiFi协议是WiFi 5,则STA采用WiFi 5协议重新向AP发送探测请求,从而重新与AP建立连接。
关于上述各步骤的实际执行,可参照上述实施例中相关的描述,重复之处不再赘述。
上述实施例中,AP开启WiFi热点时采用最大协议能力即WiFi 6协议能力,在STA 接入认证、关联失败时,累加STA连接失败次数,当该次数达到阈值的时候,退避为采用WiFi 5的热点状态,因此AP能根据STA的接入成功率动态调整协议能力,进而保证STA的基本接入功能。
基于以上实施例中的介绍,作为再一种可执行的方案,AP在STA每次接入时,若根据STA的协议能力信息确定所述STA支持第一WiFi协议,则AP采用第一WiFi协议与所述STA建立连接,并在与所述STA建立连接成功后,采用第一WiFi协议与所述STA进行通信;若根据STA的协议能力信息确定所述STA不支持第一WiFi协议,则AP先确定所述STA支持采用的最新的WiFi协议,即第二WiFi协议,再采用第二WiFi协议与所述STA建立连接,并在与所述STA建立连接成功后,采用第二WiFi协议与所述STA进行通信。
该方法中,当接入AP的STA支持第一WiFi协议时,AP可以采用第一WiFi协议与STA进行连接及应答;当接入AP的STA不支持第一WiFi协议时,AP可以采用STA能够支持的第二WiFi协议与STA进行连接及应答,能够动态调整AP采用的WiFi协议,使得AP开启WiFi热点的协议能力随STA的协议能力的不同而变化,因此每个接入AP的STA均能采用其支持的最新协议能力接入AP,解决了兼容性问题,并保证了AP和STA的性能不受影响。
上述方案的具体实施流程可参照以下实例二。
实例二
参阅图9所示,本实例中,AP开启WiFi热点后,默认工作在采用WiFi 6协议的模式下,在STA设备发起扫描接入时,AP可以根据来自STA的扫描接入信息提取WiFi 6兼容性关键影响因子,包括上述实施例中所述的探测请求、连接请求中的参考字段等。AP可以根据提取的WiFi 6兼容性关键影响因子确定STA是否支持WiFi 6协议,若确定STA不支持WiFi 6协议,则AP可以进一步根据来自STA的接入信息(例如图中所示的探测请求)查询数据库,确定STA的最大接入能力,即STA能够与AP建立连接时可兼容的最新WiFi协议版本。然后AP可以根据STA支持的最大接入能力调整采用的WiFi协议,再采用调整后的WiFi协议向STA应答。具体的,对于与WiFi 6热点存在兼容问题的STA,AP可以采用WiFi 5协议应答,对于与WiFi 6热点兼容无问题的STA,AP可以采用WiFi 6协议进行应答。其中,数据库可以通过本地数据库或云端数据信息查询,AP也可以根据STA的接入情况反馈刷新本地或云端数据库。
参照图10,本申请实施例提供的一种WiFi连接方法的流程可以包括:
S1001:AP开启WiFi热点,并采用WiFi 6协议工作。
S1002:AP确定STA是否采用WiFi 6协议,若是,则执行步骤S1003,否则,执行步骤S1004。
在STA请求接入AP时,AP根据来自STA的探测请求,判断请求接入的STA是否采用WiFi 6协议,具体可根据上述实施例提供的三种方式得到STA采用的WiFi协议,来确定STA是否采用WiFi 6协议,此处不再赘述。
S1003:AP采用WiFi 6协议与所述STA建立连接,及在建立连接后采用STA支持的最新版本的WiFi协议与所述STA进行通信。
S1004:AP通过查询数据库确定所述STA的协议能力。
AP通过查询数据库确定所述STA是否对第一WiFi协议兼容无问题,具体可参照上述 实施例中的方法,此处不再重述。
S1005:AP确定所述STA是否支持采用WiFi 6协议接入,若是,则执行步骤S1003,否则,执行步骤S1006。
S1006:AP采用WiFi 5协议与所述STA建立连接,及在建立连接后采用WiFi 5协议与所述STA进行通信。
关于上述各步骤的实际执行,可参照上述实施例中相关的描述,重复之处不再赘述。
上述实施例中,AP开启WiFi热点时采用最大协议能力即WiFi 6协议能力,在STA接入时,AP可以根据STA的认证接入信息和关联结果,动态调整WiFi热点采用的协议能力,与对应的STA进行交互,保证了STA接入的最佳性能,避免了STA接入过程中可能存在的兼容性问题。
基于以上实施例及相同构思,本申请实施例还提供了一种装置,如图11所示,所述装置1100可以包括:收发单元1101和处理单元1102;
其中,所述收发单元1101用于在采用第一WiFi协议开启WiFi热点的状态下,接收来自第一站点STA的探测请求,所述探测请求用于请求与所述AP建立WiFi连接;所述处理单元1102,用于确定所述第一STA采用的第二WiFi协议;根据所述第一WiFi协议和所述第二WiFi协议,判断所述第一STA是否支持采用所述第一WiFi协议与所述AP建立WiFi连接;若确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接,则采用所述第一WiFi协议与所述第一STA建立WiFi连接;若确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接,则采用所述第二WiFi协议与所述第一STA建立WiFi连接。
在一种可能的设计中,在采用所述第二WiFi协议与所述第一STA建立WiFi连接之后,所述处理单元1102还用于:在接收到第二STA发送的探测请求时,采用所述第二WiFi协议与所述第二STA建立WiFi连接,其中,所述第二STA为在所述第一STA之后请求与所述AP建立WiFi连接的STA。
在一种可能的设计中,在采用所述第二WiFi协议与所述第一STA建立WiFi连接之后,所述处理单元1102还用于:通知第三STA采用第二WiFi协议与所述AP进行通信,其中,所述第三STA为在所述第一STA之前已采用所述第一WiFi协议与所述AP建立WiFi连接的STA;或者断开与所述第三STA的WiFi连接,并采用所述第二WiFi协议与所述第三STA建立WiFi连接。
在一种可能的设计中,所述探测请求中携带用于指示所述第二WiFi协议的指示信息;所述处理单元1102确定所述第一STA采用的第二WiFi协议时,具体用于:从所述探测请求中获取所述指示信息;确定所述指示信息所指示的所述第二WiFi协议。
在一种可能的设计中,所述第一WiFi协议为第五代WiFi协议或第六代WiFi协议,所述第二WiFi协议为第五代WiFi协议或第六代WiFi协议。
在一种可能的设计中,所述处理单元1102确定所述第一STA采用的第二WiFi协议时,具体用于:确定承载所述探测请求的报文中包含的参考字段,所述参考字段用于指示所述第一STA是否支持设定版本的WiFi协议;若所述参考字段的取值为第一值,则确定所述第二WiFi协议为所述设定版本的WiFi协议;若所述参考字段的取值为第二值,则确定所述第二WiFi协议为比所述设定版本低一个版本的WiFi协议。
在一种可能的设计中,所述参考字段包括以下至少一项:目标唤醒时间请求端支持字段;目标唤醒时间应答端支持字段;广播目标唤醒时间字段;缓存状态报告持字段;正交频分多址接入随机接入支持字段;支持的信道带宽设置字段;删失前导接收字段;有效载荷中的低密度奇偶校验码字段;全带宽上行链路多用户多输入多输出字段;部分带宽上行链路多用户多输入多输出字段;双载波调制技术最大星座群接收字段;双载波调制技术最大星座群发送字段;多用户波束成形器字段。
在一种可能的设计中,所述处理单元1102根据所述第一WiFi协议和/或所述第二WiFi协议,判断所述第一STA是否支持采用所述第一WiFi协议与所述AP建立WiFi连接时,具体用于:若所述第一WiFi协议与所述第二WiFi协议的版本相同,则确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接;或者若所述第一WiFi协议的版本高于所述第二WiFi协议的版本,则确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接;或者若所述第一WiFi协议的版本高于所述第二WiFi协议的版本,执行至少一次连接过程,若与所述第一STA建立WiFi连接失败的次数小于设定阈值,则确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接;若与所述第一STA建立WiFi连接失败的次数超过所述设定阈值,则确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接;其中,每次连接过程包括以下步骤:采用所述第一WiFi协议与所述第一STA建立WiFi连接;或者若数据库中存储有所述第一STA的设备标识,则确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接;否则,确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接;其中,所述数据库用于存储目标STA的设备标识,所述目标STA为不支持采用所述第一WiFi协议与AP建立WiFi连接的STA。
在一种可能的设计中,所述处理单元1102在采用所述第二WiFi协议与所述第一STA建立WiFi连接之后,还用于:将所述第一STA的设备标识存储到所述数据库中。
在一种可能的设计中,所述第一STA的设备标识为所述第一STA的介质访问控制MAC地址。
在一种可能的设计中,所述处理单元1102还用于:
在采用所述第一WiFi协议与所述第一STA建立WiFi连接后,采用所述第一WiFi协议或所述第二WiFi协议与所述第一STA进行通信;在采用所述第二WiFi协议与所述第一STA建立WiFi连接后,采用所述第二WiFi协议与所述第一STA进行通信。
在一种可能的设计中,所述第一WiFi协议为所述AP支持采用的最高版本的WiFi协议,所述第二WiFi协议为所述第一STA支持采用的最高版本的WiFi协议。
作为一种实现方式,所述收发单元1101可以是一种装置1100的接口电路,用于从其它装置接收数据,例如接收来自STA的消息或数据。当该装置1100以芯片的方式实现时,收发单元1101可以是该芯片用于从其它芯片或装置接收数据或者向其它芯片或装置发送数据的接口电路。
所述处理单元1102可以是处理器或控制器,例如可以是通用中央处理器(central processing unit,CPU),通用处理器,数字信号处理(digital signal processing,DSP),专用集成电路(application specific integrated circuits,ASIC),现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框, 模块等。所述处理器也可以是实现计算功能的组合,例如包括一个或多个微处理器组合,DSP和微处理器的组合等等。
本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,另外,在本申请各个实施例中的各功能单元可以集成在一个处理器中,也可以是单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
图11中的各个单元的只一个或多个可以软件、硬件、固件或其结合实现。所述软件或固件包括但不限于计算机程序指令或代码,并可以被硬件处理器所执行。所述硬件包括但不限于各类集成电路,如中央处理单元(CPU)、数字信号处理器(DSP)、现场可编程门阵列(FPGA)或专用集成电路(ASIC)。
基于以上实施例及相同构思,本申请实施例还提供了一种装置,用于实现本申请实施例提供的WiFi连接方法。如图12所示,所述装置1200可以是AP,也可以是AP中的芯片或芯片***。
在本申请一些实施例中,所述装置1200还可以是能够执行本申请提供的WiFi连接方法的电子设备,或者芯片、集成电路等结构。
示例性的,所述装置1200包括收发器1201、存储器1202以及至少一个处理器1203。其中,所述处理器1203和所述收发器1201耦合,本申请实施例中的耦合是装置、单元或模块之间的间接耦合或通信连接,可以是电性,机械或其它的形式,用于装置、单元或模块之间的信息交互。
具体的,所述收发器1201可以是电路、总线、通信接口或者其它任意可以用于进行信息交互的模块,可用于接收或发送信息。
可选的,所述存储器1202与所述收发器1201和所述处理器1203耦合,用于存储程序指令。
所述处理器1203用于调用存储器1202中存储的程序指令,使得装置1200执行本申请实施例提供的WiFi连接方法中由AP所执行的步骤,从而实现AP与请求接入的STA建立WiFi连接。
所述收发器1201用于接收和发送射频信号,耦合于装置1200的接收器和发射器。所述收发器1201通过射频信号与通信网络和其它通信设备通信,如以太网(Ethernet),无线接入网(Radio Access Technology,RAN),无线局域网Wireless Local Area Networks,WLAN)等。具体实现中,所述收发器1201支持的通信协议至少包括WiFi协议,还可以包括:2G/3G、长期演进(Long Term Evolution,LTE)、5G新无线(New Radio,NR)等等。
具体实现中,所述存储器1202可包括高速随机存取的存储器,并且也可包括非易失性存储器,例如一个或多个磁盘存储设备、闪存设备或其他非易失性固态存储设备。所述存储器1202可以存储操作***(下述简称***),例如ANDROID,IOS,WINDOWS,或者LINUX等嵌入式操作***。所述存储器1202可用于存储本申请实施例的实现程序。所述存储器1202还可以存储网络通信程序,该网络通信程序可用于与一个或多个附加设备,一个或多个用户设备,一个或多个网络设备进行通信。
所述处理器1203可以是一个通用中央处理器(Central Processing Unit,CPU),微处理器,特定应用集成电路(Application-Specific Integrated Circuit,ASIC),或一个或多个用于 控制本申请方案程序执行的集成电路。
在本申请一些实施例中,所述收发器1201、存储器1202以及处理器1203可以通过通信线路1204相互连接;通信线路1204可以是外设部件互连标准(Peripheral Component Interconnect,简称PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,简称EISA)总线等。所述通信线路1204可以分为地址总线、数据总线、控制总线等。为便于表示,图12中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
需要说明的,图12仅仅是本申请实施例的一种实现方式,实际应用中,装置1200还可以包括更多或更少的部件,这里不作限制。
本申请实施例提供的方法中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、网络设备、用户设备或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,简称DSL)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机可以存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,数字视频光盘(digital video disc,简称DVD)、或者半导体介质(例如,SSD)等。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。
Claims (27)
- 一种无线保真WiFi连接方法,应用于接入点AP,其特征在于,包括:在采用第一WiFi协议开启WiFi热点的状态下,接收来自第一站点STA的探测请求,所述探测请求用于请求与所述AP建立WiFi连接;确定所述第一STA采用的第二WiFi协议;根据所述第一WiFi协议和所述第二WiFi协议,判断所述第一STA是否支持采用所述第一WiFi协议与所述AP建立WiFi连接;若确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接,则采用所述第一WiFi协议与所述第一STA建立WiFi连接;若确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接,则采用所述第二WiFi协议与所述第一STA建立WiFi连接。
- 根据权利要求1所述的方法,其特征在于,在采用所述第二WiFi协议与所述第一STA建立WiFi连接之后,所述方法还包括:在接收到第二STA发送的探测请求时,采用所述第二WiFi协议与所述第二STA建立WiFi连接,其中,所述第二STA为在所述第一STA之后请求与所述AP建立WiFi连接的STA。
- 根据权利要求1或2所述的方法,其特征在于,在采用所述第二WiFi协议与所述第一STA建立WiFi连接之后,所述方法还包括:通知第三STA采用第二WiFi协议与所述AP进行通信,其中,所述第三STA为在所述第一STA之前已采用所述第一WiFi协议与所述AP建立WiFi连接的STA;或者断开与所述第三STA的WiFi连接,并采用所述第二WiFi协议与所述第三STA建立WiFi连接。
- 根据权利要求1~3任一项所述的方法,其特征在于,所述探测请求中携带用于指示所述第二WiFi协议的指示信息;确定所述第一STA采用的第二WiFi协议,包括:从所述探测请求中获取所述指示信息;确定所述指示信息所指示的所述第二WiFi协议。
- 根据权利要求1~4任一所述的方法,其特征在于,所述第一WiFi协议为第五代WiFi协议或第六代WiFi协议,所述第二WiFi协议为第五代WiFi协议或第六代WiFi协议。
- 根据权利要求1~5任一所述的方法,其特征在于,确定所述第一STA采用的第二WiFi协议,包括:确定承载所述探测请求的报文中包含的参考字段,所述参考字段用于指示所述第一STA是否支持设定版本的WiFi协议;若所述参考字段的取值为第一值,则确定所述第二WiFi协议为所述设定版本的WiFi协议;若所述参考字段的取值为第二值,则确定所述第二WiFi协议为比所述设定版本低一个版本的WiFi协议。
- 根据权利要求6所述的方法,其特征在于,所述参考字段包括以下至少一项:目标唤醒时间请求端支持字段;目标唤醒时间应答端支持字段;广播目标唤醒时间字段;缓存状态报告持字段;正交频分多址接入随机接入支持字段;支持的信道带宽设置字段;删失前导接收字段;有效载荷中的低密度奇偶校验码字段;全带宽上行链路多用户多 输入多输出字段;部分带宽上行链路多用户多输入多输出字段;双载波调制技术最大星座群接收字段;双载波调制技术最大星座群发送字段;多用户波束成形器字段。
- 根据权利要求1~7任一所述的方法,其特征在于,根据所述第一WiFi协议和/或所述第二WiFi协议,判断所述第一STA是否支持采用所述第一WiFi协议与所述AP建立WiFi连接,包括:若所述第一WiFi协议与所述第二WiFi协议的版本相同,则确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接;或者若所述第一WiFi协议的版本高于所述第二WiFi协议的版本,则确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接;或者若所述第一WiFi协议的版本高于所述第二WiFi协议的版本,执行至少一次连接过程,若与所述第一STA建立WiFi连接失败的次数小于设定阈值,则确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接;若与所述第一STA建立WiFi连接失败的次数超过所述设定阈值,则确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接;其中,每次连接过程包括以下步骤:采用所述第一WiFi协议与所述第一STA建立WiFi连接;或者若数据库中存储有所述第一STA的设备标识,则确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接;否则,确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接;其中,所述数据库用于存储目标STA的设备标识,所述目标STA为不支持采用所述第一WiFi协议与AP建立WiFi连接的STA。
- 根据权利要求8所述的方法,其特征在于,在采用所述第二WiFi协议与所述第一STA建立WiFi连接之后,所述方法还包括:将所述第一STA的设备标识存储到所述数据库中。
- 根据权利要求8或9所述的方法,其特征在于,所述第一STA的设备标识为所述第一STA的介质访问控制MAC地址。
- 根据权利要求1~10任一所述的方法,其特征在于,所述方法还包括:在采用所述第一WiFi协议与所述第一STA建立WiFi连接后,采用所述第一WiFi协议或所述第二WiFi协议与所述第一STA进行通信;在采用所述第二WiFi协议与所述第一STA建立WiFi连接后,采用所述第二WiFi协议与所述第一STA进行通信。
- 根据权利要求1~11任一所述的方法,其特征在于,所述第一WiFi协议为所述AP支持采用的最高版本的WiFi协议,所述第二WiFi协议为所述第一STA支持采用的最高版本的WiFi协议。
- 一种装置,其特征在于,包括:收发单元,用于在采用第一WiFi协议开启WiFi热点的状态下,接收来自第一站点STA的探测请求,所述探测请求用于请求与所述AP建立WiFi连接;处理单元,用于确定所述第一STA采用的第二WiFi协议;根据所述第一WiFi协议和所述第二WiFi协议,判断所述第一STA是否支持采用所述第一WiFi协议与所述AP建立WiFi连接;若确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接,则采用所述第一WiFi协议与所述第一STA建立WiFi连接;若确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接,则采用所述第二WiFi协议与所述第一 STA建立WiFi连接。
- 根据权利要求13所述的装置,其特征在于,在采用所述第二WiFi协议与所述第一STA建立WiFi连接之后,所述处理单元还用于:在接收到第二STA发送的探测请求时,采用所述第二WiFi协议与所述第二STA建立WiFi连接,其中,所述第二STA为在所述第一STA之后请求与所述AP建立WiFi连接的STA。
- 根据权利要求13或14所述的装置,其特征在于,在采用所述第二WiFi协议与所述第一STA建立WiFi连接之后,所述处理单元还用于:通知第三STA采用第二WiFi协议与所述AP进行通信,其中,所述第三STA为在所述第一STA之前已采用所述第一WiFi协议与所述AP建立WiFi连接的STA;或者断开与所述第三STA的WiFi连接,并采用所述第二WiFi协议与所述第三STA建立WiFi连接。
- 根据权利要求13~15任一项所述的装置,其特征在于,所述探测请求中携带用于指示所述第二WiFi协议的指示信息;所述处理单元确定所述第一STA采用的第二WiFi协议时,具体用于:从所述探测请求中获取所述指示信息;确定所述指示信息所指示的所述第二WiFi协议。
- 根据权利要求13~16任一所述的装置,其特征在于,所述第一WiFi协议为第五代WiFi协议或第六代WiFi协议,所述第二WiFi协议为第五代WiFi协议或第六代WiFi协议。
- 根据权利要求13~17任一所述的装置,其特征在于,所述处理单元确定所述第一STA采用的第二WiFi协议时,具体用于:确定承载所述探测请求的报文中包含的参考字段,所述参考字段用于指示所述第一STA是否支持设定版本的WiFi协议;若所述参考字段的取值为第一值,则确定所述第二WiFi协议为所述设定版本的WiFi协议;若所述参考字段的取值为第二值,则确定所述第二WiFi协议为比所述设定版本低一个版本的WiFi协议。
- 根据权利要求18所述的装置,其特征在于,所述参考字段包括以下至少一项:目标唤醒时间请求端支持字段;目标唤醒时间应答端支持字段;广播目标唤醒时间字段;缓存状态报告持字段;正交频分多址接入随机接入支持字段;支持的信道带宽设置字段;删失前导接收字段;有效载荷中的低密度奇偶校验码字段;全带宽上行链路多用户多输入多输出字段;部分带宽上行链路多用户多输入多输出字段;双载波调制技术最大星座群接收字段;双载波调制技术最大星座群发送字段;多用户波束成形器字段。
- 根据权利要求13~19任一所述的装置,其特征在于,所述处理单元根据所述第一WiFi协议和/或所述第二WiFi协议,判断所述第一STA是否支持采用所述第一WiFi协议与所述AP建立WiFi连接时,具体用于:若所述第一WiFi协议与所述第二WiFi协议的版本相同,则确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接;或者若所述第一WiFi协议的版本高于所述第二WiFi协议的版本,则确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接;或者若所述第一WiFi协议的版本高于所述第二WiFi协议的版本,执行至少一次连接过程, 若与所述第一STA建立WiFi连接失败的次数小于设定阈值,则确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接;若与所述第一STA建立WiFi连接失败的次数超过所述设定阈值,则确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接;其中,每次连接过程包括以下步骤:采用所述第一WiFi协议与所述第一STA建立WiFi连接;或者若数据库中存储有所述第一STA的设备标识,则确定所述第一STA不支持采用所述第一WiFi协议与所述AP建立WiFi连接;否则,确定所述第一STA支持采用所述第一WiFi协议与所述AP建立WiFi连接;其中,所述数据库用于存储目标STA的设备标识,所述目标STA为不支持采用所述第一WiFi协议与AP建立WiFi连接的STA。
- 根据权利要求20所述的装置,其特征在于,所述处理单元在采用所述第二WiFi协议与所述第一STA建立WiFi连接之后,还用于:将所述第一STA的设备标识存储到所述数据库中。
- 根据权利要求20或21所述的装置,其特征在于,所述第一STA的设备标识为所述第一STA的介质访问控制MAC地址。
- 根据权利要求13~22任一所述的装置,其特征在于,所述处理单元还用于:在采用所述第一WiFi协议与所述第一STA建立WiFi连接后,采用所述第一WiFi协议或所述第二WiFi协议与所述第一STA进行通信;在采用所述第二WiFi协议与所述第一STA建立WiFi连接后,采用所述第二WiFi协议与所述第一STA进行通信。
- 根据权利要求13~23任一所述的装置,其特征在于,所述第一WiFi协议为所述AP支持采用的最高版本的WiFi协议,所述第二WiFi协议为所述第一STA支持采用的最高版本的WiFi协议。
- 一种装置,其特征在于,包括收发器、存储器和处理器;所述收发器用于接收来自所述装置之外的其它装置的信号并传输至所述处理器或将来自所述处理器的信号发送给所述装置之外的其它装置;所述存储器用于存储程序;所述处理器用于执行所述存储器中存储的程序,实现如权利要求1~12中任一项所述的方法。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,当所述计算机程序在装置上运行时,使得所述装置执行如权利要求1~12中任一项所述的方法。
- 一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机程序或指令,当所述计算机程序或指令在装置上运行时,使得所述装置执行如权利要求1~12中任一项所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110478869.7A CN115278825A (zh) | 2021-04-30 | 2021-04-30 | 一种WiFi连接方法及装置 |
CN202110478869.7 | 2021-04-30 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022228190A1 true WO2022228190A1 (zh) | 2022-11-03 |
Family
ID=83745696
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/087477 WO2022228190A1 (zh) | 2021-04-30 | 2022-04-18 | 一种WiFi连接方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115278825A (zh) |
WO (1) | WO2022228190A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116471707A (zh) * | 2023-02-21 | 2023-07-21 | 荣耀终端有限公司 | 一种路由器的连接方法、装置及*** |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8400990B1 (en) * | 2008-04-28 | 2013-03-19 | Dennis Volpano | Global service set identifiers |
CN107483558A (zh) * | 2017-07-27 | 2017-12-15 | 中兴软创科技股份有限公司 | 一种云端平台对ap配置管理和对无线终端接入控制的方法 |
WO2018232138A1 (en) * | 2017-06-14 | 2018-12-20 | Intel IP Corporation | 6 ghz neighbor reports and capability and operation elements |
CN111867004A (zh) * | 2020-06-06 | 2020-10-30 | 烽火通信科技股份有限公司 | 一种Wi-Fi6场景下无线终端接入的方法和装置 |
-
2021
- 2021-04-30 CN CN202110478869.7A patent/CN115278825A/zh active Pending
-
2022
- 2022-04-18 WO PCT/CN2022/087477 patent/WO2022228190A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8400990B1 (en) * | 2008-04-28 | 2013-03-19 | Dennis Volpano | Global service set identifiers |
WO2018232138A1 (en) * | 2017-06-14 | 2018-12-20 | Intel IP Corporation | 6 ghz neighbor reports and capability and operation elements |
CN107483558A (zh) * | 2017-07-27 | 2017-12-15 | 中兴软创科技股份有限公司 | 一种云端平台对ap配置管理和对无线终端接入控制的方法 |
CN111867004A (zh) * | 2020-06-06 | 2020-10-30 | 烽火通信科技股份有限公司 | 一种Wi-Fi6场景下无线终端接入的方法和装置 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116471707A (zh) * | 2023-02-21 | 2023-07-21 | 荣耀终端有限公司 | 一种路由器的连接方法、装置及*** |
CN116471707B (zh) * | 2023-02-21 | 2024-03-29 | 荣耀终端有限公司 | 一种路由器的连接方法、装置及*** |
Also Published As
Publication number | Publication date |
---|---|
CN115278825A (zh) | 2022-11-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021051986A1 (zh) | 设备之间建立连接的方法及电子设备 | |
WO2021218864A1 (zh) | 一种Wi-Fi点对点业务的实现方法以及相关设备 | |
KR102399798B1 (ko) | 적응적 통신 방법 및 장치 | |
EP4181602A1 (en) | Channel adjustment method and electronic device | |
EP2670209A2 (en) | Method and apparatus for providing concurrent service | |
WO2019052554A1 (zh) | 减少ue能力信令结构体内容的方法、存储介质及手机 | |
US20150163734A1 (en) | Access point connection method and electronic device thereof | |
WO2021151402A1 (zh) | 一种通信方法、终端、网络设备及通信装置 | |
US11089539B2 (en) | Data processing method, terminal, and base station | |
WO2019091266A1 (zh) | 载波配置方法、用户终端和网络侧设备 | |
US20150065053A1 (en) | Method of controlling short-range wireless communication and apparatus supporting the same | |
WO2022135341A1 (zh) | 通信方法、***及电子设备 | |
WO2022116974A1 (zh) | 接入方法、***及电子设备 | |
US20220408281A1 (en) | Method for Adjusting Quantity of Data Streams, Terminal, and MIMO System | |
WO2022228190A1 (zh) | 一种WiFi连接方法及装置 | |
US20220141070A1 (en) | Parameter processing method and device | |
US20230087282A1 (en) | Dual wi-fi connection method and electronic device | |
WO2021249231A9 (zh) | 基于应用程序的短距离通知方法、电子设备及*** | |
WO2022068882A1 (zh) | 镜像投屏方法、装置及*** | |
WO2021218937A1 (zh) | 减少功耗的方法及终端 | |
WO2022179273A1 (zh) | 一种分布式音频播放方法及电子设备 | |
WO2023051204A1 (zh) | 跨设备连接方法、电子设备及存储介质 | |
WO2023088106A1 (zh) | 降低功耗的方法和电子设备 | |
US20240205985A1 (en) | Radio Network Service Configuration Method, Terminal, and Network Side Device | |
WO2024140122A1 (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: 22794661 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: 22794661 Country of ref document: EP Kind code of ref document: A1 |