CN110870353B - WiFi connection method and terminal - Google Patents

WiFi connection method and terminal Download PDF

Info

Publication number
CN110870353B
CN110870353B CN201880045273.4A CN201880045273A CN110870353B CN 110870353 B CN110870353 B CN 110870353B CN 201880045273 A CN201880045273 A CN 201880045273A CN 110870353 B CN110870353 B CN 110870353B
Authority
CN
China
Prior art keywords
sta
wifi
frequency band
wifi connection
key negotiation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201880045273.4A
Other languages
Chinese (zh)
Other versions
CN110870353A (en
Inventor
杨俊�
罗俊颜
吴忠标
刘海军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN110870353A publication Critical patent/CN110870353A/en
Application granted granted Critical
Publication of CN110870353B publication Critical patent/CN110870353B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup

Landscapes

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

Abstract

A WiFi connection method and a terminal relate to the technical field of communication. The method comprises the following steps: the STA scans and discovers WiFi hotspots provided by the AP on a first frequency band and sends an association request to the AP; then, the STA receives an association response which is sent by the AP and used for indicating the successful association; receiving a key negotiation request sent by the AP; the STA sends a key negotiation response to the AP, wherein the key negotiation response comprises an identifier, the identifier is obtained according to the modified password, and the modified password is obtained by modifying the login password of the WiFi hotspot according to a preset rule; the STA receives a key negotiation result sent by the AP; and if the key negotiation result is used for indicating that the AP refuses to establish WiFi connection with the STA on the first frequency band, the STA initiates the AP to establish WiFi connection on the second frequency band. This solution helps to improve the efficiency of WiFi connection establishment.

Description

WiFi connection method and terminal
Technical Field
The present application relates to the field of communications technologies, and in particular, to a WiFi connection method and a terminal.
Background
A dual-band wireless fidelity (WiFi) refers to a WiFi communication technology supporting two frequency bands, for example, a WiFi communication technology supporting two frequency bands of 2.4GHz and 5 GHz. The 2.4GHz band WiFi communication technology may also be referred to as 2.4G WiFi. Generally, the 5GHz band WiFi communication technology specified in the Institute of Electrical and Electronics Engineers (IEEE) 802.11ac protocol is referred to as 5G WiFi. However, the 5GHz band WiFi communication technology is not necessarily referred to as 5G WiFi.
Currently, a new generation of electronic devices may support both 2.4G WiFi and 5G WiFi communication technologies. However, 2.4G WiFi and 5G WiFi are incompatible. For example, an electronic device supporting only 2.4G WiFi cannot scan a WiFi hotspot on the 5GHz band. In addition, when the electronic device supports 2.4G WiFi and 5G WiFi, due to the limitation of the chip function of the electronic device itself, only WiFi connection can be established based on one of 2.4GHz WiFi and 5GHz WiFi at the same time. If the electronic devices at both ends of a wireless Access Point (AP) and a Station (STA) directly establish a connection based on 2.4G WiFi, since 5G WiFi has a higher data transmission speed than 2.4G WiFi, in case that the electronic devices at both ends of the AP and the STA support 2.4G WiFi and 5G WiFi, the connection established based on 2.4G WiFi may reduce the data transmission speed between the electronic devices. If the electronic devices at the two ends of the AP and the STA directly establish connection based on 5G WiFi, when there is an electronic device that does not support5G WiFi among the electronic devices at the two ends of the AP and the STA, WiFi connection failure may result.
In order to solve the above problems, in the prior art, when an AP and an STA establish WiFi connection, a connection is established based on 2.4G WiFi first, after the connection is successfully established based on 2.4G WiFi, then based on the established 2.4G WiFi connection, the AP and the STA perform negotiation of 5G WiFi capability, if both the AP and the STA support5G WiFi, the 2.4G WiFi connection is disconnected, and then the connection is established based on 5G WiFi. Thus, the above process of establishing WiFi connection requires a long time and is inefficient.
Disclosure of Invention
The embodiment of the application provides a WiFi connection method and a terminal, which are beneficial to improving the WiFi connection efficiency and reducing the time required by WiFi connection.
In a first aspect, a WiFi connection method provided in an embodiment of the present application is applied to an STA and an AP, where the STA and the AP both support WiFi connection establishment in a first frequency band and a second frequency band, and the first frequency band is different from the second frequency band. Specifically, the method comprises the following steps: the STA scans and discovers WiFi hotspots provided by the AP on a first frequency band; secondly, the STA sends an association request to the AP on a first frequency band; then, the STA receives an association response which is sent by the AP according to the association request and used for indicating the successful association; after receiving the association response, the STA receives a key negotiation request sent by the AP; responding to the key negotiation request, and sending a key negotiation response to the AP by the STA, wherein the key negotiation response comprises an identifier, the identifier is obtained according to the modified password, and the modified password is obtained by modifying the login password of the WiFi hotspot according to a preset rule; the STA receives a key negotiation result sent by the AP according to the key negotiation response; and if the key negotiation result is used for indicating that the AP refuses to establish WiFi connection with the STA on the first frequency band, the STA initiates the AP to establish WiFi connection on the second frequency band, so that the AP establishes WiFi connection on the second frequency band.
In the embodiment of the application, because the STA and the AP can perform negotiation of the second frequency band capability in the key negotiation process corresponding to the first frequency band, compared with the prior art in which the AP and the STA perform negotiation of the second frequency band capability after establishing WiFi connection on the first frequency band, the time required for the STA and the AP to perform negotiation of the second frequency band capability is reduced, thereby contributing to improving efficiency of WiFi connection establishment and reducing time required for WiFi connection.
In one possible design, after determining that the AP supports establishing WiFi connection on the second frequency band according to the name of the WiFi hotspot, the STA sends a key agreement response to the AP. Thus, the STA is facilitated to determine whether the AP has the capability to establish a WiFi connection while operating in the second frequency band.
In one possible design, the STA scans for WiFi hotspots provided by the AP on the first frequency band in response to a first event. Thereby facilitating the STA to determine the method of using the WiFi connection provided by the first aspect.
In one possible design, the first event is that the STA is to send first data to the AP; or, the STA waits to receive the first data sent by the AP. By the technical scheme, the method and the device are beneficial to simplifying the mode of transmitting the first data between the AP and the STA.
In one possible design, the first data includes any one or more of: contacts, short messages, a gallery or a memo. Thereby being helpful to simplify the transmission mode of transmitting the contact, the short message, the picture library or the memorandum between the AP and the STA.
In one possible design, the first wireless transmission speed is a data transmission speed of a WiFi connection established based on a first frequency band, and the second wireless transmission speed is a data transmission speed of a WiFi connection established based on a second frequency band; wherein the first wireless transmission speed is less than the second wireless transmission speed. By the technical scheme, the data transmission speed is improved. For example, the first frequency band is a 2.4GHz frequency band, and the second frequency band is a 5GHz frequency band.
In one possible design, the AP is the first terminal and the STA is the second terminal. That is, both the AP and the STA may be mobile terminals, for example, both mobile phones.
In one possible design, the following procedure is included in the four-way handshake between the STA and the AP: STA receives a key negotiation request sent by AP; the STA sends a key negotiation response to the AP; and the STA receives the key negotiation result sent by the AP. Therefore, the embodiment of the application simply improves the existing four-way handshake process, that is, the capability of the second frequency band can be negotiated through the four-way handshake process, thereby being beneficial to improving the speed of establishing the WiFi connection between the STA and the AP.
In a second aspect, a WiFi connection method provided in an embodiment of the present application is applied to an STA and an AP, where the STA and the AP both support WiFi connection establishment in a first frequency band and a second frequency band, where the first frequency band is different from the second frequency band, and the method includes: the AP opens a WiFi hotspot on a first frequency band; secondly, the AP receives an association request sent by the STA on a first frequency band; then, the AP sends an association response for indicating successful association to the STA according to the association request; after sending the association response, the AP sends a key negotiation request to the STA; the AP receives a key negotiation response sent by the STA according to the key negotiation request, wherein the key negotiation response comprises an identifier, the identifier is obtained according to a modified password, and the modified password is obtained by modifying a login password of the WiFi hotspot according to a preset rule; the AP verifies the identifier, determines that the STA supports the establishment of WiFi connection on the second frequency band, and sends a key negotiation result to the STA, wherein the key negotiation result is used for indicating the AP to refuse the establishment of WiFi connection with the STA on the first frequency band; and after sending the key negotiation result, the AP closes the WiFi hotspot on the first frequency band and opens the WiFi hotspot on the second frequency band.
In the embodiment of the application, because the STA and the AP can perform negotiation of the second frequency band capability in the key negotiation process corresponding to the first frequency band, compared with the prior art in which the AP and the STA perform negotiation of the second frequency band capability after establishing WiFi connection on the first frequency band, the time required for the STA and the AP to perform negotiation of the second frequency band capability is reduced, thereby contributing to improving efficiency of WiFi connection establishment and reducing time required for WiFi connection.
In one possible design, the AP generates a name of the WiFi hotspot according to a capability of supporting establishment of a WiFi connection on the second frequency band. Thereby helping the STA determine whether the AP supports the capability of establishing a WiFi connection on the second frequency band based on the name of the WiFi hotspot.
In one possible design, the first wireless transmission speed is a data transmission speed of a WiFi connection established based on a first frequency band, and the second wireless transmission speed is a data transmission speed of a WiFi connection established based on a second frequency band; wherein the first wireless transmission speed is less than the second wireless transmission speed. By the technical scheme, the data transmission speed is improved. For example, the first frequency band is a 2.4GHz frequency band, and the second frequency band is a 5GHz frequency band.
In a possible design, after receiving the key agreement response, the AP sends a key agreement result to the STA if it is determined that the WiFi hotspot on the first frequency band is not occupied by other services and the WiFi hotspot on the second frequency band is not restricted. Thereby helping to increase the likelihood of success in establishing a WiFi connection.
In one possible design, the AP is the first terminal and the STA is the second terminal. That is, both the AP and the STA may be mobile terminals, for example, both mobile phones.
In one possible design, the following procedure is included in the four-way handshake between the STA and the AP: the AP sends a key negotiation request to the STA; the AP receives a key negotiation response sent by the STA; and the AP sends a key negotiation result to the STA. Therefore, the embodiment of the application simply improves the existing four-way handshake process, and the capability of the second frequency band can be negotiated through the four-way handshake process, so that the speed of establishing WiFi connection between the STA and the AP is further improved.
In a third aspect, a WiFi connection method provided in an embodiment of the present application is applied to an STA and an AP, where the STA and the AP both support establishing WiFi connection in a first frequency band and a second frequency band, where the first frequency band is different from the second frequency band, and the method includes: the STA scans and discovers WiFi hotspots provided by the AP on a first frequency band; secondly, the STA sends an association request to the AP on the first frequency band, wherein the association request comprises the capability information that the STA supports the establishment of WiFi connection on the second frequency band; the STA receives an association response sent by the AP according to the association request; and if the association response indicates that the AP refuses to establish WiFi connection with the STA on the first frequency band, the STA initiates the AP to establish WiFi connection on the second frequency band so as to establish WiFi connection with the AP on the second frequency band.
In the embodiment of the application, because the STA and the AP can perform negotiation of the second frequency band capability in the association process corresponding to the first frequency band, compared with the prior art in which the AP and the STA perform negotiation of the second frequency band capability after establishing WiFi connection on the first frequency band, the time required for the STA and the AP to perform negotiation of the second frequency band capability is reduced, thereby contributing to improving efficiency of establishing WiFi connection and reducing time required for WiFi connection.
In one possible design, the association response includes capability information that the AP supports establishing the WiFi connection on the second frequency band. Thus, the STA is helped to determine the reason why the AP refuses to establish the WiFi connection with the STA on the first frequency band.
In one possible design, after the STA determines that the AP supports establishing WiFi connection on the second frequency band according to the name of the WiFi hotspot, the STA sends an association request to the AP. Thereby facilitating the STA to acquire 5G WiFi capability information of the AP.
In one possible design, the STA scans for WiFi hotspots provided by the AP on the first frequency band in response to a first event. By the technical scheme, the method for determining the WiFi connection provided by the second aspect by the STA is facilitated.
In one possible design, the first event is: the STA waits for sending first data to the AP; or, the STA waits to receive the first data sent by the AP. Thereby helping to simplify the manner in which the first data is transmitted between the AP and the STA.
In one possible design, the first data includes any one or more of: contacts, short messages, a gallery or a memo. By the technical scheme, the method and the device are beneficial to simplifying the transmission mode of transmitting the contact, the short message, the gallery or the memo between the AP and the STA.
In one possible design, the first wireless transmission speed is a data transmission speed of a WiFi connection established based on a first frequency band, and the second wireless transmission speed is a data transmission speed of a WiFi connection established based on a second frequency band, where the first wireless transmission speed is less than the second wireless transmission speed. By the technical scheme, the data transmission speed is improved. For example, the first frequency band is a 2.4GHz frequency band, and the second frequency band is a 5GHz frequency band.
In one possible design, the AP is the first terminal and the STA is the second terminal. That is, both the AP and the STA may be mobile terminals, for example, both mobile phones.
In a fourth aspect, a WiFi connection method provided in an embodiment of the present application is applied to an STA and an AP, where the STA and the AP both support WiFi connection establishment in a first frequency band and a second frequency band, where the first frequency band is different from the second frequency band, and the method includes: the AP opens a WiFi hotspot on a first frequency band; secondly, the AP receives an association request sent by the STA on a first frequency band, wherein the association request comprises the capability information of the STA supporting the establishment of WiFi connection on a second frequency band; the AP determines that the AP supports the establishment of WiFi connection on the second frequency band according to the association request, and sends an association response to the STA, wherein the association response indicates that the AP refuses the establishment of WiFi connection with the STA on the first frequency band; and after sending the association response, the AP closes the WiFi hotspot on the first frequency band and opens the WiFi hotspot on the second frequency band.
In the embodiment of the application, because the STA and the AP can perform the negotiation of the 5G WiFi capability in the association process corresponding to the first frequency band, compared with the prior art in which the AP and the STA perform the negotiation of the second frequency band capability after the WiFi connection is established in the first frequency band, the time for the STA and the AP to perform the negotiation of the second frequency band capability is reduced, thereby contributing to improving the efficiency of establishing the WiFi connection and reducing the time required by the WiFi connection.
In one possible design, the association response includes capability information that the AP supports establishing the WiFi connection on the second frequency band.
In one possible design, the AP generates a name of the WiFi hotspot according to a capability of supporting establishment of a WiFi connection on the second frequency band. Thereby facilitating the STA to acquire 5G WiFi capability information of the AP.
In one possible design, the first wireless transmission speed is a data transmission speed of a WiFi connection established based on a first frequency band, and the second wireless transmission speed is a data transmission speed of a WiFi connection established based on a second frequency band, where the first wireless transmission speed is less than the second wireless transmission speed. Thereby contributing to an increase in the speed of data transmission. For example, the first frequency band is a 2.4GHz frequency band, and the second frequency band is a 5GHz frequency band.
In one possible design, after receiving the association request, the AP sends an association response to the STA if it is determined that the WiFi hotspot on the first frequency band is not occupied by other services and the WiFi hotspot on the second frequency band is not limited. By the technical scheme, the possibility of successfully establishing the WiFi connection is improved.
In one possible design, the AP is the first terminal and the STA is the second terminal.
In a fifth aspect, embodiments of the present application provide a terminal, which includes a processor, a memory, and a transceiver. The memory has stored therein program instructions, and the processor is coupled to the memory and the transceiver, and when the apparatus is operating, the processor executes the program instructions stored in the memory to cause the apparatus to perform the method of any of the above aspects.
In a sixth aspect, an apparatus provided in an embodiment of the present application is included in a terminal, and the apparatus has a function of implementing an AP or STA behavior in each method described in any of the above aspects. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules or units corresponding to the above functions.
In a seventh aspect, a chip provided in an embodiment of the present application is coupled with a memory in an electronic device, and performs the method in any of the above aspects.
In an eighth aspect, a computer storage medium of an embodiment of the present application stores program instructions, which, when executed on an electronic device, cause the electronic device to perform the method of any one of the above aspects.
In a ninth aspect, a computer program product of embodiments of the present application, when run on an electronic device, causes the electronic device to perform the method of any of the above aspects.
In addition, for technical effects brought by the fifth aspect to the ninth aspect, reference may be made to the description in the first aspect to the fourth aspect, and details are not repeated here.
It should be noted that "coupled" in the embodiments of the present application means that two components are directly or indirectly combined with each other.
Drawings
Fig. 1 is a schematic architecture of a possible communication system to which the present application is applicable;
fig. 2 is a schematic diagram of a possible terminal architecture to which the present application is applied;
fig. 3 is a schematic flowchart of a possible WiFi connection method provided in an embodiment of the present application;
fig. 4 is a schematic diagram of a possible WiFi hotspot setting interface provided in the present application;
FIG. 5 is a schematic view of a user interface provided herein;
FIG. 6 is a schematic diagram of one possible primary interface provided herein;
fig. 7 is a schematic view of a setting interface of a possible wireless lan provided in the present application;
FIG. 8 is a schematic view of another possible wireless LAN setup interface provided in the present application;
fig. 9 is a schematic diagram of a frame structure of a possible association request provided in the present application;
fig. 10 is a schematic structural diagram of one possible 5G WiFi capability provided herein;
FIG. 11 is a diagram illustrating a frame structure of another possible association request provided herein;
FIG. 12 is a diagram illustrating a frame structure of a possible association response provided herein;
FIG. 13 is a diagram illustrating a frame structure of a possible association response provided herein;
fig. 14 is a schematic structural diagram of a possible 5G WiFi capability provided by the present application;
fig. 15 is a flowchart illustrating another possible WiFi connection method provided herein;
fig. 16 is a flowchart illustrating a possible WiFi connection method provided in the present application;
FIG. 17 is a schematic diagram of a user interface for one possible cell phone clone provided herein;
FIG. 18 is a schematic representation of a user interface for another possible handset clone provided herein;
FIG. 19 is a schematic diagram of a user interface for one possible cell phone clone provided herein;
FIG. 20 is a schematic diagram of a user interface for another possible cell phone clone provided herein;
FIG. 21 is a schematic view of one possible user interface provided by the present application;
FIG. 22 is a schematic diagram of a possible apparatus provided herein;
FIG. 23 is a schematic diagram of yet another possible apparatus provided herein;
fig. 24 is a schematic structural diagram of a possible communication system provided in the present application.
Detailed Description
Fig. 1 is a schematic architecture diagram of a possible communication system to which the embodiment of the present application is applicable. The communication system shown in fig. 1 includes an AP and STAs. The connection mode between the AP and the STA is WiFi connection. It should be noted that, in the embodiment of the present application, the number of APs and the number of STAs in the communication system are not limited.
It should be understood that both the AP and the STA in the embodiments of the present application may be the terminalAnd (4) an end. The AP may be a router, or may also be other terminals or electronic devices having a WiFi access function. The STA may be a terminal or an electronic device supporting WiFi connectivity. In the embodiment of the present application, a terminal may also be referred to as a terminal equipment (terminal equipment), a User Equipment (UE), a Mobile Station (MS), a Mobile Terminal (MT), or the like. Specifically, the terminal may be a mobile phone (mobile phone), a tablet (pad), a computer with a wireless transceiving function, a Virtual Reality (VR) terminal, an Augmented Reality (AR) terminal, a wireless terminal in industrial control (industrial control), a wireless terminal in self driving (self driving), a wireless terminal in remote surgery (remote medical supply), a wireless terminal in smart grid (smart grid), a wireless terminal in transportation safety (transportation safety), a wireless terminal in smart city (smart city), a wireless terminal in smart home (smart home), and the like, which are not limited thereto. For example, the terminal of the embodiment of the present application includes, but is not limited to, a mount
Figure GPA0000283358610000081
Figure GPA0000283358610000082
Or other operating system.
Fig. 2 is a schematic diagram of a possible terminal architecture. It should be understood that the illustrated terminal 200 is merely an example, and that the terminal 200 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. 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 terminal 200 may include one or more processors 201, memory 202, Radio Frequency (RF) circuitry 203, audio circuitry 240, speaker 241, microphone 242, touch screen 250, one or more sensors 206, WiFi module 207, peripherals interface 308, and power module 309. These components may communicate over one or more communication buses or signal lines (not shown in fig. 2). Those skilled in the art will appreciate that the hardware configuration shown in fig. 2 does not constitute a limitation of terminal 200, and terminal 200 may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes the various components of terminal 200 in more detail:
the processor 201 is a control center of the terminal 200, connects various parts of the terminal 200 using various interfaces and lines, and performs various functions of the terminal 200 by executing or executing program instructions stored in the memory 202 and calling data stored in the memory 202. In some embodiments, the processor 201 may include one or more processing units. The processor 201 may also integrate an application processor and a modem processor. The application processor mainly processes an operating system, a user interface, application programs and the like, and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 201. In some other embodiments of the present application, the processor 201 may further include a fingerprint verification chip for verifying the acquired fingerprint.
The memory 202 is used to store programs and data. The memory 202 mainly includes a program storage area and a data storage area. Wherein the program storage area may store an operating system (e.g., a virtual machine operating system)
Figure GPA0000283358610000083
An operating system,
Figure GPA0000283358610000084
An operating system, etc.), application programs required for at least one function (such as a sound playing function, an image playing function, etc.). The data storage area may store data (such as audio data, a phonebook, etc.) created when the user uses the terminal 200.
The RF circuitry 203 may be used for receiving and transmitting wireless signals during the transmission and reception of information or during a call. Specifically, the RF circuit 203 may receive downlink data of the base station and then process the downlink data to the processor 201. In addition, the RF circuit 203 may also transmit uplink data to the base station. In general, the RF circuitry 203 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the RF circuitry 203 may also enable communication with other devices via wireless communication. The wireless communication may use any communication standard or protocol including, but not limited to, global system for mobile communications, general packet radio service, code division multiple access, wideband code division multiple access, long term evolution, email, short message service, and the like.
The audio circuitry 240, speaker 241, microphone 242 may provide an audio interface between a user and the terminal 200. The audio circuit 240 may transmit the electrical signal converted from the received audio data to the speaker 241, and convert the electrical signal into a sound signal by the speaker 241 for output; on the other hand, the microphone 242 converts the collected sound signals into electrical signals, which are received by the audio circuit 240 and converted into audio data, which are then output to the RF circuit 203 for transmission to, for example, a cell phone, or to the memory 202 for further processing.
Touch screen 250 may include a touch sensitive surface 251 and a display 252. Among other things, touch sensitive surface 251 (e.g., a touch panel) can capture touch events on or near the touch sensitive surface 251 by a user of terminal 200 (e.g., user manipulation of a finger, stylus, or any other suitable object on or near touch sensitive surface 251) and transmit captured touch information to another device, such as processor 201. Among other things, a touch event of a user near the touch-sensitive surface 251 may be referred to as a hover touch. Hover touch may refer to a user not having to directly contact the touchpad in order to select, move, or drag a target (e.g., an application icon, etc.), but rather only having to be located near the electronic device in order to perform a desired function. In the context of a hover touch application, the terms "touch," "contact," and the like do not imply a contact that is used to directly contact the touch screen 250, but rather a contact that is near or in proximity thereto. The touch-sensitive surface 251 capable of floating touch control can be implemented by using capacitance, infrared light sensing, ultrasonic waves and the like.
The touch sensitive surface 251 may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts the touch information into touch point coordinates, and sends the touch point coordinates to the processor 201, and the touch controller can also receive and execute instructions sent by the processor 201. In addition, the touch-sensitive surface 251 may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves.
A display (also referred to as a display screen) 252 may be used to display information entered by or provided to the user, as well as various menus for terminal 200. The display 252 may include both a display controller and a display device. Wherein the display controller is used for receiving signals or data sent by the processor 201 to drive the display device to display a corresponding interface. For example, the display device may be configured by an Active Matrix Organic Light Emitting Diode (AMOLED).
It should be appreciated that the touch sensitive surface 251 may overlie the display 252, and that when a touch event is detected on or near the touch sensitive surface 251, it is communicated to the processor 201 to determine the type of touch event, and the processor 201 may then provide a corresponding visual output on the display 252 in accordance with the type of touch event. Although in FIG. 2, touch-sensitive surface 251 and display 252 are shown as two separate components to implement input and output functions of terminal 200, in some embodiments, touch-sensitive surface 251 and display 252 may be integrated to implement input and output functions of terminal 200. It is understood that the touch screen 250 is formed by stacking multiple layers of materials, and only the touch-sensitive surface (layer) and the display (layer) are shown in the embodiment of the present application, and the description of the other layers is omitted in the embodiment of the present application. In addition, in some other embodiments of the present application, the touch-sensitive surface 251 may be covered on the display 252, and the size of the touch-sensitive surface 251 is larger than that of the display 252, so that the display 252 is completely covered under the touch-sensitive surface 251, or the touch-sensitive surface 251 may be configured on the front surface of the terminal 200 in a full-panel manner, that is, all touches of the user on the front surface of the terminal 200 can be sensed by the mobile phone, so that a full-touch experience on the front surface of the mobile phone can be achieved. In other embodiments, the touch-sensitive surface 251 is disposed on the front surface of the terminal 200 in a full-panel manner, and the display 252 may be disposed on the front surface of the terminal 200 in a full-panel manner, so that a frameless structure can be implemented on the front surface of the mobile phone. In some other embodiments of the present application, the touch screen 250 may further include a series of pressure sensor arrays that may enable the cell phone to sense the pressure applied to the touch screen 250 by the touch event.
One or more sensors 206, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display of the touch screen 250 according to the brightness of ambient light, and a proximity sensor that turns off the power of the display when the terminal 200 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), and the like.
In some embodiments of the present application, the sensor 206 may also include a fingerprint sensor. For example, the fingerprint sensor may be disposed on the rear side of the terminal 200 (e.g., below the rear camera), or the fingerprint sensor may be disposed on the front side of the terminal 200 (e.g., below the touch screen 250). In addition, the fingerprint recognition function may also be implemented by configuring a fingerprint sensor in the touch screen 250, that is, the fingerprint sensor may be integrated with the touch screen 250 to implement the fingerprint recognition function of the terminal 200. In this case, the fingerprint sensor may be disposed in the touch screen 250, may be a part of the touch screen 250, or may be otherwise disposed in the touch screen 250. Additionally, the fingerprint sensor may be implemented as a full panel fingerprint sensor, and thus, the touch screen 250 may be considered as a panel that can be used for fingerprint acquisition at any location. In some embodiments, the fingerprint sensor may process the captured fingerprint (e.g., verify the captured fingerprint), and send the fingerprint processing result (e.g., whether the fingerprint passes the verification) to the processor 201, and the processor 201 performs corresponding processing according to the fingerprint processing result. In other embodiments, the fingerprint sensor may also send the captured fingerprint to the processor 201 for processing (e.g., fingerprint verification, etc.) by the processor 201. The fingerprint sensor in embodiments of the present application may employ any type of sensing technology including, but not limited to, optical, capacitive, piezoelectric, or ultrasonic sensing technologies, among others. In addition, the terminal 200 may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described in detail herein.
A WiFi module 207 for providing the terminal 200 with network access complying with WiFi-related standard protocols. The terminal 200 can access the AP through the WiFi module 207. In addition, the terminal 200 including the WiFi module 207 may also be used as an AP, and the terminal 200 opens a WiFi hotspot to provide WiFi network access to other terminals. It is understood that the WiFi related standard protocols may include IEEE802.11ac, IEEE802.11b, IEEE802.11g/a, and/or IEEE802.11n, among others. In the embodiments of the present application, a WiFi communication technology on a 5GHz band is referred to as 5G WiFi, where the WiFi communication technology on the 5GHz band may be specified in ieee802.11ac, ieee802.11n, or ieee802.11G/a, and the embodiments of the present application do not limit a standard protocol related to the WiFi communication technology; some WiFi-related standard protocols may not define the WiFi communication technology on the 5G Hz frequency band as 5G WiFi, but in the embodiment of the present application, the 5G WiFi refers to any WiFi communication technology operating on the 5G Hz frequency band, and does not limit the standard protocols related to the communication technology. Similarly, in the embodiments of the present application, the WiFi communication technology on the 2.4GHz band is referred to as 2.4G WiFi, and the standard protocol involved in the WiFi communication technology is not limited. The 5G WiFi has the greatest characteristic of higher wireless transmission speed. The lowest wireless transmission speed of 5G WiFi can reach 433 Mbps. For some high-performance electronic devices, the wireless transmission speed of 5G WiFi can even reach more than 1 Gbps. The 2.4G WiFi and the 5G WiFi are WiFi communication technologies on different frequency bands and are not compatible with each other.
For example, if the WiFi module 207 provides WiFi-related standard protocols including ieee802.11ac and ieee802.11n, the WiFi module 207 supports 2.4G WiFi and 5G WiFi. In this case, the terminal 200 may open the 2.4G WiFi hotspot and establish a connection with other electronic devices supporting 2.4G WiFi, or may establish a connection through a 2.4G WiFi hotspot accessed to other electronic devices. The terminal 200 may also open the 5G WiFi hotspot to establish a connection with other electronic devices supporting 5G WiFi, or may establish a connection by accessing the 5G WiFi hotspot of other electronic devices. However, an electronic device operating in 2.4G WiFi cannot access the 5G WiFi hotspot opened by the terminal 200. It should be noted that the 2.4G WiFi hotspot operates in the 2.4GHz frequency band, and the 5G WiFi hotspot operates in the 5GHz frequency band.
The peripheral interface 208 is used to provide various interfaces for external input/output devices (e.g., keyboard, mouse, external display, external memory, SIM card, etc.). For example, the mouse is connected with the universal serial bus interface, and the user identification module card is connected with a user identification module card provided by an operator through metal contacts on a user identification module card slot. Peripheral interface 208 may be used to couple the aforementioned external input/output peripherals to processor 201 and memory 203.
The terminal 200 may further include a power module 209 (e.g., a battery and a power management chip) for supplying power to various components, and the battery may be logically connected to the processor 201 through the power management chip, so as to implement functions of managing charging, discharging, and power consumption through the power module 209.
Although not shown in fig. 2, the terminal 200 may further include a bluetooth module, a positioning module, a camera (e.g., a front camera and a rear camera), a flash, a micro-projector, a Near Field Communication (NFC) module, and the like, which are not described in detail herein. The front-facing camera may be configured to capture face feature information, and the processor 201 may perform face recognition on the face feature information, and then perform subsequent processing.
It should be noted that the existing WiFi connection may operate on the first frequency band or the second frequency band, but is limited by the hardware capability of the terminal, and when the terminal is connected to other devices through the WiFi connection, if the terminal can support the WiFi communication establishment on the first frequency band and the second frequency band, the WiFi connection of the terminal cannot operate on the first frequency band and the second frequency band at the same time. Wherein the first frequency band and the second frequency band are different. In some embodiments, the first wireless transmission speed is a data transmission speed of a WiFi connection established based on a first frequency band, and the second wireless transmission speed is a data transmission speed of a WiFi connection established based on a second frequency band; the first wireless transmission speed is less than the second wireless transmission speed. For example, the first frequency band may be a 2.4GHz band, and the second frequency band may be a 5GHz band.
The WiFi connection method in the embodiment of the present application is described in detail below by taking a frequency band with a first frequency band of 2.4GHz and a frequency band with a second frequency band of 5GHz as examples. It should be noted that, in the embodiment of the present application, the first frequency band is not limited to the frequency band of 2.4Ghz, and the second frequency band is not limited to the frequency band of 5 Ghz. As long as two terminals support two frequency bands, the WiFi connection method provided in the embodiments of the present application may be adopted, and is not described here.
It should be understood that, in the embodiment of the present application, the connection established based on 2.4G WiFi may be simply referred to as a 2.4G WiFi connection, which refers to a WiFi connection established on a 2.4GHz frequency band. In the embodiment of the present application, the connection established based on 5G WiFi may be simply referred to as 5G WiFi connection, which refers to WiFi connection established on a 5GHz frequency band. In the embodiment of the application, the 2.4G WiFi hotspot refers to a WiFi hotspot working in a 2.4GHz frequency band, and the 5G WiFi hotspot refers to a WiFi hotspot working in a 5GHz frequency band. For example, when the terminal 200 supports 2.4G WiFi and 5G WiFi, after the WiFi hotspot is opened, if the WiFi hotspot operates in a 2.4GHz frequency band, it may be referred to that the terminal 200 opens the 2.4GHz WiFi hotspot. If the WiFi hotspot is opened by the terminal 200 and operates in the 5GHz frequency band, it may be referred to that the terminal 200 opens the 5GHz WiFi hotspot. In general, the terminal 200 opens a WiFi hotspot, which operates in a 2.4GHz band by default, in response to a user operation.
In the embodiment of the application, since the AP and the STA can perform the negotiation of the 5G WiFi capability in the process of establishing the 2.4G WiFi connection, the negotiation of the 5G WiFi capability does not need to be performed after the 2.4G WiFi connection is established, so that compared with the WiFi connection method in the prior art, the efficiency of WiFi connection is improved. The method for WiFi connection in this application is described in detail below by taking the communication system shown in fig. 1 as an example.
Fig. 3 is a schematic flowchart of a WiFi connection method according to an embodiment of the present application. The method specifically comprises the following steps:
s300: the AP turns on a 2.4G WiFi hotspot. For example, the AP may open a 2.4G WiFi hotspot in response to a user opening a WiFi hotspot. For example, as shown in fig. 4, the operation of the user to open the WiFi hotspot may be an operation of the user touching a virtual button 401 ON the setting interface 400 of the WiFi hotspot, so that the virtual button 401 is turned ON (ON). As another example, the AP may also open a 2.4G WiFi hotspot in response to a user operation to transmit or share data to other devices (e.g., other handsets, pads, etc.). The AP may serve as a data receiving end or a data transmitting end. Taking the AP as a data receiving end as an example, as shown in fig. 5, when the user touches an icon 501 of "migrate from hua to device" on a user interface 500 of the AP, or touches an icon 502 of "migrate from other Android devices" on the user interface 500, or touches an icon 503 of "migrate from iOS device" on the user interface 500, the AP may receive data sent by the external device after the subsequent AP establishes a connection with the external device (hua to device, or other Android devices, or iOS device). It should be noted that the three icon options (501, 502, and 503) shown in fig. 5 are only examples, and in some terminals, the device brand or the device system may not be distinguished, for example, there may be only one option "migrate from other devices", or there may be two options "migrate from iOS device" and "migrate from Android device"; of course, other options are possible such as "migrate from Windows phone", etc. As a further example, the AP may also open a 2.4G WiFi hotspot in response to a preset gesture operation. For example, the preset gesture operation may be an operation of sliding a three-finger on the touch screen when the AP displays the main interface, or may be another operation, which is not limited to this. The main interface can be a negative screen, and can also be other interfaces including application icons. For example, as shown in fig. 6, the main interface 600 may include a wechat icon, a setting icon, a camera icon, a file management icon, a phone icon, a mail icon, and a weather icon, and further include a status bar and a DOCK bar, where the status bar includes an operator (china mobile), a mobile network (4G), time, a bluetooth identifier, and remaining power. It will be appreciated that in some embodiments, a screen lock icon, a WiFi icon, an add-on icon, etc. may also be included in the status bar. The DOCK bar includes a phone icon, a short message icon, a mail icon, and a weather icon. The user can change the application icon in the DOCK bar according to the actual requirement of the user.
S301: and the STA scans the 2.4GHz frequency band to find a WiFi hotspot. Specifically, after the STA turns on WiFi, it scans and discovers WiFi hotspots on the 2.4GHz band. For example, as shown in fig. 7, the user touches a virtual button 701 ON the setting interface 700 of the wireless local area network, so that the virtual button 701 is turned ON (ON), and in response to the user operation, the STA may turn ON WiFi. As another example, the STA may also turn WiFi on in response to a user sending data to the AP. The embodiment of the present application does not limit the operation of turning on WiFi by the STA.
Note that, the STA is taken as a mobile phone as an example. If the STA supports 2.4G WiFi and 5G WiFi, a virtual button 701 may be set on the setting interface 700 of the wireless lan as shown in fig. 7. When the virtual button 701 is turned on, since the mobile phone cannot establish WiFi connection on the 2.4GHz band and the 5GHz band at the same time, it is default that a WiFi hotspot is scanned on the 2.4GHz band. In some embodiments, when a WiFi hotspot is not scanned on the 2.4GHz band or when the WiFi connection is failed to be established on the 2.4GHz band, the WiFi hotspot scanning on the 2.4GHz band is turned off, and the function of the WiFi hotspot scanning on the 5GHz band is turned on. In addition, if the STA supports 2.4G WiFi and 5G WiFi, as shown in fig. 8, a virtual button 801 and a virtual button 802 may be further disposed on the setting interface 800 of the wireless local area network, where the virtual button 801 is used to control turning on or off the wireless local area network in the 2.4GHz band, and the virtual button 802 is used to control turning on or off the wireless local area network in the 5GHz band. Wherein virtual button 801 and virtual button 802 cannot be simultaneously turned on. When the virtual button 801 is turned ON, the mobile phone may default to scan a WiFi hotspot ON a 2.4GHz frequency band, when the WiFi hotspot is not scanned ON the 2.4GHz frequency band or when the WiFi connection established ON the 2.4GHz frequency band fails, the mobile phone turns OFF to scan the WiFi hotspot ON the 2.4GHz frequency band, turns ON a function of scanning the WiFi hotspot ON the 5GHz frequency band, and accordingly, the virtual button 801 is turned OFF (OFF), and the virtual button 802 is turned ON (ON).
In the embodiment of the present application, a possible manner for finding a 2.4G WiFi hotspot in scanning is as follows: the STA broadcasts a probe request. Wherein the probe request is a message satisfying a specific frame format, and the probe request includes address information of the STA. The AP that receives the probe request transmits a probe response (probe response) to the STA according to the address information of the STA, respectively. And the STA discovers the 2.4G WiFi hotspot according to the received probe response sent by the AP.
Another possible way for a card to scan for a 2.4G WiFi hotspot is: the STA scans and discovers WiFi hotspots by monitoring a Bacon frame broadcast by surrounding APs, wherein the Bacon frame is broadcast by the APs every preset time, and the Bacon frame comprises identification of the WiFi hotspots. It should be noted that the identifier of the WiFi hotspot may be a name of the WiFi hotspot (e.g., a Service Set Identifier (SSID)), a Media Access Control (MAC) address of the AP (e.g., a Basic Service Set Identifier (BSSID)), and the like, which is not limited herein.
It is understood that the two possible implementations of scanning to discover 2.4G WiFi hotspots described above can be used alone or in combination with each other.
And S302, the STA determines a 2.4G WiFi hotspot opened by the AP from the WiFi hotspots scanned and found in the S301.
In some embodiments, the STA may determine one from among the plurality of scanned 2.4G WiFi hotspots based on a user's selection. For example, as shown in fig. 7, the STA scans WiFi hotspots named WiFi1_2.4G and WiFi2, and if the STA detects that the user selects a WiFi hotspot named WiFi1_2.4G, the STA selects a WiFi hotspot named WiFi1_2.4G for subsequent operations. Alternatively, in other embodiments, the STA may determine one of the scanned WiFi hotspots according to a name of a hotspot to be connected, which is acquired in advance. For example, as shown in fig. 7, the STA scans to obtain WiFi hotspots named WiFi1_2.4G and WiFi2, and if the STA obtains a 2.4G WiFi hotspot to be connected in advance with a name WiFi1_2.4G, the STA selects the WiFi hotspot named WiFi1_2.4G for subsequent connection. Or, in other embodiments, after scanning multiple APs, the STA may automatically determine a hotspot that has been previously connected according to a record that has been previously connected, as the hotspot to be connected this time. Or in other embodiments, the STA scans only one WiFi hotspot, and the STA may directly determine the WiFi hotspot as a hotspot to be connected, or determine the WiFi hotspot as a hotspot to be connected according to a selection of a user or a preset setting.
It is to be understood that, in the processes of S301 and S302, for the STA to scan for the WiFi hotspot opened by the AP, after the STA scans for the WiFi hotspot opened by the AP, S303 is performed.
S303, the STA sends an association request (association request) to the AP, where the association request includes 5G WiFi capability information of the STA.
The STA transmits the association request to the AP determined in S302. The 5G WiFi capability information of the STA indicates the capability of the STA for establishing WiFi connection on the 5GHz frequency band. The 5G WiFi capability information of the STA is determined according to the capability of the STA to support5G WiFi. If the STA supports 5G WiFi, the 5G WiFi capability information of the STA included in the association request is used to indicate that the STA supports 5G WiFi. If the STA does not support5G WiFi, the association request does not include the 5G WiFi capability information of the STA, or the 5G WiFi capability information of the STA included in the association request is used to indicate that the STA does not support5G WiFi.
In a specific implementation, an Information Element (IE) field may be added in a frame structure of the association request, so that the association request carries the 5G WiFi capability information of the STA. For example, the frame structure of the association request may be as shown in fig. 9. Specifically, the association request includes a MAC header, a frame body, and a frame check sequence. The MAC header includes a frame control (frame control), a duration (duration), a Destination Address (DA), a Source Address (SA), a BSSID, and a sequence control (sequence control). The frame body includes capability information (capability information), listening interval (listen interval), SSID, supported rate, and 5G WiFi capability information. It should be noted that the capability information, the listening interval, the SSID, and the supported rate refer to 2.4G WiFi parameter information of the STA. The 2.4G WiFi parameter information of the STA is the parameter information supported by the STA when establishing a connection based on 2.4G WiFi. In specific implementation, the 5G WiFi capability information of the STA may be one byte, or may be multiple bytes, and specifically, corresponding setting may be performed according to actual requirements. Take 5G WiFi capability information of STA as one byte for example. For example, the 5G WiFi capability information of the STA is 1, indicating that the STA supports 5G WiFi; the 5G WiFi capability information of the STA is 0, indicating that the STA does not support5G WiFi.
It is understood that, for simplicity of implementation, in addition to the 5G WiFi capability information, specific implementations of other frame structures shown in fig. 9 can refer to specific implementations of frame structures employed in the 2.4G WiFi connection establishment in the prior art. For example, the frame control is 2 bytes for indicating the type of the frame. In addition, it is understood that the specific implementation of the frame structure shown in fig. 9 may be redefined, and is not limited thereto.
In some embodiments, the specific structure of the 5G WiFi capability information of the STA may also include an Organization Unique Identifier (OUI), a field type, a version number (version), 5G WiFi capability information, and a reserved bit (reserved), as shown in fig. 10. Wherein, the 0 th byte, the 1 st byte and the 2 nd byte are used for representing the OUI, and the 3 rd byte to the 6 th byte represent the field type. For example, bytes 3 through 6 being 80000002 indicate that the field type is a relevant definition of 5G WiFi capability. Bytes 7 and 8 indicate version numbers (versions), and byte 9 indicates 5G WiFi capability information of the STA, indicating the capability of the STA to support5G WiFi. For example, byte 9 is 01 to indicate that the STA supports 5G WiFi, and byte 9 is 00 to indicate that the STA does not support5G WiFi. Bytes 10, 11 and 12 are reserved bits. The structure shown in fig. 9 is merely an illustration of 5G WiFi capability information, and does not limit the embodiments of the present application.
In addition, in this embodiment of the application, if the frame structure of the association request is as 5G WiFi capability information included in the association request shown in fig. 9, it is indicated that the STA supports 5G WiFi. If the frame structure of the association request is as shown in fig. 11, and is different from the frame structure shown in fig. 9 in that the frame structure of the association request shown in fig. 11 does not include 5G WiFi capability information, the association request indicates that the STA does not support5G WiFi. It is understood that for simplicity of implementation, specific implementations of other frame structures shown in fig. 11 can refer to specific implementations of frame structures employed in 2.4G WiFi connection establishment in the prior art.
S304, after the AP receives the association request sent by the STA, if the STA is determined to support5G WiFi and the AP also supports 5G WiFi according to the association request, the AP judges whether to switch the 2.4G WiFi hotspot to the 5G WiFi hotspot, if so, S305 is executed, otherwise, S308 is executed.
It should be noted that switching the 2.4G WiFi hotspot to the 5G WiFi hotspot by the AP means switching the WiFi hotspot from the 2.4GHz frequency band to the 5GHz frequency band by the AP.
For example, the AP may determine whether to switch the 2.4G WiFi hotspot to the 5G WiFi hotspot by detecting whether the 2.4G WiFi hotspot of the AP is occupied by other services or whether the 5G WiFi hotspot of the AP is limited. For example, in the case that the 2.4G WiFi hotspot is not occupied by other traffic and 5G WiFi is not restricted, the AP determines to switch the 2.4G WiFi hotspot to the 5G WiFi hotspot, i.e., performs S305. For another example, in the case that the 2.4G WiFi hotspot is occupied by other services or 5G WiFi is restricted, the AP determines not to switch the 2.4G WiFi hotspot to the 5G WiFi hotspot, i.e., executes S308.
For example, the case where the 2.4G WiFi hotspot is not occupied by other traffic may be: other STAs connect with the AP through a 2.4G WiFi hotspot, but there is no data transmission between the other STAs and the AP. For another example, the case that the 2.4G WiFi hotspot is not occupied by other services may also be: no other STAs than the STA are connected to the AP through 2.4G WiFi. For example, the 5G WiFi limited situation may include a law prohibiting using the 5GHz band for communication, or the 5G WiFi antenna is occupied, etc. Specifically, the base station may send a signaling to the AP to indicate that the 5GHz band is prohibited from being used. When the AP receives the signaling, it determines that 5G WiFi is restricted. And if the base station does not send the signaling forbidding to use the 5GHz frequency band or the base station sends the signaling authorizing to use the 5GHz frequency band, the AP determines that the 5G WiFi is not limited. In other embodiments, if the antenna of 5G WiFi is shared with the antenna for modulation and demodulation in mobile communication, the AP further needs to determine whether 5G WiFi is limited by determining whether the antenna of 5G WiFi is occupied. For example, if the antenna of 5G WiFi is occupied, 5G WiFi is restricted, and if the antenna of 5G WiFi is not occupied, 5G WiFi is not restricted.
S305, the AP transmits an association response to the STA. The association response may be used to instruct the AP to refuse to establish the WiFi connection with the STA in the 2.4GHz band, or the association response may also be used to instruct the AP to agree to establish the WiFi connection with the STA in the 5GHz band.
And S306, after the AP sends the association response to the STA, closing the 2.4G WiFi hotspot and opening the 5G WiFi hotspot.
S307, after receiving the association response sent by the AP, the STA initiates the establishment of 5G WiFi connection to the AP, so that the AP establishes WiFi connection on a 5GHz frequency band.
In a specific implementation, the process of establishing the 5G WiFi connection includes the following steps:
step 1, scanning and discovering a 5G WiFi hotspot opened by an AP by the STA on a 5GHz frequency band.
And 2, after scanning and discovering the 5G WiFi hotspot opened by the AP, the STA sends an association request to the AP.
And step 3, after receiving the association request of the STA, the AP sends an association response to the STA according to the association request.
Wherein, the step 2 and the step 3 are association procedures of the AP and the STA when establishing the 5G WiFi connection, which can be referred to the association procedures when establishing the WiFi connection in the prior art and will not be described in detail herein.
And 4, if the association response indicates that the STA is successfully associated, the AP sends the association response to the STA and then initiates a four-way handshake process.
And 5, after the STA receives the association response sent by the AP, if the association is determined to be successful according to the association response, waiting to execute a four-way handshake process.
And 6, finishing the WiFi connection on the 5GHz frequency band after the STA and the AP successfully handshake in four times. Then, the STA and the AP may perform data transmission based on the WiFi connection established on the 5GHz band.
It should be noted that the four-way handshake procedure is used for key negotiation between the STA and the AP to ensure the security of communication between the STA and the AP. The four-way handshake procedure performed by the AP and the STA upon establishing the WiFi connection in the 5GHz band may be referred to as a four-way handshake procedure in the related art, and will not be described in detail here.
S308, the AP sends an association response to the STA. And the association response is used for indicating that the AP agrees to establish WiFi connection with the STA on the 2.4GHz frequency band.
In S305 and S308, the association response transmitted by the AP to the STA is a response to the association request in S303 in different cases.
For example, the frame structure of the association response may be as shown in fig. 12. Specifically, the association response includes a MAC header, a frame body, and a frame check sequence. Wherein the MAC header includes frame control, duration, destination address, source address, BSSID, and sequence control. The frame body includes capability information, status codes, association identification, and supported rates. It should be noted that the capability information, the status code, the association identifier, and the supported rate refer to parameter information supported by the AP when establishing a connection based on 2.4G WiFi. For example, if the status code is 0, the association response is used to instruct the AP to refuse to establish WiFi connection with the STA in the 2.4GHz band; and if the status code is 1, the association response is used for indicating that the AP agrees to establish WiFi connection with the STA on the 2.4GHz frequency band.
It is to be understood that, for simplicity of implementation, the specific implementation of the frame structure shown in fig. 12 may refer to the specific implementation of the frame structure adopted in the 2.4G WiFi connection establishment in the prior art, and will not be described in detail herein.
In addition, in specific implementation, the association response may further include 5G WiFi capability information of the AP. In this case, the frame structure of the association response may be as shown in fig. 13. Specifically, the association response includes a MAC header, a frame body, and a frame check sequence. Wherein the MAC header includes frame control, duration, destination address, source address, BSSID, and sequence control. The frame body includes capability information, status codes, association identification, supported rates, and 5G WiFi capability information. It should be noted that the capability information, the status code, the association identifier, and the supported rate refer to parameter information supported by the AP when establishing a connection based on 2.4G WiFi. For example, if the status code is 0, the association response is used to instruct the AP to refuse to establish WiFi connection with the STA in the 2.4GHz band; and if the status code is 1, the association response is used for indicating that the AP agrees to establish WiFi connection with the STA on the 2.4GHz frequency band. For example, the 5G WiFi capability information of the AP may be one byte, or may be multiple bytes, and specifically, the setting may be performed according to actual requirements. Take 5G WiFi capability information of the AP as one byte for example. For example, the 5G WiFi capability information of the AP is 1, indicating that the AP supports 5G WiFi; the 5G WiFi capability information of the AP is 0, indicating that the AP does not support5G WiFi.
It is understood that, for simplicity of implementation, in addition to the 5G WiFi capability information, specific implementations of other frame structures shown in fig. 13 can refer to specific implementations of frame structures employed in the 2.4G WiFi connection establishment in the prior art.
In some embodiments, the specific structure of the 5G WiFi capability information of the AP may also be as shown in fig. 14, and includes an OUI, a field type, a version number, 5G WiFi capability information, and a reserved bit. Wherein, the 0 th byte, the 1 st byte and the 2 nd byte are used for representing the OUI, and the 3 rd byte to the 6 th byte represent the field type. For example, bytes 3 through 6 being 80000002 indicate that the field type is a relevant definition of 5G WiFi capability. Bytes 7 and 8 indicate version numbers and byte 9 indicates parameter information of the AP for indicating 5G WiFi capability information of the AP. For example, byte 9 is 01 to indicate that the AP supports 5G WiFi, and byte 9 is 00 to indicate that the AP does not support5G WiFi. Bytes 10 to 15 are used to indicate BSSID, and bytes 16 to 19 are reserved bits. The structure shown in fig. 9 is merely an illustration of 5G WiFi capability information, and does not limit the embodiments of the present application.
Furthermore, in some embodiments of the present application, in the case that the AP supports 5G WiFi, the association response sent to the STA includes the 5G WiFi capability information of the AP. When the AP does not support5G WiFi, the association response sent to the STA may include the 5G WiFi capability information of the AP, or may not include the 5G WiFi capability information of the AP, which is not limited herein.
S309, after sending the association response to the STA, the AP initiates a four-way handshake process to the STA.
S310, after receiving the association response, the STA performs a four-way handshake process. And after the AP and the STA successfully handshake in four times, the STA and the AP finish establishing WiFi connection on the 2.4GHz frequency band. Subsequently, data transmission can be performed between the STA and the AP through the WiFi connection established over the 2.4GHz band.
It should be noted that the four-way handshake process between the STA and the AP may refer to the four-way handshake process in the process of establishing the WiFi connection between the STA and the AP in the prior art, and is not described herein again.
It should be further noted that, in the WiFi connection establishment method shown in fig. 3, by performing the determination in S304 to determine whether to switch the 2.4G WiFi hotspot to the 5G WiFi hotspot, it is helpful to improve the probability of successful WiFi connection establishment. However, in some embodiments, for example, in the process of establishing a WiFi connection between the mobile phone and the mobile phone for data transmission, the step of determining whether to switch the 2.4G WiFi hotspot to the 5G WiFi hotspot in S304 may not be performed; that is, if the AP determines that the STA supports 5G WiFi and the AP itself supports 5G WiFi, S305 to S307 are executed after S303.
After receiving the association request sent by the STA in S304, if it is determined that the STA does not support5G WiFi according to the association request, or if the AP determines that the AP itself does not support5G WiFi, S308 to S310 are executed after S304.
Compared with the WiFi connection method in the prior art, the WiFi connection method shown in fig. 3 in the embodiment of the present application does not need to perform negotiation of 5G WiFi capability after the 2.4G WiFi connection is established, and only needs to establish a WiFi connection once, thereby greatly shortening the time required for establishing the WiFi connection. Moreover, in the WiFi connection establishment method shown in fig. 3, negotiation of 5G WiFi capability is performed in the association process of 2.4G WiFi connection establishment, which helps to reduce negotiation time required before WiFi connection is established on a 5GHz frequency band.
In addition, in the prior art, firstly, connection is established based on 2.4G WiFi, and after the connection is successfully established based on 2.4G WiFi, the AP and the STA negotiate for 5G WiFi capability based on the established 2.4G WiFi connection; if the AP and the STA both support5G WiFi, disconnecting the 2.4G WiFi and then establishing connection based on the 5G WiFi. In the prior art, before establishing a 5G WiFi connection, a 2.4G WiFi connection needs to be disconnected, so that a problem that an AP and an STA are inconsistent when disconnecting the 2.4G WiFi connection may exist, and instability in a WiFi connection establishment process is easily increased. In the WiFi connection method shown in fig. 3, when the 5G WiFi connection is established, since the 2.4G WiFi connection is not established yet, the 2.4G WiFi connection does not need to be disconnected first. Therefore, compared with the prior art, the method reduces unstable factors in the WiFi connection establishment process, and improves the possibility of successful WiFi connection establishment.
It will be appreciated that in some embodiments, the AP may generate the name of the 2.4G WiFi hotspot based on its own 5G WiFi capability information. For example, taking the AP as a mobile phone as an example, when the AP supports 5G WiFi, the AP may generate a 2.4G WiFi hotspot with a name of mobile phone _ Support5G, and when the AP does not Support5G WiFi, the AP generates a 2.4G WiFi hotspot with a name of mobile phone _ noussupport 5G. When the STA can determine whether the AP supports 5G WiFi according to the name of the 2.4G WiFi hotspot. In this case, the AP may not include the 5G WiFi capability information of the AP in the association response sent to the STA according to the association request sent by the STA, which is helpful to reduce signaling overhead of the association response.
It should be understood that if the STA can determine that the AP supports 5G WiFi according to the name of the WiFi hotspot, in a case that the STA also supports 5G WiFi, the method of WiFi connection shown in fig. 3 in the embodiment of the present application is performed. If the STA determines that the AP does not support5G WiFi or does not support5G WiFi, the method for WiFi connection shown in fig. 3 in the embodiment of the present application may be executed, or WiFi connection between the AP and the STA may be implemented according to a method for establishing 2.4G WiFi connection in the prior art.
In addition, in other embodiments, the method for WiFi connection according to the embodiment of the present application may be performed between the STA and the AP in some special scenarios. For example, the STA is to send the first data to the AP, or the AP is to send the first data to the STA. In this scenario, the STA may scan for a 2.4G WiFi hotspot opened by the AP in response to a first event, and execute the method of WiFi connection illustrated in fig. 3 in this embodiment of the present application, for example, the first event may be that the STA is to transmit data to the AP, or that the STA is to receive the first data transmitted by the AP. For example, if the STA is to send the first data to the AP, the WiFi connection method shown in fig. 3 in the embodiment of the present application is executed, and if the AP is to receive the first data sent by the STA, the WiFi connection method shown in fig. 3 in the embodiment of the present application is executed. The first data can be contacts, short messages, a gallery, memorandum, reminders, documents and the like. For example, the STA and the AP are mobile phones respectively, and the STA needs to migrate stored data (such as contacts, short messages, a gallery, videos, a memo, and the like) to the AP, so that the STA and the AP execute the WiFi connection method shown in fig. 3 in the embodiment of the present application, which is beneficial to improving the data transmission rate.
For a scenario that the mobile phone accesses the wireless network through the router, no matter whether the mobile phone and the router support5G WiFi, the connection between the mobile phone and the router may be implemented by establishing WiFi connection at a frequency band of 2.4GHz, or the connection between the mobile phone and the router may be established by using the WiFi connection method of the embodiment of the present application, which is not limited thereto.
Another WiFi connection method is also provided in the embodiments of the present application, as shown in fig. 15, the method specifically includes the following steps.
S1500, the AP opens the 2.4G WiFi hotspot. It should be noted that, for a specific implementation manner of the AP opening the 2.4G WiFi hotspot in the embodiment of the present application, reference may be made to the specific implementation manner of the AP opening the 2.4G WiFi hotspot in S300, which is not described herein again.
S1501, the STA scans and discovers a WiFi hotspot in a 2.4GHz frequency band. It should be noted that, for a specific implementation manner of the STA scanning and discovering the WiFi hotspot in the 2.4GHz band in the embodiment of the present application, reference may be made to the description in S401, which is not described herein again.
S1502, the STA determines a 2.4G WiFi hotspot opened by the AP from the WiFi hotspots found by the S1501. It should be noted that, in the embodiment of the present application, a manner of determining, by the STA, one 2.4G WiFi hotspot opened by an AP from WiFi hotspots scanned and found in S1501 may be referred to a manner of determining, by the STA, one 2.4G WiFi hotspot opened by an AP from WiFi hotspots scanned and found in S301 in S302, which is not described herein again.
It is to be understood that S1501 and S1502 are processes of scanning by the STA to discover a WiFi hotspot opened by the AP, and after the STA scans to discover the WiFi hotspot opened by the AP, S1503 is performed.
S1503, the STA transmits an association request to the AP. As an example, the frame format of the association request may be as shown in fig. 11. Specifically, the association request includes a MAC header, a frame body, and a frame check sequence. Wherein the MAC header includes frame control, duration, destination address, source address, BSSID, and sequence control. The frame body includes capability information, listening interval, SSID, and supported rate. It can be understood that the capability information, the listening interval, the SSID, and the supported rate are parameter information supported by the STA to establish the WiFi connection on the 2.4GHz band. For simplifying the implementation manner, a specific implementation manner of the frame structure shown in fig. 11 may refer to a specific implementation manner of a frame structure of an association request in an association process between an AP and an STA when a 2.4G WiFi connection is established in the prior art, and details are not described herein again.
S1504, the AP sends an association response to the STA according to the association request sent by the STA. Wherein, the frame format of the association response may be as shown in fig. 12. Specifically, the association response includes a MAC header, a frame body, and a frame check sequence. Wherein the MAC header includes frame control, duration, destination address, source address, BSSID, and sequence control. The frame body includes capability information, status codes, association identification, and supported rates. It should be noted that the capability information, the status code, the association identifier, and the supported rate refer to parameter information supported by the AP for establishing the WiFi connection on the 2.4GHz band. For simplifying the implementation manner, the frame structure shown in fig. 12 may refer to a frame structure of an association response in an association process between an AP and an STA when a 2.4G WiFi connection is established in the prior art, and is not described herein again.
S1503 and S1504 are association procedures when the AP and the STA establish a WiFi connection in the 2.4GHz band. If the association response indicates that the AP and the STA are successfully associated, S1505 is performed.
S1505, the AP sends a key agreement request to the STA.
To simplify the implementation, the first identifier is included in the Key agreement request, and the first identifier may be, for example, Eapol Key1 in the four-way handshake process. The Eapol Key1 is used to instruct the STA to perform a four-way handshake for Key agreement.
S1506, after receiving the association response indicating that the association between the AP and the STA is successful sent by the AP in S1504, the STA receives the key agreement request sent by the AP. And after receiving the key negotiation request, the STA sends a key negotiation response to the AP if the STA supports 5G WiFi. The key negotiation response comprises a second identifier, the second identifier is obtained according to the modified password, and the modified password is obtained by modifying the login password of the 2.4G WiFi hotspot opened by the AP according to the preset rule by the STA.
For example, the STA supports 5G WiFi, and the STA may modify a login password of a 2.4G WiFi hotspot input by a user or a login password of a 2.4G WiFi hotspot obtained by scanning according to a preset rule, and then obtain a second identifier according to the modified password when the STA establishes a WiFi connection. The preset rule may be that a specific character is added before a first character of a login password of the 2.4G WiFi hotspot, or a character at a specific position in the login password of the 2.4G WiFi hotspot is modified to be a preset character, or a character at a specific position in the login password of the 2.4G WiFi hotspot is deleted, and the like, and the preset rule is not limited in the embodiment of the application. Take the case that 0 is added before the first character of the login password of the 2.4G WiFi hotspot. For example, the login password of the 2.4G WiFi hotspot input by the user is 123698, and in the case that the STA supports 5G WiFi, the login password 123689 is modified to 0123689 according to the preset rule. The STA generates a key agreement response according to 0123689.
For example, taking the STA as a mobile phone as an example, the login password of the 2.4G WiFi hotspot may be modified by an application, where the application may be a system application (e.g., a setup) on the mobile phone, or a pre-installed application (e.g., a mobile phone clone), and the like.
It should be noted that, if the STA does not support5G WiFi, the STA may generate the second identifier according to the login password of the 2.4G WiFi hotspot, where the second identifier is different from the second identifier generated when the STA supports 5G WiFi.
To simplify implementation, the second identification may be, as an example, Eapol Key2 in a four-way handshake process.
S1507, after the AP receives the key agreement response sent by the STA, if the AP supports 5G WiFi, it determines whether to switch the 2.4G WiFi hotspot to the 5G WiFi hotspot, if so, S1508 is executed, otherwise, 1511 is executed.
In some embodiments, after receiving the key agreement response sent by the STA, the AP may determine whether the STA supports 5G WiFi according to the following manner. Illustratively, the AP generates the fifth identifier by using the same algorithm as that used by the STA to generate the key agreement response according to the login password of the 2.4G WiFi hotspot, and generates the sixth identifier by using the same algorithm as that used by the STA to generate the key agreement response according to the login password of the 2.4G WiFi hotspot modified by the preset rule. For the preset rule, reference may be made to an implementation manner of the preset rule related in S1506, which is not described herein again. If the second identifier is different from the fifth identifier and is the same as the sixth identifier, the AP determines that the STA supports 5G WiFi, and then judges whether to switch the 2.4G WiFi hotspot to the 5G WiFi hotspot. And if the second identifier is the same as the fifth identifier and is different from the sixth identifier, the AP determines that the STA does not support5G WiFi, and then S1511-1512 is executed.
In addition, if the second identifier is different from the fifth identifier and the second identifier is also different from the sixth identifier, the AP determines that the WiFi login password input by the user is wrong, and then sends a key negotiation result to the STA, where the key negotiation result is used to indicate that the AP refuses to establish WiFi connection with the STA in a 2.4GHz frequency band. In this case, the AP does not turn on a 5G WiFi hotspot. And after receiving the key negotiation result, the STA initiates the establishment process of the 5G WiFi connection. Since the AP does not open the 5G WiFi hotspot, the STA cannot scan the 5G WiFi hotspot, and thus the STA may determine that the 2.4G WiFi hotspot login password is incorrectly entered, and the STA may display an input box on the interface in which the 2.4G WiFi hotspot login password is re-filled, so that the user re-enters the login password.
It should be noted that, in the embodiment of the present application, switching a 2.4G WiFi hotspot to a 5G WiFi hotspot refers to switching the WiFi hotspot from a 2.4GHz frequency band to a 5GHz frequency band by an AP. For a specific judgment, the manner of switching the 2.4G WiFi hotspot to the 5G WiFi hotspot may refer to the implementation manner in S304, which is not described herein again.
And S1508, the AP sends a key negotiation result to the STA, wherein the key negotiation result is used for indicating that the AP refuses to establish WiFi connection with the STA on a frequency band of 2.4 GHz.
And S1509, after the AP sends the key negotiation result to the STA, closing the 2.4G WiFi hotspot and opening the 5G WiFi hotspot.
S1510, after receiving the key negotiation result, the STA initiates establishment of a 5G WiFi connection to the AP, so that the AP establishes a WiFi connection in a 5GHz frequency band. Specifically, the 5G WiFi connection establishment process may refer to the specific description of the 5G WiFi connection establishment process in S307, which is not described herein again.
It should be understood that after the AP and the STA establish the WiFi connection on the 5GHz band, the STA and the AP may perform data transmission based on the WiFi connection established on the 5GHz band.
It should be noted that, in the embodiment of the present application, the 2.4G WiFi hotspot and the 5G WiFi hotspot may share one login password, and when the 2.4G WiFi hotspot and the 5G WiFi hotspot share one login password, the login password of the 2.4G WiFi hotspot is the same as the login password of the 5G WiFi hotspot, and then the STA does not need to input the login password again in the process of establishing the 5G WiFi connection with the AP. In addition, the login password of the 2.4G WiFi hotspot and the login password of the 5G WiFi hotspot can be different, and in the process that the STA and the AP establish WiFi connection on the 5GHz frequency band, the STA displays a dialog box prompting the user to input the login password of the 5G WiFi hotspot on the touch screen, so that the user can input the login password of the 5G WiFi hotspot, and the STA and the AP can be ensured to successfully establish WiFi connection on the 5GHz frequency band.
S1511, the AP sends the key negotiation result to the STA, and the key negotiation result is used for indicating the AP to agree to establish WiFi connection with the STA on the frequency band of 2.4 GHz.
In S1508 and S1511, the key agreement result sent by the AP to the STA is a judgment result made in response to the key agreement in S1506 under different conditions.
Illustratively, the key agreement result includes the third identifier. In S1508, the third flag is used to instruct the AP to reject to establish a WiFi connection with the STA in the 2.4GHz band. The third flag is used to indicate that the AP agrees to establish a WiFi connection with the STA in the 2.4GHz band in S1511. To simplify implementation, as an example, the third identification may be Eapol Key3 in a four-way handshake process.
S1512, after receiving the key agreement result sent by the AP, the STA sends a key agreement result receiving response to the AP. The key agreement result reception response is used to inform the STA of the reception of the key agreement result.
Illustratively, the fourth identifier is included in the key agreement result. The fourth identifier is used for notifying the STA of receiving the key negotiation result. As an example, the fourth identification may be Eapol Key4 in a four-way handshake process.
It should be noted that, for convenience of implementation, in some embodiments, S1505 to S1512 may be included in the four-way handshake process when the AP and the STA establish the WiFi connection on the 2.4GHz band.
The WiFi connection method shown in fig. 15 does not need to perform negotiation of 5G WiFi capability after the 2.4G WiFi connection is established, and only needs to establish a WiFi connection once, which greatly shortens the time required for establishing the WiFi connection. Moreover, the WiFi connection establishment method shown in fig. 15 may perform negotiation of 5G WiFi capability in a four-way handshake process of 2.4G WiFi connection establishment, which helps to reduce negotiation time required before establishing WiFi connection on a 5GHz frequency band.
In addition, in the WiFi connection method shown in fig. 15, before establishing a 5G WiFi connection, it is not necessary to disconnect a 2.4G WiFi connection first, so compared with the prior art, an unstable factor in the WiFi connection establishment process is reduced, and the possibility of successful WiFi connection establishment is improved.
In addition, in the WiFi connection establishing method shown in fig. 15, after the AP receives the key agreement response, if the second identifier indicates that the STA supports 5G WiFi, the AP sends a key agreement result to the STA under the condition that the AP does not support5G WiFi; and the key negotiation result is used for indicating that the AP agrees to establish WiFi connection with the STA on the 2.4GHz frequency band. By the technical scheme, the STA can establish 2.4G WiFi connection with the AP under the conditions that the STA supports 5G WiFi and the AP does not support5G WiFi, and the AP is prevented from misjudging and being incapable of establishing connection with the STA.
It should be understood that, after the AP receives the key negotiation response, if the second identifier indicates that the STA does not support5G WiFi and the AP supports 5G WiFi, the AP sends the key negotiation result to the STA, and the key negotiation response is used to indicate that the AP agrees to establish WiFi connection with the STA on the 2.4GHz band. For example, if the second identifier is determined according to a login password input by the user, the AP determines that the STA does not support5G WiFi.
It will be appreciated that in some embodiments, the AP may generate the name of the 2.4G WiFi hotspot based on its own 5G WiFi capability information. Alternatively, the method of WiFi connection shown in fig. 15 is performed in some special scenarios. For details, reference may be made to the description of the WiFi connection method shown in fig. 3, and details are not described here.
In addition, in the embodiment of the present application, when the AP is an intelligent terminal such as a mobile phone and a tablet computer, the AP may be referred to as a soft AP (soft AP).
The WiFi connection mode shown in fig. 15 is described in detail below with reference to a scenario of cell phone cloning. In order to transfer application data such as contacts, short messages and galleries in the mobile phone A to the mobile phone B, the data can be transmitted between the mobile phone A and the mobile phone B in a WiFi connection mode. In order to reduce the time required to establish a WiFi connection in the case where both cell phone a and cell phone B support 2.4G WiFi and 5G WiFi, capability negotiation of 5G WiFi may be performed in the four-way handshake process.
Take the mobile phone a as the receiving end of the data and the mobile phone B as the sending end of the data as an example. Specifically, as shown in fig. 16, the method for establishing a connection between the mobile phone a and the mobile phone B specifically includes:
s1601, the mobile phone A displays a first user interface, wherein the first user interface comprises the type of the equipment operating system of the data sending end and an icon for switching between the sending mode and the receiving mode. For example, the first user interface may be a user interface of a cell phone clone application installed on cell phone a. Take the first user interface as the user interface 1700 shown in fig. 17 as an example. Specifically, the user interface 1700 includes types of an Android device and an iOS device of a device operating system of a data transmitting end, a transmitting and receiving icon 1701 switched with each other, and a receiving icon 1702. Note that the first user interface may not include the icon 1701; that is, it is possible to set whether the mobile phone a is used as the receiving end or the sending end through other interfaces.
S1602, in response to the user touching the receiving icon 1702, the mobile phone a opens the 2.4G WiFi hotspot, and displays a second user interface, where the second user interface includes a two-dimensional code, and the two-dimensional code includes a name and a login password of the 2.4G WiFi hotspot. For example, the second user interface may be a user interface 1800 as shown in fig. 18, where the user interface 1800 includes a two-dimensional code 1801. The name and the login password of the 2.4G WiFi hotspot may be the same as the name and the login password of the 5G WiFi hotspot, respectively.
S1603, the mobile phone B displays a third user interface, where the third user interface includes an icon for switching between the sending mode and the receiving mode. For example, the third user interface is a user interface of a cell phone cloning application installed on cell phone B. Take the third user interface as the user interface 1900 shown in fig. 19 as an example. Specifically, the user interface 1900 includes a send and receive icon 1901 and a send icon 1902, which are switched with each other. Note that the user interface 1900 may not include the icon 1901; that is, it is possible to set whether the handset B is the sending end or the receiving end through other interfaces.
S1604, the mobile phone B responds to the user touching the sending icon 1902, opens the wireless local area network of the mobile phone B and opens the rear camera, and displays a fourth user interface, where the fourth user interface includes a preview box for scanning the two-dimensional code. The fourth user interface may be, for example, the user interface 2000 shown in fig. 20. Specifically, the user interface 2000 includes a preview box 2001 for scanning the two-dimensional code. The mobile phone B realizes the function of scanning and discovering the WiFi hot spot by opening the wireless local area network.
It should be noted that S1601 is followed by S1602, S1603 is followed by S1604, and S1601 and S1603, S1602 and S1603, S1601 and S1604, and S1602 and S1604 are not necessarily in sequence.
And S1605, the mobile phone B acquires the name of the 2.4G WiFi hotspot opened by the mobile phone A and the password of the 2.4G WiFi hotspot according to the scanned two-dimensional code displayed on the mobile phone A.
And S1606, according to the obtained 2.4G WiFi hotspot name, the mobile phone B determines the WiFi hotspot with the same name as the 2.4G WiFi hotspot from the WiFi hotspots found by scanning as the 2.4G WiFi hotspot opened by the mobile phone A.
And S1607, the mobile phone B sends the association request to the mobile phone A on the 2.4GHz frequency band.
S1608, after receiving the association request sent by the mobile phone B in the 2.4GHz band, the mobile phone a sends an association response indicating that the association between the mobile phone a and the mobile phone B is successful to the mobile phone B in the 2.4GHz band.
S1609, after the mobile phone a sends the association response indicating that the association between the mobile phone a and the mobile phone B is successful, the mobile phone a sends the key agreement request to the mobile phone B.
Illustratively, the key agreement request includes a first identifier, and the first identifier is used to instruct the mobile phone B to perform key agreement with the mobile phone a. As an example, the first identification may be Eapol-Key1 in a four-way handshake process.
S1610, after receiving the association response indicating successful association, the mobile phone B receives the key agreement request. And after receiving the key agreement request, sending a key agreement response to the mobile phone A. And the key agreement response comprises a second identifier, and the second identifier is obtained by the mobile phone B according to the modified password. After the mobile phone B obtains the login password of 2.4G WiFi, the mobile phone B modifies the login password scanned from the mobile phone a according to the preset rule under the condition that the mobile phone B supports 5G WiFi.
As an example, the second identification may be Eapol-Key2 in a four-way handshake process.
S1611, after receiving the key agreement response sent by the mobile phone B, if it is determined that the mobile phone a supports 5G WiFi and the mobile phone a supports 5G WiFi according to the second identifier, the mobile phone a sends a key agreement result to the mobile phone B, where the key agreement result is used to indicate that the mobile phone a refuses to establish WiFi connection with the mobile phone B at a frequency band of 2.4 GHz.
For example, the key agreement result includes a third identifier, where the third identifier is used to instruct the mobile phone a to reject to establish a WiFi connection with the mobile phone B in a frequency band of 2.4 GHz. As an example, the third identification may be Eapol-Key 3.
S1612, after the mobile phone a sends the key agreement result, close the 2.4G WiFi hotspot, and open the 5G WiFi hotspot.
S1613, after receiving the key agreement result, the mobile phone B initiates a WiFi connection to the mobile phone a in the 5GHz band.
After the WiFi connection is successfully established between the mobile phone A and the mobile phone B on the 5GHz frequency band, the mobile phone B can migrate data to the mobile phone A based on the 5G WiFi connection, and the data migration rate is improved. In some embodiments, in the process of data transmission, the mobile phone a and the mobile phone B display a prompt message on the user interface of the mobile phone a for data transmission, where the prompt message is used to prompt the user that the data transmission is transmitted based on the 5G WiFi connection, and the user interface of the mobile phone B for data transmission may also prompt the user that the data transmission is transmitted based on the 5G WiFi connection. For example, taking cell phone a as an example, as shown in fig. 21, a user interface 2100 is displayed on cell phone a. The user interface 2100 displays the prompt information 2101, for example, the prompt information 2101 may be a case where the WiFi connection between the mobile phone a and the mobile phone B operates in a frequency band of 5 GHz. The user interface 2100 shows that the WiFi connection between cell phone a and cell phone B operates at a frequency band of 5 GHz. Fig. 21 in the embodiment of the present application is merely an example, and the position of the prompt message on the user interface is not limited accordingly. For example, the reminder information may be displayed on a status bar.
Note that, the above description has been given only by taking the mobile phone a as the data receiving end and the mobile phone B as the data transmitting end as an example, and the mobile phone a may also be taken as the data transmitting end and the mobile phone B as the data receiving end, which is not limited to this.
In addition, it can be understood that the application scenarios described above are merely examples, and are not limited to the application scenarios in the embodiments of the present application, and the embodiments of the present application may be applied to scenarios in which WiFi connection is used.
It should be understood that the WiFi connection method shown in fig. 3 in the embodiment of the present application may also be applied to a scenario of cell phone cloning, for example, after performing S1601 to S1606, S303 to S310 may be performed by using cell phone a as an AP and cell phone B as an STA, and S305 to S307 may also be performed after S303 is performed.
In addition, the WiFi method in the embodiment of the present application may also be applied to a scenario where a terminal sends data such as a file to a router when the router is connected to a storage device or a built-in hard disk. The router may serve as an AP, and the terminal may serve as an STA.
It should be noted that, the foregoing embodiments are described by taking a 2.4GHz band and a 5GHz band as examples, but the frequency bands used in the WiFi connection in the embodiments of the present application are not limited.
In the embodiments provided in the present application, the method provided in the embodiments of the present application is introduced from the perspective that the STA and the AP are used as execution subjects. In order to implement the functions in the method provided by the embodiments of the present application, the STA and the AP may include a hardware structure and/or a software module, and implement the functions in the form of a hardware structure, a software module, or a hardware structure and a software module. Whether any of the above-described functions is implemented as a hardware structure, a software module, or a hardware structure plus a software module depends upon the particular application and design constraints imposed on the technical solution.
Based on the same concept, fig. 22 shows an apparatus 2200 provided in the present application, where the apparatus 2200 may be a terminal, or a chip system in the terminal. For example, the apparatus 2200 includes at least one processor 2210, memory 2220, and a transceiver 2230. The processor 2210 is coupled to the memory 2220 and the transceiver 2230, which is an indirect coupling or communication connection between devices, units or modules in this embodiment, and can be in an electrical, mechanical or other form for information exchange between devices, units or modules.
In particular, memory 2220 is used to store program instructions.
The transceiver 2230 can be a circuit, bus, communication interface, or any other means capable of communicating information and can be configured to receive or transmit data.
Processor 2210 is configured to call program instructions stored in memory 2220 to cause apparatus 2200 to perform the steps performed by the STA or AP in the method for WiFi connectivity shown in fig. 3, thereby implementing WiFi connectivity.
In addition, when the memory 2220 stores program instructions for the STA or the AP to execute the method for WiFi connection shown in fig. 15, the processor 2210 may further call the program instructions in the memory 2220, so that the apparatus 2200 performs the steps executed by the STA or the AP in the method for WiFi connection shown in fig. 15, thereby implementing WiFi connection.
As shown in fig. 23, another embodiment of the apparatus provided in the present application is that the apparatus may be a terminal, or may be a chip or a chip system in the terminal. Specifically, the apparatus 2300 includes a processing module 2301 and a transceiver module 2302. The transceiving module 2302 is used for receiving data transmitted by an external device and transmitting data to the external device.
When the apparatus 2300 is used as a STA, the processing module 2301 and the transceiver module 2302 may be used to perform the steps performed by the STA in the WiFi connection method shown in fig. 3 or fig. 15, so as to implement the WiFi connection.
When the apparatus 2300 is used as an AP, the processing module 2301 and the transceiver module 2302 can be used to perform the steps performed by the AP in the WiFi connection method shown in fig. 3 or fig. 15, so as to implement the WiFi connection.
As shown in fig. 24, the present embodiment also provides a communication system 2400, which includes an apparatus 2401 and an apparatus 2402. Wherein, if the device 2401 is used for performing the steps performed by the STA in the WiFi connection method shown in fig. 3, the device 2402 is used for performing the steps performed by the AP in the WiFi connection method shown in fig. 3; if the apparatus 2401 is configured to perform the steps performed by the STA in the WiFi connection method shown in fig. 15, the apparatus 2402 is configured to perform the steps performed by the AP in the WiFi connection method shown in fig. 15.
It should be understood that the apparatus 2200, the apparatus 2300 and the communication system 2400 may be used to implement the method for WiFi connection shown in fig. 3 and/or 15 according to the embodiment of the present application, and related features may be referred to above and will not be described herein again.
It is clear to those skilled in the art that the embodiments of the present application can be implemented in hardware, or firmware, or a combination thereof. When implemented in software, the functions described above may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a computer. Taking this as an example but not limiting: the computer-readable medium may include RAM, ROM, an Electrically Erasable Programmable Read Only Memory (EEPROM), a compact disc read-Only memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Furthermore, the method is simple. Any connection is properly termed a computer-readable medium. For example, if software is transmitted from a website, a server, or other remote source using a coaxial cable, a fiber optic cable, a twisted pair, a Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, the coaxial cable, the fiber optic cable, the twisted pair, the DSL, or the wireless technologies such as infrared, radio, and microwave are included in the fixation of the medium. Disk and disc, as used in accordance with embodiments of the present application, includes Compact Disc (CD), laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
In short, the above description is only an example of the present application, and is not intended to limit the scope of the present application. Any modifications, equivalents, improvements and the like made in accordance with the disclosure of the present application are intended to be included within the scope of the present application.

Claims (15)

1. A method for WiFi connection in wireless fidelity (WiFi), which is applied to a mobile Station (STA) and an Access Point (AP), wherein the STA and the AP support WiFi connection establishment on a first frequency band and a second frequency band, and the first frequency band is different from the second frequency band, the method comprising:
the STA scans and discovers a WiFi hotspot provided by the AP on the first frequency band;
the STA sends an association request to the AP on the first frequency band;
the STA receives an association response which is sent by the AP according to the association request and used for indicating the successful association;
after receiving the association response, the STA receives a key negotiation request sent by the AP;
responding to the key negotiation request, the STA sending a key negotiation response to the AP, wherein the key negotiation response comprises an identifier, the identifier is obtained according to a modified password, and the modified password is obtained by modifying a login password of the WiFi hotspot according to a preset rule;
the STA receives a key negotiation result sent by the AP according to the key negotiation response;
and if the key negotiation result is used for indicating that the AP refuses to establish WiFi connection with the STA on the first frequency band, the STA initiates the AP to establish WiFi connection on the second frequency band, so that the AP establishes WiFi connection on the second frequency band.
2. The method of claim 1, wherein prior to the STA sending the key agreement response to the AP, further comprising:
and the STA determines that the AP supports the establishment of WiFi connection on the second frequency band according to the name of the WiFi hotspot.
3. The method of claim 1 or 2, wherein the STA scanning on the first frequency band for WiFi hotspots provided by the AP comprises:
and the STA responds to a first event and scans and discovers a WiFi hotspot provided by the AP on the first frequency band.
4. The method of claim 3, wherein the first event is:
the STA waits to send first data to the AP; alternatively, the first and second electrodes may be,
the STA waits to receive first data sent by the AP.
5. The method of claim 4, wherein the first data comprises any one or more of: contacts, short messages, a gallery or a memo.
6. The method of claim 1 or 2, wherein a first wireless transmission speed is a data transmission speed of a WiFi connection established based on the first frequency band, and a second wireless transmission speed is a data transmission speed of a WiFi connection established based on the second frequency band; wherein the first wireless transmission speed is less than the second wireless transmission speed.
7. The method of claim 1 or 2, wherein the AP is a first terminal and the STA is a second terminal.
8. The method of claim 1 or 2, wherein the following procedure is included in the procedure of the STA handshaking with the AP four times:
the STA receives the key negotiation request sent by the AP;
the STA sends the key negotiation response to the AP;
and the STA receives the key negotiation result sent by the AP.
9. A method for WiFi connection in wireless fidelity (WiFi), which is applied to a mobile Station (STA) and an Access Point (AP), wherein the STA and the AP support WiFi connection establishment on a first frequency band and a second frequency band, and the first frequency band is different from the second frequency band, the method comprising:
the AP opens a WiFi hotspot on the first frequency band;
the AP receives an association request sent by the STA on the first frequency band;
the AP sends an association response used for indicating successful association to the STA according to the association request;
after sending the association response, the AP sends a key negotiation request to the STA;
the AP receives a key negotiation response sent by the STA according to the key negotiation request, wherein the key negotiation response comprises an identifier, the identifier is obtained according to a modified password, and the modified password is obtained by modifying a login password of the WiFi hotspot according to a preset rule;
the AP verifies the identifier, determines that the STA supports the establishment of WiFi connection on the second frequency band, and sends a key negotiation result to the STA, wherein the key negotiation result is used for indicating that the AP refuses the establishment of WiFi connection with the STA on the first frequency band;
and after the key negotiation result is sent, the AP closes the WiFi hotspot on the first frequency band and opens the WiFi hotspot on the second frequency band.
10. The method of claim 9, wherein the method further comprises:
and the AP generates the name of the WiFi hotspot according to the capability of supporting the establishment of WiFi connection on the second frequency band.
11. The method of claim 9 or 10, wherein a first wireless transmission speed is a data transmission speed of a WiFi connection established based on the first frequency band, and a second wireless transmission speed is a data transmission speed of a WiFi connection established based on the second frequency band; wherein the first wireless transmission speed is less than the second wireless transmission speed.
12. The method of claim 9 or 10, wherein after receiving the key agreement response and before sending the key agreement result to the STA, the AP further comprises:
and the AP determines that other services do not occupy the WiFi hotspot on the first frequency band and the WiFi hotspot on the second frequency band is not limited.
13. The method of claim 9 or 10, wherein the AP is a first terminal and the STA is a second terminal.
14. The method of claim 9 or 10, wherein the following procedure is included in the procedure of the STA handshaking with the AP four times:
the AP sends the key negotiation request to the STA;
the AP receives the key negotiation response sent by the STA;
and the AP sends the key negotiation result to the STA.
15. A terminal comprising a processor, a memory, and a transceiver;
the memory has stored therein program instructions;
the transceiver is used for transceiving data;
the processor is coupled to the memory and the transceiver for executing the program instructions stored in the memory to cause the terminal to perform the method of any of claims 1 to 14.
CN201880045273.4A 2018-06-07 2018-06-07 WiFi connection method and terminal Active CN110870353B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/090311 WO2019232758A1 (en) 2018-06-07 2018-06-07 Method and terminal for wi-fi connection

Publications (2)

Publication Number Publication Date
CN110870353A CN110870353A (en) 2020-03-06
CN110870353B true CN110870353B (en) 2021-08-13

Family

ID=68769144

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880045273.4A Active CN110870353B (en) 2018-06-07 2018-06-07 WiFi connection method and terminal

Country Status (2)

Country Link
CN (1) CN110870353B (en)
WO (1) WO2019232758A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113453306B (en) * 2020-03-25 2023-02-03 华为技术有限公司 Wireless network access method and related equipment
CN114697929A (en) * 2020-12-31 2022-07-01 华为技术有限公司 Connection establishing method and electronic equipment
CN114390501B (en) * 2022-03-22 2022-09-09 荣耀终端有限公司 Data transmission method and electronic equipment
CN115150217A (en) * 2022-06-30 2022-10-04 青岛海信移动通信技术股份有限公司 Network distribution method, device and equipment for intelligent household equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015143066A1 (en) * 2014-03-21 2015-09-24 Good Technology Corporation Computing device security
CN105101192A (en) * 2015-06-29 2015-11-25 深圳市美贝壳科技有限公司 WiFi accessing method and WiFi accessing device
CN105610912A (en) * 2015-12-22 2016-05-25 成都云晖航空科技股份有限公司 Aerial open type internet system
CN106550425A (en) * 2015-09-16 2017-03-29 中兴通讯股份有限公司 Wireless access device and its load management method, terminal and cut-in method, system
CN106576042A (en) * 2014-07-14 2017-04-19 三菱电机株式会社 Wireless communication system and wireless communication method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104703221A (en) * 2013-12-10 2015-06-10 中国移动通信集团北京有限公司 Mobile network, device and method for control of terminal access target frequency bands
US10588030B2 (en) * 2015-08-05 2020-03-10 Hewlett Packard Enterprise Development Lp Switching frequency band of radio of access point

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015143066A1 (en) * 2014-03-21 2015-09-24 Good Technology Corporation Computing device security
CN106576042A (en) * 2014-07-14 2017-04-19 三菱电机株式会社 Wireless communication system and wireless communication method
CN105101192A (en) * 2015-06-29 2015-11-25 深圳市美贝壳科技有限公司 WiFi accessing method and WiFi accessing device
CN106550425A (en) * 2015-09-16 2017-03-29 中兴通讯股份有限公司 Wireless access device and its load management method, terminal and cut-in method, system
CN105610912A (en) * 2015-12-22 2016-05-25 成都云晖航空科技股份有限公司 Aerial open type internet system

Also Published As

Publication number Publication date
WO2019232758A1 (en) 2019-12-12
CN110870353A (en) 2020-03-06

Similar Documents

Publication Publication Date Title
JP6784306B2 (en) Communication device and communication method
CN111246545B (en) Method, medium, control terminal and system for guiding intelligent device to access network
EP3934117A1 (en) Method for establishing service connection, bluetooth master device, chip, and bluetooth system
CN110870353B (en) WiFi connection method and terminal
US8503331B2 (en) Wireless communication device, wireless communication system, program and wireless communication method
KR101915314B1 (en) Method and apparatus for wi-fi connecting using wi-fi protected setup in a portable terminal
EP3893109B1 (en) Method and device for connecting bluetooth devices
EP3958533B1 (en) Method for accessing wireless local area network and terminal
EP3664491B1 (en) Wi-fi hotspot connection method and terminal
EP3857975B1 (en) Mobile device and electronic device for wireless communication, and operation methods thereof
JP6932781B2 (en) Methods and terminal devices for establishing hotspot connections
KR102444897B1 (en) Device and method for establishing communication connection
CN114390501B (en) Data transmission method and electronic equipment
EP4247031A1 (en) Access method and system and electronic device
WO2023160265A1 (en) Incoming call response method and corresponding terminal and communication system
WO2024016503A1 (en) Communication method and electronic device
US9883545B2 (en) Apparatus and method for selecting channel in wireless communication system
CN113552808A (en) Network distribution method for electronic home equipment, electronic home equipment and mobile terminal
US20230087282A1 (en) Dual wi-fi connection method and electronic device
KR20130043336A (en) Display device, and access point connection method of a display device
CN113114798B (en) Method for acquiring Internet protocol IP address and electronic equipment
KR101982199B1 (en) Method and apparatus for wi-fi connecting using wi-fi protected setup in a portable terminal
US20130252555A1 (en) Apparatus and method for link setup using electric field
JP7303913B2 (en) Communication device, control method, and program
CN115022872B (en) Data transmission method, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant