CN115499897B - WiFi network access method and related device - Google Patents

WiFi network access method and related device Download PDF

Info

Publication number
CN115499897B
CN115499897B CN202211433095.7A CN202211433095A CN115499897B CN 115499897 B CN115499897 B CN 115499897B CN 202211433095 A CN202211433095 A CN 202211433095A CN 115499897 B CN115499897 B CN 115499897B
Authority
CN
China
Prior art keywords
router
terminal equipment
wifi network
terminal device
button
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211433095.7A
Other languages
Chinese (zh)
Other versions
CN115499897A (en
Inventor
刘鹏
马晓伟
蔡磊磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202211433095.7A priority Critical patent/CN115499897B/en
Publication of CN115499897A publication Critical patent/CN115499897A/en
Application granted granted Critical
Publication of CN115499897B publication Critical patent/CN115499897B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

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

Abstract

The embodiment of the application provides a WiFi network access method and a related device, which relate to the technical field of communication, and the method is applied to a system comprising terminal equipment and a router and comprises the following steps: at the first moment, the distance between the terminal equipment and the router is larger than the first distance, the terminal equipment is not accessed to the wireless fidelity WiFi network of the router, and the account and the password of the WiFi network are not stored in the terminal equipment; at the second moment, the distance between the terminal equipment and the router is smaller than or equal to the first distance, and the terminal equipment displays a first button and prompt information for prompting the terminal equipment to access the WiFi network; the second time is later than the first time; when the terminal device receives the trigger of the first button, the terminal device and the router both automatically trigger a button configuration mode PBC flow, and the terminal device accesses the WiFi network based on the PBC flow. Therefore, convenience, safety and flexibility of accessing the terminal equipment to the WiFi network can be improved, and user experience is improved.

Description

WiFi network access method and related device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a WiFi network access method and a related apparatus.
Background
Wireless fidelity (WiFi) is a wireless local area network (wlan) technology based on the Institute of Electrical and Electronics Engineers (IEEE) 802.11 standard. With the development of communication technology, wiFi is more and more widely applied in daily life.
The terminal device needs to access the WiFi network through a router (router), and if the router sets a Service Set Identifier (SSID) and a password, the user needs to manually input the SSID and the password corresponding to the router on the terminal device when connecting to the router.
However, the operation process of the above method is complicated, and the user experience is not good.
Disclosure of Invention
The embodiment of the application provides a WiFi network access method and a related device, when the distance between terminal equipment and a router is smaller than a preset value or the terminal equipment approaches the router, a message for prompting a user whether to access a WiFi network is popped up on a display screen of the terminal equipment, and when the user agrees to access the WiFi network, the terminal equipment and the router can simulate a PBC mode to realize WiFi network access of the terminal equipment.
In a first aspect, an embodiment of the present application provides a WiFi network access method. The method is applied to a system comprising terminal equipment and a router, and comprises the following steps: at the first moment, the distance between the terminal equipment and the router is larger than the first distance, the terminal equipment is not accessed to the wireless fidelity WiFi network of the router, and the account and the password of the WiFi network are not stored in the terminal equipment; at the second moment, the distance between the terminal equipment and the router is smaller than or equal to the first distance, and the terminal equipment displays a first button and prompt information for prompting the terminal equipment to access the WiFi network; the second time is later than the first time; when the terminal device receives the trigger of the first button, the terminal device and the router both automatically trigger the button to configure the PBC flow, and the terminal device accesses the WiFi network based on the PBC flow. In this way, when the distance between the terminal device and the router is less than or equal to 1 meter, the terminal device may display the first button and a prompt message for prompting the terminal device to access the WiFi network.
In one possible implementation, at the third moment, the distance between the terminal device and the router is greater than the first distance, the terminal device does not access the WiFi network of the router, and the account and the password of the WiFi network are not stored in the terminal device; the third time is later than the second time; at the fourth moment, the distance between the terminal equipment and the router is smaller than or equal to the first distance, and the terminal equipment displays a first button and prompt information for prompting the terminal equipment to access the WiFi network; the fourth time is later than the third time; when the terminal device receives the trigger of the first button, the terminal device and the router both automatically trigger a button configuration mode PBC flow, and the terminal device accesses the WiFi network based on the PBC flow. Therefore, the safety of the terminal equipment accessing the WiFi network can be improved.
In one possible implementation, after the terminal device accesses the WiFi network based on the PBC procedure, the method further includes: the terminal equipment receives an account and a password of a WiFi network from the router; at the fifth moment, the distance between the terminal equipment and the router is larger than the first distance, the terminal equipment is not accessed to the wireless fidelity WiFi network of the router, and an account and a password of the WiFi network are stored in the terminal equipment; the fifth time is later than the second time; and at the sixth moment, the distance between the terminal equipment and the router is smaller than or equal to the first distance, and the terminal equipment accesses the WiFi network based on the account number and the password of the WiFi network. Therefore, the convenience of accessing the terminal equipment to the WiFi network can be improved, and the use experience of a user is improved.
In one possible implementation, at the second time, the terminal device further displays a second button; the method further comprises the following steps: when the terminal equipment receives the trigger of the second button, the terminal equipment cancels the display of the first button and prompt information for prompting the terminal equipment to access the WiFi network, and the terminal equipment does not access the WiFi network; at the seventh moment, the distance between the terminal equipment and the router is smaller than or equal to the first distance, and the terminal equipment does not display the first button and prompt information for prompting the terminal equipment to access the WiFi network; the difference value between the seventh moment and the moment when the second button is triggered is within the first time length; or the distances between the terminal equipment and the router between the seventh moment and the second moment are smaller than or equal to the first distance. Therefore, the prompt message for prompting the terminal equipment to access the WiFi network can be displayed or cancelled on the mobile phone according to the actual requirements of the user, the message of the user is prevented from being disturbed, and the use experience of the user is improved.
In one possible implementation, at the eighth moment, the distance between the terminal device and the router is greater than the first distance, the terminal device does not access the WiFi network of the router, and an account and a password of the WiFi network are not stored in the terminal device; the eighth time is later than the seventh time; and at the ninth moment, the distance between the terminal equipment and the router is smaller than or equal to the first distance, and the terminal equipment displays the first button, the second button and prompt information for prompting the terminal equipment to access the WiFi network. Therefore, the convenience of accessing the terminal equipment to the WiFi network can be improved, and the use experience of a user is improved.
In a possible implementation, after the ninth time, the method further includes: when the terminal equipment receives the trigger of the second button, the terminal equipment cancels the display of the first button and the prompt information for prompting the terminal equipment to access the WiFi network, the terminal equipment does not access the WiFi network, and when the distance between the terminal equipment and the router is smaller than or equal to the first distance again, the terminal equipment does not display the first button and the prompt information for prompting the terminal equipment to access the WiFi network any more. Therefore, the prompt message for prompting the terminal equipment to access the WiFi network can be displayed or cancelled on the mobile phone according to the actual requirements of the user, the message of the user is prevented from being disturbed, and the use experience of the user is improved.
In one possible implementation, after the terminal device displays the first button, the second button and a second time length after the terminal device displays the prompt message for prompting the terminal device to access the WiFi network, if the terminal device does not receive the trigger of the first button and the second button, the terminal device cancels to display the first button, the second button and the prompt message for prompting the terminal device to access the WiFi network; after the third time length, if the distance between the terminal equipment and the router is less than or equal to the first distance, the terminal equipment displays the first button, the second button and prompt information for prompting the terminal equipment to access the WiFi network again. Therefore, the prompt message for prompting the terminal equipment to access the WiFi network can be displayed or cancelled on the mobile phone according to the actual requirements of the user, so that the message of the user is prevented from being disturbed, the convenience of accessing the terminal equipment to the WiFi network can be improved, and the use experience of the user is improved.
In one possible implementation, before the terminal device displays the first button and the prompt message for prompting the terminal device to access the WiFi network, the method includes: the router determines that the distance between the terminal equipment and the router is smaller than or equal to a first distance according to the signal strength between the terminal equipment and the router, and/or the terminal equipment approaches the router; the router sends a response message to the terminal equipment; the terminal equipment displays a first button and prompt information used for prompting the terminal equipment to access the WiFi network, and the prompt information comprises the following steps: and when the terminal equipment receives the response message, the terminal equipment displays a first button and prompt information for prompting the terminal equipment to access the WiFi network. Therefore, in different scenes, the WiFi network access process of the embodiment of the application can be triggered, the terminal equipment can be accessed to the WiFi network as early as possible, the flexibility of the application scene of the WiFi network access method is improved, the convenience of accessing the terminal equipment to the WiFi network is improved, and the use experience of a user is improved.
In a possible implementation, a router determines, according to a signal strength between a terminal device and the router, that a distance between the terminal device and the router is smaller than or equal to a first distance, and/or that the terminal device approaches the router, including: the router receives a detection message from the terminal equipment; when the router analyzes that the detection message comprises the preset field, the router determines that the distance between the terminal equipment and the router is smaller than or equal to the first distance according to the signal strength between the terminal equipment and the router, and/or the terminal equipment approaches the router. Therefore, based on the preset field in the detection message, the router can confirm that the terminal device supports the process of accessing the WiFi network according to the embodiment of the present application, and the automatic access of the terminal device to the WiFi network is realized based on the process of accessing the WiFi network according to the embodiment of the present application. For a terminal device without the preset field in the detection message, the router may not support the procedure of automatically accessing the WiFi network according to the embodiment of the present application. Therefore, the accuracy and the safety of the connection process between the terminal equipment and the router can be improved.
In one possible implementation, the response message includes a preset field; when the terminal device receives the response message, the terminal device displays a first button and prompt information for prompting the terminal device to access the WiFi network, and the prompt information comprises the following steps: when the terminal equipment receives the response message, the terminal equipment analyzes the response message; and when the response message comprises the preset field, the terminal equipment displays a first button and prompt information for prompting the terminal equipment to access the WiFi network. Therefore, the accuracy and the safety of the connection process between the terminal equipment and the router can be improved.
In one possible implementation, the preset field includes: first information for indicating a type, second information for indicating a length, and third information for indicating a value. Therefore, whether the router and the terminal equipment can support the WiFi network connection method provided by the embodiment of the application or not is identified through the preset field, and the safety of the terminal equipment accessing to the WiFi network can be improved.
In a second aspect, an embodiment of the present application provides a WiFi network access device. The WiFi network access apparatus may be a terminal device, or a chip system in the terminal device, and the WiFi network access apparatus may include a first processing unit, a first communication unit, a display unit, and a first storage unit, where the first processing unit is configured to implement any method related to processing executed by the terminal device in the first aspect or any one of possible implementation manners of the first aspect. When the WiFi network access apparatus is a terminal device, the first processing unit may be a processor. The first communication unit is used for supporting the interaction of the WiFi network access device and other equipment. The display unit is used for implementing any method related to displaying in the first aspect or any one of the possible implementations of the first aspect. The WiFi network access device may also include a first storage unit, which may be a memory. The first storage unit is configured to store instructions, and the first processing unit executes the instructions stored in the storage unit, so that the terminal device implements the method performed by the terminal device described in the first aspect or any one of the possible implementation manners of the first aspect. When the WiFi network access device is a chip or chip system within a terminal equipment, the first processing unit may be a processor. The first processing unit executes the instructions stored in the first storage unit to enable the terminal device to implement the method performed by the terminal device described in the first aspect or any one of the possible implementation manners of the first aspect. The first storage unit may be a storage unit (e.g., a register, a cache, etc.) within the chip, or may be a storage unit (e.g., a read-only memory, a random access memory, etc.) located outside the chip within the terminal device.
Or, the WiFi network access device may be a router, and may also be a chip or a chip system in the router, and the WiFi network access device may include the second processing unit and the second communication unit, and may also include the second storage unit. Wherein the second processing unit is configured to implement the second aspect or any method related to processing performed by the router in any possible implementation manner of the second aspect. When the WiFi network access device is a router, the processing unit may be a processor. The second communication unit is used for supporting the interaction of the WiFi network access device and other equipment. The WiFi network access device may also include a second storage unit, which may be a memory. The second storage unit is configured to store instructions, and the second processing unit executes the instructions stored in the storage unit, so as to enable the terminal device to implement the method performed by the router described in the first aspect or any one of the possible implementation manners of the first aspect. When the WiFi network access device is a chip or chip system within a router, the second processing unit may be a processor. The second processing unit executes the instructions stored in the second storage unit to enable the terminal device to implement the method performed by the router described in the first aspect or any one of the possible implementations of the first aspect. The second storage unit may be a storage unit (e.g., a register, a cache, etc.) within the chip, or a storage unit (e.g., a read-only memory, a random access memory, etc.) within the router that is external to the chip.
Exemplarily, at a first moment, the distance between the terminal device and the router is greater than a first distance, the terminal device does not access the WiFi network of the router, and an account and a password of the WiFi network are not stored in the terminal device; at the second moment, the distance between the terminal equipment and the router is smaller than or equal to the first distance, and the display unit is used for displaying the first button and prompt information for prompting the terminal equipment to access the WiFi network; the second time is later than the first time; when the terminal device receives the trigger of the first button, the first processing unit and the second processing unit are both used for automatically triggering the button to configure the PBC process, and the terminal device accesses the WiFi network based on the PBC process.
In a possible implementation, at the third moment, the distance between the terminal device and the router is greater than the first distance, the terminal device does not access the WiFi network of the router, and the account and the password of the WiFi network are not stored in the terminal device; the third time is later than the second time; at the fourth moment, the distance between the terminal equipment and the router is smaller than or equal to the first distance, and the display unit is also used for displaying a first button and prompt information for prompting the terminal equipment to access the WiFi network; the fourth time is later than the third time; when the terminal device receives the trigger of the first button, the first processing unit and the second processing unit are both used for automatically triggering the PBC process of the button configuration mode, and the terminal device accesses the WiFi network based on the PBC process.
In a possible implementation, the first communication unit is further configured to receive an account and a password of the WiFi network from the router; at the fifth moment, the distance between the terminal equipment and the router is larger than the first distance, the terminal equipment is not accessed to the wireless fidelity WiFi network of the router, and an account number and a password of the WiFi network are stored in the terminal equipment; the fifth time is later than the second time; and at the sixth moment, the distance between the terminal equipment and the router is smaller than or equal to the first distance, and the terminal equipment accesses the WiFi network based on the account number and the password of the WiFi network.
In one possible implementation, when the terminal device receives the trigger of the second button, the display unit is further configured to cancel displaying the first button and prompt information for prompting the terminal device to access the WiFi network, and the terminal device does not access the WiFi network; at the seventh moment, the distance between the terminal equipment and the router is smaller than or equal to the first distance, and the display unit is also used for not displaying the first button and prompting information for prompting the terminal equipment to access the WiFi network; the difference value between the seventh moment and the moment when the trigger on the second button is received is within the first time length; or the distances between the terminal equipment and the router between the seventh moment and the second moment are smaller than or equal to the first distance.
In one possible implementation, at the eighth moment, the distance between the terminal device and the router is greater than the first distance, the terminal device does not access the WiFi network of the router, and an account and a password of the WiFi network are not stored in the terminal device; the eighth time is later than the seventh time; and at the ninth moment, the distance between the terminal equipment and the router is smaller than or equal to the first distance, and the display unit is also used for displaying the first button, the second button and prompt information for prompting the terminal equipment to access the WiFi network.
In a possible implementation, when the terminal device receives the trigger of the second button, the display unit is further configured to cancel displaying the first button and the prompt information for prompting the terminal device to access the WiFi network, the terminal device does not access the WiFi network, and when the distance between the terminal device and the router is less than or equal to the first distance again, the display unit is further configured to not display the first button and the prompt information for prompting the terminal device to access the WiFi network again.
In one possible implementation, after the terminal device displays the first button, the second button and a second duration after the terminal device displays the prompt message for prompting the terminal device to access the WiFi network, if the terminal device does not receive the trigger for the first button and the second button, the display unit is further configured to cancel displaying the first button, the second button and the prompt message for prompting the terminal device to access the WiFi network; after the third duration, if the distance between the terminal device and the router is less than or equal to the first distance, the display unit is further configured to display the first button, the second button and a prompt message for prompting the terminal device to access the WiFi network again.
In one possible implementation, the second processing unit is further configured to determine, according to the signal strength between the terminal device and the router, that the distance between the terminal device and the router is smaller than or equal to the first distance, and/or that the terminal device approaches the router; the second communication unit is used for sending a response message to the terminal equipment; when the terminal device receives the response message, the first display unit is further used for displaying the first button and prompting information for prompting the terminal device to access the WiFi network.
In one possible implementation, the second communication unit is further configured to receive a detection packet from the terminal device; when the router analyzes that the detection message comprises the preset field, the second processing unit is further used for determining that the distance between the terminal equipment and the router is smaller than or equal to the first distance and/or the terminal equipment approaches the router according to the signal strength between the terminal equipment and the router.
In one possible implementation, when the terminal device receives the response packet, the first processing unit is further configured to parse the response packet; when the response message includes the preset field, the first display unit is further configured to display a first button and prompt information for prompting the terminal device to access the WiFi network.
In one possible implementation, the preset field includes: first information for indicating a type, second information for indicating a length, and third information for indicating a value.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, where the memory is configured to store code instructions, and the processor is configured to execute the code instructions to perform the method described in the first aspect or any one of the possible implementation manners of the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium. The computer program when executed by a processor implements a method as in the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product comprising a computer program which, when executed, causes a computer to perform a method as in the first aspect.
In a sixth aspect, embodiments of the present application provide a chip, where the chip includes a processor, and the processor is configured to call a computer program in a memory to execute the method according to the first aspect.
It should be understood that the second aspect to the sixth aspect of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by the aspects and the corresponding possible implementations are similar, and are not described again.
Drawings
FIG. 1 is a schematic diagram of an application scenario in some implementations;
fig. 2 is a schematic structural diagram of a terminal device according to an embodiment of the present application;
fig. 3 is a block diagram of a software structure of a terminal device according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a router according to an embodiment of the present application;
fig. 5 is a software structure diagram of a router according to an embodiment of the present application;
fig. 6 is a schematic diagram of a router setting interface provided in an embodiment of the present application;
fig. 7 is a schematic view of a display interface of a mobile phone according to an embodiment of the present disclosure;
fig. 8 is a schematic diagram illustrating a specific connection between a terminal device and a router according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a WiFi network access device according to an embodiment of the present application;
fig. 10 is a schematic hardware structure diagram of an electronic device according to an embodiment of the present disclosure;
fig. 11 is a schematic structural diagram of a chip according to an embodiment of the present disclosure.
Detailed Description
In order to facilitate clear description of the technical solutions of the embodiments of the present application, some terms and techniques referred to in the embodiments of the present application are briefly described below:
1. wireless network security settings
Wireless network security protected setup (WPS) is a WiFi security setup standard promulgated by the WiFi alliance, and is used to simplify security setup and network management for WiFi. There are two main implementations of WPS: a Personal Identification Number (PIN) mode, and a Push Button Configuration (PBC) mode. The terminal equipment with the WIFI connection function can be connected with the router in one of the modes to achieve wireless communication.
2. PBC mode
The PBC mode may refer to a mode in which the terminal device and the router realize that the terminal device automatically accesses the WiFi network based on the WPS. For example, a user presses a WPS PBC button of a router to start a WPS PBC flow, a WPS indicator lamp on the router flashes to indicate that the router can communicate with a terminal device based on PBC, and meanwhile, the user opens a PBC function of the terminal device to start the WPS PBC flow, so that the terminal device can also communicate with the router based on PBC, and the terminal device can automatically and safely access a WiFi network through the router. It is to be understood that, for convenience of description, in the following embodiments, the WPS PBC flow is simply referred to as a PBC flow.
The PBC scheme is actually a variation of the PIN scheme, but the PIN code is not required in the PBC scheme, and all 0 s may be used instead of the PIN code.
3. In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations for the purpose of clearly describing technical solutions of the embodiments of the present application. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or" describes the association relationship of the associated object, indicating that there may be three relationships, for example, a and/or B, which may indicate: a alone, A and B together, and B alone, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or multiple.
In the present embodiment, "at … …" may be an instant when a certain condition occurs or a period of time after the certain condition occurs, and the present embodiment is not particularly limited to this. In addition, the display interface provided by the embodiment of the application is only used as an example, and the display interface may further include more or less content.
4. Terminal device
The terminal device of the embodiment of the present application may also be any form of electronic device, for example, the electronic device may include a handheld device having an image processing function, an in-vehicle device, and the like. For example, some electronic devices are: a mobile phone (mobile phone), a tablet computer, a palm computer, a notebook computer, a Mobile Internet Device (MID), a wearable device, a Virtual Reality (VR) device, an Augmented Reality (AR) device, a wireless terminal in industrial control (industrial control), a wireless terminal in unmanned driving (self driving), a wireless terminal in remote surgery (remote medical supply), a wireless terminal in smart grid (smart grid), a wireless terminal in transportation security (smart), a wireless terminal in city (smart city), a wireless terminal in smart home (smart home), a cellular phone, a cordless phone, a session initiation protocol (session initiation protocol), SIP) phone, wireless Local Loop (WLL) station, personal Digital Assistant (PDA), handheld device with wireless communication function, computing device or other processing device connected to wireless modem, vehicle-mounted device, wearable device, terminal device in 5G network or terminal device in Public Land Mobile Network (PLMN) for future evolution, etc., which are not limited by the embodiments of the present application.
By way of example and not limitation, in the embodiments of the present application, the electronic device may also be a wearable device. Wearable equipment can also be called wearable intelligent equipment, is the general term of applying wearable technique to carry out intelligent design, develop the equipment that can dress to daily wearing, like glasses, gloves, wrist-watch, dress and shoes etc.. A wearable device is a portable device that is worn directly on the body or integrated into the clothing or accessories of the user. The wearable device is not only a hardware device, but also realizes powerful functions through software support, data interaction and cloud interaction. The generalized wearable smart device includes full functionality, large size, and can implement full or partial functionality without relying on a smart phone, such as: smart watches or smart glasses and the like, and only focus on a certain type of application functions, and need to be used in cooperation with other devices such as smart phones, such as various smart bracelets for physical sign monitoring, smart jewelry and the like.
In addition, in the embodiment of the present application, the electronic device may also be a terminal device in an internet of things (IoT) system, where IoT is an important component of future information technology development, and the main technical feature of the electronic device is to connect an article with a network through a communication technology, so as to implement an intelligent network with human-computer interconnection and object-object interconnection.
The electronic device in the embodiment of the present application may also be referred to as: a terminal device, a User Equipment (UE), a Mobile Station (MS), a Mobile Terminal (MT), an access terminal, a subscriber unit, a subscriber station, a mobile station, a remote terminal, a mobile device, a user terminal, a wireless communication device, a user agent, or a user equipment, etc.
In an embodiment of the present application, the electronic device or each network device includes a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on top of the operating system layer. The hardware layer includes hardware such as a Central Processing Unit (CPU), a Memory Management Unit (MMU), and a memory (also referred to as a main memory). The operating system may be any one or more computer operating systems that implement business processing through processes (processes), such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a windows operating system. The application layer comprises applications such as a browser, an address list, word processing software, instant messaging software and the like.
For example, fig. 1 is a schematic diagram of an application scenario in some implementations, and the application scenario may include a terminal device 101 (for example, a mobile phone in fig. 1) and a router 102.
As shown in fig. 1, when the terminal device 101 and the router 102 are connected for the first time or the password set on the router 102 is changed, when the terminal device 101 and the router 102 establish a connection, the interface shown in fig. 1 is displayed on the display interface of the terminal device, and the user needs to input the password on the interface, so that the terminal device can access the WiFi network through the router 102.
In possible implementation, the user can also access the WiFi network without inputting a password by means of terminal equipment scanning a WiFi two-dimensional code or Near Field Communication (NFC), or the like. The terminal equipment accesses the network by scanning the WiFi two-dimensional code, wherein the WiFi two-dimensional code comprises SSID (service set identifier) and password information for connecting the WiFi network, and the terminal equipment can acquire the information in the process of scanning the two-dimensional code; for the NFC mode, in the process of NFC communication between the terminal device and the router, the terminal device may obtain an SSID and a password for connecting to a WiFi network. However, for a user who cannot know the above method, the above method is not simple and convenient enough, and the terminal device can transmit the password by scanning the two-dimensional code or accessing the WiFi network through NFC, so that the security is low.
In possible implementation, an association relationship between the terminal device and the router may be pre-established, the association relationship may be stored in the cloud platform, and when the router acquires the association relationship on the cloud platform, the router may allow the terminal device to access the WiFi network. However, the association relationship established in advance may have a security problem, and the above manner occupies a large resource, and an application scenario is limited, and a terminal device that does not establish an association relationship with a router in advance cannot access a WiFi network through the above manner.
In view of this, an embodiment of the present application provides a WiFi network access method, where a message for prompting a user whether to access a WiFi network is popped up on a display screen of a terminal device when a distance between the terminal device and a router is smaller than a preset value, or the terminal device approaches the router, and when the user agrees to access the WiFi network, the terminal device and the router may simulate a PBC manner to implement WiFi network access of the terminal device, and when implementing WiFi network access of the terminal device in the PBC manner, an account and a password of the WiFi network do not need to be transferred between the terminal device and the router, so that security is improved, an association between the terminal device and the router does not need to be established in advance, and an application scenario is flexible. Like this, terminal equipment can realize that a key inserts the wiFi network, can improve convenient degree, security and the flexibility that terminal equipment inserted the wiFi network, promotes user's use and experiences.
Exemplarily, fig. 2 is a schematic structural diagram of a terminal device 100 provided in the embodiment of the present application.
The terminal device 100 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, a battery 142, an antenna 10, an antenna 20, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. 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, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the terminal device 100. In other embodiments of the present application, terminal device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
The wireless communication function of the terminal device 100 may be implemented by the antenna 10, the antenna 20, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antenna 10 and the antenna 20 are used for transmitting and receiving electromagnetic wave signals. Each antenna in terminal device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 10 may be multiplexed as a diversity antenna for a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied on the terminal device 100.
The wireless communication module 160 may provide a solution for wireless communication applied to the terminal device 100, including Wireless Local Area Networks (WLANs) (e.g., wiFi), bluetooth (BT), global Navigation Satellite System (GNSS), frequency Modulation (FM), near Field Communication (NFC), infrared (IR), and the like. 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 20, performs frequency modulation and filtering on electromagnetic wave signals, and transmits the processed signals to the processor 110. Wireless communication module 160 may also receive signals to be transmitted from processor 110, frequency modulate them, amplify them, and convert them into electromagnetic waves via antenna 20 for radiation. In this embodiment, the terminal device 100 implements WiFi access through a router via the wireless communication module 160.
In some embodiments, the antenna 10 of the terminal device 100 is coupled to the mobile communication module 150 and the antenna 20 is coupled to the wireless communication module 160 so that the terminal device 100 can communicate with networks 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 (code division multiple access, CDMA), wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), long Term Evolution (LTE), LTE, BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. GNSS may include Global Positioning System (GPS), global navigation satellite system (GLONASS), beidou satellite navigation system (BDS), quasi-zenith satellite system (QZSS), and/or Satellite Based Augmentation System (SBAS).
The terminal device 100 implements a display function by the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, 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 that execute program instructions to generate or alter display information.
The terminal device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, the application processor, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the storage capability of the terminal device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like. The processor 110 executes various functional applications of the terminal device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The terminal device 100 may implement an audio function through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playing, recording, etc.
The software system of the terminal device 100 may adopt a hierarchical architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes an Android system with a layered architecture as an example, and exemplarily illustrates a software structure of the terminal device 100.
Fig. 3 is a block diagram of a software structure of the terminal device 100 according to an embodiment of the present disclosure.
The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom.
The application layer may include a series of application packages.
As shown in fig. 3, the application package may include applications such as camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, etc.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in fig. 3, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, a WiFi manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The phone manager is used to provide the communication function of the terminal device 100. Such as management of call status (including on, off, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short dwell, and does not require user interaction. Such as a notification manager used to inform download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
In the embodiment of the application, the WiFi manager is used for realizing the simulated starting of the PBC function of the terminal equipment, and further realizing the access of the terminal equipment to the WiFi network through the router. It is understood that, in some embodiments, the WiFi manager may also be located in the application layer, and this is not specifically limited in this application embodiment.
The Android Runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application layer and the application framework layer as binary files. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver, a sensor driver and a WiFi driver.
In the embodiment of the application, a WiFi drive of a kernel layer of a terminal device sends a detection message to a router, the router sends a corresponding response message to the terminal device after acquiring the detection message, after the terminal device is successfully verified, a notification Manager in an application program frame can enable a display screen of the terminal device to display a message popup window, after the terminal device receives an operation of a confirmation button in the message popup window by a user, namely after the user agrees to access a WiFi network, the notification Manager sends a message that the user agrees to access the WiFi network to the WiFi Manager, after the WiFi Manager receives the message, a PBC function can be started, the WiFi Manager can send the detection message carrying PBC information to the router by calling the WiFi drive of the kernel layer, and then connection between the terminal device and the router is realized, so that the terminal device accesses the WiFi network through the router.
Fig. 4 is a schematic structural diagram of a router according to an embodiment of the present application.
As shown in fig. 4, the router 400 includes: memory 401, processor 402, interface 403, console port 404, auxiliary port 405, and power module 406.
It is to be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation to the router 400. In other embodiments of the present application, router 400 may include more or fewer components than shown, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
In some embodiments of the present application, the memory 401 may be a non-volatile memory, a random access memory, a flash memory, and a read only memory, where the random access memory discards information when the router is started or during a power supply interval, the read only memory stores startup software of the router, the startup software is first software run by the router and is responsible for entering a normal operating state of the router, the router stores a complete operating system as a backup in the random access memory so as to be used as a backup when the operating system is not used, and the read only memory is usually disposed on one or more chips and soldered on a motherboard of the router. The main purpose of the flash memory is to store the operating system of the router 400, maintain the normal operation of the router, and if the router is installed with the flash memory, mainly boot the default location of the operating system of the router, so long as the capacity of the flash memory is sufficient, multiple operating system images can be saved to provide multiple boot options. The main purpose of the non-volatile memory is to store configuration data (boot configuration) that is read in when the operating system boots. The random access memory is mainly used as an operating system table and a buffer storage area, and the operating system can meet all conventional storage requirements through the random access memory so that the router can quickly access the information, wherein the storage speed of the random access memory is superior to the three types mentioned above.
The processor 402 may include one or more processing units, for example, processing modules or processing circuits that may include a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Digital Signal Processor (DSP), a Microprocessor (MCU), an Artificial Intelligence (AI) processor, or a programmable logic device (FPGA), among others. Wherein, the different processing units may be independent devices or may be integrated in one or more processors. A memory unit may be provided in the processor 402 for storing instructions and data. In some embodiments, the memory location in processor 402 is a cache memory.
The interfaces 403 of the router 400 all have their own names and numbers, and the full name of an interface is composed of the type identifier and the number of the interface, and the number starts from 0, and for a router with a fixed interface or a router with a modular interface, only one number is used in the full name of the interface and the numbering is performed according to the physical sequence of the number in the router, for example, ethernet0 represents the 1 st Ethernet interface, and Serial1 represents the 2 nd Serial port. For a router supporting 'online plugging and deleting' or having a function of changing physical interface configuration, the whole name of an interface at least comprises two numbers, and the middle part is divided by a slash '/', wherein the 1 st number represents a slot number, and the 2 nd number represents a port number in an interface card. For a router supporting "universal interface processor", its interface number is in the form of "slot/port adapter/port number", e.g. Ethernet4/0/1 is the 2 nd Ethernet interface of the 1 st port adapter on slot number 4.
The console port 404 is a port that allows a user or administrator to communicate with the router 400 using a network access device to complete the configuration of the router, and provides an EIA/TIA-242 asynchronous serial interface for configuration at the router 400.
The auxiliary port 405, like the console port 404, also provides an EIA/TIA-242 asynchronous serial interface, except that it is often used to interface with modems to enable remote management of routers.
The power module 406 may include a power supply, power management components, and the like. The power management component is used for managing the charging of the power supply and the power supply of the power supply to other modules.
Fig. 5 is a diagram illustrating an exemplary software structure of a router according to an embodiment of the present application.
The software architecture of the router is shown in fig. 5, and the software architecture of the router divides the software into a plurality of layers, and each layer has a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the software architecture of the router is divided into four layers, namely an application layer, a component layer, a kernel layer and a driver layer from top to bottom. The application layer comprises an authentication management module, a communication module, a DDNS module, a web server and a network service module. The component layer includes an open secure sockets layer (OpenSSL) algorithm module and an encryption/decryption module. The kernel layer comprises a protocol stack module, a memory management module, a process management module, a scheduler and a file system module, wherein the protocol stack module comprises a Network Address Translation (NAT) module, a firewall and an intelligent service identification module. The driving layer comprises a network driver, a storage driver, an indicator light driver and the like.
The authentication management module is used for remotely accessing the monitoring equipment through the router aiming at the electronic equipment to complete multiple authentications. The authentication management module may rely on the OpenSSL algorithm module and the encryption/decryption module to implement key authentication and data encryption functions, for example, the OpenSSL algorithm module may provide an encryption/decryption algorithm in an OpenSSL open source framework, the authentication management module invokes the encryption/decryption module when performing key authentication, the encryption/decryption module may select one algorithm from the encryption/decryption algorithms provided by the OpenSSL algorithm module to perform key authentication, and the same encryption/decryption algorithm may also invoke the encryption/decryption algorithm provided by the OpenSSL algorithm module to encrypt a video stream (which may also be referred to as video data). The communication module is used for implementing communication with the electronic device, for example, the communication module may be a global system for mobile communications (GSM) module, and the GAM module is used for communicating with the electronic device according to a GSM standard, and the DDNS module is used for communicating with the DDNS server to dynamically manage an IP address and a dynamic domain name of the router. The network service module is used for executing network services, such as management of the router by the electronic device, and controlling access to the monitoring device.
The intelligent service identification module is used for identifying the type of network service which is executed by the router, for example, identifying whether to execute the access of electronic equipment to monitoring equipment; the memory management module is used for managing the memory of the router; the process management module is used for managing the process of the router; the file system module is used for managing files in the router; the scheduler is used for managing task scheduling, such as game task and webpage task scheduling. The network driver includes an ethernet (ethernet) driver, a Wireless (WIFI) driver, a universal asynchronous receiver/transmitter (UART) driver to complete communication using different networks through the network drivers, the storage driver may be a Flash memory (Flash) driver, the router may store files using Flash, etc., the indicator light driver may be an LED driver, and the on and off of the LED in the router is driven by the LED driver.
In the embodiment of the application, after the WiFi driving module of the router driving layer acquires the detection message sent by the terminal device, the detection message is identified and checked for security, and after the identification and the check are passed, the WiFi driving module sends a response message to the terminal device. In possible implementation, when the router acquires the detection message carrying the PBC related information sent by the terminal device within the effective time, after the identification and the verification are passed, the WiFi driving module sends a response message to the terminal device, and the WiFi driving module can notify the application layer running in the user state to start the WPS PBC key process of the WPS through the kernel interface, and trigger the router to simulate to press the WPS PBC key.
Exemplarily, the WiFi network access method provided in the embodiment of the present application is as follows:
at the first moment, the distance between the terminal device and the router is larger than the first distance, the terminal device does not access the wireless fidelity WiFi network of the router, and the account and the password of the WiFi network are not stored in the terminal device.
In this embodiment of the application, an account of a WiFi network may be understood as an SSID, the first distance may refer to a preset security distance between the terminal device and the router, where the preset distance may be a factory value set by a manufacturer based on experience, or may also be a distance set by a user according to a requirement, and the first distance may refer to a smaller distance, such as any distance between 0 and 5 meters, and the like. A schematic diagram of the user setting the first distance may be as shown in fig. 6.
Fig. 6 is a setting interface of a router, and the WiFi safety distance shown in fig. 6 may be understood as a first distance, and a user may modify a value of the WiFi safety distance, for example, the user may set the WiFi safety distance to 1 meter, so that when the distance between the terminal device and the router is less than or equal to 1 meter, the terminal device may display a first button and a prompt message for prompting the terminal device to access the WiFi network.
It is understood that WiFi safe distance may be enabled or disabled. When the WiFi safe distance is disabled, under the condition that the distance between the terminal segment device and the router is less than or equal to the WiFi safe distance, the terminal device cannot access the WiFi network through the WiFi network access method provided by the embodiment of the application.
At the second moment, the distance between the terminal equipment and the router is smaller than or equal to the first distance, and the terminal equipment displays a first button and prompt information for prompting the terminal equipment to access the WiFi network; the second time is later than the first time.
In the embodiment of the application, the prompt information is used for prompting whether the user agrees to access the WiFi network by the terminal device, and the user selecting the first button can indicate that the user agrees to access the WiFi network by the terminal device. A schematic diagram of the first button and the reminder information may be as shown in fig. 7.
Fig. 7 is a schematic diagram of a display interface of a mobile phone. As shown in fig. 7, the display interface of the mobile phone includes a message popup, and the message popup may include a prompt message, a confirm button, and a cancel button. Wherein the confirmation button may be understood as the first button.
When the terminal device receives the trigger of the first button, the terminal device and the router both automatically trigger a button configuration mode PBC flow, and the terminal device accesses the WiFi network based on the PBC flow.
In the embodiment of the present application, the PBC flow is: within preset time, the PBC function is started on the terminal device in a simulation mode, the WPS PBC key is pressed on the router in a simulation mode, and the terminal device can be accessed to the WiFi network through the router based on the PBC process. The preset time is generally set to 2 minutes, and the preset time can be adjusted in practical application, which is not specifically limited in the embodiment of the present application.
It is understood that the WPS functionality of the router may be enabled or disabled, and the setting of the WPS functionality enabled or disabled may be as shown in fig. 6. When the WPS function is enabled, the router may select an implementation of the WPS function. When the router selects the PBC as the implementation of the WPS function, the terminal device may access the WiFi network based on the PBC procedure under the condition that the terminal device also selects the PBC as the implementation of the WPS function.
When the WPS function of the router is disabled, the terminal device cannot access the WiFi network based on passing the WPS function.
For convenience of description, the terminal device is a mobile phone, and the WiFi network is WiFi 123. Under the condition that the mobile phone does not access the network of WiFi 123 and does not acquire or store the account and the password corresponding to WiFi 123, when the distance between the mobile phone and the router is larger than 1 meter, a message popup window is not displayed on the mobile phone, when the distance between the mobile phone and the router is smaller than or equal to 1 meter, the message popup window can be displayed on the mobile phone, the message popup window comprises a prompt message, a confirmation button and a cancel button, the content of the prompt message is 'whether WiFi 123 is added', when the mobile phone receives the operation of selecting the confirmation button by a user, the mobile phone and the router can automatically trigger a PBC flow, a PBC function is simulated to be started on the mobile phone, a WPS PBC button is simulated to be pressed on the router, and the mobile phone can access the WiFi 123 through the router under the condition that the password is not input.
That is to say, the mobile phone can access the WiFi 123 through the router without inputting a password and without password transmission between the router and the mobile phone. Therefore, convenience, safety and flexibility of accessing the terminal equipment to the WiFi network can be improved, and user experience is improved.
In possible implementation, at the third moment, the distance between the terminal device and the router is greater than the first distance, the terminal device does not access the WiFi network of the router, and the account and the password of the WiFi network are not stored in the terminal device; the third time is later than the second time. At the fourth moment, the distance between the terminal equipment and the router is smaller than or equal to the first distance, and the terminal equipment displays a first button and prompt information for prompting the terminal equipment to access the WiFi network; the fourth time is later than the third time. When the terminal device receives the trigger of the first button, the terminal device and the router both automatically trigger a button configuration mode PBC flow, and the terminal device accesses the WiFi network based on the PBC flow.
Taking the first distance as 1 meter as an example, when the distance between the mobile phone and the router is less than or equal to 1 meter, after the mobile phone receives the operation that the user agrees to access the WiFi 123, the mobile phone may access the WiFi 123 through the router based on the WiFi network access method provided in the embodiment of the present application. After the connection between the mobile phone and the router is disconnected, when the distance between the mobile phone and the router is greater than 1 meter, the mobile phone cannot access the WiFi 123 of the router, and the account and the password of the WiFi 123 are not stored in the mobile phone. When the distance between the mobile phone and the terminal equipment is less than or equal to 1 meter, a message popup window containing a prompt message, a confirmation button and a cancel button can be displayed on a display screen of the terminal equipment again, and when the mobile phone receives the operation of selecting the confirmation button by the user, the mobile phone and the router can automatically trigger the PBC flow and access the WiFi 123 through the router again.
That is to say, based on the WiFi network access method provided in this embodiment of the application, the terminal device may not transmit the password in the process of accessing the WiFi network through the router, after the terminal device is disconnected from the router, the terminal device may not automatically access the WiFi network of the router, when the distance between the terminal device and the router is smaller than the first distance again, the first button and the prompt message are displayed again on the display screen of the terminal device, and after the terminal device receives an operation of selecting the first button by the user, the PBC flow may be triggered, and the terminal device accesses the network based on the PBC flow. Therefore, the safety of the terminal equipment accessing the WiFi network can be improved.
In possible implementation, after the terminal device accesses the WiFi network based on the PBC flow, the terminal device receives an account and a password of the WiFi network from the router; at the fifth moment, the distance between the terminal equipment and the router is larger than the first distance, the terminal equipment is not accessed to the wireless fidelity WiFi network of the router, and an account number and a password of the WiFi network are stored in the terminal equipment; the fifth time is later than the second time; and at the sixth moment, the distance between the terminal equipment and the router is smaller than or equal to the first distance, and the terminal equipment accesses the WiFi network based on the account number and the password of the WiFi network.
For example, after the mobile phone accesses the WiFi 123, the mobile phone receives the account and the password of the WiFi 123 from the router, and the mobile phone may save the account and the password of the WiFi 123. When the distance between the mobile phone and the router is greater than 1 meter, the mobile phone does not access the WiFi 123 of the router, and when the distance between the mobile phone and the router is less than or equal to 1 meter, the mobile phone can access the WiFi network based on the stored account number and the password of the WiFi 123.
It can be understood that, after the terminal device receives and stores the account and the password of the WiFi network from the router, and when the distance between the terminal device and the router is greater than the first distance, and the terminal device and the router may discover each other, the prompt message and the first button may no longer be displayed on the display screen of the terminal device, and the terminal device may automatically access the WiFi network based on the acquired account and password of the WiFi network, which is not specifically limited in the embodiments of the present application.
That is to say, according to the WiFi network access method provided in this embodiment of the application, after the terminal device accesses the WiFi network through the router, the terminal device may receive and store the account and the password of the WiFi network from the router, when the terminal device and the router need to be connected again, the prompt message and the first button may not be displayed on the display screen of the terminal device, and the terminal device may automatically access the WiFi network based on the acquired account and password of the WiFi network.
Therefore, the convenience of accessing the terminal equipment to the WiFi network can be improved, and the use experience of a user is improved.
In a possible implementation, at the second time, the terminal device further displays a second button; when the terminal equipment receives the trigger of the second button, the terminal equipment cancels the display of the first button and prompt information for prompting the terminal equipment to access the WiFi network, and the terminal equipment does not access the WiFi network; at the seventh moment, the distance between the terminal equipment and the router is smaller than or equal to the first distance, and the terminal equipment does not display the first button and prompt information for prompting the terminal equipment to access the WiFi network; the difference value between the seventh moment and the moment when the second button is triggered is within the first time length; or the distances between the terminal equipment and the router between the seventh moment and the second moment are smaller than or equal to the first distance.
In this embodiment, the user selecting the second button may indicate that the user does not agree that the terminal device accesses the WiFi network. The second button schematic may be as shown in fig. 7, and the cancel button in fig. 7 may be understood as the second button. The first duration may be a factory value set by a manufacturer based on experience, or a duration set by a user according to a requirement, which is not specifically limited in this embodiment of the present application, and in the first duration, when the distance between the terminal device and the router is less than or equal to the first distance, the terminal device does not display the first button and the prompt information for prompting the terminal device to access the WiFi network.
For example, after the distance between the mobile phone and the router is less than or equal to 1 meter, a message popup window including a prompt message, a confirmation button, and a cancel button may be displayed on the mobile phone, and when the mobile phone receives an operation of selecting the cancel button by a user, the mobile phone cancels the display of the message popup window, and the mobile phone does not access the WiFi network. Taking the set first duration as 30 minutes as an example, within 30 minutes, when the distance between the mobile phone and the router is less than or equal to 1 meter again, the mobile phone does not display the message popup window, and the mobile phone does not access the WiFi network.
Or the distance between the mobile phone and the router is always less than or equal to 1 meter, the mobile phone does not display the message popup window, and the mobile phone does not access the WiFi network.
That is, after the terminal device receives the operation of selecting the second button by the user, the terminal device cancels the display of the first button and the prompt message, and the terminal device does not access the WiFi network. And in the first time period, when the distance between the terminal equipment and the router is less than or equal to the first distance again, or the distance is not limited by the first time period, and under the condition that the distance between the terminal equipment and the router is less than or equal to the first distance all the time, the mobile phone does not display the first button and the prompt message, and does not access the WiFi network of the router.
Therefore, the prompt message for prompting the terminal equipment to access the WiFi network can be displayed or cancelled on the mobile phone according to the actual requirements of the user, the message of the user is prevented from being disturbed, and the use experience of the user is improved.
In possible implementation, at the eighth moment, the distance between the terminal device and the router is greater than the first distance, the terminal device does not access the WiFi network of the router, and an account and a password of the WiFi network are not stored in the terminal device; the eighth time is later than the seventh time; and at the ninth moment, the distance between the terminal equipment and the router is smaller than or equal to the first distance, and the terminal equipment displays the first button, the second button and prompt information for prompting the terminal equipment to access the WiFi network.
For example, when the mobile phone receives an operation of a user selecting a cancel button, the mobile phone cancels the display of the message popup, and the mobile phone does not access the WiFi network. Taking the first duration as 30 minutes as an example, after 30 minutes, when the distance between the mobile phone and the router is shortened from more than 1 meter to less than or equal to 1 meter, under the condition that the account and the password of the WiFi 123 are not stored in the mobile phone, a message popup including a prompt message, a confirmation button and a cancel button may be displayed on the mobile phone.
Or when the mobile phone receives the operation of the user selecting the cancel button, the mobile phone cancels the display of the message popup window, and the mobile phone does not access the WiFi network. When the distance between the mobile phone and the router is shortened from more than 1 meter to less than or equal to 1 meter, under the condition that the account and the password of the WiFi 123 are not stored in the mobile phone, a message popup including a prompt message, a confirmation button and a cancel button can be displayed on the mobile phone.
That is to say, after the user disagrees that the terminal device accesses the WiFi network of the router, when the distance between the terminal device and the router is shortened from being greater than the first distance to being smaller than or equal to the first distance, and under the condition that the terminal device does not store the account and the password of the WiFi network, the terminal device may display the first button, the second button, and the prompt information for prompting the terminal device to access the WiFi network again.
Therefore, the convenience of accessing the terminal equipment to the WiFi network can be improved, and the use experience of a user is improved.
In a possible implementation, after the ninth moment, when the terminal device receives the trigger of the second button, the terminal device cancels the display of the first button and the prompt information for prompting the terminal device to access the WiFi network, the terminal device does not access the WiFi network, and when the distance between the terminal device and the router is less than or equal to the first distance again, the terminal device does not display the first button and the prompt information for prompting the terminal device to access the WiFi network any more.
For example, when the mobile phone receives an operation of a user selecting a cancel button, the mobile phone cancels the display of the message popup, and the mobile phone does not access the WiFi network. When the distance between the mobile phone and the router is less than or equal to 1 meter again, the mobile phone can display a message popup again, wherein the message popup comprises a prompt message, a confirmation button and a cancel button, the mobile phone receives an operation that a user selects the cancel button, the mobile phone cancels the display of the message popup, and the mobile phone does not access the WiFi network. When the distance between the mobile phone and the router is less than or equal to 1 meter again, the mobile phone does not display the message popup, that is, the mobile phone does not inquire whether the user accesses the WiFi network. Optionally, when the mobile phone receives two or more operations of the user selecting the cancel button, the mobile phone may shield the message popup.
That is, after the terminal device receives the trigger of the user to the second button again, the terminal device does not display the first button and the prompt message any more.
Therefore, the prompt message for prompting the terminal equipment to access the WiFi network can be displayed or cancelled on the mobile phone according to the actual requirements of the user, so that the message of the user is prevented from being disturbed, and the use experience of the user is improved.
In possible implementation, after the terminal device displays the first button, the second button and a second time length after the terminal device displays the prompt message for prompting the terminal device to access the WiFi network, if the terminal device does not receive the trigger of the first button and the second button, the terminal device cancels the display of the first button, the second button and the prompt message for prompting the terminal device to access the WiFi network; after the third time length, if the distance between the terminal equipment and the router is less than or equal to the first distance, the terminal equipment displays the first button, the second button and prompt information for prompting the terminal equipment to access the WiFi network again.
In this embodiment of the application, the second duration and the third duration may be factory values set by a manufacturer based on experience, or may be durations set by a user according to requirements, which is not specifically limited in this embodiment of the application.
For example, the second time period is 30 seconds, and the third time period is 10 minutes. Displaying a message popup window comprising a prompt message, a confirmation button and a cancellation button on the mobile phone, wherein the mobile phone cancels to display the message popup window when the mobile phone does not receive the operation of a user on the confirmation button and the cancellation button within 30 seconds; and after the mobile phone cancels the 10 minutes of displaying the message popup, when the distance between the mobile phone and the router is less than or equal to 1 meter, the message popup is displayed on the mobile phone again.
That is, in the second time period, the terminal device does not receive the trigger of the user on the first button and the second button, the terminal device cancels the display of the first button, the second button and the prompt message, and after the display is cancelled, after the third time period, when the distance between the terminal device and the router is less than or equal to the first distance, the terminal device may display the first button, the second button and the prompt message again.
Therefore, the prompt message for prompting the terminal equipment to access the WiFi network can be displayed or cancelled on the mobile phone according to the actual requirement of the user, the message interference of the user is avoided, the convenience of accessing the terminal equipment to the WiFi network can be improved, and the use experience of the user is improved.
In possible implementation, before the terminal device displays the first button and prompt information for prompting the terminal device to access the WiFi network, the router determines, according to the signal strength between the terminal device and the router, that the distance between the terminal device and the router is less than or equal to the first distance, and/or the terminal device approaches the router; the router sends a response message to the terminal equipment; the terminal equipment displays a first button and prompt information used for prompting the terminal equipment to access the WiFi network, and the prompt information comprises the following steps: and when the terminal equipment receives the response message, the terminal equipment displays a first button and prompt information for prompting the terminal equipment to access the WiFi network.
In this application embodiment, the signal strength between the terminal device and the router may refer to the signal strength of a detection packet sent by the terminal device and received by the router, where the detection packet of the terminal device is used to detect whether there is a router that can be connected to the terminal device, and generally, when the terminal device is turned on, the terminal device periodically sends the detection packet.
After receiving the detection message sent by the terminal device, the router may send a response message to the terminal device in at least several possible scenarios described below.
The first scenario is: the router may determine, according to the signal strength between the terminal device and the router, that the distance between the terminal device and the router is smaller than or equal to the first distance, and then the router sends a response packet to the terminal device.
For example, the router determines that the distance between the mobile phone and the router is less than or equal to the first distance according to the signal strength between the mobile phone and the router, the router sends a response message to the mobile phone, and after receiving the response message, the mobile phone may display a message popup window including a prompt message, a confirm button, and a cancel button, where specific display contents may refer to an interface example corresponding to fig. 7, which is not described herein again.
Therefore, the terminal equipment which is less than the first distance away from the router can automatically access the WiFi network of the router.
The second scenario is: the router can determine that the terminal device approaches the router according to the signal strength between the terminal device and the router, and when the distance between the terminal device and the router is smaller than or equal to the first distance, the router sends a response message to the terminal device.
For example, the router may determine that the mobile phone approaches the router if the signal strength of the probe packet received by the router from the mobile phone is stronger, and further, when the router determines that the distance between the mobile phone and the router is smaller than or equal to the first distance according to the signal strength, the router sends a response packet to the mobile phone, and the mobile phone displays a message popup window including a prompt message, a confirmation button, and a cancel button according to the received response packet.
Therefore, the terminal equipment which is dynamically and gradually close to the router and is less than the first distance away from the router can be automatically accessed into the WiFi network of the router, the terminal equipment which is always less than the first distance away from the router and is not provided with the mobile terminal equipment can not execute the WiFi network access process of the embodiment of the application, and the disturbance to the terminal equipment is reduced.
Illustratively, for the mobile phone 1 and the mobile phone 2, the distance to the router is the same at the beginning, when the mobile phone 1 approaches the router, the distance between the mobile phone 1 and the router is reduced until the distance between the mobile phone 1 and the router is less than or equal to the first distance, the WiFi network access procedure of the embodiment of the present application is triggered in the mobile phone 1, and when the mobile phone 2 does not approach the router, the WiFi network access procedure of the embodiment of the present application is not triggered in the mobile phone 2.
The third scenario is: the router may determine that the terminal device approaches the router according to the signal strength between the terminal device and the router, and when the distance between the terminal device and the router is smaller than or equal to a second distance, the router sends a response packet to the terminal device, where the second distance is greater than the first distance.
For example, the router may determine that the mobile phone approaches the router if the signal strength of the probe packet received by the router from the mobile phone is stronger, and further, when the router determines that the distance between the mobile phone and the router is smaller than the second distance according to the signal strength, the router sends a response packet to the mobile phone, and the mobile phone displays a message popup including a prompt message, a confirmation button, and a cancel button according to the received response packet.
It can be understood that the second distance may be a distance greater than the first distance, so that in the process of approaching the router by the terminal device, even if the distance between the terminal device and the router does not reach the first distance set by the user, the WiFi network access procedure of the embodiment of the present application can be triggered in the terminal device in advance, so that the terminal device can access the WiFi network as soon as possible.
Illustratively, for the mobile phone 1 and the mobile phone 2, the distance to the router is the same at the beginning, when the mobile phone 1 approaches the router, the distance between the mobile phone 1 and the router is reduced until the distance between the mobile phone 1 and the router is less than or equal to the second distance, the WiFi network access procedure of the embodiment of the present application is triggered in the mobile phone 1, and the WiFi network access procedure of the embodiment of the present application is not triggered in the mobile phone 2 if the mobile phone 2 does not approach the router.
The fourth scenario is as follows: the router can determine that the terminal device approaches the router according to the signal strength between the terminal device and the router, and then the router sends a response message to the terminal device.
For example, if the signal strength of the detection message received by the router from the mobile phone is stronger, it may be determined that the mobile phone is approaching the router, the router sends a response message to the mobile phone, and the mobile phone displays a message popup including a prompt message, a confirm button, and a cancel button according to the received response message.
For example, the distance between the mobile phone 1 and the router is the same as the distance between the mobile phone 2 and the router at the beginning, when the mobile phone 1 approaches the router and the distance between the mobile phone 1 and the router becomes smaller, the WiFi network access flow in the embodiment of the present application is triggered in the mobile phone 1, and when the mobile phone 2 does not approach the router, the WiFi network access flow in the embodiment of the present application is not triggered in the mobile phone 2.
Therefore, in the process that the terminal equipment approaches to the router, the WiFi network access process of the embodiment of the application can be triggered in the terminal equipment, and the terminal equipment can be accessed to the WiFi network as soon as possible.
In conclusion, in different scenes, the WiFi network access process of the embodiment of the present application may be triggered, so that the terminal device accesses the WiFi network as early as possible, the flexibility of the application scene of the WiFi network access method is improved, the convenience of accessing the terminal device to the WiFi network is improved, and the user experience is improved.
In a possible implementation, the determining, by the router according to the signal strength between the terminal device and the router, that the distance between the terminal device and the router is smaller than or equal to the first distance, and/or the terminal device approaches the router includes:
the router receives a detection message from the terminal equipment; when the router analyzes that the detection message comprises the preset field, the router determines that the distance between the terminal equipment and the router is smaller than or equal to a first distance according to the signal strength between the terminal equipment and the router, and/or the terminal equipment approaches the router.
In this embodiment of the application, the detecting a preset field in the message may include: the field indicating that the terminal device may support the WiFi network connection method provided in the embodiment of the present application may also be understood as an identifier indicating that the terminal device may support the WiFi network connection method provided in the embodiment of the present application. Illustratively, the probe message may be a probe request, the preset field may be a self-defined field reserved in the probe message, the preset field may be a number, a character or a character string, and the like, and the number of bits of the preset field may be set arbitrarily, which is not limited in the embodiment of the present application.
That is to say, based on the preset field in the detection message, the router may determine that the terminal device supports performing the procedure of accessing to the WiFi network according to the embodiment of the present application, and implement that the terminal device automatically accesses to the WiFi network based on the procedure of accessing to the WiFi network according to the embodiment of the present application. For a terminal device without the preset field in the detection message, the router may not support the procedure of automatically accessing the WiFi network according to the embodiment of the present application.
Optionally, an encryption field for performing security check may be added to the preset field in the detection message, so as to improve security, and the specific encryption mode is not specifically limited in this embodiment of the application. The detection message can also carry a validity check field, so that the security is further improved, the validity check field can comprise a random number, a timestamp and the like, and when the router determines that the random number conforms to a preset rule or the difference between the time of the timestamp and the time of receiving the detection message is smaller, the validity check can be confirmed to be passed.
Therefore, the accuracy and the safety of the connection process between the terminal equipment and the router can be improved.
In possible implementation, the response message replied to the terminal device by the router also includes a preset field, and when the terminal device receives the response message, the terminal device analyzes the response message. And when the response message comprises the preset field, the terminal equipment displays a first button and prompt information for prompting the terminal equipment to access the WiFi network.
In this way, based on the preset field in the response message, the terminal device may also confirm that the router supports the procedure of accessing the WiFi network according to the embodiment of the present application, and the terminal device automatically accesses the WiFi network based on the procedure of accessing the WiFi network according to the embodiment of the present application. For a router without the preset field in the response message, the flow for automatically accessing the WiFi network according to the embodiment of the present application may not be supported.
Certainly, an encryption field for performing security check may also be added to the preset field in the response message, so as to improve the security, and the specific encryption mode is not specifically limited in the embodiment of the present application. The response message may also carry a validity check field, which may include, for example, a random number, a timestamp, and the like, and when the terminal device determines that the random number conforms to a preset rule, or a difference between the time of the timestamp and the time of receiving the response message is small, it may be determined that the validity check is passed.
Therefore, the accuracy and the safety of the connection process between the terminal equipment and the router can be improved.
Under the condition that the detection message and the response message both include preset fields, the following several possibilities can be realized:
a first possible implementation: for the mobile phone 1 and the mobile phone 2, the distance between the mobile phone 1 and the router is the same at the beginning, the mobile phone 1 and the mobile phone 2 send detection messages to the router, when the mobile phone 1 approaches the router, and the distance between the mobile phone 1 and the router becomes smaller, the router sends response messages to the mobile phone 1, the WiFi network access process of the embodiment of the application is triggered in the mobile phone 1, a message popup window comprising a prompt message, a confirmation button and a cancel button can be displayed on the mobile phone 1, after the mobile phone 1 receives an operation of selecting the confirmation button by a user, the mobile phone 1 and the router both automatically trigger the PBC process, the mobile phone 1 simulates to start a PBC function, the router simulates to press the WPS button, an indicator lamp on the router flashes, and the mobile phone 1 can realize the WiFi network access through the router.
If the mobile phone 2 is not close to the router, the WiFi network access process of the embodiment of the present application is not triggered in the mobile phone 2.
A second possible implementation: for the mobile phone 1 and the mobile phone 2, the distance between the mobile phone 1 and the router is the same at the beginning, the mobile phone 1 and the mobile phone 2 send detection messages to the router, when the mobile phone 1 approaches the router and the distance between the mobile phone 1 and the router becomes smaller, the router sends response messages to the mobile phone 1, the WiFi network access process of the embodiment of the application is triggered in the mobile phone 1, the mobile phone 1 can display a message popup window comprising a prompt message, a confirmation button and a cancel button, after the mobile phone 1 receives the operation of selecting the cancel button by a user, the mobile phone 1 cancels the display of the message popup window, and the mobile phone 1 does not access the WiFi network through the router.
If the mobile phone 2 is not close to the router, the WiFi network access process in the embodiment of the present application is not triggered in the mobile phone 2.
A third possible implementation: for the mobile phone 1 and the mobile phone 2, the distance between the mobile phone 1 and the router is the same at the beginning, the mobile phone 1 and the mobile phone 2 send a detection message to the router, when the mobile phone 1 approaches the router and the distance between the mobile phone 1 and the router becomes smaller, the router sends a response message to the mobile phone 1, the WiFi network access process of the embodiment of the application is triggered in the mobile phone 1, a message popup window including a prompt message, a confirmation button and a cancel button can be displayed on the mobile phone 1, after the second time, the mobile phone 1 does not receive the operation of the confirmation button or the cancel button by the user, the mobile phone 1 cancels the display of the message popup window, and the mobile phone 1 does not access the WiFi network through the router.
If the mobile phone 2 is not close to the router, the WiFi network access process of the embodiment of the present application is not triggered in the mobile phone 2.
It can be understood that, when no field is preset in the detection message of the mobile phone, the mobile phone cannot access the WiFi network through the router based on the WiFi network access method of the embodiment of the present application, or when no field is preset in the response message of the router, the mobile phone cannot access the WiFi network through the router based on the WiFi network access method of the embodiment of the present application.
In a possible implementation, the preset fields include: first information for representing a type (type), second information for representing a length (length), and third information for representing a value (value).
The first information used for representing the type can represent the type of the preset field; the second information is used for indicating the length and can indicate the length of the preset field; the third information for representing the value may store the contents of the preset field.
It is understood that the preset field is not limited to the structure of type-length-value (TLV).
Therefore, whether the router and the terminal device can support the WiFi network connection method provided by the embodiment of the application or not is identified through the preset field, and the safety of the terminal device accessing the WiFi network can be improved.
Fig. 8 is a schematic diagram illustrating a specific terminal device and a router establishing connection according to an embodiment of the present application. The steps of establishing connection between the terminal equipment and the router are as follows:
s801, the terminal equipment sends a probe request with a sender specific to the router.
The vender specific is a field described by a protocol, in this embodiment of the present application, the vender specific includes the preset field described above and an encryption field used for performing security check, and the preset field indicates an identifier that the terminal device can support the WiFi network connection method provided in this embodiment of the present application.
After the router receives a detection message sent by the terminal device, the router analyzes that the detection message carries a vender specific, and the vender specific contains an identifier indicating that the terminal device can support the WiFi network connection method provided by the embodiment of the application, the router performs security verification according to an encryption field used for security verification in the vender specific, and after the security verification is passed, the router determines that the distance between the terminal device and the router is smaller than or equal to a security distance based on the signal strength of the received detection message, and/or the terminal device approaches the router.
S802, the router sends a response message (probe response) with the vendor specific to the terminal equipment.
And after the router passes the identification and security check of the acquired detection message, when the router determines that the distance between the terminal equipment and the router is less than or equal to the safe distance, and/or when the terminal equipment approaches the router, the router sends a response message with the vendor specific to the terminal equipment.
Otherwise, the router sends a response message which does not carry the vendor specific to the terminal equipment.
And S803, triggering the WPS PBC key process.
In the embodiment of the application, both the terminal side and the router side can trigger the WPS PBC keystroke procedure, and the triggering sequence is not specifically limited.
The flow of the terminal side triggering the WPS PBC key is as follows:
after the terminal device receives the response message sent by the router, the terminal device analyzes that the response message carries the vender specific, and the vender specific contains an identifier indicating that the router can support the WiFi network connection method provided by the embodiment of the present application, the terminal device performs security verification according to the encrypted field used for security verification in the vender specific, after the security verification is passed, the terminal device can display a message popup window containing a prompt message, a confirmation button and a cancel button for prompting the terminal device to access the WiFi network, and the message popup window can be as shown in fig. 7.
When the terminal equipment receives the operation of selecting the confirmation button by the user, the PBC flow at the terminal side is triggered. It can be understood that the PBC procedure at the terminal side is initiated by the terminal device simulating the opening of the PBC function, where the simulation may be understood as that an event similar to that obtained after the PBC function is triggered by the user is generated inside the terminal device, and based on the event, the terminal device may execute the PBC procedure without the user actually executing the triggering action.
The flow of the router side triggering the WPS PBC key is as follows:
optionally, when the terminal device receives an operation of selecting the confirmation button by the user, the terminal device may send a detection message carrying the PBC related information to the router, and after the router receives the detection message within the valid time, the router compares the terminal device sending the detection message with the terminal device in step S801, and may trigger the PBC flow on the router side in the case of the same terminal device.
Optionally, when the terminal device receives an operation of selecting the confirmation button by the user, the terminal device may send a probe message carrying the sender specific and the PBC related information to the router, and the router may trigger the PBC flow on the router side after receiving the probe message within the effective time.
Optionally, when the router receives the probe packet with the sender specific sent by the terminal device, and sends the response packet with the sender specific to the terminal device, the PBC flow at the router side may be triggered.
It can be understood that the PBC flow on the router side is initiated by the router simulating the WPS PBC button pressing, where the simulation can be understood as that an event similar to the event obtained after the WPS PBC button pressing is simulated by the user is generated inside the terminal device, and the router can execute the PBC flow based on the event without the user actually executing the trigger action.
After the PBC flow at the router side is triggered, the router may send a beacon message with information of Wi-Fi fast configuration (WSC), SR = TRUE, and PBC to the terminal device, where SR = TRUE indicates that the WPS PBC key has been simulated and pressed, and the beacon message is one of 802.11 messages.
And S804, continuing to execute the rest flows of the PBC.
After the terminal device and the router both trigger the PBC flow, the terminal device and the router may continue to execute the standard PBC flow, and complete the authentication (authentication), association (association), M1 to M8 and other flows for enabling the terminal device to access the WiFi network.
M1 and M2 can be the process of establishing encrypted connection between the terminal equipment and the router, M3-M7 can be the authentication process of confirming that the PIN codes used by the router and the terminal equipment are consistent, and M8 can carry configData and is used for configuring the WiFi network. It can be understood that the PBC procedure may be a procedure specified based on a protocol, and details of specific implementation are not described in this embodiment of the present application.
S805, the terminal equipment establishes connection with the router.
And connection is established between the terminal equipment and the router, and the terminal equipment can be connected with the WiFi network through the router.
In summary, in the embodiment of the present application, when the distance between the terminal device and the router is less than or equal to the safety distance, and/or when the terminal device approaches the router, a message popup window for prompting the user whether to access the WiFi network may pop up on a display screen of the terminal device, and when the user agrees to access the WiFi network, the terminal device and the router may simulate a PBC mode to implement WiFi network access of the terminal device. Like this, terminal equipment can realize that a key inserts the wiFi network, improves convenient degree, security and the flexibility that terminal equipment inserted the wiFi network, promotes user's use and experiences.
It should be noted that, the above embodiments are all described by taking a terminal device access router as an example. In possible implementation, the WiFi network access method provided in this application embodiment may also be applicable to a scenario where the terminal device accesses a WiFi hotspot transmitted by another terminal device, where a procedure executed by the terminal device that transmits the WiFi hotspot may correspond to a procedure executed by the router, a message transmitted between the terminal device and the terminal device that transmits the WiFi hotspot, a communication protocol that is followed, and the like, may be different from a message transmitted between the terminal device and the router, and a communication protocol that is followed, and may be adaptively changed, which is not described in this application embodiment in detail.
The method provided by the embodiment of the present application is explained above with reference to fig. 6 to 8, and the apparatus provided by the embodiment of the present application for performing the method is described below.
As shown in fig. 9, fig. 9 is a schematic structural diagram of a WiFi network access device provided in this embodiment of the present application, where the WiFi network access device may be a terminal device in this embodiment of the present application, or may also be a chip or a chip system in the terminal device, or the WiFi network access device may be a router in this embodiment of the present application, or may also be a chip or a chip system in the router.
As shown in fig. 9, a WiFi network access device 900 may be used in a circuit, hardware component, or chip, the WiFi network access device including a processing unit 901 and a communication unit 902. Wherein the processing unit 901 is configured to support the steps performed by the WiFi network access device. The communication unit 902 is used to support the WiFi network access apparatus to interact with other devices. Illustratively, when the WiFi network access apparatus is a terminal device, the communication unit 902 may be a communication interface or an interface circuit. When the WiFi network access device is a chip or chip system within a terminal device, the communication unit 902 may be a communication interface. For example, the communication interface may be an input/output interface, a pin or a circuit, etc.
In one possible implementation manner, the WiFi network access apparatus may further include: a display unit 903. The display unit 903 is configured to display image information supporting the WiFi network access device, such as a prompt message for prompting the terminal device to access the WiFi network.
In one possible implementation manner, the WiFi network access apparatus may further include: a storage unit 904. The storage unit 904 may include one or more memories, which may be devices in one or more devices or circuits for storing programs or data.
The storage unit 904 may be separate and connected to the processing unit 901 via a communication bus. The storage unit 904 may also be integrated with the processing unit 901.
Taking the case that the WiFi network access apparatus may be a chip or a chip system of the terminal device in this embodiment as an example, the storage unit 904 may store a computer execution instruction of the method of the terminal device, so that the processing unit 901 executes the method of the terminal device in the foregoing embodiment. The storage unit 904 may be a register, a cache memory, a Random Access Memory (RAM), or the like, and the storage unit 904 may be integrated with the processing unit 901. Memory unit 904 may be a read-only memory (ROM) or other type of static storage device that may store static information and instructions, and memory unit 904 may be separate from processing unit 901.
The apparatus of this embodiment may be correspondingly used to perform the steps performed in the above method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 10 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure, and as shown in fig. 10, the electronic device includes a processor 1001, a communication line 1004, and at least one communication interface (an exemplary case of the communication interface 1003 in fig. 10 is described as an example).
The processor 1001 may be a general-purpose Central Processing Unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more ics for controlling the execution of programs in accordance with the present disclosure.
The communication lines 1004 may include circuitry to communicate information between the above-described components.
Communication interface 1003, using any transceiver or the like, may be used to communicate with other devices or communication networks, such as ethernet, wireless Local Area Networks (WLAN), etc.
Possibly, the electronic device may further comprise a memory 1002.
The memory 1002 may be, but is not limited to, a read-only memory (ROM) or other type of static storage device that may store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that may store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disk read-only memory (CD-ROM) or other optical disk storage, optical disk storage (including compact disk, laser disk, optical disk, digital versatile disk, blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory may be separate and coupled to the processor via communication line 1004. The memory may also be integral to the processor.
The memory 1002 is used for storing computer-executable instructions for executing the present invention, and is controlled by the processor 1001. The processor 1001 is configured to execute computer-executable instructions stored in the memory 1002, so as to implement steps performed by a terminal device in the method provided by the embodiment of the present application, or implement steps performed by a router in the method provided by the embodiment of the present application.
Possibly, the computer-executable instructions in the embodiments of the present application may also be referred to as application program codes, which are not specifically limited in the embodiments of the present application.
In particular implementations, processor 1001 may include one or more CPUs, such as CPU0 and CPU1 in fig. 10, as one embodiment.
In particular implementations, an electronic device may include multiple processors, such as processor 1001 and processor 1005 of fig. 10, for example. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
Exemplarily, fig. 11 is a schematic structural diagram of a chip provided in an embodiment of the present application. Chip 1100 includes one or more (including two) processors 1120 and a communication interface 1130.
In some embodiments, memory 1140 stores the following elements: an executable module or a data structure, or a subset thereof, or an expanded set thereof.
In an embodiment of the present application, the memory 1140 may include a read-only memory and a random access memory, and provide instructions and data to the processor 1120. A portion of memory 1140 may also include non-volatile random access memory (NVRAM).
In the illustrated embodiment, the memory 1140, communication interface 1130, and processor 1120 are coupled via a bus system 1110. The bus system 1110 may include a power bus, a control bus, a status signal bus, and the like, in addition to a data bus. For ease of description, the various buses are labeled as bus system 1110 in FIG. 11.
The method described in the embodiment of the present application may be applied to the processor 1120, or may be implemented by the processor 1120. Processor 1120 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 1120. The processor 1120 can be a general-purpose processor (e.g., a microprocessor or a conventional processor), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate, transistor logic device or discrete hardware component, and the processor 1120 can implement or execute the methods, steps and logic blocks disclosed in the embodiments of the present application.
The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium mature in the field, such as a random access memory, a read only memory, a programmable read only memory, or a charged erasable programmable memory (EEPROM). The storage medium is located in the memory 1140, and the processor 1120 reads the information in the memory 1140, and combines the hardware thereof to complete the steps of the above-mentioned method.
In the above embodiments, the instructions stored by the memory for execution by the processor may be implemented in the form of a computer program product. The computer program product may be written in the memory in advance, or may be downloaded in the form of software and installed in the memory.
The computer program product includes one or more computer instructions. The procedures or functions according to the embodiments of the present application are all or partially generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in, or transmitted from, one computer-readable storage medium to another, e.g., from one website, computer, server, or datacenter, through a wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL), or wireless (e.g., infrared, wireless, microwave, etc.) manner to another website, computer, server, or datacenter.
The embodiment of the application also provides a computer readable storage medium. The methods described in the above embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. Computer-readable media may include both computer storage media and communication media, and may include any medium that can transfer a computer program from one place to another. A storage medium may be any target medium that can be accessed by a computer.
As one possible design, the computer-readable medium may include a compact disk read-only memory (CD-ROM), RAM, ROM, EEPROM, or other optical disk storage; the computer readable medium may include a disk memory or other disk storage device. Also, any connecting line may also be properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers.
Combinations of the above should also be included within the scope of computer-readable media. The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A WiFi network access method is applied to a system comprising a terminal device and a router, and the method comprises the following steps:
at a first moment, the distance between the terminal equipment and the router is greater than a first distance, the terminal equipment does not access the wireless fidelity WiFi network of the router, and an account and a password of the WiFi network are not stored in the terminal equipment;
at a second moment, the distance between the terminal equipment and the router is smaller than or equal to the first distance, and the terminal equipment displays a first button and prompt information for prompting the terminal equipment to access the WiFi network; the second time is later than the first time;
when the terminal equipment receives the trigger of the first button, the terminal equipment and the router both automatically trigger the button to configure a PBC flow, and the terminal equipment accesses the WiFi network based on the PBC flow;
before the terminal device displays a first button and prompt information for prompting the terminal device to access the WiFi network, the method comprises the following steps:
the router determines that the terminal equipment approaches to the router according to the signal strength between the terminal equipment and the router, and when the distance between the terminal equipment and the router is smaller than or equal to the first distance, the router sends a response message to the terminal equipment; the terminal equipment displays a first button and prompt information for prompting the terminal equipment to access the WiFi network, wherein the prompt information comprises: when the terminal equipment receives the response message, the terminal equipment displays a first button and prompt information for prompting the terminal equipment to access the WiFi network;
the method further comprises the following steps:
at a third moment, the distance between the terminal equipment and the router is greater than the first distance, the terminal equipment does not access the wireless fidelity WiFi network of the router, and an account and a password of the WiFi network are not stored in the terminal equipment; the third time is later than the second time;
at a fourth moment, the distance between the terminal equipment and the router is smaller than or equal to the first distance, and the terminal equipment displays the first button and prompt information for prompting the terminal equipment to access the WiFi network; the fourth time is later than the third time;
when the terminal device receives the trigger of the first button, the terminal device and the router both automatically trigger a button configuration mode PBC flow, and the terminal device accesses the WiFi network based on the PBC flow.
2. The method of claim 1, wherein at the second time, the terminal device further displays a second button, the method further comprising:
when the terminal equipment receives the trigger of the second button, the terminal equipment cancels the display of the first button and the prompt information for prompting the terminal equipment to access the WiFi network, and the terminal equipment does not access the WiFi network;
at a seventh moment, the distance between the terminal device and the router is smaller than or equal to the first distance, and the terminal device does not display the first button and the prompt information for prompting the terminal device to access the WiFi network; wherein a difference between the seventh time and the time when the trigger on the second button is received is within a first time period; or the distances between the terminal equipment and the router between the seventh moment and the second moment are smaller than or equal to the first distance.
3. The method of claim 2, further comprising:
at an eighth moment, the distance between the terminal equipment and the router is greater than the first distance, the terminal equipment does not access the wireless fidelity WiFi network of the router, and an account and a password of the WiFi network are not stored in the terminal equipment; the eighth time is later than the seventh time;
and at the ninth moment, the distance between the terminal equipment and the router is smaller than or equal to the first distance, and the terminal equipment displays the first button, the second button and prompt information for prompting the terminal equipment to access the WiFi network.
4. The method of claim 3, wherein after the ninth time, further comprising:
when the terminal equipment receives the trigger of the second button, the terminal equipment cancels the display of the first button and the prompt information for prompting the terminal equipment to access the WiFi network, the terminal equipment does not access the WiFi network, and when the distance between the terminal equipment and the router is less than or equal to the first distance again, the terminal equipment does not display the first button and the prompt information for prompting the terminal equipment to access the WiFi network.
5. The method of claim 4, further comprising:
after the terminal device displays the first button, the second button and a second time length after the terminal device displays the prompt message for prompting the terminal device to access the WiFi network, if the terminal device does not receive the trigger of the first button and the second button, the terminal device cancels the display of the first button, the second button and the prompt message for prompting the terminal device to access the WiFi network;
after a third time, if the distance between the terminal equipment and the router is less than or equal to the first distance, the terminal equipment displays the first button, the second button and the prompt message for prompting the terminal equipment to access the WiFi network again.
6. The method according to claim 1, wherein the router determines that the distance between the terminal device and the router is less than or equal to the first distance according to the signal strength between the terminal device and the router, and/or the terminal device approaches the router, and comprises:
the router receives a detection message from the terminal equipment;
when the router analyzes that the detection message comprises a preset field, the router determines that the distance between the terminal equipment and the router is smaller than or equal to the first distance according to the signal strength between the terminal equipment and the router, and/or the terminal equipment approaches the router.
7. The method according to claim 6, wherein the response message includes the preset field; when the terminal device receives the response message, the terminal device displays a first button and prompt information for prompting the terminal device to access the WiFi network, and the prompt information comprises:
when the terminal equipment receives the response message, the terminal equipment analyzes the response message;
and when the response message comprises the preset field, the terminal equipment displays a first button and prompt information for prompting the terminal equipment to access the WiFi network.
8. The method of claim 7, wherein the preset field comprises:
first information for indicating a type, second information for indicating a length, and third information for indicating a value.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, causes the electronic device to perform the steps performed by a terminal device in the method of any one of claims 1-8 or causes the electronic device to perform the steps performed by a router in the method of any one of claims 1-8.
10. A computer-readable storage medium, characterized in that it stores a computer program which, when executed by a processor, carries out the steps performed by a terminal device in the method of any one of claims 1 to 8, or causes the computer program to, when executed by a processor, carry out the steps performed by a router in the method of any one of claims 1 to 8.
CN202211433095.7A 2022-11-16 2022-11-16 WiFi network access method and related device Active CN115499897B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211433095.7A CN115499897B (en) 2022-11-16 2022-11-16 WiFi network access method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211433095.7A CN115499897B (en) 2022-11-16 2022-11-16 WiFi network access method and related device

Publications (2)

Publication Number Publication Date
CN115499897A CN115499897A (en) 2022-12-20
CN115499897B true CN115499897B (en) 2023-04-11

Family

ID=85115869

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211433095.7A Active CN115499897B (en) 2022-11-16 2022-11-16 WiFi network access method and related device

Country Status (1)

Country Link
CN (1) CN115499897B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116052607B (en) * 2023-04-03 2023-09-19 荣耀终端有限公司 Electronic equipment control method, device, chip, electronic equipment and medium
CN116887385B (en) * 2023-09-06 2023-12-12 博为科技有限公司 Wireless device access optimization method, device and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106413132A (en) * 2016-10-21 2017-02-15 乐视控股(北京)有限公司 WI-FI connection method and system
CN114697991A (en) * 2020-12-31 2022-07-01 华为技术有限公司 Wi-Fi configuration method and electronic equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106332303A (en) * 2015-06-30 2017-01-11 中兴通讯股份有限公司 Method and device for building connection
CN105142202A (en) * 2015-08-03 2015-12-09 腾讯科技(深圳)有限公司 Access control method, router and terminal equipment
FR3060251B1 (en) * 2016-12-09 2019-05-10 Sagemcom Broadband Sas METHOD OF PAIRING A WI-FI TYPE TERMINAL AT A WI-FI TYPE ACCESS POINT
CN113316952A (en) * 2019-01-30 2021-08-27 联发科技(新加坡)私人有限公司 Handover improvement in new radio unlicensed spectrum
CN114615660A (en) * 2020-12-04 2022-06-10 华为技术有限公司 Access method, system and electronic equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106413132A (en) * 2016-10-21 2017-02-15 乐视控股(北京)有限公司 WI-FI connection method and system
CN114697991A (en) * 2020-12-31 2022-07-01 华为技术有限公司 Wi-Fi configuration method and electronic equipment

Also Published As

Publication number Publication date
CN115499897A (en) 2022-12-20

Similar Documents

Publication Publication Date Title
EP4002108B1 (en) Application start method and electronic device
CN115499897B (en) WiFi network access method and related device
CN110602686B (en) Method for using remote SIM module and electronic equipment
CN110730448A (en) Method for establishing connection between devices and electronic device
CN111954283A (en) Method and terminal for accessing wireless local area network
CN113923611B (en) Call forwarding system and related device
CN112738143B (en) Account number binding method, device and system
CN114124980B (en) Method, device, system, terminal and storage medium for starting application
EP4243556A1 (en) Method for monitoring link and terminal device
CN112860445B (en) Method and terminal for sharing data between fast application and native application
WO2024037032A1 (en) Account login method and electronic device
WO2022199673A1 (en) Login authentication method and electronic device
CN115438354A (en) User privacy protection method and device
CN115879088A (en) Authority checking method and electronic equipment
CN113840030B (en) Icon display method, electronic device and readable storage medium
CN115348630A (en) Multi-device cooperation method and related device
CN115278642A (en) Method for acquiring information of SIM card, electronic equipment and terminal equipment
CN115268710A (en) Login method of application program, related device and system
CN116382728B (en) Propagation name display method and terminal equipment
WO2023160217A1 (en) Method for detecting embedded subscriber identity module (esim) card, and terminal device
CN116347550B (en) Network switching method and electronic equipment
EP4346250A1 (en) Method for switching security service, and terminal
CN118277120A (en) Method for managing system service and related device
CN117786706A (en) Access control method and electronic equipment
CN114980045A (en) Bluetooth connection method and electronic equipment

Legal Events

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