CN110602707A - Method and terminal for connecting wireless network - Google Patents

Method and terminal for connecting wireless network Download PDF

Info

Publication number
CN110602707A
CN110602707A CN201910837540.8A CN201910837540A CN110602707A CN 110602707 A CN110602707 A CN 110602707A CN 201910837540 A CN201910837540 A CN 201910837540A CN 110602707 A CN110602707 A CN 110602707A
Authority
CN
China
Prior art keywords
wireless network
terminal
wireless
password
bssid
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.)
Pending
Application number
CN201910837540.8A
Other languages
Chinese (zh)
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.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications Technology 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 Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN201910837540.8A priority Critical patent/CN110602707A/en
Publication of CN110602707A publication Critical patent/CN110602707A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/08Access security
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W16/00Network planning, e.g. coverage or traffic planning tools; Network deployment, e.g. resource partitioning or cells structures
    • H04W16/18Network planning tools
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0055Transmission or use of information for re-establishing the radio link
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/08Reselecting an access point
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers

Abstract

The application discloses a method and a terminal for connecting wireless networks, relates to the technical field of wireless networks, and is used for solving the problem that in the prior art, when a terminal is switched from a wireless network established by a router to another wireless network established by the router, the switching is inconvenient. The method comprises the following steps: a terminal connected with a first wireless network determines that switching to a second wireless network is needed; and if the first wireless network and the second wireless network are wireless networks established by the same router, the terminal uses the password of the first wireless network to connect the second wireless network. When the second wireless network switched by the terminal and the first wireless network connected with the terminal are determined to be wireless networks established by the same router, the password of the first wireless network is used for directly connecting the second wireless network. Therefore, the problem that the password needs to be input again when the wireless network is switched by the terminal is avoided, the operation of the user is simplified, and the use experience of the user is improved.

Description

Method and terminal for connecting wireless network
Technical Field
The present application relates to the field of wireless network technologies, and in particular, to a method and a terminal for connecting a wireless network.
Background
At present, WiFi (wireless network) hotspots are distributed throughout various scenes of work, life and the like, and a plurality of routers can create a plurality of wireless network hotspots, generally, passwords of the wireless network hotspots created by one router are the same, and when a terminal is switched from one wireless network created by one router to another wireless network created by the router, the terminal needs to input the passwords again to be capable of normally connecting, so that the problem that the wireless network is inconvenient to switch in practical use is caused.
Disclosure of Invention
The application provides a method and a terminal for connecting wireless networks, which are used for solving the problem that in the prior art, when the terminal is switched from one wireless network established by a router to another wireless network established by the router, the switching is inconvenient.
In a first aspect, an embodiment of the present application provides a method for connecting a wireless network, where the method includes:
a terminal connected with a first wireless network determines that switching to a second wireless network is needed;
and if the first wireless network and the second wireless network are wireless networks established by the same router, the terminal uses the password of the first wireless network to connect the second wireless network.
According to the method, when the second wireless network switched by the terminal and the first wireless network connected with the terminal are determined to be the wireless network established by the same router, the password of the first wireless network is used for directly connecting the second wireless network. Therefore, the problem that the password needs to be input again when the wireless network is switched by the terminal is avoided, the operation of the user is simplified, and the use experience of the user is improved.
In a possible implementation manner, the terminal determines whether the first wireless network and the second wireless network are wireless networks established by the same router by:
the terminal acquires a Basic Service Set Identifier (BSSID) of the second wireless network;
the terminal determines a BSSID universal segment of the second wireless network according to the BSSID of the second wireless network;
and if the BSSID general section of the second wireless network is the same as the BSSID general section of the first wireless network, the terminal determines that the first wireless network and the second wireless network are wireless networks established for the same router.
The method determines whether each wireless network is the wireless network established by the same router by judging whether the BSSID general segments of each wireless network are the same, can accurately and quickly obtain the judgment result, and thus completes the operation of switching to the second wireless network.
In a possible implementation manner, before the first wireless network and the second wireless network are wireless networks established by the same router, the method further includes, before connecting the second wireless network with the first wireless network using the password of the first wireless network:
the terminal determines that the password for connecting the second wireless network is not recorded.
The method defines the technical characteristic of using the password of the first wireless network to connect the second wireless network, namely, before using the password of the first wireless network to connect the second wireless network, whether the terminal records the password of the second wireless network is judged, and the technical characteristic of using the password of the first wireless network to connect the second wireless network is executed only when the terminal does not record the password of the second wireless network (namely, the terminal is connected with the second wireless network for the first time). Therefore, when the terminal is connected with the second wireless network for the first time, the terminal can be connected without inputting the password, and the problem that the terminal needs to input the password when being connected with the second wireless network for the first time is solved, so that the operation of a user is simplified, and the use experience of the user is improved.
In one possible implementation, the method further includes:
and if the password for connecting the second wireless network is recorded, the terminal is connected with the second wireless network according to the recorded password.
According to the method, under the condition that the password for connecting the second wireless network is recorded, the recorded password is directly used for connecting the second wireless network, so that even if the login passwords set by the first wireless network and the second wireless network are different, the second wireless network can be connected according to the recorded password for connecting the second wireless network, and the accuracy of connection is guaranteed.
In one possible implementation, the determining that the terminal connected to the first wireless network needs to switch to the second wireless network includes:
if the wireless networks with the signal intensity higher than that of the first wireless network are detected in the signal intensity of the wireless networks established by the same router as the first wireless network, determining that switching is needed and using the wireless network with the highest signal intensity in the wireless networks as the second wireless network; or;
and after receiving a switching instruction of the user, determining that the switching is needed and taking the wireless network selected by the user as the second wireless network.
According to the method, the terminal can be connected with the wireless network with the best signal at any time through the automatic switching method and the manual switching method, so that the network quality of the terminal is guaranteed, and the user experience is improved.
In a second aspect, an embodiment of the present application provides a terminal connected to a wireless network, including: a processor, a memory and a camera, wherein the memory stores program code that, when executed by the processor, causes the terminal to perform the following:
a terminal connected with a first wireless network determines that switching to a second wireless network is needed;
and if the first wireless network and the second wireless network are wireless networks established by the same router, the terminal uses the password of the first wireless network to connect the second wireless network.
In one possible implementation, the processor is specifically configured to:
the terminal acquires a Basic Service Set Identifier (BSSID) of the second wireless network;
the terminal determines a BSSID universal segment of the second wireless network according to the BSSID of the second wireless network;
and if the BSSID general section of the second wireless network is the same as the BSSID general section of the first wireless network, the terminal determines that the first wireless network and the second wireless network are wireless networks established for the same router.
In a possible implementation manner, the terminal further includes:
the terminal determines that the password for connecting the second wireless network is not recorded.
In a possible implementation manner, the terminal further includes:
and if the password for connecting the second wireless network is recorded, the terminal is connected with the second wireless network according to the recorded password.
In one possible implementation, the processor is specifically configured to:
if the wireless networks with the signal intensity higher than that of the first wireless network are detected in the signal intensity of the wireless networks established by the same router as the first wireless network, determining that switching is needed and using the wireless network with the highest signal intensity in the wireless networks as the second wireless network; or;
and after receiving a switching instruction of the user, determining that the switching is needed and taking the wireless network selected by the user as the second wireless network.
In a third aspect, an embodiment of the present application further provides a terminal connected to a wireless network, where the terminal includes a determining module and a connecting module:
the switching determining module is used for determining that a terminal connected with the first wireless network needs to be switched to the second wireless network;
and the connection module is used for connecting the terminal with the second wireless network by using the password of the first wireless network if the first wireless network and the second wireless network are wireless networks established by the same router.
In a possible implementation manner, the terminal determines whether the first wireless network and the second wireless network are wireless networks established by the same router by the following means:
an obtaining module, configured to obtain, by the terminal, a basic service set identifier BSSID of the second wireless network;
a determine common segment module for the terminal to determine the BSSID common segment of the second wireless network according to the BSSID of the second wireless network;
and the determining module is used for determining that the first wireless network and the second wireless network are wireless networks established for the same router if the BSSID general section of the second wireless network is the same as the BSSID general section of the first wireless network.
In a possible implementation manner, the terminal further includes:
and the password unrecorded module is used for determining that the password for connecting the second wireless network is not recorded by the terminal before the terminal uses the password of the first wireless network to connect the second wireless network if the first wireless network and the second wireless network are wireless networks established by the same router.
In a possible implementation manner, the terminal further includes:
and the password recording module is used for connecting the terminal with the second wireless network according to the recorded password if the password for connecting the second wireless network is recorded.
In one possible implementation, determining the switching module includes:
the automatic switching unit is used for determining that switching is needed and taking a wireless network with the highest signal strength in the wireless networks as the second wireless network if the wireless networks which are higher than the first wireless network are detected in the signal strengths of the wireless networks which are established for the same router as the first wireless network; or;
and the receiving switching unit is used for determining that the wireless network needs to be switched and taking the wireless network selected by the user as the second wireless network after receiving a switching instruction of the user.
In a fourth aspect, the present application also provides a computer storage medium having a computer program stored thereon, which when executed by a processor, performs the steps of the method of the first aspect.
In addition, for technical effects brought by any one implementation manner of the second aspect to the third aspect, reference may be made to technical effects brought by different implementation manners of the first aspect, and details are not described here.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic view of an application scenario of a terminal connected to a wireless network according to an embodiment of the present application;
fig. 2 is a schematic diagram illustrating a method for connecting a wireless network according to an embodiment of the present application;
fig. 3 is a schematic diagram of a selected wireless network according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a method for determining whether a first wireless network and a second wireless network are established by the same router according to an embodiment of the present invention;
fig. 5 is a flowchart of a complete method for connecting a terminal of a wireless network according to an embodiment of the present application;
fig. 6 is a schematic diagram of a first wireless network-connected terminal according to an embodiment of the present application;
fig. 7 is a schematic diagram of a second wireless network-connected terminal according to an embodiment of the present application;
fig. 8 is a schematic diagram of a third wireless network-connected terminal according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Some of the words that appear in the text are explained below:
1. in the embodiment of the present application, the term "and/or" describes an association relationship of associated objects, and means that there may be three relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
2. The term "terminal" in the embodiments of the present application refers to a computer device that can be used in mobile, i.e., a mobile phone, a tablet, and the like.
3. In the embodiment of the present application, the term "BSSID (Basic Service Set IDentifier)" is a building block of an 802.11 network, and is used to describe a physical address of a device in an 802.11WLAN (Wireless Local Area network).
The application scenario described in the embodiment of the present application is for more clearly illustrating the technical solution of the embodiment of the present application, and does not form a limitation on the technical solution provided in the embodiment of the present application, and it can be known by a person skilled in the art that with the occurrence of a new application scenario, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems. In the description of the present application, the term "plurality" means two or more unless otherwise specified.
In order to better understand the technical solution provided by the embodiments of the present application, the following brief description is made on the basic principle of the solution:
at present, Wifi (wireless network) hotspots are distributed throughout various scenes such as work and life, and many routers can create a plurality of wireless network hotspots, for example: a router A is deployed in an office hall, and the router A opens three WiFi hotspots, namely A-5G, A-5G-2 and A-2.4G.
In general, passwords of multiple wireless network hotspots established by the same router are the same, and when a user switches from one wireless network created by one router to another wireless network created by the router, the password needs to be input again to be able to normally connect, for example: the upper three WiFi hotspots: the passwords of the A-5G, the A-5G-2 and the A-2.4G are 123456, and when the terminal is connected with the WiFi hotspot of the A-2.4G, the terminal wants to switch to the WiFi hotspot of the A-5G, the terminal can normally switch by inputting the password 123456 again. Therefore, in the related art, when a terminal is handed over from one wireless network created by one router to another wireless network created by the router, the handover is inconvenient.
In view of the above, the present application provides a method and a terminal for connecting a wireless network, which directly connect a second wireless network using a password of a first wireless network when determining that the second wireless network switched by the terminal and the first wireless network connected by the terminal are wireless networks established by the same router. For example: the upper three WiFi hotspots: the passwords of A-5G, A-5G-2 and A-2.4G are 123456, and when the terminal wants to switch to the WiFi hotspot of A-5G under the condition that the terminal is connected with the WiFi hotspot of A-2.4G, the terminal can be directly connected with the A-5G according to the recorded passwords of A-2.4G. Therefore, the problem that the password needs to be input again when the wireless network is switched by the terminal is avoided, the operation of the user is simplified, and the use experience of the user is improved.
For the convenience of understanding, the technical solutions provided in the present application are further described below with reference to the accompanying drawings.
Fig. 1 is a schematic view of an application scenario of a method for connecting a wireless network according to an embodiment of the present application. This scenario includes a terminal device 101 of a user 100, a router 102, a wireless network 103 created by the router 102, a wireless network 104 and a wireless network 105.
Currently, the terminal device 101 is connected to the wireless network 103, and when the user 100 wants to switch the wireless network connected to the terminal device 101 from the wireless network 103 to the wireless network 105, the terminal device 101 needs to determine whether or not the wireless network 103 and the wireless network 105 are established as a wireless network of the same router. If the terminal apparatus 101 determines that both the wireless network 103 and the wireless network 105 are wireless networks established by the router 102, the terminal apparatus 101 connects to the wireless network 105 using the password for connecting to the wireless network 103.
In one embodiment, the terminal device 101 may be a cell phone, a tablet, a personal computer, a virtual machine, or a simulator simulated terminal device, etc.
In view of the above scenario, the following describes embodiments of the present application in further detail with reference to the drawings of the specification.
As shown in fig. 2, a method for connecting a wireless network according to an embodiment of the present application includes the following steps:
step 201: a terminal connected to a first wireless network determines that a handover to a second wireless network is required.
Step 202: and if the first wireless network and the second wireless network are wireless networks established by the same router, the terminal uses the password of the first wireless network to connect the second wireless network.
Therefore, the problem that the password needs to be input again when the wireless network is switched by the terminal is avoided, the operation of the user is simplified, and the use experience of the user is improved.
Having described the method of connecting to a wireless network, further description of how to determine to switch wireless networks is provided below. In the embodiment of the application, when the terminal is switched from one wireless network to another wireless network, the switching can be carried out by responding to the switching instruction of the user, and the switching can also be automatically carried out according to the signal intensity of each wireless network. These two cases are explained separately below.
The first situation, responding to the switching instruction of the user to switch:
in the embodiment of the application, if a user wants to switch a wireless network, the user can select one WiFi from a WiFi list in the terminal to switch. As shown in fig. 3, there are three WiFi hotspots in the WiFi list, which are: A-5G, A-5G-2, A-2.4G. At present, the WiFi hotspot connected with the terminal is A-2.4G, and the user wants to switch to A-5G.
And after receiving a switching instruction of the user, the terminal determines that the wireless network needs to be switched and takes the wireless network selected by the user as the second wireless network.
And in the second case, the switching can be automatically carried out according to the signal intensity of each wireless network:
in this embodiment, the terminal detects the signal strength of each wireless network in the current location, and if it detects that there is a wireless network with higher signal strength than the first wireless network in the wireless networks established for the same router as the first wireless network, it determines that a handover is required and uses the wireless network with the highest signal strength in the wireless networks as the second wireless network.
For example: the terminal detects 4 wireless networks, A-5G-2, A-2.4G and B-2.4G, respectively, at the current position. Wherein, three wireless networks of A-5G, A-5G-2 and A-2.4G are established for the router A, and B-2.4G is established by the router. The wireless network connected with the terminal is A-5G, the signal intensity of the wireless network is-51 dBm (decibel milliwatt), the signal intensity of A-5G-2 is-39 dBm, the signal intensity of A-2.4G is-75 dBm, and the signal intensity of B-2.4G is-46 dBm. The comparison determines that the signal strength of A-5G-2 and B-2.4G is higher than that of A-5G, but the A-5G-2 is used as a second wireless network for connection because B-2.4G and A-5G are not wireless networks established by the same router.
In one embodiment, if it is detected that the signal strength of the plurality of wireless networks is higher than that of the first wireless network and the plurality of wireless networks are all wireless networks established for the same router as the first wireless network, the wireless network with the highest signal strength is selected from the plurality of wireless networks as the second wireless network.
Therefore, the terminal can be connected with the wireless network with the best signal at any time, so that the network quality of the terminal is ensured, and the user experience is improved.
In the embodiment of the present application, whether the wireless network is automatically switched or after the second wireless network to be switched is determined, it is necessary to determine whether the first wireless network and the second wireless network are established as the same router.
As shown in fig. 4, a schematic flowchart of a wireless network for determining whether a first wireless network and a second wireless network are established by the same router includes the following steps:
step 401: the terminal acquires the BSSID of the second wireless network.
In the embodiment of the present application, BSSID information of a wireless network is acquired by a WifiManager (wireless network manager) of a terminal. Wherein, BSSID is composed of 6 segments, and a colon mark is arranged between each segment: and (4) dividing. For example: the BSSID of the second wireless network is: 3 c: 37: 86: 57: 6 a: b0.
step 402: the terminal determines a BSSID general segment of the second wireless network based on the BSSID of the second wireless network.
In the embodiment of the present application, the BSSID general segment is the first five segments of BSSID information. If the BSSID of the second wireless network is: 3 c: 37: 86: 57: 6 a: b0, the BSSID general segment of the second wireless network is: 3 c: 37: 86: 57: 6 a.
Step 403: and if the BSSID general section of the second wireless network is the same as the BSSID general section of the first wireless network, the terminal determines that the first wireless network and the second wireless network are wireless networks established for the same router.
In the embodiment of the present application, BSSID general segments of wireless networks created by the same router are the same, and thus it is possible to determine whether each wireless network is a wireless network established by the same router based on the BSSID general segments. Thus, whether the wireless networks are established for the same router or not is determined by judging whether the BSSID general segments of the wireless networks are the same or not, the judgment result can be accurately and quickly obtained, and the operation of switching to the second wireless network is completed.
In the embodiment of the application, when the terminal is connected to a wireless network, the password connected to the wireless network is recorded. Therefore, when the terminal determines from the connected first wireless network that a handover to the second wireless network is required, it can be detected whether a password for connecting the second wireless network is recorded.
And if the terminal determines that the password for connecting the second wireless network is not recorded, the terminal is connected with the second wireless network for the first time, so that the terminal uses the password of the first wireless network to connect the second wireless network after determining that the first wireless network and the second wireless network are established as the wireless network of the same router.
Therefore, when the terminal is connected with the second wireless network for the first time, the terminal can be connected without inputting the password, and the problem that the terminal needs to input the password when being connected with the second wireless network for the first time is solved, so that the operation of a user is simplified, and the use experience of the user is improved.
And if the password for connecting the second wireless network is recorded, the terminal is connected with the second wireless network according to the recorded password.
In the embodiment of the application, under the condition that the password for connecting the second wireless network is recorded, the recorded password is directly used for connecting the second wireless network, so that even if the login passwords set by the first wireless network and the second wireless network are different, the second wireless network can be connected according to the recorded password for connecting the second wireless network, and the connection accuracy is ensured. Meanwhile, the recorded password is directly used for connection, and the second wireless network and the first wireless network do not need to be judged to be the wireless network established by the same router, so that the connection time is saved.
In the embodiment of the present application, if the second wireless network cannot be connected using the password of the first wireless network (i.e., the passwords of the first wireless network and the second wireless network are not the same), the connection is performed by the user inputting the password.
As shown in fig. 5, an embodiment of the present application provides a complete method for connecting a wireless network, including:
step 501: a terminal connected to a first wireless network determines that a handover to a second wireless network is required.
Step 502: determining whether the terminal records a password for connecting to the second wireless network; if not, go to step 503; if yes, go to step 506.
Step 503: acquiring a BSSID of the second wireless network.
Step 504: determining a BSSID generic segment of the second wireless network based on the BSSID of the second wireless network.
Step 505: and if the BSSID general section of the second wireless network is the same as the BSSID general section of the first wireless network, the terminal uses the password of the first wireless network to connect the second wireless network.
Step 506: connecting the second wireless network according to the recorded password.
As shown in fig. 6, an embodiment of the present application further provides a terminal connected to a wireless network, where the terminal includes: a processor 610, and a memory 620, wherein the memory 620 stores program code, which when executed by the processor 610, causes the terminal to perform the following:
a terminal connected with a first wireless network determines that switching to a second wireless network is needed;
and if the first wireless network and the second wireless network are wireless networks established by the same router, the terminal uses the password of the first wireless network to connect the second wireless network.
Optionally, the processor 610 is specifically configured to:
the terminal acquires a Basic Service Set Identifier (BSSID) of the second wireless network;
the terminal determines a BSSID universal segment of the second wireless network according to the BSSID of the second wireless network;
and if the BSSID general section of the second wireless network is the same as the BSSID general section of the first wireless network, the terminal determines that the first wireless network and the second wireless network are wireless networks established for the same router.
Optionally, the terminal further includes:
the terminal determines that the password for connecting the second wireless network is not recorded.
Optionally, the terminal further includes:
and if the password for connecting the second wireless network is recorded, the terminal is connected with the second wireless network according to the recorded password.
Optionally, the processor 610 is specifically configured to:
if the wireless networks with the signal intensity higher than that of the first wireless network are detected in the signal intensity of the wireless networks established by the same router as the first wireless network, determining that switching is needed and using the wireless network with the highest signal intensity in the wireless networks as the second wireless network; or the like, or, alternatively,
and after receiving a switching instruction of the user, determining that the switching is needed and taking the wireless network selected by the user as the second wireless network.
As shown in fig. 7, an embodiment of the present application further provides a terminal connected to a wireless network, where the terminal includes a determining switching module 701 and a connecting module 702:
a determining and switching module 701, configured to determine that a terminal connected to a first wireless network needs to be switched to a second wireless network;
a connection module 702, configured to, if the first wireless network and the second wireless network are wireless networks established by the same router, connect the terminal to the second wireless network by using the password of the first wireless network.
In a possible implementation manner, the terminal determines whether the first wireless network and the second wireless network are wireless networks established by the same router by the following means:
an obtaining module, configured to obtain, by the terminal, a basic service set identifier BSSID of the second wireless network;
a determine common segment module for the terminal to determine the BSSID common segment of the second wireless network according to the BSSID of the second wireless network;
and the determining module is used for determining that the first wireless network and the second wireless network are wireless networks established for the same router if the BSSID general section of the second wireless network is the same as the BSSID general section of the first wireless network.
In a possible implementation manner, the terminal further includes:
a password unregistered module, configured to, if the first wireless network and the second wireless network are wireless networks established by the same router, the connection module 702, before the terminal connects to the second wireless network using the password of the first wireless network, determine that the password connected to the second wireless network is unregistered by the terminal.
In a possible implementation manner, the terminal further includes:
and the password recording module is used for connecting the terminal with the second wireless network according to the recorded password if the password for connecting the second wireless network is recorded.
In one possible implementation, determining the switching module 701 includes:
the automatic switching unit is used for determining that switching is needed and taking a wireless network with the highest signal strength in the wireless networks as the second wireless network if the wireless networks which are higher than the first wireless network are detected in the signal strengths of the wireless networks which are established for the same router as the first wireless network; or the like, or, alternatively,
and the receiving switching unit is used for determining that the wireless network needs to be switched and taking the wireless network selected by the user as the second wireless network after receiving a switching instruction of the user.
As shown in fig. 8, an embodiment of the present disclosure provides a terminal 800 connected to a wireless network, including: radio Frequency (RF) circuitry 810, a power supply 820, a processor 830, a memory 840, an input unit 850, a display unit 860, a camera 870, a communication interface 880, and a WiFi module 890. Those skilled in the art will appreciate that the configuration of the terminal shown in fig. 8 is not intended to be limiting, and that the terminal provided by the embodiments of the present application may include more or less components than those shown, or some components may be combined, or a different arrangement of components may be provided.
The following describes the various components of the terminal 800 in detail with reference to fig. 8:
the RF circuitry 810 may be used for receiving and transmitting data during a communication or conversation. Specifically, the RF circuit 810 sends downlink data of the base station to the processor 830 for processing; and in addition, sending the uplink data to be sent to the base station. Generally, the RF circuit 810 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
In addition, the RF circuit 810 may also communicate with networks and other terminals via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
The WiFi technology belongs to a short-distance wireless transmission technology, and the terminal 800 may connect to an Access Point (AP) through a WiFi module 890, thereby implementing Access to a data network. The WiFi module 890 can be used for receiving and transmitting data during communication.
The terminal 800 may be physically connected to other terminals through the communication interface 880. In some embodiments, the communication interface 880 is connected to the communication interface of the other terminal through a cable, so as to implement data transmission between the terminal 800 and the other terminal.
In the embodiment of the present application, the terminal 800 can implement a communication service and send information to other contacts, so the terminal 800 needs to have a data transmission function, that is, the terminal 800 needs to include a communication module inside. Although fig. 8 shows communication modules such as the RF circuit 810, the WiFi module 890 and the communication interface 880, it is understood that at least one of the above components or other communication modules (e.g., bluetooth modules) for enabling communication are present in the terminal 800 for data transmission.
For example, when the terminal 800 is a mobile phone, the terminal 800 may include the RF circuit 810 and may further include the WiFi module 890; when the terminal 800 is a computer, the terminal 800 may include the communication interface 880 and may further include the WiFi module 890; when the terminal 800 is a tablet computer, the terminal 800 may include the WiFi module.
The memory 840 may be used to store software programs and modules. The processor 830 executes various functional applications and data processing of the terminal 800 by executing the software programs and modules stored in the memory 840, and after the processor 830 executes the program codes in the memory 840, part or all of the processes in fig. 1 of the embodiments of the present disclosure can be implemented.
In some embodiments, the memory 840 may mainly include a program storage area and a data storage area. The storage program area can store an operating system, various application programs (such as communication application), a face recognition module and the like; the storage data area may store data (such as various multimedia files like pictures, video files, etc., and face information templates) created according to the use of the terminal, etc.
Further, the memory 840 may include high speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 850 may be used to receive numeric or character information input by a user and generate key signal inputs related to user settings and function control of the terminal 800.
In some embodiments, input unit 850 may include a touch panel 851 and other input terminals 852.
The touch panel 851, also referred to as a touch screen, can collect touch operations of a user on or near the touch panel 851 (for example, operations of the user on or near the touch panel 851 using any suitable object or accessory such as a finger or a stylus), and drive the corresponding connection device according to a preset program. In some embodiments, the touch panel 851 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 830, and can receive and execute commands sent by the processor 830. In addition, the touch panel 851 may be implemented by various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave.
In some embodiments, the other input terminals 852 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 860 may be used to display information input by a user or information provided to a user and various menus of the terminal 800. The display unit 860 is a display system of the terminal 800, and is configured to present an interface and implement human-computer interaction.
Further, the touch panel 851 may cover the display panel 861, and when the touch panel 851 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 830 to determine the type of touch event, and then the processor 830 provides a corresponding visual output on the display panel 861 according to the type of touch event.
Although in fig. 8, the touch panel 851 and the display panel 861 are two separate components to implement the input and output functions of the terminal 800, in some embodiments, the touch panel 851 and the display panel 861 may be integrated to implement the input and output functions of the terminal 800.
The processor 830 is a control center of the terminal 800, connects various components using various interfaces and lines, and performs various functions of the terminal 800 and processes data by operating or executing software programs and/or modules stored in the memory 840 and calling data stored in the memory 840, thereby implementing various services based on the terminal.
In some implementations, the processor 830 may include one or more processors. In some embodiments, the processor 830 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 830.
The camera 870 is configured to implement a shooting function of the terminal 800, and shoot pictures or videos. The camera 870 may also be used to implement a scanning function of the terminal 800, and scan a scanned object (two-dimensional code/barcode).
The terminal 800 also includes a power supply 820 (e.g., a battery) for powering the various components. In some embodiments, the power supply 820 may be logically connected to the processor 830 via a power management system, so as to manage charging, discharging, and power consumption via the power management system.
Although not shown, the terminal 800 may further include at least one sensor, an audio circuit, and the like, which will not be described herein.
Wherein the memory 830 may store the same program code as the memory 620, which when executed by the processor 820, causes the processor 820 to implement all of the functions of the processor 610.
An embodiment of the present invention further provides a computer-readable non-volatile storage medium, which includes program code, when the program code runs on a computing terminal, the program code is configured to enable the computing terminal to execute the steps of the method for connecting to a wireless network according to the embodiment of the present invention.
The present application is described above with reference to block diagrams and/or flowchart illustrations of methods, apparatus (systems) and/or computer program products according to embodiments of the application. It will be understood that one block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, and/or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer and/or other programmable data processing apparatus, create means for implementing the functions/acts specified in the block diagrams and/or flowchart block or blocks.
Accordingly, the subject application may also be embodied in hardware and/or in software (including firmware, resident software, micro-code, etc.). Furthermore, the present application may take the form of a computer program product on a computer-usable or computer-readable storage medium having computer-usable or computer-readable program code embodied in the medium for use by or in connection with an instruction execution system. In the context of this application, a computer-usable or computer-readable medium may be any medium that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A method of connecting to a wireless network, the method comprising:
a terminal connected with a first wireless network determines that switching to a second wireless network is needed;
and if the first wireless network and the second wireless network are wireless networks established by the same router, the terminal uses the password of the first wireless network to connect the second wireless network.
2. The method of claim 1, wherein the terminal determines whether the first wireless network and the second wireless network are wireless networks established by the same router by:
the terminal acquires a Basic Service Set Identifier (BSSID) of the second wireless network;
the terminal determines a BSSID universal segment of the second wireless network according to the BSSID of the second wireless network;
and if the BSSID general section of the second wireless network is the same as the BSSID general section of the first wireless network, the terminal determines that the first wireless network and the second wireless network are wireless networks established for the same router.
3. The method of claim 1, wherein before the first wireless network and the second wireless network establish wireless networks for the same router, the method further comprises:
the terminal determines that the password for connecting the second wireless network is not recorded.
4. The method of claim 3, further comprising:
and if the password for connecting the second wireless network is recorded, the terminal is connected with the second wireless network according to the recorded password.
5. The method according to any of claims 1 to 4, wherein the determining that the terminal connected to the first wireless network needs to switch to the second wireless network comprises:
if the wireless networks with the signal intensity higher than that of the first wireless network are detected in the signal intensity of the wireless networks established by the same router as the first wireless network, determining that switching is needed and using the wireless network with the highest signal intensity in the wireless networks as the second wireless network; or the like, or, alternatively,
and after receiving a switching instruction of the user, determining that the switching is needed and taking the wireless network selected by the user as the second wireless network.
6. A terminal for connecting to a wireless network, the terminal comprising: a processor and a memory, wherein the memory stores program code that, when executed by the processor, causes the terminal to perform the following:
a terminal connected with a first wireless network determines that switching to a second wireless network is needed;
and if the first wireless network and the second wireless network are wireless networks established by the same router, the terminal uses the password of the first wireless network to connect the second wireless network.
7. The terminal of claim 6, wherein the processor is specifically configured to:
the terminal acquires a Basic Service Set Identifier (BSSID) of the second wireless network;
the terminal determines a BSSID universal segment of the second wireless network according to the BSSID of the second wireless network;
and if the BSSID general section of the second wireless network is the same as the BSSID general section of the first wireless network, the terminal determines that the first wireless network and the second wireless network are wireless networks established for the same router.
8. The terminal of claim 6, further comprising:
the terminal determines that the password for connecting the second wireless network is not recorded.
9. The terminal of claim 8, wherein the terminal further comprises:
and if the password for connecting the second wireless network is recorded, the terminal is connected with the second wireless network according to the recorded password.
10. The terminal of any of claims 6 to 9, wherein the processor is specifically configured to:
if the wireless networks with the signal intensity higher than that of the first wireless network are detected in the signal intensity of the wireless networks established by the same router as the first wireless network, determining that switching is needed and using the wireless network with the highest signal intensity in the wireless networks as the second wireless network; or the like, or, alternatively,
and after receiving a switching instruction of the user, determining that the switching is needed and taking the wireless network selected by the user as the second wireless network.
CN201910837540.8A 2019-09-05 2019-09-05 Method and terminal for connecting wireless network Pending CN110602707A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910837540.8A CN110602707A (en) 2019-09-05 2019-09-05 Method and terminal for connecting wireless network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910837540.8A CN110602707A (en) 2019-09-05 2019-09-05 Method and terminal for connecting wireless network

Publications (1)

Publication Number Publication Date
CN110602707A true CN110602707A (en) 2019-12-20

Family

ID=68857655

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910837540.8A Pending CN110602707A (en) 2019-09-05 2019-09-05 Method and terminal for connecting wireless network

Country Status (1)

Country Link
CN (1) CN110602707A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111970750A (en) * 2020-08-18 2020-11-20 维沃移动通信有限公司 Multi-frequency WiFi identification method and device
CN113747543A (en) * 2021-08-03 2021-12-03 荣耀终端有限公司 Network distribution method and device
WO2022188538A1 (en) * 2021-03-10 2022-09-15 Oppo广东移动通信有限公司 Method for authenticating wi-fi connection, wireless terminal, access node, and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108337707A (en) * 2018-04-17 2018-07-27 Oppo广东移动通信有限公司 A kind of switching method of wireless network, mobile terminal and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108337707A (en) * 2018-04-17 2018-07-27 Oppo广东移动通信有限公司 A kind of switching method of wireless network, mobile terminal and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111970750A (en) * 2020-08-18 2020-11-20 维沃移动通信有限公司 Multi-frequency WiFi identification method and device
WO2022188538A1 (en) * 2021-03-10 2022-09-15 Oppo广东移动通信有限公司 Method for authenticating wi-fi connection, wireless terminal, access node, and storage medium
CN115087073A (en) * 2021-03-10 2022-09-20 Oppo广东移动通信有限公司 Method for authenticating Wi-Fi connection, wireless terminal, access node and storage medium
CN113747543A (en) * 2021-08-03 2021-12-03 荣耀终端有限公司 Network distribution method and device

Similar Documents

Publication Publication Date Title
US10142845B2 (en) Network connection method and apparatus, and computer storage medium
KR102424190B1 (en) NSA and SA networking mode selection method and terminal equipment
CN105075333B (en) User equipment and method for guaranteeing continuous receiving of service in wireless network
CN106464303B (en) Data transmission method and terminal
EP3462803B1 (en) Method for managing bluetooth connection and master bluetooth device
JP7200312B2 (en) Method and terminal device for establishing a hotspot connection
US10813058B2 (en) Method for processing information and terminal device
CN106604314B (en) WiFi roaming network access method and terminal equipment
CN110602707A (en) Method and terminal for connecting wireless network
CN108255683B (en) Method for prompting message in terminal and terminal
CN106713799B (en) Projection equipment control method, projection equipment and intelligent terminal
CN110933704B (en) Network communication method, device, storage medium and electronic equipment
CN112118538A (en) Method and device for device information interaction between terminals
CN110870353B (en) WiFi connection method and terminal
CN110618806B (en) Application program control method and device, electronic equipment and storage medium
EP3355655A1 (en) Direct mode operation communication method and terminal
CN111294875A (en) Measurement report method, terminal equipment information acquisition method and electronic equipment
CN112543493A (en) Wifi connection method, terminal and computer storage medium
CN112256335B (en) Method and device for loading drive file, storage medium and electronic equipment
CN111988867B (en) Communication method with limited radio resource control and terminal equipment
CN111654898B (en) Information display method and device, storage medium and terminal
CN111970745B (en) WLAN (Wireless local area network) connection method of terminal and terminal
JP7477589B2 (en) Method and terminal device for establishing a hotspot connection - Patents.com
WO2018103442A1 (en) Information processing method and terminal device
CN110119238B (en) Method and equipment for adjusting position of intelligent terminal object

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20191220

RJ01 Rejection of invention patent application after publication