WO2021052178A1 - Wi-fi connection method and device - Google Patents

Wi-fi connection method and device Download PDF

Info

Publication number
WO2021052178A1
WO2021052178A1 PCT/CN2020/113063 CN2020113063W WO2021052178A1 WO 2021052178 A1 WO2021052178 A1 WO 2021052178A1 CN 2020113063 W CN2020113063 W CN 2020113063W WO 2021052178 A1 WO2021052178 A1 WO 2021052178A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
configuration information
probe response
frame
response frame
Prior art date
Application number
PCT/CN2020/113063
Other languages
French (fr)
Chinese (zh)
Inventor
贺安超
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021052178A1 publication Critical patent/WO2021052178A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/03Protecting confidentiality, e.g. by encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/02Protecting privacy or anonymity, e.g. protecting personally identifiable information [PII]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/08Access security
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information

Definitions

  • This application relates to the field of communications, and in particular to a wireless fidelity (Wi-Fi) connection method and device.
  • Wi-Fi wireless fidelity
  • Wi-Fi technology is a wireless local area network technology established by the Wi-Fi Alliance in the Institute of Electrical and Electronic Engineers (IEEE) 802.11 standard. Wi-Fi technology usually involves two types of devices: access point (Access Point, AP) and station (station, STA). Among them, the AP can also be called a wireless access point, which is a Wi-Fi network provider, allows other wireless devices to access, and provides data access for the connected devices. A device connected to a Wi-Fi network can be called an STA. For example, electronic devices that support Wi-Fi functions, such as mobile phones, tablets, and laptops, can be used as STAs.
  • the process of STA (for example, STA is a mobile phone) accessing the Wi-Fi network provided by the AP is: the user selects the Wi-Fi network that the mobile phone wants to access on the mobile phone. For example, the user can select the service set identifier (SSID) of the Wi-Fi network that the mobile phone wants to access in the wireless local area network setting interface of the mobile phone.
  • the mobile phone displays a password input interface for the user to enter the Wi-Fi network access password. After the user enters the access password, the mobile phone can carry the Wi-Fi configuration information in the connection request and transmit it to the AP that provides the Wi-Fi network.
  • SSID service set identifier
  • the Wi-Fi configuration information includes at least the access password input by the user and the SSID of the Wi-Fi network.
  • the AP verifies the Wi-Fi configuration information in the connection request. If the verification is passed, the access of the mobile phone is approved, and if the verification fails, the access of the mobile phone is rejected.
  • the user manually inputting the access password is a prerequisite for the STA to access the Wi-Fi network, and this affects the speed at which the STA can access the Wi-Fi network.
  • the embodiment of the present application provides a Wi-Fi connection method and device, which solves the problem of the slow speed of STA accessing the Wi-Fi network.
  • an embodiment of the present application provides a Wi-Fi connection method.
  • the method may include: the electronic device sends a probe request frame; the electronic device receives a probe response frame from the AP, and the probe response The frame carries the Wi-Fi configuration information of the Wi-Fi network provided by the AP, which is used for the electronic device to access the Wi-Fi network provided by the AP; the electronic device according to the Wi-Fi configuration information carried in the received probe response frame, Access the Wi-Fi network provided by the AP.
  • the electronic device can broadcast a probe request frame to scan for available APs around it. After the AP detects the probe request frame, it can reply to the electronic device a probe response frame carrying the Wi-Fi configuration information of the Wi-Fi network provided by the AP. The electronic device can access the Wi-Fi network provided by the AP according to the Wi-Fi configuration information in the probe response frame. In this way, the user does not need to manually enter the access password, and only needs to receive a probe response frame to obtain the Wi-Fi configuration information required to access the Wi-Fi network to complete the access, which improves the access of the electronic device to the Wi-Fi network. The speed of the Fi network. There is no need for the user to perform multiple operations, which improves the user's operating experience.
  • the method may further include: the electronic device parses the probe response frame, and determines When the probe response frame contains a field carrying Wi-Fi configuration information, the field is decrypted according to a preset encryption key to obtain Wi-Fi configuration information. By encrypting the Wi-Fi configuration information and carrying it in the probe response frame, the security of secret-free access is increased.
  • the above Wi-Fi configuration information may include: the SSID and access password of the Wi-Fi network provided by the AP.
  • the probe response frame includes: a media access control (MAC) header, a frame entity and a frame check (FCS) field; the above Wi-Fi configuration information is contained in a reserved field of the frame entity.
  • MAC media access control
  • FCS frame check
  • the method may further include: the electronic device receives an operation of the user to enable the Wi-Fi function of the electronic device.
  • an embodiment of the present application provides a Wi-Fi connection method.
  • the method may include: the AP receives a probe request frame from an electronic device; the AP sends a probe response frame to the electronic device, and the probe response frame carries the information provided by the AP.
  • the Wi-Fi configuration information of the Wi-Fi network is used for electronic devices to access the Wi-Fi network provided by the AP.
  • the AP monitors the probe request frame from the electronic device, it can reply to the electronic device a probe response frame carrying the Wi-Fi configuration information of the Wi-Fi network provided by the AP. So that the electronic device accesses the Wi-Fi network provided by the AP according to the Wi-Fi configuration information in the probe response frame. In this way, the user does not need to manually enter the access password, and only needs to receive a probe response frame to obtain the Wi-Fi configuration information required to access the Wi-Fi network to complete the access, which improves the access of the electronic device to the Wi-Fi network. The speed of the Fi network. There is no need for the user to perform multiple operations, which improves the user's operating experience.
  • the above-mentioned AP sending a probe response frame to the electronic device may include: when it is determined that the secret-free access rule is satisfied, the AP sends a probe response frame carrying Wi-Fi configuration information to the electronic device; where , Meeting the secret-free access rule includes one or more of the following situations: the identity of the electronic device is included in the whitelist; the distance between the electronic device and the AP is less than or equal to the preset distance; or the probe request frame of the electronic device is that the AP is in the Received within a specific time period.
  • the AP can reply to the electronic device a probe response frame carrying Wi-Fi configuration information after determining that the set secret-free access rule is satisfied, which can ensure the security of secret-free access.
  • the whitelist includes at least one of the first identifier and the second identifier; the first identifier is: before the Wi-Fi configuration information of the Wi-Fi network provided by the AP is changed, successful The identifier of the device that has accessed the Wi-Fi network provided by the AP; the second identifier is received by the AP from the first device, and the first device has management authority to the AP.
  • the MAC address of the smart home device can be added to the whitelist for secret-free access, so that the user can achieve Wi-Fi always online through only one operation, which improves the user’s Use experience.
  • the method may further include: the AP encrypts the Wi-Fi configuration information according to a preset encryption key. By encrypting the Wi-Fi configuration information and carrying it in the probe response frame, the security of secret-free access is further increased.
  • the Wi-Fi configuration information may include: the SSID and access password of the Wi-Fi network provided by the AP.
  • the probe response frame may include: a MAC header, a frame entity, and an FCS field; Wi-Fi configuration information is included in a reserved field of the frame entity.
  • inventions of the present application provide an electronic device.
  • the electronic device may include a processor, a memory, and a communication interface.
  • the memory and the communication interface are coupled to the processor.
  • the communication interface is used to communicate with other devices.
  • the other devices include APs.
  • the memory is used to store computer program code, and the computer program code includes computer instructions.
  • an embodiment of the present application provides a computer-readable storage medium, including computer instructions, which when the computer instructions run on an electronic device, cause the electronic device to execute any of the first aspect or the possible implementation manners of the first aspect.
  • the embodiments of the present application provide a computer program product, which when the computer program product runs on a computer, causes the computer to execute the first aspect or any one of the possible implementation manners of the first aspect Wi-Fi connection method.
  • an embodiment of the present application provides an AP, including: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program codes, and the computer program codes include computer instructions.
  • the AP executes the Wi-Fi connection method according to the second aspect or any one of the possible implementation manners of the second aspect.
  • an embodiment of the present application provides a computer-readable storage medium, including computer instructions, which when the computer instructions run on the AP, cause the AP to execute any one of the second aspect or the possible implementation manners of the second aspect The described Wi-Fi connection method.
  • the embodiments of the present application provide a computer program product, which when the computer program product runs on a computer, causes the computer to execute the second aspect or any one of the possible implementation manners of the second aspect Wi-Fi connection method.
  • an embodiment of the present application provides a device that has the function of implementing the behavior of the electronic device in the methods of the foregoing aspects.
  • the function can be realized by hardware, or the corresponding software can be executed by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions, for example, a receiving unit or module, a sending unit or module, a connecting unit or module, and so on.
  • an embodiment of the present application provides a device that has the function of implementing AP behaviors in the methods of the foregoing aspects.
  • the function can be realized by hardware, or the corresponding software can be executed by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions, for example, a sending unit or module, a receiving unit or module, an encryption unit or module, and so on.
  • an embodiment of the present application provides a system, and the system may include an electronic device and an AP.
  • Electronic devices can be used to send probe request frames
  • APs can be used to receive probe request frames from electronic devices, and send probe response frames to the electronic devices.
  • the probe response frames carry Wi-Fi configuration information of the Wi-Fi network provided by the AP.
  • the electronic device is also used to receive the probe response frame from the AP, and access the Wi-Fi network provided by the AP according to the Wi-Fi configuration information carried in the probe response frame.
  • FIG. 1 is a schematic structural diagram of an electronic device provided by an embodiment of this application.
  • FIG. 2 is a schematic flowchart of a Wi-Fi connection method provided by an embodiment of this application.
  • FIG. 3 is a schematic diagram of an operation of turning on the Wi-Fi function provided by an embodiment of the application
  • FIG. 4 is a schematic diagram of another operation of turning on the Wi-Fi function provided by an embodiment of the application.
  • FIG. 5 is a schematic diagram of an example of a frame structure of a Wi-Fi frame provided by an embodiment of the application.
  • FIG. 6 is a schematic diagram of a display interface of an electronic device provided by an embodiment of the application.
  • first and second are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with “first” and “second” may explicitly or implicitly include one or more of these features. In the description of the present embodiment, unless otherwise specified, "plurality" means two or more.
  • the Wi-Fi network provided by the AP is usually encrypted. That is, before the electronic device as a STA accesses the Wi-Fi network provided by the AP, the AP needs to authenticate the Wi-Fi configuration information carried in the connection request sent by the electronic device. If the authentication is passed, the electronic device is allowed to access, otherwise the electronic device is rejected.
  • the Wi-Fi configuration information includes at least: the SSID and access password of the Wi-Fi network.
  • the Wi-Fi configuration information may also include the encryption method of the Wi-Fi network.
  • the access password can be manually input by the user.
  • manually entering the access password will affect the speed at which the electronic device accesses the Wi-Fi network.
  • more and more smart home devices support Wi-Fi functions.
  • Some smart home devices, such as desk lamps, speakers, air conditioners, etc. do not have a display screen, that is, they cannot provide a password input interface for users to enter the access password. Therefore, if users are allowed to avoid entering the access password on the side of the electronic device as a STA, it will not only increase the speed of the electronic device accessing Wi-Fi network, but also provide a way for electronic devices without a display screen to access the Wi-Fi network. It's possible.
  • the prior art provides a solution for preventing the user from inputting the access password on the side of the electronic device serving as the STA.
  • the electronic device as a desk lamp as an example
  • the specific process is as follows: First, the user presses the factory reset button of the desk lamp. In response to the user's operation of the button, the desk lamp broadcasts a Wi-Fi beacon frame.
  • the AP When the AP is working, it will monitor all the channels that can be used for Wi-Fi transmission. Therefore, the AP can receive the Wi-Fi beacon frame broadcast by the desk lamp. After that, the prompt light corresponding to the AP will flash, prompting the user that there is a device that needs to be accessed.
  • the user can operate the corresponding button set on the AP to indicate that the device is allowed to access.
  • the AP In response to the user's operation of the corresponding button on the AP, the AP encrypts the Wi-Fi configuration information (such as including SSID, access password, and encryption method) of the Wi-Fi network provided by it and stores the fragments in multiple multicast packets ( At least dozens of multicast packets are required to send the last two bytes of the destination Internet Protocol (IP) address, and send these multiple multicast packets.
  • IP Internet Protocol
  • the encryption key is pre-configured in the AP and lamp. After the desk lamp receives these multiple multicast packets, it splices the multiple multicast packets, and uses the preset encryption key to parse them to obtain the Wi-Fi configuration information. Finally, the desk lamp sends a connection request carrying Wi-Fi configuration information to the AP. After the AP receives the connection request, it authenticates the Wi-Fi configuration information. After the authentication is passed, the desk lamp is allowed to access. So far, the desk lamp has successfully connected to the Wi-Fi network provided by the AP.
  • the electronic device as the STA needs to receive multiple multicast packets for splicing to obtain the corresponding Wi-Fi configuration information, which still cannot be used.
  • Electronic devices quickly connect to Wi-Fi networks.
  • the access process requires the user to perform multiple operations, and the user experience is not good.
  • the embodiment of the present application provides a Wi-Fi connection method.
  • the electronic device can broadcast a probe request frame to scan for available APs around it.
  • the AP detects the probe request frame, it may reply to the electronic device a probe response frame carrying Wi-Fi configuration information of the Wi-Fi network provided by the AP.
  • the electronic device can access the Wi-Fi network provided by the AP according to the Wi-Fi configuration information in the probe response frame.
  • the user does not need to manually enter the access password, and only needs to receive a probe response frame to obtain the Wi-Fi configuration information required to access the Wi-Fi network to complete the access, which improves the access of the electronic device to the Wi-Fi network.
  • the speed of the Fi network In addition, there is no need for the user to perform multiple operations, which improves the user's operating experience.
  • the electronic devices described in the embodiments of the present application may be mobile phones, tablet computers, desktop computers, laptops, handheld computers, notebook computers, ultra-mobile personal computers (UMPC), and netbooks.
  • PDAs personal digital assistants
  • smart home devices such as desk lamps, speakers, air conditioners, rice cookers, televisions, and augmented reality (AR) ⁇ virtual reality (VR) devices, etc.
  • AR augmented reality
  • VR virtual reality
  • the AP may be a router.
  • the AP may also be an electronic device with AP capability (for example, capable of providing a Wi-Fi network), such as a mobile phone, that is, an electronic device with AP capability may be used as an AP.
  • the embodiments of the present application do not impose special restrictions on the specific forms of the AP and the electronic device that is used as a STA to access the Wi-Fi network provided by the AP.
  • FIG. 1 is a schematic structural diagram of an electronic device provided by an embodiment of this application.
  • the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, and a battery 142, Antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, A display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and the environment Light sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device.
  • the electronic device may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait.
  • AP application processor
  • modem processor modem processor
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the different processing units may be independent devices or integrated in one or more processors.
  • the controller can be the nerve center and command center of the electronic device.
  • the controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 to store instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory can store instructions or data that the processor 110 has just used or used cyclically. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, and a universal asynchronous transmitter/receiver (universal asynchronous) interface.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter/receiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM interface SIM interface
  • USB interface universal asynchronous transmitter/receiver
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 140 may receive the charging input of the wired charger through the USB interface 130.
  • the charging management module 140 may receive the wireless charging input through the wireless charging coil of the electronic device. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device through the power management module 141.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 may also be provided in the processor 110.
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the electronic device can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
  • the antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G and the like applied to electronic devices.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
  • the mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic wave radiation via the antenna 1.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor.
  • the application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194.
  • the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on electronic devices including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellite systems. (global navigation satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
  • the wireless communication module 160 may also receive the signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic waves to radiate through the antenna 2.
  • the wireless communication module 160 may be used to send a probe request frame, and may also be used to receive a probe response frame from an AP.
  • the probe response frame can carry Wi-Fi configuration information of the Wi-Fi network provided by the AP.
  • the antenna 1 of the electronic device is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite-based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite-based augmentation systems
  • the electronic device realizes the display function through the GPU, the display screen 194, and the application processor.
  • the GPU is a microprocessor for image processing, which is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, and the like.
  • the display screen 194 includes a display panel.
  • the display panel can adopt liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active-matrix organic light-emitting diode active-matrix organic light-emitting diode
  • emitting diode AMOLED, flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc.
  • the electronic device may include one or N display screens 194, and N is a positive integer greater than one.
  • Electronic equipment can achieve shooting functions through ISP, camera 193, video codec, GPU, display 194, and application processor.
  • the ISP is used to process the data fed back by the camera 193. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing and is converted into an image visible to the naked eye.
  • ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193.
  • the camera 193 is used to capture still images or videos.
  • the object generates an optical image through the lens and is projected to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to convert it into a digital image signal.
  • ISP outputs digital image signals to DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the electronic device may include 1 or N cameras 193, and N is a positive integer greater than 1.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device selects the frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device can support one or more video codecs.
  • the electronic device can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
  • MPEG moving picture experts group
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • NPU can realize the intelligent cognition of electronic equipment and other applications, such as: image recognition, face recognition, speech recognition, text understanding, etc.
  • the external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
  • the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device by running instructions stored in the internal memory 121. For example, in the embodiment of the present application, the processor 110 may run an instruction stored in the internal memory 121 to cause the electronic device to send a probe request frame and receive a probe response frame from the AP. If the received probe response frame carries Wi-Fi configuration information, the Wi-Fi configuration information in the probe response frame can be used to access the Wi-Fi network provided by the AP.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, at least one application program (such as a sound playback function, an image playback function, etc.) required by at least one function.
  • the data storage area can store data (such as audio data, phone book, etc.) created during the use of the electronic device.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
  • the electronic device can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the audio module 170 may be provided in the processor 110, or part of the functional modules of the audio module 170 may be provided in the processor 110.
  • the speaker 170A also called “speaker” is used to convert audio electrical signals into sound signals.
  • the electronic device can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the electronic device answers a call or voice message, it can receive the voice by bringing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone”, “microphone”, is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through the human mouth, and input the sound signal into the microphone 170C.
  • the electronic device may be provided with at least one microphone 170C.
  • the electronic device may be provided with two microphones 170C, which can implement noise reduction functions in addition to collecting sound signals.
  • the electronic device may also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
  • the earphone interface 170D is used to connect wired earphones.
  • the earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
  • the pressure sensor 180A may be provided on the display screen 194.
  • the capacitive pressure sensor may include at least two parallel plates with conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device determines the strength of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the electronic device detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device may also calculate the touched position based on the detection signal of the pressure sensor 180A.
  • touch operations that act on the same touch position but have different touch operation strengths may correspond to different operation instructions. For example, when a touch operation whose intensity of the touch operation is less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
  • the gyro sensor 180B can be used to determine the movement posture of the electronic device.
  • the angular velocity of the electronic device around three axes ie, x, y, and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyroscope sensor 180B detects the angle of the shake of the electronic device, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shake of the electronic device through a reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device can use the magnetic sensor 180D to detect the opening and closing of the flip holster.
  • the electronic device when the electronic device is a flip machine, the electronic device can detect the opening and closing of the flip according to the magnetic sensor 180D.
  • features such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device in various directions (generally three axes). When the electronic device is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and apply to applications such as horizontal and vertical screen switching, pedometers and so on.
  • Distance sensor 180F used to measure distance.
  • Electronic equipment can measure distance through infrared or laser.
  • the electronic device may use the distance sensor 180F to measure the distance to achieve fast focusing.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the electronic device emits infrared light to the outside through the light-emitting diode.
  • Electronic devices use photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device. When insufficient reflected light is detected, the electronic device can determine that there is no object near the electronic device.
  • the electronic device can use the proximity light sensor 180G to detect that the user holds the electronic device close to the ear to talk, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in leather case mode, and the pocket mode will automatically unlock and lock the screen.
  • the ambient light sensor 180L is used to sense the brightness of the ambient light.
  • the electronic device can adaptively adjust the brightness of the display screen 194 according to the perceived brightness of the ambient light.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device is in the pocket to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints. Electronic devices can use the collected fingerprint characteristics to unlock fingerprints, access application locks, take photos with fingerprints, and answer calls with fingerprints.
  • the temperature sensor 180J is used to detect temperature.
  • the electronic device uses the temperature detected by the temperature sensor 180J to execute the temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device executes to reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
  • the electronic device when the temperature is lower than another threshold, the electronic device heats the battery 142 to avoid abnormal shutdown of the electronic device due to low temperature.
  • the electronic device boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also called “touch panel”.
  • the touch sensor 180K may be disposed on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a “touch screen”.
  • the touch sensor 180K is used to detect touch operations acting on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • the visual output related to the touch operation can be provided through the display screen 194.
  • the touch sensor 180K may also be disposed on the surface of the electronic device, which is different from the position of the display screen 194.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can obtain the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the human pulse and receive the blood pressure pulse signal.
  • the bone conduction sensor 180M may also be provided in the earphone, combined with the bone conduction earphone.
  • the audio module 170 can parse the voice signal based on the vibration signal of the vibrating bone block of the voice obtained by the bone conduction sensor 180M, and realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beating signal obtained by the bone conduction sensor 180M, and realize the heart rate detection function.
  • the button 190 includes a power-on button, a volume button, and so on.
  • the button 190 may be a mechanical button. It can also be a touch button.
  • the electronic device can receive key input, and generate key signal input related to user settings and function control of the electronic device.
  • the motor 191 can generate vibration prompts.
  • the motor 191 can be used for incoming call vibration notification, and can also be used for touch vibration feedback.
  • touch operations that act on different applications can correspond to different vibration feedback effects.
  • Acting on touch operations in different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects.
  • Different application scenarios for example: time reminding, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, and so on.
  • the SIM card interface 195 is used to connect to the SIM card.
  • the SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device.
  • the electronic device can support 1 or N SIM card interfaces, and N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
  • the same SIM card interface 195 can insert multiple cards at the same time. The types of the multiple cards can be the same or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 may also be compatible with external memory cards.
  • the electronic device interacts with the network through the SIM card to realize functions such as call and data communication.
  • the electronic device adopts an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device and cannot be separated from the electronic device.
  • FIG. 2 is a schematic flowchart of a Wi-Fi connection method provided by an embodiment of the application. As shown in Figure 2, the method may include:
  • the electronic device After the Wi-Fi function of the electronic device is turned on, the electronic device sends a probe request frame.
  • the electronic device can broadcast a probe request frame on a channel that can be used for Wi-Fi transmission to scan for available APs around it.
  • the electronic device may enable the Wi-Fi function of the electronic device after receiving the user's first operation.
  • the first operation is an operation for the user to turn on the Wi-Fi function of the electronic device.
  • the first operation may be an operation of a button for turning on the Wi-Fi function of the electronic device by the user.
  • the button may be a virtual button displayed on the display screen of the electronic device, or may be a physical button set in the electronic device.
  • the first operation is an operation of a virtual button displayed on the display screen of the mobile phone, such as a switch button of a wireless local area network.
  • the user can click the switch button 302 of the wireless LAN in the wireless LAN setting interface 301 of the mobile phone.
  • the mobile phone can turn on the Wi-Fi function of the mobile phone.
  • the mobile phone can broadcast a probe request frame on a channel that can be used for Wi-Fi transmission to scan for available APs around it.
  • the first operation is the operation of a physical button set in the desk lamp, such as a factory reset button.
  • the user can operate the factory reset button 401 of the desk lamp.
  • the desk lamp can turn on the Wi-Fi function of the desk lamp.
  • the desk lamp can broadcast probe request frames on the channels available for Wi-Fi transmission to scan for available APs around it.
  • the AP receives a probe request frame from the electronic device.
  • the AP When the AP is working, it will monitor all channels available for Wi-Fi transmission. Therefore, after the electronic device broadcasts the probe request frame on a channel that can be used for Wi-Fi transmission, the AP can receive the probe request frame from the electronic device. Combining the example in S201, for example, the AP may receive a probe request frame from a mobile phone. For another example, the AP may receive the probe request frame from the desk lamp.
  • the AP sends a probe response frame to the electronic device, where the probe response frame carries Wi-Fi configuration information of the Wi-Fi network provided by the AP.
  • the Wi-Fi configuration information is used for the electronic device to access the Wi-Fi network provided by the AP.
  • the Wi-Fi configuration information includes at least: the SSID and access password of the Wi-Fi network.
  • the Wi-Fi configuration information may also include the encryption method of the Wi-Fi network.
  • the Wi-Fi configuration information of the Wi-Fi network provided by the AP may be carried in the probe response frame and sent to the electronic device.
  • the AP may carry the Wi-Fi configuration information of the Wi-Fi network provided by the AP in the probe response when determining that it meets the secret-free access rule.
  • the frame is sent to the electronic device.
  • secret-free access rules can be set on the AP side.
  • the AP may carry the Wi-Fi configuration information required to access the Wi-Fi network in a probe response frame and send it to the electronic device.
  • the secret-free access rules set on the AP side may include one or more of the following: electronic devices in the whitelist allow secret-free access, electronic devices located within a certain distance from the AP allow secret-free access, and during a specific time period It allows secret-free access of electronic devices, etc.
  • the whitelist may include one or more identities of electronic devices that allow secret-free access.
  • the identifier can be a MAC address.
  • the AP can determine whether the MAC address of the electronic device is included in the whitelist. If the MAC address of the electronic device is included in the whitelist, the Wi-Fi configuration information required to access the Wi-Fi network can be carried in a probe response frame and sent to the electronic device. If the MAC address of the electronic device is not included in the whitelist, a probe response frame that does not carry Wi-Fi configuration information is sent.
  • the identifiers in the above whitelist may be manually added by the user.
  • the mobile phone (the mobile phone may be the first device in this application) has the management authority of the router.
  • the mobile phone can configure or control the router, and it can be said that the mobile phone has the management authority to the router.
  • an application for controlling the router can be installed in the mobile phone, and the router can be configured or controlled through the application.
  • the mobile phone can open the control interface of the router through the webpage, and the router can be configured or controlled in the control interface.
  • the mobile phone can obtain the MAC address of the lamp.
  • the user can use the application to manually enter the MAC address of the lamp, and the mobile phone can obtain the MAC address of the lamp. Later, when the mobile phone is connected to the Wi-Fi network provided by the router, the mobile phone can send the MAC address of the lamp to the router.
  • the router After the router receives the MAC address of the lamp, it can save the MAC address of the lamp in the whitelist. In this way, combined with the example in S201, after the desk lamp broadcasts the probe request frame on the channel that can be used for Wi-Fi transmission, the router receives the probe request frame of the desk lamp. The router can determine that the MAC address of the lamp is included in the whitelist. At this time, the router sends a probe response frame containing Wi-Fi configuration information to the lamp.
  • the identifiers in the above whitelist may also be automatically added by the AP.
  • the router can save its MAC address.
  • the Wi-Fi configuration information of the Wi-Fi network provided by the router is changed, for example, the user changes the SSID of the Wi-Fi network, or changes the access password, usually the user is required to manually re-enter the password before it can be used again.
  • the router can automatically add the MAC addresses of electronic devices that have successfully accessed the router into the whitelist before the Wi-Fi configuration information is changed.
  • the whitelist includes the MAC addresses of electronic devices that have successfully accessed the router before the Wi-Fi configuration information is changed.
  • the router adds the MAC address of the mobile phone to the whitelist.
  • the router can determine that the MAC address of the mobile phone is included in the whitelist after receiving the probe request frame broadcast on the channel available for Wi-Fi transmission by the mobile phone.
  • the router can send a probe response frame containing Wi-Fi configuration information to the mobile phone.
  • the AP can determine whether the distance between the electronic device and the AP is less than or equal to the preset distance. If the distance between the electronic device and the AP is less than or equal to the preset distance, the Wi-Fi configuration information required to access the Wi-Fi network can be carried in a probe response frame and sent to the electronic device. If the distance between the electronic device and the AP is greater than the preset distance, a probe response frame that does not carry Wi-Fi configuration information is sent.
  • the AP can determine whether the distance between the electronic device and the AP is less than or equal to the preset distance according to the signal strength of the probe request frame sent by the electronic device. For example, when the AP determines that the signal strength of the probe request frame sent by the electronic device is greater than the preset strength, it determines that the distance between the electronic device and the AP is less than or equal to the preset distance, that is, determines that the electronic device is located within a certain distance of the AP.
  • the AP determines that the signal strength of the probe request frame sent by the electronic device is less than the preset strength, it determines that the distance between the electronic device and the AP is greater than the preset distance, that is, it determines that the electronic device is not located within a certain distance range of the AP.
  • the specific time period can be predefined, such as a certain time period every day (such as 6 pm to 7 pm). Take the specific time period from 6 pm to 7 pm as an example.
  • the AP can determine whether the time when the probe request frame is received is included in the specific time period, that is, whether it is a probe request frame received between 6 pm and 7 pm. If the probe request frame is received between 6 pm and 7 pm, the Wi-Fi configuration information required to access the Wi-Fi network can be carried in the probe response frame and sent to the electronic device. If it is not the probe request frame received between 6 pm and 7 pm, the probe response frame without Wi-Fi configuration information is sent.
  • the specific time period may also be a time period triggered by the user to start timing, and the duration is equal to the preset duration.
  • a button in the AP it is used to trigger the device's secret-free access.
  • the AP starts timing after receiving the user's operation on the button, and allows the device to gain secret-free access within a preset period of time. That is to say, if the AP receives the probe request frame from the electronic device within the preset time period after receiving the user's operation on the button, it sends the probe response frame carrying the Wi-Fi configuration information to the electronic device.
  • the user can set the time period for secret-free access in the management interface of the AP, or trigger the device to allow secret-free access and start timing.
  • the secret-free access rule set on the AP side includes a rule.
  • the AP may send a portable packet to the electronic device when it determines that one of the rules is satisfied or when it is determined that these multiple rules are satisfied at the same time.
  • Probe response frame of Wi-Fi configuration information For example, the secret-free access rules set on the AP side include: electronic devices located within a certain distance of the AP allow secret-free access, and allow electronic devices to be secret-free access within a specific time period as an example.
  • the AP after the AP receives the probe request frame from the electronic device, it may be included when determining that the distance between the electronic device and the AP is less than or equal to a preset distance, or when determining that the probe request frame is received Within a specific time period, send a probe response frame carrying Wi-Fi configuration information to the electronic device. In some other embodiments, after the AP receives the probe request frame from the electronic device, it may determine that the distance between the electronic device and the AP is less than or equal to the preset distance, and when it determines that the probe request frame is received, it includes In a specific time period, a probe response frame carrying Wi-Fi configuration information is sent to the electronic device.
  • a new field can be extended in the probe response frame to carry Wi-Fi configuration information.
  • a new field can be extended in the reserved field of the probe response frame to carry Wi-Fi configuration information.
  • the field carrying Wi-Fi configuration information in the probe response frame may be predefined.
  • the Wi-Fi frame 500 may include: a frame header (ie, a MAC header) 501, a frame body (frame body) 502, and a frame check sequence (FCS) field 503.
  • a frame header ie, a MAC header
  • a frame body frame body
  • FCS frame check sequence
  • the above-mentioned MAC header 501 is a media access control (media access control, MAC) header.
  • the aforementioned MAC header 501 may include a frame control field (frame control) 5011, a duration/identification (duration/ID) 5012, an address field (address) 5013, a sequence control field (sequence control) 5014, etc. .
  • frame control frame control
  • duration/identification duration/identification
  • address field address field
  • sequence control sequence control
  • the frame control field 5011 may include a protocol version field (protocol version) 501a, a type field 501b, and so on.
  • the protocol version field 501a is used to indicate the protocol version followed by the Wi-Fi frame 500, and the protocol version is usually 0.
  • the type field 501b may include Type and Subtype.
  • Type is used to indicate whether the corresponding frame is a management frame, a data frame, or a control frame.
  • the address field 5013 may include address information such as a source address, a destination address, a transmitting workstation address, and a receiving workstation address.
  • the frame entity 502 includes an SSID field 5021, a supported rate (supported Rates) 5022, an extended supported rate (extended supported rates) 5023, a reserved field 5024, and so on.
  • the supported rate 5022 and the extended supported rate 5023 are used to indicate the set of rates supported by the electronic device or AP.
  • the frame entity 502 can carry The Wi-Fi configuration information of the Wi-Fi network provided by the AP.
  • the reserved field 5024 of the frame entity 502 can be used to carry Wi-Fi configuration information.
  • the field used to indicate Wi-Fi configuration information in the probe response frame includes three parts: type, length, and value.
  • the content of the type (type) may be 0x51, which is used to indicate the attribute type of the field, that is, it is used to indicate that the field is Wi-Fi configuration information.
  • the length of the type can be 1 byte. Of course, the type can also be other content, and the specific content can be predefined or negotiated between the electronic device and the AP.
  • the content of length can be 0x08, which is used to indicate the length of value.
  • the length of the type can be 1 byte.
  • the content of the length is determined by the length of the value, and is not limited to 0x08, and can also be other content.
  • the content of the value is specifically determined by the Wi-Fi configuration information of the Wi-Fi network provided by the AP.
  • the Wi-Fi configuration information carried in the probe response frame of the AP may be encrypted.
  • the encryption key used to encrypt the Wi-Fi configuration information can be pre-configured in the AP and the electronic device.
  • the encryption keys of different electronic devices may be the same or different, and the embodiment of the present application does not make specific restrictions here.
  • the electronic device receives a probe response frame from the AP, and the Wi-Fi configuration information carried in the probe response frame is used for the electronic device to access the Wi-Fi network provided by the AP.
  • the electronic device parses the probe response frame. If the electronic device determines that the probe response frame contains a field for carrying Wi-Fi configuration information, it indicates that the AP is guiding itself to access.
  • the electronic device may send a connection request to the AP, and the connection request includes the Wi-Fi configuration information.
  • the AP authenticates the Wi-Fi configuration information in the connection request.
  • the electronic device is allowed to access.
  • the electronic device accesses the Wi-Fi network provided by the AP.
  • the desk lamp can receive the probe response frame carrying Wi-Fi configuration information from the AP, and the desk lamp can send a connection request containing the Wi-Fi configuration information to the AP at this time.
  • the desk lamp can successfully access the Wi-Fi network provided by the AP.
  • the electronic device when the electronic device is currently connected to another Wi-Fi network, the electronic device can disconnect from the Wi-Fi network, and then send the Wi-Fi configuration information to the AP. Connection request in order to access the Wi-Fi network provided by the AP.
  • the electronic device is an electronic device with a display screen (such as a mobile phone), as shown in FIG. 6, the electronic device may display prompt information 601 for prompting the user that there is currently an AP to guide access, and asking the user whether to agree to access. If the user agrees to access, the electronic device can disconnect from the current Wi-Fi network, and then send a connection request carrying the Wi-Fi configuration information to the AP, so as to access the Wi-Fi network provided by the AP.
  • the electronic device can save the Wi-Fi configuration information. Later, when the user chooses to access the Wi-Fi network, the electronic device can use the stored Wi-Fi configuration information to access the Wi-Fi network provided by the AP without the user having to manually enter the access password.
  • the electronic device can use the preset encryption key pair after determining that the probe response frame contains a field for carrying Wi-Fi configuration information This field is parsed to obtain Wi-Fi configuration information.
  • the electronic device can broadcast a probe request frame to scan for available APs around it.
  • the AP detects the probe request frame, it can reply to the electronic device a probe response frame carrying Wi-Fi configuration information of the Wi-Fi network provided by the AP.
  • the electronic device can access the Wi-Fi network provided by the AP according to the Wi-Fi configuration information in the probe response frame.
  • the user does not need to manually enter the access password, and only needs to receive a probe response frame to obtain the Wi-Fi configuration information required to access the Wi-Fi network to complete the access, which improves the access of the electronic device to the Wi-Fi network.
  • the speed of the Fi network There is no need for the user to perform multiple operations, which improves the user's operating experience.
  • the AP can reply the probe response frame carrying Wi-Fi configuration information to the electronic device after determining that the set secret-free access rules are satisfied, which can ensure the security of secret-free access .
  • the AP can also be in a dominant position in access, and the device can be guided to automatically access without secret, which improves the ease of use.
  • the MAC address of the smart home device can be added to the whitelist for secret-free access, so that the user can achieve Wi-Fi always online through only one operation, which improves the user experience.
  • the electronic device may include a processor, a memory, and a communication interface.
  • the memory and the communication interface are coupled to the processor.
  • the communication interface is used to communicate with other devices, and the other devices include APs.
  • the memory is used to store computer program codes.
  • the computer program codes include computer instructions.
  • the computer storage medium may include computer instructions.
  • the computer instructions run on an electronic device, the electronic device executes the execution of the electronic device in the embodiment shown in FIG. 2 The various steps.
  • FIG. 2 Another embodiments of the present application also provide a computer program product, which when the computer program product runs on a computer, causes the computer to execute each step performed by the electronic device in the embodiment shown in FIG. 2.
  • FIG. 2 Other embodiments of the present application also provide a device that has the function of realizing the behavior of the electronic device in the corresponding embodiment in FIG. 2 above.
  • the function can be realized by hardware, or by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above functions, for example, a sending unit or module, a receiving unit or module, a connecting unit or module, and so on.
  • the AP may include a processor and a memory, the memory is coupled to the processor, and the memory is used to store computer program codes.
  • the computer program codes include computer instructions.
  • the computer storage medium may include computer instructions.
  • the AP executes the steps performed by the AP in the embodiment shown in FIG. 2 .
  • FIG. 2 Another embodiments of the present application also provide a computer program product, which when the computer program product runs on a computer, causes the computer to execute each step executed by the AP in the embodiment shown in FIG. 2.
  • FIG. 2 Other embodiments of the present application also provide a device that has the function of realizing the AP behavior in the corresponding embodiment in FIG. 2 above.
  • the function can be realized by hardware, or by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above functions, for example, a sending unit or module, a receiving unit or module, an encryption unit or module, and so on.
  • the disclosed device and method can be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components may be divided. It can be combined or integrated into another device, or some features can be omitted or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate parts may or may not be physically separate.
  • the parts displayed as units may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed to multiple different places. . Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium.
  • the technical solutions of the embodiments of the present application are essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of a software product, and the software product is stored in a storage medium. It includes several instructions to make a device (may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code .

Abstract

Provided in the present application are a Wi-Fi connection method and device, relating to the field of communication, and used for solving the problem of the slow speed of electronic devices accessing a Wi-Fi network. After sending a probe request frame, an electronic device receives a probe response frame from an access point, the probe response frame carrying Wi-Fi configuration information of a Wi-Fi network provided by the access point, used for the electronic device to access the Wi-Fi network; and, on the basis of the Wi-Fi configuration information carried in the probe response frame, the electronic device can access the Wi-Fi network.

Description

一种Wi-Fi连接方法及设备Wi-Fi connection method and equipment
本申请要求于2019年09月16日提交国家知识产权局、申请号为201910872247.5、申请名称为“一种AP主动引导STA Wi-Fi免密接入的方法”,及于2019年11月29日提交国家知识产权局、申请号为201911205382.0、申请名称为“一种Wi-Fi连接方法及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application is required to be submitted to the State Intellectual Property Office on September 16, 2019, the application number is 201910872247.5, and the application name is "A method for AP to actively guide STA Wi-Fi secret-free access", and submitted on November 29, 2019 The State Intellectual Property Office, the application number is 201911205382.0, and the application name is "A Wi-Fi connection method and equipment", the priority of the Chinese patent application, the entire content of which is incorporated into this application by reference.
技术领域Technical field
本申请涉及通信领域,尤其涉及一种无线保真(wireless fidelity,Wi-Fi)连接方法及设备。This application relates to the field of communications, and in particular to a wireless fidelity (Wi-Fi) connection method and device.
背景技术Background technique
Wi-Fi技术是Wi-Fi联盟创建于电气和电子工程师协会(institute of electrical and electronic engineers,IEEE)802.11标准的无线局域网技术。Wi-Fi技术中通常涉及接入点(Access Point,AP)和站点(station,STA)两类设备。其中,AP也可以称为无线接入点,是Wi-Fi网络的提供者,允许其他无线设备接入,并为接入的设备提供数据访问。接入Wi-Fi网络的设备可称为STA。如,手机,平板电脑及笔记本电脑等支持Wi-Fi功能的电子设备均可作为STA。Wi-Fi technology is a wireless local area network technology established by the Wi-Fi Alliance in the Institute of Electrical and Electronic Engineers (IEEE) 802.11 standard. Wi-Fi technology usually involves two types of devices: access point (Access Point, AP) and station (station, STA). Among them, the AP can also be called a wireless access point, which is a Wi-Fi network provider, allows other wireless devices to access, and provides data access for the connected devices. A device connected to a Wi-Fi network can be called an STA. For example, electronic devices that support Wi-Fi functions, such as mobile phones, tablets, and laptops, can be used as STAs.
目前,STA(如,以STA是手机为例)接入AP提供的Wi-Fi网络的过程为:用户在手机上选择想要手机接入的Wi-Fi网络。如,用户可对手机的无线局域网设置界面中想要手机接入的Wi-Fi网络的服务集标识符(Service Set Identifier,SSID)进行选择。响应于用户的选择,手机显示密码输入界面,供用户输入该Wi-Fi网络的接入密码。在用户输入接入密码后,手机可将Wi-Fi配置信息携带在连接请求中传输给提供该Wi-Fi网络的AP。该Wi-Fi配置信息中至少包括用户输入的接入密码和该Wi-Fi网络的SSID。AP接收到连接请求后,对连接请求中Wi-Fi配置信息进行验证。如果验证通过,则同意该手机的接入,如果验证未通过,则拒绝该手机的接入。At present, the process of STA (for example, STA is a mobile phone) accessing the Wi-Fi network provided by the AP is: the user selects the Wi-Fi network that the mobile phone wants to access on the mobile phone. For example, the user can select the service set identifier (SSID) of the Wi-Fi network that the mobile phone wants to access in the wireless local area network setting interface of the mobile phone. In response to the user's selection, the mobile phone displays a password input interface for the user to enter the Wi-Fi network access password. After the user enters the access password, the mobile phone can carry the Wi-Fi configuration information in the connection request and transmit it to the AP that provides the Wi-Fi network. The Wi-Fi configuration information includes at least the access password input by the user and the SSID of the Wi-Fi network. After receiving the connection request, the AP verifies the Wi-Fi configuration information in the connection request. If the verification is passed, the access of the mobile phone is approved, and if the verification fails, the access of the mobile phone is rejected.
可以理解的是,在上述过程中,用户手动输入接入密码是STA接入Wi-Fi网络的前提,而这影响了STA接入Wi-Fi网络的速度。It is understandable that, in the above process, the user manually inputting the access password is a prerequisite for the STA to access the Wi-Fi network, and this affects the speed at which the STA can access the Wi-Fi network.
发明内容Summary of the invention
本申请实施例提供一种Wi-Fi连接方法及设备,解决了STA接入Wi-Fi网络速度慢的问题。The embodiment of the present application provides a Wi-Fi connection method and device, which solves the problem of the slow speed of STA accessing the Wi-Fi network.
本申请采用如下技术方案:This application adopts the following technical solutions:
第一方面,本申请实施例提供一种Wi-Fi连接方法,该方法可以包括:电子设备发送探测请求(probe request)帧;电子设备接收来自AP的探测响应(probe response)帧,该probe response帧中携带AP所提供Wi-Fi网络的Wi-Fi配置信息,用于电子设备接入AP所提供的Wi-Fi网络;电子设备根据接收到的probe response帧中携带的Wi-Fi配置信息,接入AP所提供的Wi-Fi网络。In the first aspect, an embodiment of the present application provides a Wi-Fi connection method. The method may include: the electronic device sends a probe request frame; the electronic device receives a probe response frame from the AP, and the probe response The frame carries the Wi-Fi configuration information of the Wi-Fi network provided by the AP, which is used for the electronic device to access the Wi-Fi network provided by the AP; the electronic device according to the Wi-Fi configuration information carried in the received probe response frame, Access the Wi-Fi network provided by the AP.
本申请实施例提供的Wi-Fi连接方法,电子设备可广播probe request帧,以扫描周围可用的AP。AP监测到该probe request帧后,可向电子设备回复携带该AP所 提供Wi-Fi网络的Wi-Fi配置信息的probe response帧。电子设备根据probe response帧中的Wi-Fi配置信息便可接入该AP提供的Wi-Fi网络。这样,无需用户手动输入接入密码,且只需接收到一个probe response帧便可获得接入Wi-Fi网络所需的Wi-Fi配置信息,以完成接入,提高了电子设备接入Wi-Fi网络的速度。无需用户进行多次操作,提高了用户的操作体验。In the Wi-Fi connection method provided by the embodiment of the present application, the electronic device can broadcast a probe request frame to scan for available APs around it. After the AP detects the probe request frame, it can reply to the electronic device a probe response frame carrying the Wi-Fi configuration information of the Wi-Fi network provided by the AP. The electronic device can access the Wi-Fi network provided by the AP according to the Wi-Fi configuration information in the probe response frame. In this way, the user does not need to manually enter the access password, and only needs to receive a probe response frame to obtain the Wi-Fi configuration information required to access the Wi-Fi network to complete the access, which improves the access of the electronic device to the Wi-Fi network. The speed of the Fi network. There is no need for the user to perform multiple operations, which improves the user's operating experience.
在一种可能的实现方式中,在电子设备接收来自AP的probe response帧之后,接入AP所提供的Wi-Fi网络之前,该方法还可以包括:电子设备对probe response帧进行解析,在确定probe response帧包含携带Wi-Fi配置信息的字段时,根据预置的加密密钥对字段进行解密,以获得Wi-Fi配置信息。通过将Wi-Fi配置信息加密携带在probe response帧中,增加了免密接入的安全性。In a possible implementation, after the electronic device receives the probe response frame from the AP and before accessing the Wi-Fi network provided by the AP, the method may further include: the electronic device parses the probe response frame, and determines When the probe response frame contains a field carrying Wi-Fi configuration information, the field is decrypted according to a preset encryption key to obtain Wi-Fi configuration information. By encrypting the Wi-Fi configuration information and carrying it in the probe response frame, the security of secret-free access is increased.
在另一种可能的实现方式中,上述Wi-Fi配置信息可以包括:AP所提供Wi-Fi网络的SSID和接入密码。In another possible implementation manner, the above Wi-Fi configuration information may include: the SSID and access password of the Wi-Fi network provided by the AP.
在另一种可能的实现方式中,上述probe response帧包括:媒体访问控制(MAC)头,帧实体和帧校验(FCS)域;上述Wi-Fi配置信息包含在帧实体的保留字段中。In another possible implementation manner, the probe response frame includes: a media access control (MAC) header, a frame entity and a frame check (FCS) field; the above Wi-Fi configuration information is contained in a reserved field of the frame entity.
在另一种可能的实现方式中,在电子设备发送probe request帧之前,该方法还可以包括:电子设备接收用户开启电子设备的Wi-Fi功能的操作。In another possible implementation manner, before the electronic device sends the probe request frame, the method may further include: the electronic device receives an operation of the user to enable the Wi-Fi function of the electronic device.
第二方面,本申请实施例提供一种Wi-Fi连接方法,该方法可以包括:AP接收来自电子设备的probe request帧;AP向电子设备发送probe response帧,该probe response帧中携带AP所提供Wi-Fi网络的Wi-Fi配置信息,用于电子设备接入AP所提供的Wi-Fi网络。In the second aspect, an embodiment of the present application provides a Wi-Fi connection method. The method may include: the AP receives a probe request frame from an electronic device; the AP sends a probe response frame to the electronic device, and the probe response frame carries the information provided by the AP The Wi-Fi configuration information of the Wi-Fi network is used for electronic devices to access the Wi-Fi network provided by the AP.
本申请实施例提供的Wi-Fi连接方法,AP在监测到来自电子设备的probe request帧后,可向电子设备回复携带该AP所提供Wi-Fi网络的Wi-Fi配置信息的probe response帧,以便电子设备根据probe response帧中的Wi-Fi配置信息接入该AP提供的Wi-Fi网络。这样,无需用户手动输入接入密码,且只需接收到一个probe response帧便可获得接入Wi-Fi网络所需的Wi-Fi配置信息,以完成接入,提高了电子设备接入Wi-Fi网络的速度。无需用户进行多次操作,提高了用户的操作体验。In the Wi-Fi connection method provided by the embodiments of this application, after the AP monitors the probe request frame from the electronic device, it can reply to the electronic device a probe response frame carrying the Wi-Fi configuration information of the Wi-Fi network provided by the AP. So that the electronic device accesses the Wi-Fi network provided by the AP according to the Wi-Fi configuration information in the probe response frame. In this way, the user does not need to manually enter the access password, and only needs to receive a probe response frame to obtain the Wi-Fi configuration information required to access the Wi-Fi network to complete the access, which improves the access of the electronic device to the Wi-Fi network. The speed of the Fi network. There is no need for the user to perform multiple operations, which improves the user's operating experience.
在一种可能的实现方式中,上述AP向电子设备发送探测响应probe response帧,可以包括:在确定满足免密接入规则时,AP向电子设备发送携带Wi-Fi配置信息的probe response帧;其中,满足免密接入规则包括以下一种或多种情况:电子设备的标识包含在白名单中;电子设备与AP之间的距离小于或等于预设距离;或者电子设备的probe request帧是AP在特定时间段内接收到的。AP在接收到电子设备的probe request帧后,可以在确定满足设定的免密接入规则后,向电子设备回复携带Wi-Fi配置信息的probe response帧,可确保免密接入的安全性。In a possible implementation manner, the above-mentioned AP sending a probe response frame to the electronic device may include: when it is determined that the secret-free access rule is satisfied, the AP sends a probe response frame carrying Wi-Fi configuration information to the electronic device; where , Meeting the secret-free access rule includes one or more of the following situations: the identity of the electronic device is included in the whitelist; the distance between the electronic device and the AP is less than or equal to the preset distance; or the probe request frame of the electronic device is that the AP is in the Received within a specific time period. After receiving the probe request frame of the electronic device, the AP can reply to the electronic device a probe response frame carrying Wi-Fi configuration information after determining that the set secret-free access rule is satisfied, which can ensure the security of secret-free access.
在另一种可能的实现方式中,白名单中包括第一标识和第二标识中的至少一个;第一标识为:在AP所提供的Wi-Fi网络的Wi-Fi配置信息变更之前,成功接入过AP所提供的Wi-Fi网络的设备的标识;第二标识是AP从第一设备接收到的,第一设备具有对AP的管理权限。这样,对于电子设备,如智能家居设备来说,可通过将该智能家居设备的MAC地址加入免密接入的白名单中,使得用户仅通过一次操作,实现Wi-Fi永远在线,提高了用户的使用体验。In another possible implementation manner, the whitelist includes at least one of the first identifier and the second identifier; the first identifier is: before the Wi-Fi configuration information of the Wi-Fi network provided by the AP is changed, successful The identifier of the device that has accessed the Wi-Fi network provided by the AP; the second identifier is received by the AP from the first device, and the first device has management authority to the AP. In this way, for electronic devices, such as smart home devices, the MAC address of the smart home device can be added to the whitelist for secret-free access, so that the user can achieve Wi-Fi always online through only one operation, which improves the user’s Use experience.
在另一种可能的实现方式中,在AP向电子设备发送探测响应probe response帧之前,该方法还可以包括:AP根据预置的加密密钥对Wi-Fi配置信息进行加密。通过将Wi-Fi配置信息加密携带在probe response帧中,进一步增加了免密接入的安全性。In another possible implementation manner, before the AP sends a probe response frame to the electronic device, the method may further include: the AP encrypts the Wi-Fi configuration information according to a preset encryption key. By encrypting the Wi-Fi configuration information and carrying it in the probe response frame, the security of secret-free access is further increased.
在另一种可能的实现方式中,Wi-Fi配置信息可以包括:AP所提供Wi-Fi网络的SSID和接入密码。In another possible implementation manner, the Wi-Fi configuration information may include: the SSID and access password of the Wi-Fi network provided by the AP.
在另一种可能的实现方式中,上述probe response帧可以包括:MAC头,帧实体和FCS域;Wi-Fi配置信息包含在帧实体的保留字段中。In another possible implementation, the probe response frame may include: a MAC header, a frame entity, and an FCS field; Wi-Fi configuration information is included in a reserved field of the frame entity.
第三方面,本申请实施例提供一种电子设备,该电子设备可以包括:处理器、存储器和通信接口,存储器和通信接口与处理器耦合,通信接口用于与其他设备通信,其他设备包括AP,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当处理器执行计算机指令时,电子设备执行前述第一方面中任一所述的方法。In a third aspect, embodiments of the present application provide an electronic device. The electronic device may include a processor, a memory, and a communication interface. The memory and the communication interface are coupled to the processor. The communication interface is used to communicate with other devices. The other devices include APs. , The memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes the method described in any one of the foregoing first aspects.
第四方面,本申请实施例提供一种计算机可读存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行如第一方面或第一方面的可能的实现方式中任一项所述的Wi-Fi连接方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, including computer instructions, which when the computer instructions run on an electronic device, cause the electronic device to execute any of the first aspect or the possible implementation manners of the first aspect. The Wi-Fi connection method described in item 1.
第五方面,本申请实施例提供一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得所述计算机执行如第一方面或第一方面的可能的实现方式中任一项所述的Wi-Fi连接方法。In a fifth aspect, the embodiments of the present application provide a computer program product, which when the computer program product runs on a computer, causes the computer to execute the first aspect or any one of the possible implementation manners of the first aspect Wi-Fi connection method.
第六方面,本申请实施例提供一种AP,包括:一个或多个处理器和存储器;存储器与一个或多个处理器耦合,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,该AP执行如第二方面或第二方面的可能的实现方式中任一项所述的Wi-Fi连接方法。In a sixth aspect, an embodiment of the present application provides an AP, including: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program codes, and the computer program codes include computer instructions. When one or more processors execute computer instructions, the AP executes the Wi-Fi connection method according to the second aspect or any one of the possible implementation manners of the second aspect.
第七方面,本申请实施例提供一种计算机可读存储介质,包括计算机指令,当计算机指令在AP上运行时,使得AP执行如第二方面或第二方面的可能的实现方式中任一项所述的Wi-Fi连接方法。In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, including computer instructions, which when the computer instructions run on the AP, cause the AP to execute any one of the second aspect or the possible implementation manners of the second aspect The described Wi-Fi connection method.
第八方面,本申请实施例提供一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得所述计算机执行如第二方面或第二方面的可能的实现方式中任一项所述的Wi-Fi连接方法。In an eighth aspect, the embodiments of the present application provide a computer program product, which when the computer program product runs on a computer, causes the computer to execute the second aspect or any one of the possible implementation manners of the second aspect Wi-Fi connection method.
第九方面,本申请实施例提供一种装置,该装置具有实现上述各方面的方法中电子设备行为的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块,例如,接收单元或模块,发送单元或模块,连接单元或模块等。In a ninth aspect, an embodiment of the present application provides a device that has the function of implementing the behavior of the electronic device in the methods of the foregoing aspects. The function can be realized by hardware, or the corresponding software can be executed by hardware. The hardware or software includes one or more modules corresponding to the above functions, for example, a receiving unit or module, a sending unit or module, a connecting unit or module, and so on.
第十方面,本申请实施例提供一种装置,该装置具有实现上述各方面的方法中AP行为的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块,例如,发送单元或模块,接收单元或模块,加密单元或模块等。In a tenth aspect, an embodiment of the present application provides a device that has the function of implementing AP behaviors in the methods of the foregoing aspects. The function can be realized by hardware, or the corresponding software can be executed by hardware. The hardware or software includes one or more modules corresponding to the above functions, for example, a sending unit or module, a receiving unit or module, an encryption unit or module, and so on.
第十一方面,本申请实施例提供一种系统,该系统可以包括电子设备和AP。电子设备可以用于发送probe request帧,AP可以用于接收来自电子设备的probe request帧,向电子设备发送probe response帧,该probe response帧中携带AP所提供Wi-Fi网络的Wi-Fi配置信息。电子设备还用于接收来自AP的probe response帧,根据probe  response帧中携带的Wi-Fi配置信息,接入AP所提供的Wi-Fi网络。In an eleventh aspect, an embodiment of the present application provides a system, and the system may include an electronic device and an AP. Electronic devices can be used to send probe request frames, APs can be used to receive probe request frames from electronic devices, and send probe response frames to the electronic devices. The probe response frames carry Wi-Fi configuration information of the Wi-Fi network provided by the AP. . The electronic device is also used to receive the probe response frame from the AP, and access the Wi-Fi network provided by the AP according to the Wi-Fi configuration information carried in the probe response frame.
应当理解的是,本申请中对技术特征、技术方案、有益效果或类似语言的描述并不是暗示在任意的单个实施例中可以实现所有的特点和优点。相反,可以理解的是对于特征或有益效果的描述意味着在至少一个实施例中包括特定的技术特征、技术方案或有益效果。因此,本说明书中对于技术特征、技术方案或有益效果的描述并不一定是指相同的实施例。进而,还可以任何适当的方式组合本实施例中所描述的技术特征、技术方案和有益效果。本领域技术人员将会理解,无需特定实施例的一个或多个特定的技术特征、技术方案或有益效果即可实现实施例。在其他实施例中,还可在没有体现所有实施例的特定实施例中识别出额外的技术特征和有益效果。It should be understood that the description of technical features, technical solutions, beneficial effects or similar language in this application does not imply that all the features and advantages can be realized in any single embodiment. On the contrary, it can be understood that the description of features or beneficial effects means that a specific technical feature, technical solution, or beneficial effect is included in at least one embodiment. Therefore, the descriptions of technical features, technical solutions, or beneficial effects in this specification do not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions, and beneficial effects described in this embodiment can also be combined in any appropriate manner. Those skilled in the art will understand that the embodiments can be implemented without one or more specific technical features, technical solutions, or beneficial effects of the specific embodiments. In other embodiments, additional technical features and beneficial effects may also be identified in specific embodiments that do not reflect all the embodiments.
附图说明Description of the drawings
图1为本申请实施例提供的一种电子设备的结构示意图;FIG. 1 is a schematic structural diagram of an electronic device provided by an embodiment of this application;
图2为本申请实施例提供的一种Wi-Fi连接方法的流程示意图;2 is a schematic flowchart of a Wi-Fi connection method provided by an embodiment of this application;
图3为本申请实施例提供的一种开启Wi-Fi功能操作示意图;FIG. 3 is a schematic diagram of an operation of turning on the Wi-Fi function provided by an embodiment of the application;
图4为本申请实施例提供的另一种开启Wi-Fi功能操作示意图;FIG. 4 is a schematic diagram of another operation of turning on the Wi-Fi function provided by an embodiment of the application;
图5为本申请实施例提供的一种Wi-Fi帧的帧结构实例示意图;FIG. 5 is a schematic diagram of an example of a frame structure of a Wi-Fi frame provided by an embodiment of the application;
图6为本申请实施例提供的一种电子设备的显示界面示意图。FIG. 6 is a schematic diagram of a display interface of an electronic device provided by an embodiment of the application.
具体实施方式detailed description
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。Hereinafter, the terms “first” and “second” are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first" and "second" may explicitly or implicitly include one or more of these features. In the description of the present embodiment, unless otherwise specified, "plurality" means two or more.
目前,如手机等支持Wi-Fi功能的电子设备可作为STA通过接入AP提供的Wi-Fi网络,实现数据访问。为了确保网络连接的安全性,AP提供的Wi-Fi网络通常是加密的。即作为STA的电子设备接入AP提供的Wi-Fi网络之前,AP需要对电子设备发送的连接请求中携带的Wi-Fi配置信息进行鉴权。如果鉴权通过,则同意该电子设备接入,否则拒绝该电子设备接入。其中,Wi-Fi配置信息至少包括:Wi-Fi网络的SSID和接入密码。Wi-Fi配置信息还可以包括Wi-Fi网络的加密方式。At present, electronic devices that support Wi-Fi functions such as mobile phones can be used as STAs to access the Wi-Fi network provided by the AP to achieve data access. In order to ensure the security of the network connection, the Wi-Fi network provided by the AP is usually encrypted. That is, before the electronic device as a STA accesses the Wi-Fi network provided by the AP, the AP needs to authenticate the Wi-Fi configuration information carried in the connection request sent by the electronic device. If the authentication is passed, the electronic device is allowed to access, otherwise the electronic device is rejected. Among them, the Wi-Fi configuration information includes at least: the SSID and access password of the Wi-Fi network. The Wi-Fi configuration information may also include the encryption method of the Wi-Fi network.
对于具有显示屏的电子设备,如手机,平板电脑而言,接入密码可由用户手动输入。而手动输入接入密码会影响电子设备接入Wi-Fi网络的速度。另外,随着科技的进步,支持Wi-Fi功能的智能家居设备也越来越多。有些智能家居设备,如台灯,音箱,空调等并没有显示屏,也就是说,其并无法提供密码输入界面供用户输入接入密码。因此,如果能让用户在作为STA的电子设备侧免输入接入密码,则不仅可以提高电子设备接入Wi-Fi网络的速度,也为不具备显示屏的电子设备接入Wi-Fi网络提供了可能。For electronic devices with display screens, such as mobile phones and tablet computers, the access password can be manually input by the user. However, manually entering the access password will affect the speed at which the electronic device accesses the Wi-Fi network. In addition, with the advancement of technology, more and more smart home devices support Wi-Fi functions. Some smart home devices, such as desk lamps, speakers, air conditioners, etc., do not have a display screen, that is, they cannot provide a password input interface for users to enter the access password. Therefore, if users are allowed to avoid entering the access password on the side of the electronic device as a STA, it will not only increase the speed of the electronic device accessing Wi-Fi network, but also provide a way for electronic devices without a display screen to access the Wi-Fi network. It's possible.
现有技术提供了在作为STA的电子设备侧免用户输入接入密码的方案。以电子设备是台灯为例,具体过程为:首先,用户按下台灯的恢复出厂设置按钮。响应于用户对该按钮的操作,台灯进行Wi-Fi信标(beacon)帧的广播。AP在工作时,会对Wi-Fi传输可使用的所有信道进行监听,因此,AP可以接收到台灯广播的Wi-Fi beacon帧。之后,AP对应的提示灯会闪烁,提示用户有设备需要接入。用户可对AP上设置的对 应按钮进行操作,以指示同意该设备接入。响应于用户对AP上对应按钮的操作,AP将其所提供Wi-Fi网络的Wi-Fi配置信息(如包括SSID,接入密码和加密方式)加密后分片存放于多个组播包(至少需要几十个组播包)的目的互联网协议(internet protocol,IP)地址的后两个字节,并发送这多个组播包。加密秘钥是预先配置在AP和台灯中的。台灯接收到这多个组播包后,对多个组播包进行拼接,并采用预置的加密秘钥进行解析后便可获得Wi-Fi配置信息。最后,台灯向AP发送携带的Wi-Fi配置信息的连接请求。AP接收到连接请求后,对Wi-Fi配置信息进行鉴权。在鉴权通过后,同意台灯接入。至此,台灯成功接入AP提供的Wi-Fi网络。The prior art provides a solution for preventing the user from inputting the access password on the side of the electronic device serving as the STA. Taking the electronic device as a desk lamp as an example, the specific process is as follows: First, the user presses the factory reset button of the desk lamp. In response to the user's operation of the button, the desk lamp broadcasts a Wi-Fi beacon frame. When the AP is working, it will monitor all the channels that can be used for Wi-Fi transmission. Therefore, the AP can receive the Wi-Fi beacon frame broadcast by the desk lamp. After that, the prompt light corresponding to the AP will flash, prompting the user that there is a device that needs to be accessed. The user can operate the corresponding button set on the AP to indicate that the device is allowed to access. In response to the user's operation of the corresponding button on the AP, the AP encrypts the Wi-Fi configuration information (such as including SSID, access password, and encryption method) of the Wi-Fi network provided by it and stores the fragments in multiple multicast packets ( At least dozens of multicast packets are required to send the last two bytes of the destination Internet Protocol (IP) address, and send these multiple multicast packets. The encryption key is pre-configured in the AP and lamp. After the desk lamp receives these multiple multicast packets, it splices the multiple multicast packets, and uses the preset encryption key to parse them to obtain the Wi-Fi configuration information. Finally, the desk lamp sends a connection request carrying Wi-Fi configuration information to the AP. After the AP receives the connection request, it authenticates the Wi-Fi configuration information. After the authentication is passed, the desk lamp is allowed to access. So far, the desk lamp has successfully connected to the Wi-Fi network provided by the AP.
可以看到的是,现有技术提供的免用户输入接入密码的方案,作为STA的电子设备需要接收到多个组播包进行拼接后才能获得对应的Wi-Fi配置信息,这仍然不能使电子设备快速接入Wi-Fi网络。另外,接入过程需要用户进行多次操作,用户体验不好。It can be seen that in the solution provided by the prior art that does not require the user to enter the access password, the electronic device as the STA needs to receive multiple multicast packets for splicing to obtain the corresponding Wi-Fi configuration information, which still cannot be used. Electronic devices quickly connect to Wi-Fi networks. In addition, the access process requires the user to perform multiple operations, and the user experience is not good.
本申请实施例提供一种Wi-Fi连接方法,在电子设备的Wi-Fi功能开启后,电子设备可广播探测请求(probe request)帧,以扫描周围有哪些可用的AP。AP监测到该probe request帧后,可向电子设备回复携带该AP所提供Wi-Fi网络的Wi-Fi配置信息的探测响应(probe response)帧。电子设备接收到probe response帧后,根据probe response帧中的Wi-Fi配置信息便可接入该AP提供的Wi-Fi网络。这样,无需用户手动输入接入密码,且只需接收到一个probe response帧便可获得接入Wi-Fi网络所需的Wi-Fi配置信息,以完成接入,提高了电子设备接入Wi-Fi网络的速度。另外,无需用户进行多次操作,提高了用户的操作体验。The embodiment of the present application provides a Wi-Fi connection method. After the Wi-Fi function of the electronic device is turned on, the electronic device can broadcast a probe request frame to scan for available APs around it. After the AP detects the probe request frame, it may reply to the electronic device a probe response frame carrying Wi-Fi configuration information of the Wi-Fi network provided by the AP. After receiving the probe response frame, the electronic device can access the Wi-Fi network provided by the AP according to the Wi-Fi configuration information in the probe response frame. In this way, the user does not need to manually enter the access password, and only needs to receive a probe response frame to obtain the Wi-Fi configuration information required to access the Wi-Fi network to complete the access, which improves the access of the electronic device to the Wi-Fi network. The speed of the Fi network. In addition, there is no need for the user to perform multiple operations, which improves the user's operating experience.
示例性的,本申请实施例中所述的电子设备可以是手机、平板电脑、桌面型、膝上型、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personal digital assistant,PDA)、如台灯,音箱,空调,电饭煲,电视机等智能家居设备、增强现实(augmented reality,AR)\虚拟现实(virtual reality,VR)设备等支持Wi-Fi功能的设备。在本申请实施例中,AP可以是路由器。AP也可以是如手机等具有AP能力(如能够提供Wi-Fi网络)的电子设备,也就是说,具有AP能力的电子设备可作为AP。本申请实施例对AP及作为STA接入AP所提供Wi-Fi网络的电子设备的具体形态均不作特殊限制。Exemplarily, the electronic devices described in the embodiments of the present application may be mobile phones, tablet computers, desktop computers, laptops, handheld computers, notebook computers, ultra-mobile personal computers (UMPC), and netbooks. As well as cellular phones, personal digital assistants (PDAs), smart home devices such as desk lamps, speakers, air conditioners, rice cookers, televisions, and augmented reality (AR)\virtual reality (VR) devices, etc. Devices that support Wi-Fi functions. In this embodiment of the application, the AP may be a router. The AP may also be an electronic device with AP capability (for example, capable of providing a Wi-Fi network), such as a mobile phone, that is, an electronic device with AP capability may be used as an AP. The embodiments of the present application do not impose special restrictions on the specific forms of the AP and the electronic device that is used as a STA to access the Wi-Fi network provided by the AP.
下面将结合附图对本申请实施例的实施方式进行详细描述。The implementation of the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings.
请参考图1,为本申请实施例提供的一种电子设备的结构示意图。如图1所示,电子设备可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。Please refer to FIG. 1, which is a schematic structural diagram of an electronic device provided by an embodiment of this application. As shown in FIG. 1, the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, and a battery 142, Antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, A display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
其中,传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导 传感器180M等。Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and the environment Light sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本实施例示意的结构并不构成对电子设备的具体限定。在另一些实施例中,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Among them, the different processing units may be independent devices or integrated in one or more processors.
控制器可以是电子设备的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can be the nerve center and command center of the electronic device. The controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 to store instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can store instructions or data that the processor 110 has just used or used cyclically. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,SIM接口,和/或USB接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, and a universal asynchronous transmitter/receiver (universal asynchronous) interface. receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, SIM interface, and/or USB interface, etc.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is used to receive charging input from the charger. Among them, the charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive the charging input of the wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 may receive the wireless charging input through the wireless charging coil of the electronic device. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device through the power management module 141.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. In some other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
电子设备的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。电子设备中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna can be used in combination with a tuning switch.
移动通信模块150可以提供应用在电子设备上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G and the like applied to electronic devices. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic wave radiation via the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。例如,在本实施例中,无线通信模块160可以用于发送probe request帧,还可用于接收来自AP的probe response帧。该probe response帧中可以携带AP所提供Wi-Fi网络的Wi-Fi配置信息。The wireless communication module 160 can provide applications on electronic devices including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellite systems. (global navigation satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive the signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic waves to radiate through the antenna 2. For example, in this embodiment, the wireless communication module 160 may be used to send a probe request frame, and may also be used to receive a probe response frame from an AP. The probe response frame can carry Wi-Fi configuration information of the Wi-Fi network provided by the AP.
在一些实施例中,电子设备的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite-based augmentation systems (SBAS).
电子设备通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处 理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device realizes the display function through the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, which is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can adopt liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode). emitting diode, AMOLED, flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device may include one or N display screens 194, and N is a positive integer greater than one.
电子设备可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。Electronic equipment can achieve shooting functions through ISP, camera 193, video codec, GPU, display 194, and application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used to process the data fed back by the camera 193. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing and is converted into an image visible to the naked eye. ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 193.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备可以包括1个或N个摄像头193,N为大于1的正整数。The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and is projected to the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to convert it into a digital image signal. ISP outputs digital image signals to DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats of image signals. In some embodiments, the electronic device may include 1 or N cameras 193, and N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device selects the frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
视频编解码器用于对数字视频压缩或解压缩。电子设备可以支持一种或多种视频编解码器。这样,电子设备可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device can support one or more video codecs. In this way, the electronic device can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, for example, the transfer mode between human brain neurons, it can quickly process input information, and it can also continuously self-learn. NPU can realize the intelligent cognition of electronic equipment and other applications, such as: image recognition, face recognition, speech recognition, text understanding, etc.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备的各种 功能应用以及数据处理。例如,在本申请实施例中,处理器110可通过运行存储在内部存储器121的指令,使得电子设备发送probe request帧,接收来自AP的probe response帧。如果接收到的probe response帧中携带Wi-Fi配置信息,可根据该probe response帧中的Wi-Fi配置信息接入AP提供的Wi-Fi网络。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。The internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device by running instructions stored in the internal memory 121. For example, in the embodiment of the present application, the processor 110 may run an instruction stored in the internal memory 121 to cause the electronic device to send a probe request frame and receive a probe response frame from the AP. If the received probe response frame carries Wi-Fi configuration information, the Wi-Fi configuration information in the probe response frame can be used to access the Wi-Fi network provided by the AP. The internal memory 121 may include a storage program area and a storage data area. Among them, the storage program area can store an operating system, at least one application program (such as a sound playback function, an image playback function, etc.) required by at least one function. The data storage area can store data (such as audio data, phone book, etc.) created during the use of the electronic device. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
电子设备可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110, or part of the functional modules of the audio module 170 may be provided in the processor 110.
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备可以通过扬声器170A收听音乐,或收听免提通话。The speaker 170A, also called "speaker", is used to convert audio electrical signals into sound signals. The electronic device can listen to music through the speaker 170A, or listen to a hands-free call.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device answers a call or voice message, it can receive the voice by bringing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息或需要通过语音助手触发电子设备执行某些功能时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备可以设置至少一个麦克风170C。在另一些实施例中,电子设备可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also called "microphone", "microphone", is used to convert sound signals into electrical signals. When making a call or sending voice information or when the electronic device needs to be triggered to perform certain functions through a voice assistant, the user can make a sound by approaching the microphone 170C through the human mouth, and input the sound signal into the microphone 170C. The electronic device may be provided with at least one microphone 170C. In some other embodiments, the electronic device may be provided with two microphones 170C, which can implement noise reduction functions in addition to collecting sound signals. In other embodiments, the electronic device may also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone interface 170D is used to connect wired earphones. The earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备根据压力传感器180A检测所述触摸操作强度。电子设备也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触 摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be provided on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors and so on. The capacitive pressure sensor may include at least two parallel plates with conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device determines the strength of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the electronic device detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device may also calculate the touched position based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch position but have different touch operation strengths may correspond to different operation instructions. For example, when a touch operation whose intensity of the touch operation is less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
陀螺仪传感器180B可以用于确定电子设备的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B can be used to determine the movement posture of the electronic device. In some embodiments, the angular velocity of the electronic device around three axes (ie, x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the shake of the electronic device, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shake of the electronic device through a reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
气压传感器180C用于测量气压。在一些实施例中,电子设备通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备是翻盖机时,电子设备可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The electronic device can use the magnetic sensor 180D to detect the opening and closing of the flip holster. In some embodiments, when the electronic device is a flip machine, the electronic device can detect the opening and closing of the flip according to the magnetic sensor 180D. Furthermore, according to the detected opening and closing state of the holster or the opening and closing state of the flip cover, features such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测电子设备在各个方向上(一般为三轴)加速度的大小。当电子设备静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device in various directions (generally three axes). When the electronic device is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and apply to applications such as horizontal and vertical screen switching, pedometers and so on.
距离传感器180F,用于测量距离。电子设备可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备可以利用距离传感器180F测距以实现快速对焦。Distance sensor 180F, used to measure distance. Electronic equipment can measure distance through infrared or laser. In some embodiments, when shooting a scene, the electronic device may use the distance sensor 180F to measure the distance to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备通过发光二极管向外发射红外光。电子设备使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备附近有物体。当检测到不充分的反射光时,电子设备可以确定电子设备附近没有物体。电子设备可以利用接近光传感器180G检测用户手持电子设备贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device emits infrared light to the outside through the light-emitting diode. Electronic devices use photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device. When insufficient reflected light is detected, the electronic device can determine that there is no object near the electronic device. The electronic device can use the proximity light sensor 180G to detect that the user holds the electronic device close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode, and the pocket mode will automatically unlock and lock the screen.
环境光传感器180L用于感知环境光亮度。电子设备可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备是否在口袋里,以防误触。The ambient light sensor 180L is used to sense the brightness of the ambient light. The electronic device can adaptively adjust the brightness of the display screen 194 according to the perceived brightness of the ambient light. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device is in the pocket to prevent accidental touch.
指纹传感器180H用于采集指纹。电子设备可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. Electronic devices can use the collected fingerprint characteristics to unlock fingerprints, access application locks, take photos with fingerprints, and answer calls with fingerprints.
温度传感器180J用于检测温度。在一些实施例中,电子设备利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备对电池142加热,以避免低温导致电子设备异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device uses the temperature detected by the temperature sensor 180J to execute the temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device executes to reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device heats the battery 142 to avoid abnormal shutdown of the electronic device due to low temperature. In some other embodiments, when the temperature is lower than another threshold, the electronic device boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194, 由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备的表面,与显示屏194所处的位置不同。Touch sensor 180K, also called "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a “touch screen”. The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. The visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device, which is different from the position of the display screen 194.
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can obtain the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the human pulse and receive the blood pressure pulse signal. In some embodiments, the bone conduction sensor 180M may also be provided in the earphone, combined with the bone conduction earphone. The audio module 170 can parse the voice signal based on the vibration signal of the vibrating bone block of the voice obtained by the bone conduction sensor 180M, and realize the voice function. The application processor can analyze the heart rate information based on the blood pressure beating signal obtained by the bone conduction sensor 180M, and realize the heart rate detection function.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备可以接收按键输入,产生与电子设备的用户设置以及功能控制有关的键信号输入。The button 190 includes a power-on button, a volume button, and so on. The button 190 may be a mechanical button. It can also be a touch button. The electronic device can receive key input, and generate key signal input related to user settings and function control of the electronic device.
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。The motor 191 can generate vibration prompts. The motor 191 can be used for incoming call vibration notification, and can also be used for touch vibration feedback. For example, touch operations that act on different applications (such as photographing, audio playback, etc.) can correspond to different vibration feedback effects. Acting on touch operations in different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminding, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, and so on.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备的接触和分离。电子设备可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备中,不能和电子设备分离。The SIM card interface 195 is used to connect to the SIM card. The SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device. The electronic device can support 1 or N SIM card interfaces, and N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. The same SIM card interface 195 can insert multiple cards at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device interacts with the network through the SIM card to realize functions such as call and data communication. In some embodiments, the electronic device adopts an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device and cannot be separated from the electronic device.
以下实施例中的方法均可以在具有上述硬件结构的电子设备中实现。The methods in the following embodiments can all be implemented in an electronic device having the above hardware structure.
图2为本申请实施例提供的一种Wi-Fi连接方法的流程示意图。如图2所示,该方法可以包括:FIG. 2 is a schematic flowchart of a Wi-Fi connection method provided by an embodiment of the application. As shown in Figure 2, the method may include:
S201、电子设备的Wi-Fi功能开启后,电子设备发送probe request帧。S201. After the Wi-Fi function of the electronic device is turned on, the electronic device sends a probe request frame.
其中,在电子设备的Wi-Fi功能开启后,电子设备可在Wi-Fi传输可使用的信道上广播probe request帧,以扫描周围可用的AP。Among them, after the Wi-Fi function of the electronic device is turned on, the electronic device can broadcast a probe request frame on a channel that can be used for Wi-Fi transmission to scan for available APs around it.
在一些实施例中,电子设备可在接收到用户的第一操作后,开启电子设备的Wi-Fi功能。该第一操作是用户开启电子设备的Wi-Fi功能的操作。示例性的,该第一操作可以是用户对电子设备开启Wi-Fi功能的按钮的操作。该按钮可以是电子设备显示屏上显示的虚拟按键,也可以是设置在电子设备中的物理按键。In some embodiments, the electronic device may enable the Wi-Fi function of the electronic device after receiving the user's first operation. The first operation is an operation for the user to turn on the Wi-Fi function of the electronic device. Exemplarily, the first operation may be an operation of a button for turning on the Wi-Fi function of the electronic device by the user. The button may be a virtual button displayed on the display screen of the electronic device, or may be a physical button set in the electronic device.
例如,以电子设备是具有显示屏的设备,如手机,第一操作是对手机显示屏上显示的虚拟按键,如无线局域网的开关按钮的操作为例。如图3所示,用户可对手机的无线局域网设置界面301中无线局域网的开关按钮302进行点击操作。响应于该点击操作,手机可开启手机的Wi-Fi功能。在手机的Wi-Fi功能开启后,手机可在Wi-Fi传输可使用的信道上广播probe request帧,以扫描周围可用的AP。For example, if the electronic device is a device with a display screen, such as a mobile phone, the first operation is an operation of a virtual button displayed on the display screen of the mobile phone, such as a switch button of a wireless local area network. As shown in FIG. 3, the user can click the switch button 302 of the wireless LAN in the wireless LAN setting interface 301 of the mobile phone. In response to the click operation, the mobile phone can turn on the Wi-Fi function of the mobile phone. After the Wi-Fi function of the mobile phone is turned on, the mobile phone can broadcast a probe request frame on a channel that can be used for Wi-Fi transmission to scan for available APs around it.
又例如,以电子设备是不具备显示屏的设备,如台灯,第一操作是对设置在台灯中的物理按键,如恢复出厂设置按钮的操作为例。如图4所示,用户可对台灯的恢复出厂设置按钮401进行操作。响应于该操作,台灯可开启台灯的Wi-Fi功能。在台灯的Wi-Fi功能开启后,台灯可在Wi-Fi传输可使用的信道上广播probe request帧,以扫描周围可用的AP。For another example, if the electronic device is a device without a display screen, such as a desk lamp, the first operation is the operation of a physical button set in the desk lamp, such as a factory reset button. As shown in Fig. 4, the user can operate the factory reset button 401 of the desk lamp. In response to this operation, the desk lamp can turn on the Wi-Fi function of the desk lamp. After the Wi-Fi function of the desk lamp is turned on, the desk lamp can broadcast probe request frames on the channels available for Wi-Fi transmission to scan for available APs around it.
S202、AP接收来自电子设备的probe request帧。S202. The AP receives a probe request frame from the electronic device.
AP在工作时,会对Wi-Fi传输可使用的所有信道进行监听。因此,在电子设备在Wi-Fi传输可使用的信道上广播probe request帧后,AP可接收到来自电子设备的probe request帧。结合S201中的示例,例如,AP可接收到来自手机的probe request帧。又例如,AP可接收到来自台灯的probe request帧。When the AP is working, it will monitor all channels available for Wi-Fi transmission. Therefore, after the electronic device broadcasts the probe request frame on a channel that can be used for Wi-Fi transmission, the AP can receive the probe request frame from the electronic device. Combining the example in S201, for example, the AP may receive a probe request frame from a mobile phone. For another example, the AP may receive the probe request frame from the desk lamp.
S203、AP向电子设备发送probe response帧,该probe response帧中携带AP所提供Wi-Fi网络的Wi-Fi配置信息。S203. The AP sends a probe response frame to the electronic device, where the probe response frame carries Wi-Fi configuration information of the Wi-Fi network provided by the AP.
其中,Wi-Fi配置信息用于电子设备接入该AP所提供的Wi-Fi网络。Wi-Fi配置信息至少包括:Wi-Fi网络的SSID和接入密码。Wi-Fi配置信息还可以包括Wi-Fi网络的加密方式。Among them, the Wi-Fi configuration information is used for the electronic device to access the Wi-Fi network provided by the AP. The Wi-Fi configuration information includes at least: the SSID and access password of the Wi-Fi network. The Wi-Fi configuration information may also include the encryption method of the Wi-Fi network.
在一些实施例中,AP在接收到来自电子设备的probe request帧后,可将该AP所提供的Wi-Fi网络的Wi-Fi配置信息携带在probe response帧中发送给电子设备。In some embodiments, after the AP receives the probe request frame from the electronic device, the Wi-Fi configuration information of the Wi-Fi network provided by the AP may be carried in the probe response frame and sent to the electronic device.
在其他一些实施例中,AP在接收到来自电子设备的probe request帧后,可以在确定符合免密接入规则时,将该AP所提供的Wi-Fi网络的Wi-Fi配置信息携带在probe response帧中发送给电子设备。也就是说,可在AP侧设置免密接入规则。AP在接收到来自电子设备的probe request帧后,如果确定符合该免密接入规则,则表明允许该电子设备免密接入,即免用户输入密码。此时,AP可将接入Wi-Fi网络所需的Wi-Fi配置信息携带在probe response帧中发送给电子设备。In some other embodiments, after the AP receives the probe request frame from the electronic device, it may carry the Wi-Fi configuration information of the Wi-Fi network provided by the AP in the probe response when determining that it meets the secret-free access rule. The frame is sent to the electronic device. In other words, secret-free access rules can be set on the AP side. After the AP receives the probe request frame from the electronic device, if it determines that the secret-free access rule is met, it indicates that the electronic device is allowed to access secret-free, that is, the user is not required to enter a password. At this time, the AP may carry the Wi-Fi configuration information required to access the Wi-Fi network in a probe response frame and send it to the electronic device.
示例性的,AP侧设置的免密接入规则可以包括以下一种或多种:白名单中的电子设备允许免密接入,位于AP一定距离范围内的电子设备允许免密接入,在特定时间段内允许电子设备免密接入等。Exemplarily, the secret-free access rules set on the AP side may include one or more of the following: electronic devices in the whitelist allow secret-free access, electronic devices located within a certain distance from the AP allow secret-free access, and during a specific time period It allows secret-free access of electronic devices, etc.
其中,以免密接入规则包括白名单中的电子设备允许免密接入为例。该白名单中可以包括一个或多个允许免密接入的电子设备的标识。该标识可以是MAC地址。具体的:AP在接收到来自电子设备的probe request帧后,可以判断该电子设备的MAC地址是否包含在白名单中。如果该电子设备的MAC地址包含在白名单中,则可将接入Wi-Fi网络所需的Wi-Fi配置信息携带在probe response帧中发送给该电子设备。如果该电子设备的MAC地址未包含在白名单中,则发送未携带Wi-Fi配置信息的probe response帧。Among them, take the secret-free access rule including the electronic devices in the whitelist allowing secret-free access as an example. The whitelist may include one or more identities of electronic devices that allow secret-free access. The identifier can be a MAC address. Specifically: after receiving the probe request frame from the electronic device, the AP can determine whether the MAC address of the electronic device is included in the whitelist. If the MAC address of the electronic device is included in the whitelist, the Wi-Fi configuration information required to access the Wi-Fi network can be carried in a probe response frame and sent to the electronic device. If the MAC address of the electronic device is not included in the whitelist, a probe response frame that does not carry Wi-Fi configuration information is sent.
上述白名单中的标识可以是用户手动加入的。如,以AP是路由器为例。手机(该 手机可以为本申请中的第一设备)具有对该路由器的管理权限。手机可配置或控制该路由器可称为手机具有对路由器的管理权限。例如,可以在手机中安装用于控制该路由器的应用,通过该应用可以配置或控制该路由器。又例如,手机可通过网页打开该路由器的控制界面,在该控制界面中可以配置或控制该路由器。The identifiers in the above whitelist may be manually added by the user. For example, take the AP as a router as an example. The mobile phone (the mobile phone may be the first device in this application) has the management authority of the router. The mobile phone can configure or control the router, and it can be said that the mobile phone has the management authority to the router. For example, an application for controlling the router can be installed in the mobile phone, and the router can be configured or controlled through the application. For another example, the mobile phone can open the control interface of the router through the webpage, and the router can be configured or controlled in the control interface.
如用户想允许台灯免密接入该路由器提供的Wi-Fi网络。用户可打开手机中安装的可用于控制该路由器的应用,如该路由器的应用,或者是智能家居应用等,使用该应用的扫一扫功能,通过扫描台灯的二维码(该二维码包含台灯的MAC地址),手机可获得该台灯的MAC地址。或者,用户可使用该应用手动输入该台灯的MAC地址,此时手机可获得该台灯的MAC地址。之后,在手机接入了该路由器提供的Wi-Fi网络的情况下,手机可将该台灯的MAC地址发送给路由器。路由器接收到该台灯的MAC地址后,可将台灯的MAC地址保存在白名单中。这样,结合S201中的示例,台灯在Wi-Fi传输可使用的信道上广播probe request帧后,路由器接收到台灯的probe request帧。路由器可确定出该台灯的MAC地址包含在白名单中,此时,路由器向台灯发送包含Wi-Fi配置信息的probe response帧。If the user wants to allow the desk lamp to access the Wi-Fi network provided by the router without secret. The user can open the application installed in the mobile phone that can be used to control the router, such as the application of the router, or the smart home application, etc., and use the scan function of the application to scan the QR code of the desk lamp (the QR code contains The MAC address of the lamp), the mobile phone can obtain the MAC address of the lamp. Alternatively, the user can use the application to manually enter the MAC address of the lamp, and the mobile phone can obtain the MAC address of the lamp. Later, when the mobile phone is connected to the Wi-Fi network provided by the router, the mobile phone can send the MAC address of the lamp to the router. After the router receives the MAC address of the lamp, it can save the MAC address of the lamp in the whitelist. In this way, combined with the example in S201, after the desk lamp broadcasts the probe request frame on the channel that can be used for Wi-Fi transmission, the router receives the probe request frame of the desk lamp. The router can determine that the MAC address of the lamp is included in the whitelist. At this time, the router sends a probe response frame containing Wi-Fi configuration information to the lamp.
上述白名单中的标识也可以是AP自动加入的。如,以AP是路由器为例。一般的,对于成功接入过该路由器提供的Wi-Fi网络的电子设备,路由器可以保存其MAC地址。在该路由器所提供的Wi-Fi网络的Wi-Fi配置信息发生变更,如用户修改了Wi-Fi网络的SSID,或修改了接入密码的情况下,通常是需要用户重新手动输入密码才能再次成功接入该路由器提供的Wi-Fi网络的。在本实施例中,路由器可以将在Wi-Fi配置信息发生变更之前,成功接入过该路由器的电子设备的MAC地址自动加入白名单中。也就是说,该白名单中包括Wi-Fi配置信息发生变更之前,成功接入过该路由器的电子设备的MAC地址。结合S201中的示例,以Wi-Fi配置信息发生变更之前,成功接入过该路由器的电子设备包括S201示例中所述的手机为例。路由器将该手机的MAC地址加入白名单中。这样,在Wi-Fi配置信息发生变更后,路由器在接收到该手机在Wi-Fi传输可使用的信道上广播probe request帧后,可确定出该手机的MAC地址包含在白名单中。此时,路由器可向该手机发送包含Wi-Fi配置信息的probe response帧。The identifiers in the above whitelist may also be automatically added by the AP. For example, take the AP as a router as an example. Generally, for an electronic device that has successfully accessed the Wi-Fi network provided by the router, the router can save its MAC address. When the Wi-Fi configuration information of the Wi-Fi network provided by the router is changed, for example, the user changes the SSID of the Wi-Fi network, or changes the access password, usually the user is required to manually re-enter the password before it can be used again. Successfully connected to the Wi-Fi network provided by the router. In this embodiment, the router can automatically add the MAC addresses of electronic devices that have successfully accessed the router into the whitelist before the Wi-Fi configuration information is changed. That is, the whitelist includes the MAC addresses of electronic devices that have successfully accessed the router before the Wi-Fi configuration information is changed. With reference to the example in S201, take the electronic device successfully connected to the router including the mobile phone described in the S201 example before the Wi-Fi configuration information is changed as an example. The router adds the MAC address of the mobile phone to the whitelist. In this way, after the Wi-Fi configuration information is changed, the router can determine that the MAC address of the mobile phone is included in the whitelist after receiving the probe request frame broadcast on the channel available for Wi-Fi transmission by the mobile phone. At this time, the router can send a probe response frame containing Wi-Fi configuration information to the mobile phone.
以免密接入规则包括位于AP一定距离范围内的电子设备允许免密接入为例。具体的:AP在接收到来自电子设备的probe request帧后,可以判断该电子设备与AP之间的距离是否小于或等于预设距离。如果该电子设备与AP之间的距离小于或等于预设距离,则可将接入Wi-Fi网络所需的Wi-Fi配置信息携带在probe response帧中发送给该电子设备。如果该电子设备与AP之间的距离大于预设距离,则发送未携带Wi-Fi配置信息的probe response帧。Take the secret-free access rule including that electronic devices located within a certain distance of the AP allow secret-free access as an example. Specifically: after the AP receives the probe request frame from the electronic device, it can determine whether the distance between the electronic device and the AP is less than or equal to the preset distance. If the distance between the electronic device and the AP is less than or equal to the preset distance, the Wi-Fi configuration information required to access the Wi-Fi network can be carried in a probe response frame and sent to the electronic device. If the distance between the electronic device and the AP is greater than the preset distance, a probe response frame that does not carry Wi-Fi configuration information is sent.
其中,AP可根据电子设备发送的probe request帧的信号强度确定电子设备与AP之间的距离是否小于或等于预设距离。如,AP在确定电子设备发送的probe request帧的信号强度大于预设强度时,确定该电子设备与AP之间的距离小于或等于预设距离,即确定电子设备位于AP的一定距离范围内。AP在确定电子设备发送的probe request帧的信号强度小于预设强度时,确定该电子设备与AP之间的距离大于预设距离,即确定电子设备并未位于AP的一定距离范围内。The AP can determine whether the distance between the electronic device and the AP is less than or equal to the preset distance according to the signal strength of the probe request frame sent by the electronic device. For example, when the AP determines that the signal strength of the probe request frame sent by the electronic device is greater than the preset strength, it determines that the distance between the electronic device and the AP is less than or equal to the preset distance, that is, determines that the electronic device is located within a certain distance of the AP. When the AP determines that the signal strength of the probe request frame sent by the electronic device is less than the preset strength, it determines that the distance between the electronic device and the AP is greater than the preset distance, that is, it determines that the electronic device is not located within a certain distance range of the AP.
以免密接入规则包括在特定时间段内允许电子设备免密接入为例。其中,该特定 时间段可以是预定义的,如每天的某一时间段(如下午六点到下午七点)。以该特定时间段为下午六点到下午七点为例。AP在接收到来自电子设备的probe request帧后,可以判断接收到probe request帧的时刻是否包含在该特定时间段内,即是否是在下午六点到下午七点接收到的probe request帧。如果是在下午六点到下午七点接收到的probe request帧,则可将接入Wi-Fi网络所需的Wi-Fi配置信息携带在probe response帧中发送给该电子设备。如果不是在下午六点到下午七点接收到的probe request帧,则发送未携带Wi-Fi配置信息的probe response帧。Take the secret-free access rule including allowing the secret-free access of electronic devices within a certain period of time as an example. Among them, the specific time period can be predefined, such as a certain time period every day (such as 6 pm to 7 pm). Take the specific time period from 6 pm to 7 pm as an example. After receiving the probe request frame from the electronic device, the AP can determine whether the time when the probe request frame is received is included in the specific time period, that is, whether it is a probe request frame received between 6 pm and 7 pm. If the probe request frame is received between 6 pm and 7 pm, the Wi-Fi configuration information required to access the Wi-Fi network can be carried in the probe response frame and sent to the electronic device. If it is not the probe request frame received between 6 pm and 7 pm, the probe response frame without Wi-Fi configuration information is sent.
该特定时间段也可以是由用户触发开始计时,且时长等于预设时长的时间段。如AP中设置有按键,用于触发允许设备免密接入,AP在接收到用户对该按键的操作后开始计时,在预设时长内允许设备免密接入。也就是说,AP在接收到用户对该按键的操作后的预设时长内,如果接收到来自电子设备的probe request帧,则向该电子设备发送携带Wi-Fi配置信息的probe response帧。或者,用户可以在AP的管理界面中设置免密接入的时间段,或者,触发允许设备免密接入并开始计时。The specific time period may also be a time period triggered by the user to start timing, and the duration is equal to the preset duration. If there is a button in the AP, it is used to trigger the device's secret-free access. The AP starts timing after receiving the user's operation on the button, and allows the device to gain secret-free access within a preset period of time. That is to say, if the AP receives the probe request frame from the electronic device within the preset time period after receiving the user's operation on the button, it sends the probe response frame carrying the Wi-Fi configuration information to the electronic device. Alternatively, the user can set the time period for secret-free access in the management interface of the AP, or trigger the device to allow secret-free access and start timing.
以上是以AP侧设置的免密接入规则包含一个规则为例进行说明的。在其他一些实施例中,当AP侧设置的免密接入规则包括上述规则中的多种规则时,AP可在确定满足其中一个规则或在确定同时满足这多种规则时,向电子设备发送携带Wi-Fi配置信息的probe response帧。例如,以AP侧设置的免密接入规则包括:位于AP一定距离范围内的电子设备允许免密接入,及在特定时间段内允许电子设备免密接入为例。在一些实施例,AP在接收到来自电子设备的probe request帧后,可以在确定该电子设备与AP之间的距离小于或等于预设距离,或者,在确定接收到probe request帧的时刻包含在特定时间段内时,向该电子设备发送携带Wi-Fi配置信息的probe response帧。在其他一些实施例中,AP在接收到来自电子设备的probe request帧后,可以在确定该电子设备与AP之间的距离小于或等于预设距离,且在确定接收到probe request帧的时刻包含在特定时间段内时,向该电子设备发送携带Wi-Fi配置信息的probe response帧。如果确定出电子设备与AP之间的距离小于或等于预设距离,但接收到probe request帧的时刻未包含在特定时间段内,或者确定出接收到probe request帧的时刻包含在特定时间段内,但电子设备与AP之间的距离大于预设距离,则向该电子设备发送未携带Wi-Fi配置信息的probe response帧。The above description is based on an example in which the secret-free access rule set on the AP side includes a rule. In some other embodiments, when the secret-free access rules set on the AP side include multiple rules in the foregoing rules, the AP may send a portable packet to the electronic device when it determines that one of the rules is satisfied or when it is determined that these multiple rules are satisfied at the same time. Probe response frame of Wi-Fi configuration information. For example, the secret-free access rules set on the AP side include: electronic devices located within a certain distance of the AP allow secret-free access, and allow electronic devices to be secret-free access within a specific time period as an example. In some embodiments, after the AP receives the probe request frame from the electronic device, it may be included when determining that the distance between the electronic device and the AP is less than or equal to a preset distance, or when determining that the probe request frame is received Within a specific time period, send a probe response frame carrying Wi-Fi configuration information to the electronic device. In some other embodiments, after the AP receives the probe request frame from the electronic device, it may determine that the distance between the electronic device and the AP is less than or equal to the preset distance, and when it determines that the probe request frame is received, it includes In a specific time period, a probe response frame carrying Wi-Fi configuration information is sent to the electronic device. If it is determined that the distance between the electronic device and the AP is less than or equal to the preset distance, but the time when the probe request frame is received is not included in the specific time period, or it is determined that the time when the probe request frame is received is included in the specific time period , But the distance between the electronic device and the AP is greater than the preset distance, a probe response frame that does not carry Wi-Fi configuration information is sent to the electronic device.
在本申请实施例中,示例性的,可在probe response帧中扩展新的字段来携带Wi-Fi配置信息。如,可在probe response帧的保留字段中扩展新的字段来携带Wi-Fi配置信息。其中,probe response帧中携带Wi-Fi配置信息的字段可以是预先定义的。In the embodiment of the present application, as an example, a new field can be extended in the probe response frame to carry Wi-Fi configuration information. For example, a new field can be extended in the reserved field of the probe response frame to carry Wi-Fi configuration information. Among them, the field carrying Wi-Fi configuration information in the probe response frame may be predefined.
例如,请参考图5,其示出了本申请提供的一种Wi-Fi帧的帧结构实例示意图。如图5所示,Wi-Fi帧500中可以包括:帧头(即MAC头)501、帧实体(frame body)502和帧校验(frame check sequence,FCS)域503。其中,上述MAC头501即为媒体访问控制(media access control,MAC)header。For example, please refer to FIG. 5, which shows a schematic diagram of an example of the frame structure of a Wi-Fi frame provided by the present application. As shown in FIG. 5, the Wi-Fi frame 500 may include: a frame header (ie, a MAC header) 501, a frame body (frame body) 502, and a frame check sequence (FCS) field 503. Wherein, the above-mentioned MAC header 501 is a media access control (media access control, MAC) header.
其中,如图5所示,上述MAC头501可以包括帧控制域(frame control)5011、持续时间/标识(duration/ID)5012、地址域(address)5013和序列控制域(sequence Control)5014等。Wherein, as shown in FIG. 5, the aforementioned MAC header 501 may include a frame control field (frame control) 5011, a duration/identification (duration/ID) 5012, an address field (address) 5013, a sequence control field (sequence control) 5014, etc. .
帧控制域5011中可以包括协议版本域(protocol version)501a和类型域501b 等。协议版本域501a用于指示Wi-Fi帧500所遵循的协议版本,该协议版本通常为0。类型域501b可以包括Type和Subtype。Type用于指示对应帧为管理帧、数据帧或者控制帧。Subtype用于指示帧的子类型。例如,当Type=00时,可以指示对应帧为管理帧。此时,Subtype可以指示该管理帧是Beacon帧、probe request帧或者probe response帧等管理帧中的哪一种帧。例如,当Type=00,Subtype=0100时,图5所示的Wi-Fi帧500是probe request帧;当Type=00,Subtype=0101时,图5所示的Wi-Fi帧500是probe response帧。地址域5013中可以包括源地址、目的地址、传输工作站地址、接收工作站地址等地址信息。The frame control field 5011 may include a protocol version field (protocol version) 501a, a type field 501b, and so on. The protocol version field 501a is used to indicate the protocol version followed by the Wi-Fi frame 500, and the protocol version is usually 0. The type field 501b may include Type and Subtype. Type is used to indicate whether the corresponding frame is a management frame, a data frame, or a control frame. Subtype is used to indicate the subtype of the frame. For example, when Type=00, it can indicate that the corresponding frame is a management frame. At this time, the Subtype can indicate which of the management frames is a Beacon frame, a probe request frame, or a probe response frame. For example, when Type = 00 and Subtype = 0100, the Wi-Fi frame 500 shown in Figure 5 is a probe request frame; when Type = 00 and Subtype = 0101, the Wi-Fi frame 500 shown in Figure 5 is a probe response frame. The address field 5013 may include address information such as a source address, a destination address, a transmitting workstation address, and a receiving workstation address.
如图5所示,帧实体502包括SSID字段5021、支持速率(supported Rates)5022和扩展支持速率(extended supported rates)5023及保留字段5024等。其中,支持速率5022和扩展支持速率5023用于指示电子设备或者AP所支持的速率集合。As shown in FIG. 5, the frame entity 502 includes an SSID field 5021, a supported rate (supported Rates) 5022, an extended supported rate (extended supported rates) 5023, a reserved field 5024, and so on. Among them, the supported rate 5022 and the extended supported rate 5023 are used to indicate the set of rates supported by the electronic device or AP.
在本实施例中,当图5所示的Wi-Fi帧500是probe response帧时,即类型域501b中的Type和Subtype指示Wi-Fi帧500是probe response帧时,上述帧实体502可携带AP所提供Wi-Fi网络的Wi-Fi配置信息。如,帧实体502的保留字段5024中可用于携带Wi-Fi配置信息。In this embodiment, when the Wi-Fi frame 500 shown in FIG. 5 is a probe response frame, that is, when the Type and Subtype in the type field 501b indicate that the Wi-Fi frame 500 is a probe response frame, the frame entity 502 can carry The Wi-Fi configuration information of the Wi-Fi network provided by the AP. For example, the reserved field 5024 of the frame entity 502 can be used to carry Wi-Fi configuration information.
其中,probe response帧中携带的Wi-Fi配置信息的具体组成及对应描述如表1所示。Among them, the specific composition and corresponding description of the Wi-Fi configuration information carried in the probe response frame are shown in Table 1.
表1Table 1
Figure PCTCN2020113063-appb-000001
Figure PCTCN2020113063-appb-000001
如表1所示,probe response帧中用于指示Wi-Fi配置信息的字段包括三部分,分别为:类型(type),长度(length)和值(value)。其中,类型(type)的内容可以为0x51,用于指示该字段的属性类型,即用于指示该字段是Wi-Fi配置信息。类型的长度可以为1个字节。当然,类型也可以是其他内容,具体内容可以是预定义的,也可以是电子设备和AP之间协商的。长度(length)的内容可以是0x08,用于指示value的长度。类型的长度可以为1个字节。长度的内容是由value的长度来决定的,并不局限于0x08,也可以是其他内容。值(value)的内容具体的由AP所提供Wi-Fi网络的Wi-Fi配置信息决定。As shown in Table 1, the field used to indicate Wi-Fi configuration information in the probe response frame includes three parts: type, length, and value. The content of the type (type) may be 0x51, which is used to indicate the attribute type of the field, that is, it is used to indicate that the field is Wi-Fi configuration information. The length of the type can be 1 byte. Of course, the type can also be other content, and the specific content can be predefined or negotiated between the electronic device and the AP. The content of length can be 0x08, which is used to indicate the length of value. The length of the type can be 1 byte. The content of the length is determined by the length of the value, and is not limited to 0x08, and can also be other content. The content of the value is specifically determined by the Wi-Fi configuration information of the Wi-Fi network provided by the AP.
需要说明的是,在本申请一些实施例中,AP在probe response帧中携带的Wi-Fi配置信息可以是加密的。用于加密Wi-Fi配置信息的加密密钥可以预先配置在AP和电子设备中。不同电子设备的加密密钥可以相同,也可以不同,本申请实施例在此不做具体限制。It should be noted that, in some embodiments of the present application, the Wi-Fi configuration information carried in the probe response frame of the AP may be encrypted. The encryption key used to encrypt the Wi-Fi configuration information can be pre-configured in the AP and the electronic device. The encryption keys of different electronic devices may be the same or different, and the embodiment of the present application does not make specific restrictions here.
S204、电子设备接收来自AP的probe response帧,probe response帧中携带的Wi-Fi配置信息用于电子设备接入AP所提供的Wi-Fi网络。S204. The electronic device receives a probe response frame from the AP, and the Wi-Fi configuration information carried in the probe response frame is used for the electronic device to access the Wi-Fi network provided by the AP.
其中,电子设备在接收到来自AP的probe response帧后,对该probe response帧进行解析。如果电子设备确定该probe response帧中包含有用于携带Wi-Fi配置信 息的字段,则表明该AP在引导自身接入。Wherein, after receiving the probe response frame from the AP, the electronic device parses the probe response frame. If the electronic device determines that the probe response frame contains a field for carrying Wi-Fi configuration information, it indicates that the AP is guiding itself to access.
在一些实施例中,在电子设备当前未接入其他Wi-Fi网络的情况下,电子设备可向AP发送连接请求,该连接请求中包括该Wi-Fi配置信息。AP接收到连接请求后,对连接请求中的Wi-Fi配置信息进行鉴权。在鉴权通过后,同意电子设备接入,此时电子设备接入该AP提供的Wi-Fi网络。例如,结合上述S201和S203中的示例,台灯可接收到来自AP的携带Wi-Fi配置信息的probe response帧中,台灯此时可向AP发送包含该Wi-Fi配置信息的连接请求。AP对接收到的连接请求中的Wi-Fi配置信息进行鉴权通过后,同意台灯接入,此时台灯可成功接入该AP提供的Wi-Fi网络。In some embodiments, when the electronic device is not currently connected to another Wi-Fi network, the electronic device may send a connection request to the AP, and the connection request includes the Wi-Fi configuration information. After receiving the connection request, the AP authenticates the Wi-Fi configuration information in the connection request. After the authentication is passed, the electronic device is allowed to access. At this time, the electronic device accesses the Wi-Fi network provided by the AP. For example, combining the examples in S201 and S203 above, the desk lamp can receive the probe response frame carrying Wi-Fi configuration information from the AP, and the desk lamp can send a connection request containing the Wi-Fi configuration information to the AP at this time. After the AP authenticates the Wi-Fi configuration information in the received connection request, it agrees to access the desk lamp. At this time, the desk lamp can successfully access the Wi-Fi network provided by the AP.
在其他一些实施例中,在电子设备当前已接入了其他Wi-Fi网络的情况下,电子设备可断开与该Wi-Fi网络的连接,然后向AP发送携带该Wi-Fi配置信息的连接请求,以便接入该AP提供的Wi-Fi网络。或者,如果电子设备是具有显示屏的电子设备(如手机),如图6所示,电子设备可显示提示信息601,用于提示用户当前有AP引导接入,并询问用户是否同意接入。如果用户同意接入,则电子设备可断开与当前Wi-Fi网络的连接,然后向AP发送携带该Wi-Fi配置信息的连接请求,以便接入该AP提供的Wi-Fi网络。如果用户不同意接入,则电子设备可将该Wi-Fi配置信息保存。之后在用户选择接入该Wi-Fi网络时,电子设备可利用保存的该Wi-Fi配置信息接入该AP提供的Wi-Fi网络,而无需用户手动输入接入密码。In some other embodiments, when the electronic device is currently connected to another Wi-Fi network, the electronic device can disconnect from the Wi-Fi network, and then send the Wi-Fi configuration information to the AP. Connection request in order to access the Wi-Fi network provided by the AP. Or, if the electronic device is an electronic device with a display screen (such as a mobile phone), as shown in FIG. 6, the electronic device may display prompt information 601 for prompting the user that there is currently an AP to guide access, and asking the user whether to agree to access. If the user agrees to access, the electronic device can disconnect from the current Wi-Fi network, and then send a connection request carrying the Wi-Fi configuration information to the AP, so as to access the Wi-Fi network provided by the AP. If the user does not agree to access, the electronic device can save the Wi-Fi configuration information. Later, when the user chooses to access the Wi-Fi network, the electronic device can use the stored Wi-Fi configuration information to access the Wi-Fi network provided by the AP without the user having to manually enter the access password.
需要说明的是,如果probe response帧中的Wi-Fi配置信息是加密的,电子设备在确定probe response帧中包含有用于携带Wi-Fi配置信息的字段后,可利用预置的加密密钥对该字段进行解析,以获得Wi-Fi配置信息。It should be noted that if the Wi-Fi configuration information in the probe response frame is encrypted, the electronic device can use the preset encryption key pair after determining that the probe response frame contains a field for carrying Wi-Fi configuration information This field is parsed to obtain Wi-Fi configuration information.
本申请实施例提供的Wi-Fi连接方法,在电子设备的Wi-Fi功能开启后,电子设备可广播probe request帧,以扫描周围可用的AP。AP监测到该probe request帧后,可向电子设备回复携带该AP所提供Wi-Fi网络的Wi-Fi配置信息的probe response帧。电子设备根据probe response帧中的Wi-Fi配置信息便可接入该AP提供的Wi-Fi网络。这样,无需用户手动输入接入密码,且只需接收到一个probe response帧便可获得接入Wi-Fi网络所需的Wi-Fi配置信息,以完成接入,提高了电子设备接入Wi-Fi网络的速度。无需用户进行多次操作,提高了用户的操作体验。In the Wi-Fi connection method provided by the embodiment of the present application, after the Wi-Fi function of the electronic device is turned on, the electronic device can broadcast a probe request frame to scan for available APs around it. After the AP detects the probe request frame, it can reply to the electronic device a probe response frame carrying Wi-Fi configuration information of the Wi-Fi network provided by the AP. The electronic device can access the Wi-Fi network provided by the AP according to the Wi-Fi configuration information in the probe response frame. In this way, the user does not need to manually enter the access password, and only needs to receive a probe response frame to obtain the Wi-Fi configuration information required to access the Wi-Fi network to complete the access, which improves the access of the electronic device to the Wi-Fi network. The speed of the Fi network. There is no need for the user to perform multiple operations, which improves the user's operating experience.
另外,AP在接收到电子设备的probe request帧后,可以在确定满足设定的免密接入规则后,向电子设备回复携带Wi-Fi配置信息的probe response帧,可确保免密接入的安全性。通过在probe response帧中携带Wi-Fi配置信息也可以使得AP处于接入的主导地位,引导设备自动免密接入,提高了易用性。对于智能家居设备来说,可通过将该智能家居设备的MAC地址加入免密接入的白名单中,使得用户仅通过一次操作,实现Wi-Fi永远在线,提高了用户的使用体验。In addition, after receiving the probe request frame of the electronic device, the AP can reply the probe response frame carrying Wi-Fi configuration information to the electronic device after determining that the set secret-free access rules are satisfied, which can ensure the security of secret-free access . By carrying Wi-Fi configuration information in the probe response frame, the AP can also be in a dominant position in access, and the device can be guided to automatically access without secret, which improves the ease of use. For smart home devices, the MAC address of the smart home device can be added to the whitelist for secret-free access, so that the user can achieve Wi-Fi always online through only one operation, which improves the user experience.
本申请另一实施例还提供一种电子设备,该电子设备可以包括:处理器、存储器和通信接口,存储器和通信接口与处理器耦合,通信接口用于与其他设备通信,其他设备包括AP,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当处理器执行计算机指令时,电子设备执行如图2所示实施例中电子设备执行的各个步骤。Another embodiment of the present application further provides an electronic device. The electronic device may include a processor, a memory, and a communication interface. The memory and the communication interface are coupled to the processor. The communication interface is used to communicate with other devices, and the other devices include APs. The memory is used to store computer program codes. The computer program codes include computer instructions. When the processor executes the computer instructions, the electronic device executes each step performed by the electronic device in the embodiment shown in FIG. 2.
本申请另一些实施例还提供一种计算机存储介质,该计算机存储介质可包括计算 机指令,当该计算机指令在电子设备上运行时,使得该电子设备执行如图2所示实施例中电子设备执行的各个步骤。Other embodiments of the present application also provide a computer storage medium. The computer storage medium may include computer instructions. When the computer instructions run on an electronic device, the electronic device executes the execution of the electronic device in the embodiment shown in FIG. 2 The various steps.
本申请另一些实施例还提供一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得该计算机执行如图2所示实施例中电子设备执行的各个步骤。Other embodiments of the present application also provide a computer program product, which when the computer program product runs on a computer, causes the computer to execute each step performed by the electronic device in the embodiment shown in FIG. 2.
本申请另一些实施例还提供一种装置,该装置具有实现上述图2相应实施例中电子设备行为的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块,例如,发送单元或模块,接收单元或模块,连接单元或模块等。Other embodiments of the present application also provide a device that has the function of realizing the behavior of the electronic device in the corresponding embodiment in FIG. 2 above. The function can be realized by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, for example, a sending unit or module, a receiving unit or module, a connecting unit or module, and so on.
本申请另一实施例还提供一种AP,该AP可以包括:处理器和存储器,存储器与处理器耦合,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当处理器执行计算机指令时,AP执行如图2所示实施例中AP执行的各个步骤。Another embodiment of the present application further provides an AP. The AP may include a processor and a memory, the memory is coupled to the processor, and the memory is used to store computer program codes. The computer program codes include computer instructions. When the processor executes the computer instructions , The AP executes the steps performed by the AP in the embodiment shown in FIG. 2.
本申请另一些实施例还提供一种计算机存储介质,该计算机存储介质可包括计算机指令,当该计算机指令在AP上运行时,使得该AP执行如图2所示实施例中AP执行的各个步骤。Other embodiments of the present application also provide a computer storage medium. The computer storage medium may include computer instructions. When the computer instructions run on the AP, the AP executes the steps performed by the AP in the embodiment shown in FIG. 2 .
本申请另一些实施例还提供一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得该计算机执行如图2所示实施例中AP执行的各个步骤。Other embodiments of the present application also provide a computer program product, which when the computer program product runs on a computer, causes the computer to execute each step executed by the AP in the embodiment shown in FIG. 2.
本申请另一些实施例还提供一种装置,该装置具有实现上述图2相应实施例中AP行为的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块,例如,发送单元或模块,接收单元或模块,加密单元或模块等。Other embodiments of the present application also provide a device that has the function of realizing the AP behavior in the corresponding embodiment in FIG. 2 above. The function can be realized by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, for example, a sending unit or module, a receiving unit or module, an encryption unit or module, and so on.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be allocated according to needs. It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components may be divided. It can be combined or integrated into another device, or some features can be omitted or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate parts may or may not be physically separate. The parts displayed as units may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed to multiple different places. . Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质 上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application are essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of a software product, and the software product is stored in a storage medium. It includes several instructions to make a device (may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any changes or substitutions within the technical scope disclosed in this application shall be covered by the protection scope of this application. . Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (18)

  1. 一种无线保真Wi-Fi连接方法,其特征在于,所述方法包括:A wireless fidelity Wi-Fi connection method, characterized in that the method includes:
    电子设备发送探测请求probe request帧;The electronic device sends a probe request frame;
    所述电子设备接收来自接入点AP的探测响应probe response帧,所述probe response帧中携带所述AP所提供Wi-Fi网络的Wi-Fi配置信息,用于所述电子设备接入所述AP所提供的Wi-Fi网络;The electronic device receives a probe response frame from the access point AP, where the probe response frame carries Wi-Fi configuration information of the Wi-Fi network provided by the AP, and is used by the electronic device to access the Wi-Fi network provided by AP;
    所述电子设备根据所述probe response帧中携带的Wi-Fi配置信息,接入所述AP所提供的Wi-Fi网络。The electronic device accesses the Wi-Fi network provided by the AP according to the Wi-Fi configuration information carried in the probe response frame.
  2. 根据权利要求1所述的方法,其特征在于,在所述电子设备接收来自接入点AP的探测响应probe response帧之后,接入所述AP所提供的Wi-Fi网络之前,所述方法还包括:The method according to claim 1, wherein after the electronic device receives the probe response frame from the access point AP and before accessing the Wi-Fi network provided by the AP, the method further include:
    所述电子设备对所述probe response帧进行解析,在确定所述probe response帧包含携带所述Wi-Fi配置信息的字段时,根据预置的加密密钥对所述字段进行解密,以获得所述Wi-Fi配置信息。The electronic device parses the probe response frame, and when it is determined that the probe response frame contains a field carrying the Wi-Fi configuration information, decrypts the field according to a preset encryption key to obtain the Describe Wi-Fi configuration information.
  3. 根据权利要求1或2所述的方法,其特征在于,所述Wi-Fi配置信息包括:所述AP所提供Wi-Fi网络的服务集标识符SSID和接入密码。The method according to claim 1 or 2, wherein the Wi-Fi configuration information comprises: a service set identifier SSID and an access password of the Wi-Fi network provided by the AP.
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述probe response帧包括:媒体访问控制MAC头,帧实体和帧校验FCS域;The method according to any one of claims 1-3, wherein the probe response frame comprises: a media access control MAC header, a frame entity and a frame check FCS field;
    所述Wi-Fi配置信息包含在所述帧实体的保留字段中。The Wi-Fi configuration information is contained in a reserved field of the frame entity.
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,在所述电子设备发送探测请求probe request帧之前,所述方法还包括:The method according to any one of claims 1-4, wherein before the electronic device sends a probe request frame, the method further comprises:
    所述电子设备接收用户开启所述电子设备的Wi-Fi功能的操作。The electronic device receives the user's operation of turning on the Wi-Fi function of the electronic device.
  6. 一种无线保真Wi-Fi连接方法,其特征在于,所述方法包括:A wireless fidelity Wi-Fi connection method, characterized in that the method includes:
    接入点AP接收来自电子设备的探测请求probe request帧;The access point AP receives the probe request frame from the electronic device;
    所述AP向所述电子设备发送探测响应probe response帧,所述probe response帧中携带所述AP所提供Wi-Fi网络的Wi-Fi配置信息,用于所述电子设备接入所述AP所提供的Wi-Fi网络。The AP sends a probe response frame to the electronic device, and the probe response frame carries Wi-Fi configuration information of the Wi-Fi network provided by the AP for the electronic device to access the AP Wi-Fi network provided.
  7. 根据权利要求6所述的方法,其特征在于,所述AP向所述电子设备发送探测响应probe response帧,包括:The method according to claim 6, wherein the AP sending a probe response frame to the electronic device comprises:
    在确定满足免密接入规则时,所述AP向所述电子设备发送携带所述Wi-Fi配置信息的所述probe response帧;When it is determined that the secret-free access rule is satisfied, the AP sends the probe response frame carrying the Wi-Fi configuration information to the electronic device;
    其中,满足免密接入规则包括以下一种或多种情况:Among them, satisfying the secret-free access rule includes one or more of the following situations:
    所述电子设备的标识包含在白名单中;The identification of the electronic device is included in the white list;
    所述电子设备与所述AP之间的距离小于或等于预设距离;或者The distance between the electronic device and the AP is less than or equal to a preset distance; or
    所述电子设备的所述probe request帧是所述AP在特定时间段内接收到的。The probe request frame of the electronic device is received by the AP within a specific time period.
  8. 根据权利要求7所述的方法,其特征在于,所述白名单中包括第一标识和第二标识中的至少一个;The method according to claim 7, wherein the whitelist includes at least one of a first identification and a second identification;
    所述第一标识为:在所述AP所提供的Wi-Fi网络的Wi-Fi配置信息变更之前,成功接入过所述AP所提供的Wi-Fi网络的设备的标识;The first identifier is: an identifier of a device that has successfully accessed the Wi-Fi network provided by the AP before the Wi-Fi configuration information of the Wi-Fi network provided by the AP is changed;
    所述第二标识是所述AP从第一设备接收到的,所述第一设备具有对所述AP的管理权限。The second identifier is received by the AP from the first device, and the first device has management authority for the AP.
  9. 根据权利要求6-8中任一项所述的方法,其特征在于,在所述AP向所述电子设备发送探测响应probe response帧之前,所述方法还包括:The method according to any one of claims 6-8, wherein before the AP sends a probe response frame to the electronic device, the method further comprises:
    所述AP根据预置的加密密钥对所述Wi-Fi配置信息进行加密。The AP encrypts the Wi-Fi configuration information according to a preset encryption key.
  10. 根据权利要求6-9中任一项所述的方法,其特征在于,所述Wi-Fi配置信息包括:所述AP所提供Wi-Fi网络的服务集标识符SSID和接入密码。The method according to any one of claims 6-9, wherein the Wi-Fi configuration information comprises: a service set identifier SSID and an access password of the Wi-Fi network provided by the AP.
  11. 根据权利要求6-10中任一项所述的方法,其特征在于,所述probe response帧包括:媒体访问控制MAC头,帧实体和帧校验FCS域;The method according to any one of claims 6-10, wherein the probe response frame comprises: a media access control MAC header, a frame entity and a frame check FCS field;
    所述Wi-Fi配置信息包含在所述帧实体的保留字段中。The Wi-Fi configuration information is contained in a reserved field of the frame entity.
  12. 一种电子设备,其特征在于,所述电子设备包括:处理器、存储器和通信接口,所述存储器和所述通信接口与所述处理器耦合,所述通信接口用于与其他设备通信,所述其他设备包括接入点AP,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述处理器执行所述计算机指令时,所述电子设备执行如下操作:An electronic device, characterized in that the electronic device includes a processor, a memory, and a communication interface, the memory and the communication interface are coupled with the processor, and the communication interface is used to communicate with other devices. The other device includes an access point AP, the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor executes the computer instructions, the electronic device performs the following operations:
    发送探测请求probe request帧;Send probe request frame;
    接收来自所述AP的探测响应probe response帧,所述probe response帧中携带所述AP所提供无线保真Wi-Fi网络的Wi-Fi配置信息,用于所述电子设备接入所述AP所提供的Wi-Fi网络;Receive a probe response frame from the AP, where the probe response frame carries Wi-Fi configuration information of the wireless fidelity Wi-Fi network provided by the AP, and is used by the electronic device to access the AP Wi-Fi network provided;
    根据所述probe response帧中携带的Wi-Fi配置信息,接入所述AP所提供的Wi-Fi网络。Access the Wi-Fi network provided by the AP according to the Wi-Fi configuration information carried in the probe response frame.
  13. 根据权利要求12所述的电子设备,其特征在于,当所述处理器执行所述计算机指令时,所述电子设备还执行如下操作:The electronic device according to claim 12, wherein when the processor executes the computer instruction, the electronic device further performs the following operations:
    对所述probe response帧进行解析,在确定所述probe response帧包含携带所述Wi-Fi配置信息的字段时,根据预置的加密密钥对所述字段进行解密,以获得所述Wi-Fi配置信息。Analyze the probe response frame, and when it is determined that the probe response frame contains a field carrying the Wi-Fi configuration information, decrypt the field according to a preset encryption key to obtain the Wi-Fi Configuration information.
  14. 根据权利要求12或13所述的电子设备,其特征在于,所述Wi-Fi配置信息包括:所述AP所提供Wi-Fi网络的服务集标识符SSID和接入密码。The electronic device according to claim 12 or 13, wherein the Wi-Fi configuration information comprises: a service set identifier SSID and an access password of the Wi-Fi network provided by the AP.
  15. 根据权利要求12-14中任一项所述的电子设备,其特征在于,所述probe response帧包括:媒体访问控制MAC头,帧实体和帧校验FCS域;The electronic device according to any one of claims 12-14, wherein the probe response frame comprises: a media access control MAC header, a frame entity and a frame check FCS field;
    所述Wi-Fi配置信息包含在所述帧实体的保留字段中。The Wi-Fi configuration information is contained in a reserved field of the frame entity.
  16. 根据权利要求12-15中任一项所述的电子设备,其特征在于,当所述处理器执行所述计算机指令时,所述电子设备还执行如下操作:The electronic device according to any one of claims 12-15, wherein when the processor executes the computer instruction, the electronic device further performs the following operations:
    接收用户开启所述电子设备的Wi-Fi功能的操作。An operation of the user to turn on the Wi-Fi function of the electronic device is received.
  17. 一种接入点设备,包括:处理器、存储器和通信接口;所述存储器和所述通信接口与所述处理器耦合;所述处理器能够通过所述通信接口提供Wi-Fi网络;所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令;当所述处理器执行所述计算机指令时,所述接入点设备执行如权利要求6-11任一项所述的方法。An access point device includes: a processor, a memory, and a communication interface; the memory and the communication interface are coupled with the processor; the processor can provide a Wi-Fi network through the communication interface; the The memory is used to store computer program code, and the computer program code includes computer instructions; when the processor executes the computer instructions, the access point device executes the method according to any one of claims 6-11.
  18. 一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指 令在电子设备上运行时,使得所述电子设备执行如权利要求1-11中任一项所述的方法。A computer-readable storage medium, characterized by comprising computer instructions, which when the computer instructions run on an electronic device, causes the electronic device to execute the method according to any one of claims 1-11.
PCT/CN2020/113063 2019-09-16 2020-09-02 Wi-fi connection method and device WO2021052178A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201910872247 2019-09-16
CN201910872247.5 2019-09-16
CN201911205382.0 2019-11-29
CN201911205382.0A CN111132137A (en) 2019-09-16 2019-11-29 Wi-Fi connection method and device

Publications (1)

Publication Number Publication Date
WO2021052178A1 true WO2021052178A1 (en) 2021-03-25

Family

ID=70496405

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/113063 WO2021052178A1 (en) 2019-09-16 2020-09-02 Wi-fi connection method and device

Country Status (2)

Country Link
CN (1) CN111132137A (en)
WO (1) WO2021052178A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116471707A (en) * 2023-02-21 2023-07-21 荣耀终端有限公司 Method, device and system for connecting router
CN116668583A (en) * 2023-08-02 2023-08-29 荣耀终端有限公司 WiFi connection method, electronic equipment, storage medium and chip

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109151818B (en) * 2018-08-07 2021-08-17 西安易朴通讯技术有限公司 Terminal verification method, AP (access point) equipment, terminal and system
CN111132137A (en) * 2019-09-16 2020-05-08 华为技术有限公司 Wi-Fi connection method and device
CN111885598A (en) * 2020-06-02 2020-11-03 普联国际有限公司 Event sending realization system and method of Wi-Fi equipment
CN111741463B (en) * 2020-07-08 2022-12-13 Oppo广东移动通信有限公司 Communication connection method, related equipment and storage medium
US20220329600A1 (en) * 2020-07-21 2022-10-13 Arris Enterprises Llc Fast access to local area network (lan) graphical user interface (gui) by client device
CN114698057A (en) * 2020-12-31 2022-07-01 奇点新源国际技术开发(北京)有限公司 Wireless network access method and communication system
CN113438102B (en) * 2021-06-04 2022-07-26 荣耀终端有限公司 Network configuration system, network configuration method, electronic device and routing device
CN116744276A (en) * 2022-03-03 2023-09-12 华为技术有限公司 Wi-Fi P2P connection method, device and system
CN116056185B (en) * 2022-05-27 2023-10-27 荣耀终端有限公司 Wi-Fi network connection method, electronic equipment and Wi-Fi network connection system
CN117202228A (en) * 2022-05-31 2023-12-08 华为技术有限公司 Method for repairing WLAN information, main configurator, internet of things equipment and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140112198A1 (en) * 2012-08-24 2014-04-24 Huawei Device Co., Ltd. Method, Related Device, and System for Configuring Wireless Local Area Network Device
CN106571985A (en) * 2016-10-09 2017-04-19 美的智慧家居科技有限公司 Household appliance distribution method and system, household appliance and router
CN107846685A (en) * 2017-11-16 2018-03-27 北京小米移动软件有限公司 The transmission method of configuration information, apparatus and system, storage medium
CN107948974A (en) * 2017-11-29 2018-04-20 江苏省未来网络创新研究院 A kind of WiFi safety certifying methods
CN111132137A (en) * 2019-09-16 2020-05-08 华为技术有限公司 Wi-Fi connection method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140112198A1 (en) * 2012-08-24 2014-04-24 Huawei Device Co., Ltd. Method, Related Device, and System for Configuring Wireless Local Area Network Device
CN106571985A (en) * 2016-10-09 2017-04-19 美的智慧家居科技有限公司 Household appliance distribution method and system, household appliance and router
CN107846685A (en) * 2017-11-16 2018-03-27 北京小米移动软件有限公司 The transmission method of configuration information, apparatus and system, storage medium
CN107948974A (en) * 2017-11-29 2018-04-20 江苏省未来网络创新研究院 A kind of WiFi safety certifying methods
CN111132137A (en) * 2019-09-16 2020-05-08 华为技术有限公司 Wi-Fi connection method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116471707A (en) * 2023-02-21 2023-07-21 荣耀终端有限公司 Method, device and system for connecting router
CN116471707B (en) * 2023-02-21 2024-03-29 荣耀终端有限公司 Method, device and system for connecting router
CN116668583A (en) * 2023-08-02 2023-08-29 荣耀终端有限公司 WiFi connection method, electronic equipment, storage medium and chip
CN116668583B (en) * 2023-08-02 2023-11-14 荣耀终端有限公司 WiFi connection method, electronic equipment, storage medium and chip

Also Published As

Publication number Publication date
CN111132137A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
WO2021052178A1 (en) Wi-fi connection method and device
WO2020224486A1 (en) Calling method, device and system
WO2021027616A1 (en) Terminal device, method and system for realizing one-touch screen projection through remote control
WO2021036835A1 (en) Bluetooth search method and system, and related apparatus
US20230041669A1 (en) Bluetooth connection method, system, and electronic device
WO2020133183A1 (en) Audio data synchronization method and device
CN111373713B (en) Message transmission method and device
WO2021043045A1 (en) Method and device for configuring network configuration information
WO2021043219A1 (en) Bluetooth reconnection method and related apparatus
WO2021175268A1 (en) Method and apparatus for sharing mobile network hotspot, and hotspot sharing device
WO2021043198A1 (en) Bluetooth pairing method, and related device
WO2021000923A1 (en) Router configuration method, terminal, and router
WO2021093855A1 (en) Mobile device management method and device
WO2021147660A1 (en) Data transmission method, and device
WO2021175266A1 (en) Identity verification method and apparatus, and electronic devices
WO2021104448A1 (en) Method for synchronizing key information, system and device
EP4210363A1 (en) Communicational connection establishment method and system, electronic device, and storage medium
WO2021027623A1 (en) Device capability discovery method and p2p device
WO2021043250A1 (en) Bluetooth communication method, and related device
WO2022267974A1 (en) Screen projection method and related apparatus
EP4247030A1 (en) Device network distribution method, and mobile terminal and storage medium
WO2022143156A1 (en) Encrypted call method and apparatus, terminal, and storage medium
WO2022068670A1 (en) Method for touching to establish wireless connection between devices, electronic device, and chip
WO2021227942A1 (en) Information sharing method, electronic devices and system
WO2023025059A1 (en) Communication system and communication method

Legal Events

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

Ref document number: 20866511

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20866511

Country of ref document: EP

Kind code of ref document: A1