CN111586665B - Method and device for accessing wireless network - Google Patents

Method and device for accessing wireless network Download PDF

Info

Publication number
CN111586665B
CN111586665B CN202010693726.3A CN202010693726A CN111586665B CN 111586665 B CN111586665 B CN 111586665B CN 202010693726 A CN202010693726 A CN 202010693726A CN 111586665 B CN111586665 B CN 111586665B
Authority
CN
China
Prior art keywords
terminal
network
connection
communication connection
wireless network
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
CN202010693726.3A
Other languages
Chinese (zh)
Other versions
CN111586665A (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.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information 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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202010693726.3A priority Critical patent/CN111586665B/en
Publication of CN111586665A publication Critical patent/CN111586665A/en
Application granted granted Critical
Publication of CN111586665B publication Critical patent/CN111586665B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Abstract

In the method for accessing the wireless network, a first terminal establishes a first communication connection with a second terminal when detecting that a distance between the first terminal and the second terminal is smaller than a preset distance threshold, wherein the first communication connection is a short-range communication connection. And responding to an acquisition request of the network connection information sent by the second terminal through the first communication connection, and sending the network connection information of the first wireless network to the second terminal through the first communication connection, so that the second terminal accesses the first wireless network according to the received network connection information.

Description

Method and device for accessing wireless network
Technical Field
One or more embodiments of the present disclosure relate to the field of communications technologies, and in particular, to a method and an apparatus for accessing a wireless network.
Background
With the popularity of artificial intelligence technology, the number of intelligent terminals increases day by day, and the use of the intelligent terminals basically needs the support of a network, so that the problem to be solved is to quickly and effectively access the intelligent terminals to the wireless network.
Disclosure of Invention
One or more embodiments of the present specification describe a method and apparatus for accessing a wireless network, which can quickly and efficiently access a terminal to the wireless network.
In a first aspect, a method for accessing a wireless network is provided, including:
when detecting that the distance between the first terminal and the second terminal is smaller than a preset distance threshold value, establishing a first communication connection with the second terminal, wherein the first communication connection is a short-distance communication connection;
and responding to an acquisition request of network connection information sent by the second terminal through the first communication connection, and sending the network connection information of the first wireless network to the second terminal through the first communication connection, so that the second terminal accesses the first wireless network according to the network connection information.
In a second aspect, a method for accessing a wireless network is provided, including:
after the second terminal establishes a first communication connection with a first terminal accessed to a first wireless network, sending an acquisition request of network connection information to the first terminal through the first communication connection; the first communication connection is a close range communication connection;
receiving network connection information of the first wireless network, which is sent by the first terminal through the first communication connection;
and accessing the first wireless network according to the network connection information.
In a third aspect, an apparatus for accessing a wireless network is provided, including:
the device comprises an establishing unit, a judging unit and a judging unit, wherein the establishing unit is used for establishing a first communication connection with a second terminal when detecting that the distance between the establishing unit and the second terminal is less than a preset distance threshold value, and the first communication connection is a short-distance communication connection;
a sending unit, configured to send, in response to an acquisition request of network connection information sent by the second terminal through the first communication connection, the network connection information of the first wireless network to the second terminal through the first communication connection, so that the second terminal accesses the first wireless network according to the network connection information.
In a fourth aspect, an apparatus for accessing a wireless network is provided, including:
a sending unit, configured to send, to a first terminal that has accessed a first wireless network, an acquisition request of network connection information through a first communication connection after the first communication connection is established between the second terminal and the first terminal; the first communication connection is a close range communication connection;
a receiving unit, configured to receive network connection information of the first wireless network, which is sent by the first terminal through the first communication connection;
and the access unit is used for accessing the first wireless network according to the network connection information.
In a fifth aspect, there is provided a storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of the first aspect or the method of the second aspect.
In a sixth aspect, there is provided a computing device comprising a memory having stored therein executable code, and a processor which, when executing the executable code, implements the method of the first aspect or the method of the second aspect.
In one or more embodiments of the present disclosure, a method and an apparatus for accessing a wireless network are provided, in which a near field communication connection is first established between a first terminal that has accessed a first wireless network and a second terminal that is to access the first wireless network. Then, the first terminal sends the network connection information to the second terminal through the near field communication connection, so that the second terminal can access the first wireless network according to the network connection information. Therefore, in the scheme, interaction with the user is not needed, or the operation of accessing the wireless network in the scheme is executed under the condition that the user does not sense, so that the user experience can be greatly improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a communication architecture diagram of a method of accessing a wireless network provided herein;
fig. 2 is a flowchart of a method for accessing a wireless network according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a method for accessing a wireless network according to another embodiment of the present disclosure;
fig. 4 is an information interaction diagram of a method for accessing a wireless network according to still another embodiment of the present disclosure;
fig. 5 is a schematic diagram of an apparatus for accessing a wireless network according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of an apparatus for accessing a wireless network according to another embodiment of the present disclosure.
Detailed Description
The scheme provided by the specification is described below with reference to the accompanying drawings.
Before describing the solutions provided in the embodiments of the present specification, the following description will be made on the inventive concept of the present solution.
In the conventional technology, the method for the intelligent terminal to access the wireless network may include the following three methods:
first, a user turns on a wireless local area network, such as a Wi-Fi (wireless internet access) network, on the side of an intelligent terminal. Then the intelligent terminal searches available wireless networks around the intelligent terminal, and finally the user selects a target network and inputs a password for connection. As can be seen, in conventional methods of accessing a wireless network, multiple interactions with a user are typically required. This may result in a poor experience for the user.
Secondly, the surrounding wireless local area network is automatically discovered by opening the terminal Wi-Fi. The method firstly requires that a Wireless Access Point (AP) of the Wireless local area network is a device with a special protocol, and has no universality, the discovery Access range of the method is larger, and the Access controllability of the device is not high.
Third, a broadcasting terminal (hereinafter also referred to as a second terminal) may periodically broadcast Bluetooth Low Energy (BLE) packets (e.g., beacon data frames), and a scanning terminal (hereinafter also referred to as a first terminal) may scan the broadcasting terminal. Specifically, if the scan terminal receives the broadcast BLE data packet, or scans the broadcast terminal, the scan terminal initiates a bluetooth connection request and establishes a connection with the broadcast terminal, so that the broadcast terminal is connected to the wireless network. However, this method causes a problem that the data transfer amount of the terminal is limited because the data amount transferred through the bluetooth connection is limited.
For this purpose, the present application proposes the following improvements:
specifically, a first terminal having access to a first wireless network establishes a first communication connection with a second terminal when detecting that a distance to the second terminal is smaller than a predetermined distance threshold, wherein the first communication connection is a short-range communication connection. And responding to an acquisition request of the network connection information sent by the second terminal through the first communication connection, and sending the network connection information of the first wireless network to the second terminal through the first communication connection, so that the second terminal accesses the first wireless network according to the network connection information.
That is to say, in the present solution, after the first communication connection is established between the first terminal and the second terminal, the first terminal further sends the network connection information thereof to the second terminal through the first communication connection, so that the second terminal can really access the first wireless network according to the network connection information. Therefore, the problem that the data transmission quantity of the terminal is limited can be solved.
In summary, the scheme provided by the embodiment of the application does not need to interact with the user, and can solve the problem that the data transmission quantity of the terminal is limited.
The present invention is provided above, and can be obtained based on the present invention, and the present invention will be described in detail below.
Fig. 1 is a communication architecture diagram of a method of accessing a wireless network provided by the present specification. The first terminal in fig. 1 may be, for example, a mobile phone, a computer, or an internet of things device with Wi-Fi and connection functions, which has access to a first wireless network. The first wireless network may be a Wi-Fi network based on an independent AP, or may be an own AP network of the first terminal communicating through a cellular network. It should be appreciated that when the first wireless network is a Wi-Fi network based on independent APs, the first terminal may compose the first wireless network by establishing a wireless network connection with a first AP in the first wireless network through Wi-Fi. When the first wireless network is the own AP network of the first terminal, the first terminal may form the first wireless network by turning on the AP mode of the first terminal and then performing communication through the cellular network.
The second terminal in fig. 1 may also be a mobile phone, a computer, or an internet of things device with Wi-Fi and bluetooth functions. In contrast, the second terminal has not accessed the first wireless network, or has accessed other wireless networks. The other wireless network here may be any wireless network other than the first wireless network. In one example, the second terminal may be accessing other wireless networks through the first terminal, that is, the first terminal and the second terminal have historically accessed the same wireless network. Thereafter, the wireless network to which the first terminal accesses is migrated, that is, from the other wireless network to the first wireless network. The second terminal thus also desires to migrate, i.e. to the first wireless network.
Specifically, the first terminal may detect whether a distance to the second terminal is less than a predetermined distance threshold. And if the detected result is less than the preset threshold, establishing a first communication connection with the second terminal, wherein the first communication connection is a short-distance communication connection. And responding to an acquisition request of the network connection information sent by the second terminal through the first communication connection, and sending the network connection information of the first wireless network to the second terminal through the first communication connection, so that the second terminal accesses the first wireless network according to the network connection information.
It should be understood that the second terminal accesses the wireless network similarly to the migration process, and therefore, only the method of the second terminal accessing the wireless network will be described below. That is, in the embodiments described below in this specification, the second terminal does not access any wireless network.
Fig. 2 is a flowchart of a method for accessing a wireless network according to an embodiment of the present disclosure. The execution subject of the method may be the first terminal in fig. 1. As shown in fig. 2, the method may include:
step 202, the first terminal establishes a first communication connection with the second terminal when detecting that the distance between the first terminal and the second terminal is smaller than a preset distance threshold.
As previously mentioned, the first terminal has access to the first wireless network and the second terminal has not. The first wireless network may be a Wi-Fi network based on an independent AP, or may be an AP network of the first terminal. It should be understood that when the first wireless network is the first terminal's own AP network, the first terminal communicates through the cellular network and has turned on the wireless access function.
The first Communication connection is specifically a Near Field Communication connection, and may be, for example, a bluetooth connection, a Zigbee connection, or a Near Field Communication (NFC) connection.
Taking bluetooth connection as an example, when detecting that the distance to the second terminal is smaller than the predetermined distance threshold, establishing the first communication connection with the second terminal may specifically include: step a, the first terminal receives a Beacon (Beacon) data frame broadcast by the second terminal. And b, detecting whether the distance between the first terminal and the second terminal is less than a preset distance threshold value by judging whether the Received Signal Strength Indication (RSSI) of the beacon data frame exceeds the preset Strength threshold value or not. And c, if the distance is smaller than the preset distance threshold, sending a Bluetooth connection request to the second terminal so as to establish Bluetooth connection with the second terminal.
In step a, after turning on the bluetooth function for the first terminal, the first terminal may scan its interested terminals within its peripheral range (e.g., 10 meters). The first terminal may also be referred to as a scanning terminal. And for the second terminal, after the bluetooth function is turned on for it, a beacon data frame may be periodically (e.g., every 1 second) broadcast to request bluetooth pairing. The second terminal may therefore also be referred to as a broadcast terminal.
In one example, the beacon data frame may be transmitted based on a BLE protocol. BLE technology belongs to one of bluetooth technology, and aims at providing a solution for wireless data transmission in the field of low power consumption.
In addition, the beacon data frame broadcast by the second terminal may be a data frame customized by the second terminal. The customized data frame herein may refer to data in which a specific location (e.g., a header) of the data frame is unique to the second terminal. The first terminal may identify whether the second terminal is the terminal of interest based on the custom data frame. It should be understood that the custom data frames may be different for different broadcast terminals so that the scanning terminal may distinguish between broadcast terminals.
In step b, the first terminal may determine whether the RSSI of the beacon data frame exceeds a predetermined strength threshold when determining that the second terminal is a terminal of interest thereof.
The predetermined strength threshold herein may be set based on a safe connection distance between two terminals communicating in the BLE protocol. In particular, if the RSSI exceeds a predetermined strength threshold, it is characteristic that the current distance between the first terminal and the second terminal has reached the secure connection distance. And if the RSSI does not exceed the preset strength threshold value, the current distance between the first terminal and the second terminal is not represented to reach the safe connection distance.
In one example, the secure connection distance may be determined based on a predetermined distance threshold, for example, when the distance is smaller than the predetermined distance threshold, the current distance is considered to reach the secure connection distance; and when the distance is not less than the preset distance threshold value, the current distance is considered not to reach the safe connection distance.
Thus, in this example, if the RSSI exceeds the predetermined strength threshold, the current distance between the first terminal and the second terminal is less than the predetermined distance threshold. And if the RSSI does not exceed the predetermined strength threshold, the current distance between the first terminal and the second terminal is not less than the predetermined distance threshold.
It should be understood that if the first terminal determines that the second terminal is not the terminal of interest, or determines that the RSSI does not exceed the predetermined strength threshold, the beacon data frame is ignored and the scanning operation continues.
In step c, the first terminal may transmit a bluetooth connection request to the second terminal based on a BLE protocol, so that the bluetooth connection established between the first terminal and the second terminal may be a BLE connection.
It should be noted that, because the BLE connection between the terminals is established without inputting a secret key, that is, the BLE connection between the terminals is automatically established, interaction with the user can be avoided, and thus user experience can be improved.
Step 204, in response to the request for acquiring the network connection information sent by the second terminal through the first communication connection, sending the network connection information of the first wireless network to the second terminal through the first communication connection, so that the second terminal accesses the first wireless network according to the network connection information.
The network connection information may include a Service Set Identifier (SSID) and a password of the first wireless access point AP of the first wireless network.
The following is discussed in two cases:
first, the first wireless network is a Wi-Fi network based on an independent AP, and in this case, the first AP of the first wireless network may be a router. In the case where the first AP is a router, the SSID and the password of the first AP may be recorded by the first terminal when establishing a wireless network connection with the first AP.
For example, the process of establishing the wireless network connection between the first terminal and the first AP may be as follows: the user of the first terminal opens the wireless local area network. The first terminal searches for available wireless networks in its vicinity. The user selects the target network (i.e., selects the SSID of the first AP of the first wireless network) and enters the password. And the first AP receives and verifies the password input by the user, and establishes wireless network connection with the first terminal after the verification is successful.
It should be understood that, when the user selects the SSID of the first AP and inputs the password, the first AP may record the SSID and the password in a preset storage unit. Then, when the SSID and the password of the first AP need to be sent to the second terminal, the first terminal may read from the preset storage unit.
Second, the first wireless network is the first terminal's own AP network, and the first AP of the first wireless network is the first terminal itself, and the first terminal communicates through the cellular network and has already started the wireless access function. Taking the first terminal as a mobile phone as an example, the opening of the wireless access function is to open a "personal hotspot" of the mobile phone. It should be appreciated that after turning on the handset "personal hotspot," the user may set the device name and password so that the first terminal may write the device name as its SSID, along with the password, into the system file.
In this case, when the SSID and the password of the first AP need to be transmitted to the second terminal, the first terminal reads from the system file by calling the operating system.
The second terminal may transmit the SSID and the password of the first AP to the first AP of the first wireless network after receiving the SSID and the password. The first AP authenticates the SSID and password received from the second terminal. For example, the SSID and password received from the second terminal are compared with the SSID and password stored in advance. And when the verification is passed, establishing wireless network connection with the second terminal. It should be appreciated that the second terminal, upon establishing a wireless network connection with the first AP of the first wireless network, facilitates access to the first wireless network.
In summary, the method for accessing the wireless network provided by the embodiment of the present specification can execute the operation of accessing the wireless network by the terminal under the condition that the user does not perceive, thereby greatly improving the user experience.
Fig. 3 is a flowchart of a method for accessing a wireless network according to another embodiment of the present disclosure. The execution subject of the method may be the second terminal in fig. 1. As shown in fig. 3, the method may include:
step 302, after the second terminal establishes the first communication connection with the first terminal having accessed to the first wireless network, sends an acquisition request of the network connection information to the first terminal through the first communication connection.
The first Communication connection is specifically a Near Field Communication connection, and may be, for example, a bluetooth connection, a Zigbee connection, or a Near Field Communication (NFC) connection.
Taking bluetooth connection as an example, the process of the second terminal establishing the first communication connection with the first terminal having accessed the first wireless network may be: and step x, the second terminal broadcasts a beacon data frame. And step y, receiving a Bluetooth connection request sent by the first terminal when the distance between the first terminal and the second terminal is judged to be less than a preset distance threshold according to the Received Signal Strength Indication (RSSI) of the beacon data frame. And step z, establishing the Bluetooth connection with the first terminal according to the Bluetooth connection request.
In step x, after the bluetooth function is turned on for the second terminal, a beacon data frame may be periodically (e.g., every 1 second) broadcast to request bluetooth pairing. The second terminal may therefore also be referred to as a broadcast terminal.
In one example, the beacon data frame may be transmitted based on a BLE protocol. BLE technology belongs to one of bluetooth technology, and aims at providing a solution for wireless data transmission in the field of low power consumption.
In addition, the beacon data frame broadcast by the second terminal may be a data frame customized by the second terminal. The customized data frame herein may refer to data in which a specific location (e.g., a header) of the data frame is unique to the second terminal. The first terminal may identify whether the second terminal is the terminal of interest based on the custom data frame. It should be understood that the custom data frames may be different for different broadcast terminals so that the scanning terminal may distinguish between broadcast terminals.
In step y, a predetermined intensity threshold may be set in advance. It may specifically be set based on a secure connection distance between two terminals communicating in the BLE protocol. In particular, if the RSSI exceeds a predetermined strength threshold, it is characteristic that the current distance between the first terminal and the second terminal has reached the secure connection distance. And if the RSSI does not exceed the preset strength threshold value, the current distance between the first terminal and the second terminal is not represented to reach the safe connection distance.
In one example, the secure connection distance may be determined based on a predetermined distance threshold, for example, when the distance is smaller than the predetermined distance threshold, the current distance is considered to reach the secure connection distance; and when the distance is not less than the preset distance threshold value, the current distance is considered not to reach the safe connection distance.
Thus, in this example, if the RSSI exceeds the predetermined strength threshold, the current distance between the first terminal and the second terminal is less than the predetermined distance threshold. And if the RSSI does not exceed the predetermined strength threshold, the current distance between the first terminal and the second terminal is not less than the predetermined distance threshold.
Thus, the first terminal may send a bluetooth connection request to the second terminal when the RSSI exceeds the predetermined strength threshold, or when the current distance between the first terminal and the second terminal is less than the predetermined distance threshold.
Further, the first terminal may send a bluetooth connection request to the second terminal based on the BLE protocol, so that the bluetooth connection established between the first terminal and the second terminal may be a BLE connection.
Step z, which is the conventional BLE connection establishment process, is not described herein again.
It should be noted that, because the BLE connection between the terminals is established without inputting a secret key, that is, the BLE connection between the terminals is automatically established, interaction with the user can be avoided, and thus user experience can be improved.
Step 304, receiving the network connection information of the first wireless network sent by the first terminal through the first communication connection.
The network connection information here may include the SSID and password of the first wireless access point AP of the first wireless network.
The following is discussed in two cases:
first, the first wireless network is a Wi-Fi network based on an independent AP, and in this case, the first AP of the first wireless network may be a router. In the case where the first AP is a router, the SSID and the password of the first AP may be recorded by the first terminal when establishing a wireless network connection with the first AP.
For example, the process of establishing the wireless network connection between the first terminal and the first AP may be as follows: the user of the first terminal opens the wireless local area network. The first terminal searches for available wireless networks in its vicinity. The user selects the target network (i.e., selects the SSID of the first AP of the first wireless network) and enters the password. And the first AP receives and verifies the password input by the user, and establishes wireless network connection with the first terminal after the verification is successful.
It should be understood that, when the user selects the SSID of the first AP and inputs the password, the first AP may record the SSID and the password in a preset storage unit. Then, the first terminal may read the SSID and the password of the first AP from the preset storage unit and send the SSID and the password to the second terminal.
Second, the first wireless network is the first terminal's own AP network, and the first AP of the first wireless network is the first terminal itself, and the first terminal communicates through the cellular network and has already started the wireless access function. Taking the first terminal as a mobile phone as an example, the opening of the wireless access function is to open a "personal hotspot" of the mobile phone. It should be appreciated that after turning on the handset "personal hotspot," the user may set the device name and password so that the first terminal may write the device name as its SSID, along with the password, into the system file.
In this case, the first terminal may read the SSID and the password of the first AP from the system file by calling the operating system, and transmit to the second terminal.
Step 306, accessing the first wireless network according to the network connection information received from the first terminal.
The second terminal may transmit the SSID and the password of the first AP to the first AP of the first wireless network after receiving the SSID and the password. The first AP authenticates the SSID and password received from the second terminal. For example, the SSID and password received from the second terminal are compared with the SSID and password stored in advance. And when the verification is passed, establishing wireless network connection with the second terminal. It should be appreciated that the second terminal, upon establishing a wireless network connection with the first AP of the first wireless network, facilitates access to the first wireless network.
In summary, the method for accessing the wireless network provided by the embodiment of the present specification can execute the operation of accessing the wireless network by the terminal under the condition that the user does not perceive, thereby greatly improving the user experience.
The method for accessing a wireless network according to the embodiment of the present disclosure will be described below with the first communication connection being a bluetooth connection.
Fig. 4 is an information interaction diagram of a method for accessing a wireless network according to still another embodiment of the present disclosure. As shown in fig. 4, the method may include:
in step 402, a first terminal having access to a first wireless network scans for terminals of interest within its vicinity.
In step 404, the second terminal broadcasts a beacon data frame.
In step 406, the first terminal determines whether the second terminal is a terminal of interest according to the received beacon data frame. If not, jump to step 402, if yes, go to step 408.
In step 408, the first terminal determines whether the RSSI of the beacon data frame exceeds a predetermined strength threshold. If not, jump to step 402, if yes, go to step 410.
In step 410, the first terminal sends a bluetooth connection request to the second terminal.
And step 412, the second terminal establishes a bluetooth connection with the first terminal according to the bluetooth connection request.
In step 414, the second terminal sends a request for acquiring network connection information to the first terminal.
Step 416, the first terminal sends the network connection information of the first wireless network to the second terminal through bluetooth connection.
Step 418, the second terminal accesses the first wireless network according to the network connection information.
Fig. 5 is a schematic diagram of an apparatus for accessing a wireless network according to an embodiment of the present disclosure. The device is arranged on a first terminal which is accessed to a first wireless network. As shown in fig. 5, the apparatus may include:
an establishing unit 502, configured to establish a first communication connection with the second terminal when detecting that the distance to the second terminal is smaller than a predetermined distance threshold, where the first communication connection is a near field communication connection.
The first communication connection here may be a bluetooth connection.
The establishing unit 502 may specifically be configured to: and receiving a beacon data frame broadcast by the second terminal. And detecting whether the distance between the second terminal and the second terminal is less than a preset distance threshold value by judging whether the Received Signal Strength Indication (RSSI) of the data frame exceeds the preset strength threshold value or not.
And if the distance is smaller than the preset distance threshold, sending a Bluetooth connection request to the second terminal so as to establish Bluetooth connection with the second terminal.
In addition, the first communication connection may also be a Zigbee connection or a near field communication NFC connection.
A sending unit 504, configured to send, in response to an acquisition request of network connection information sent by the second terminal through the first communication connection, the network connection information of the first wireless network to the second terminal through the first communication connection, so that the second terminal accesses the first wireless network according to the received network connection information.
The sending unit 504 may specifically be configured to:
and sending the Service Set Identification (SSID) and the password of the first wireless Access Point (AP) of the first wireless network to the second terminal through the first communication connection.
In one example, the first wireless network is a Wi-Fi network based on an independent AP, and the first AP is a router; and the SSID and the password of the first AP are recorded by the first terminal when the first terminal establishes wireless network connection with the first AP.
In another example, the first wireless network is an own AP network of the first terminal, the first AP is the first terminal itself, and the first terminal communicates through the cellular network and has turned on the wireless access function. And the SSID and the password of the first AP are read from the system file by the first terminal.
The functions of each functional module of the device in the above embodiments of the present description may be implemented through each step of the above method embodiments, and therefore, a specific working process of the device provided in one embodiment of the present description is not repeated herein.
The device for accessing the wireless network provided by one embodiment of the present specification can execute the operation of accessing the wireless network by the terminal under the condition that the user does not perceive, thereby greatly improving the user experience.
Fig. 6 is a schematic diagram of an apparatus for accessing a wireless network according to another embodiment of the present disclosure. The device is arranged at the second terminal. As shown in fig. 6, the apparatus may include:
a sending unit 602, configured to send an acquisition request of network connection information to a first terminal through a first communication connection after a first communication connection is established between a second terminal and the first terminal that has accessed a first wireless network. The first communication connection is a close range communication connection.
The second terminal can be an internet of things device with Wi-Fi function and Bluetooth function. The first communication connection may be a bluetooth connection, a Zigbee connection, or a near field communication, NFC, connection.
A receiving unit 604, configured to receive network connection information of the first wireless network, which is sent by the first terminal through the first communication connection.
The network connection information here may comprise a service set identification SSID and a password of the first wireless access point AP of the first wireless network.
An accessing unit 606, configured to access the first wireless network according to the received network connection information.
The access unit 606 may specifically be configured to:
and sending the SSID and the password to the first AP so that the first AP verifies the received SSID and the password, and establishing wireless network connection with the second terminal when the verification is passed so as to access the second terminal to the first wireless network.
Taking the first communication connection as a bluetooth connection as an example, the apparatus may further include: a building unit (not shown in the figure).
The sending unit 602 is further configured to broadcast a beacon data frame.
The receiving unit 604 is further configured to receive a bluetooth connection request sent by the first terminal when determining that the distance to the second terminal is smaller than the predetermined distance threshold according to the received signal strength indication RSSI of the beacon data frame.
And the establishing unit is used for establishing the Bluetooth connection with the first terminal according to the Bluetooth connection request.
The functions of each functional module of the device in the above embodiments of the present description may be implemented through each step of the above method embodiments, and therefore, a specific working process of the device provided in one embodiment of the present description is not repeated herein.
The device for accessing the wireless network provided by one embodiment of the present specification can execute the operation of accessing the wireless network by the terminal under the condition that the user does not perceive, thereby greatly improving the user experience.
In another aspect, embodiments of the present specification provide a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method shown in fig. 2, 3 or 4.
In another aspect, embodiments of the present description provide a computing device comprising a memory having stored therein executable code, and a processor that, when executing the executable code, implements the method illustrated in fig. 2, 3, or 4.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The steps of a method or algorithm described in connection with the disclosure herein may be embodied in hardware or may be embodied in software instructions executed by a processor. The software instructions may consist of corresponding software modules that may be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an ASIC. Additionally, the ASIC may reside in a server. Of course, the processor and the storage medium may reside as discrete components in a server.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in this invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The above-mentioned embodiments, objects, technical solutions and advantages of the present specification are further described in detail, it should be understood that the above-mentioned embodiments are only specific embodiments of the present specification, and are not intended to limit the scope of the present specification, and any modifications, equivalent substitutions, improvements and the like made on the basis of the technical solutions of the present specification should be included in the scope of the present specification.

Claims (18)

1. A method for accessing a wireless network, performed by a first terminal that communicates over a cellular network and has turned on a wireless access function, comprising:
scanning a terminal of interest within a peripheral range of the first terminal;
receiving, from a second terminal, a beacon data frame broadcast by the second terminal;
judging whether the second terminal is a terminal which is interested in the second terminal according to the beacon data frame received from the second terminal;
when the second terminal is a terminal which is interested in the second terminal, and the distance between the second terminal and the second terminal is detected to be smaller than a preset distance threshold value, establishing a first communication connection with the second terminal, wherein the first communication connection is a short-distance communication connection; the second terminal has access to other wireless networks, which are any wireless networks different from the first terminal's own AP network; the first terminal historically accessed the other wireless network and the second terminal accessed the other wireless network through the first terminal;
in response to an acquisition request of network connection information sent by the second terminal through the first communication connection, sending network connection information of the own AP network of the first terminal to the second terminal through the first communication connection, so that the second terminal is moved from the other wireless networks to the own AP network of the first terminal according to the network connection information;
the sending, to the second terminal through the first communication connection, network connection information of the own AP network of the first terminal includes:
sending a Service Set Identifier (SSID) and a password of the first terminal to the second terminal through the first communication connection;
and the SSID and the password are read from a system file by the first terminal.
2. The method of claim 1, the first communication connection being a bluetooth connection;
when detecting that the distance between the first terminal and the second terminal is smaller than the preset distance threshold, establishing a first communication connection with the second terminal comprises the following steps:
receiving a beacon data frame broadcast by the second terminal;
detecting whether the distance between the second terminal and the second terminal is smaller than a preset distance threshold value by judging whether the Received Signal Strength Indication (RSSI) of the data frame exceeds the preset strength threshold value or not;
and if the distance is smaller than the preset distance threshold, sending a Bluetooth connection request to the second terminal so as to establish Bluetooth connection with the second terminal.
3. The method of claim 1, the first communication connection being a Zigbee connection, or a near field communication, NFC, connection.
4. A method of accessing a wireless network, performed by a second terminal; the second terminal has access to other wireless networks, and the other wireless networks are any wireless networks different from the AP network of the first terminal; the first terminal communicating based on a cellular network and having turned on a wireless access function that historically accessed the other wireless network, and the second terminal accessing the other wireless network through the first terminal; the method comprises the following steps:
broadcasting a beacon data frame to the first terminal;
receiving a first communication connection request sent by the first terminal when the second terminal is judged to be the terminal interested by the first terminal according to the beacon data frame;
establishing a first communication connection with the first terminal according to the first communication connection request;
after the second terminal establishes a first communication connection with the first terminal, sending an acquisition request of network connection information to the first terminal through the first communication connection; the first communication connection is a close range communication connection;
receiving network connection information of the AP network of the first terminal sent by the first terminal through the first communication connection;
migrating from the other wireless networks to the own AP network of the first terminal according to the network connection information;
the network connection information comprises a Service Set Identifier (SSID) and a password of the first terminal;
and the SSID and the password are read from a system file by the first terminal.
5. The method of claim 4, the first communication connection being a Zigbee connection, or a Near Field Communication (NFC) connection.
6. The method of claim 4, the first communication connection being a Bluetooth connection; the first communication connection is established by:
broadcasting a beacon data frame;
receiving a Bluetooth connection request sent by the first terminal when the distance between the first terminal and the second terminal is judged to be smaller than a preset distance threshold according to the Received Signal Strength Indication (RSSI) of the beacon data frame;
and establishing the Bluetooth connection with the first terminal according to the Bluetooth connection request.
7. The method of claim 4, wherein the accessing the first terminal's own AP network according to the network connection information comprises:
and sending the SSID and the password to the first terminal so that the first terminal verifies the SSID and the password, and when the SSID and the password pass the verification, establishing wireless network connection with the second terminal so as to access the second terminal to the AP network of the first terminal.
8. The method of claim 4, the second terminal being a Wi-Fi capable and bluetooth capable internet of things device.
9. An apparatus for accessing a wireless network, which is disposed in a first terminal that is based on cellular network communication and has turned on a wireless access function, comprises:
a establishing unit, configured to scan a terminal of interest within a peripheral range of the first terminal; receiving, from a second terminal, a beacon data frame broadcast by the second terminal; judging whether the second terminal is a terminal which is interested in the second terminal according to the beacon data frame received from the second terminal; when the second terminal is a terminal which is interested in the second terminal, and the distance between the second terminal and the second terminal is detected to be smaller than a preset distance threshold value, establishing a first communication connection with the second terminal, wherein the first communication connection is a short-distance communication connection; the second terminal has access to other wireless networks, which are any wireless networks different from the first terminal's own AP network; the first terminal historically accessed the other wireless network and the second terminal accessed the other wireless network through the first terminal;
a sending unit, configured to send, in response to an acquisition request of network connection information sent by the second terminal through the first communication connection, network connection information of a self-AP network of the first terminal to the second terminal through the first communication connection, so that the second terminal migrates from the other wireless networks to the self-AP network of the first terminal according to the network connection information;
the sending unit is specifically configured to:
sending a Service Set Identifier (SSID) and a password of the first terminal to the second terminal through the first communication connection;
and the SSID and the password are read from a system file by the first terminal.
10. The apparatus of claim 9, the first communication connection being a bluetooth connection;
the establishing unit is specifically configured to:
receiving a beacon data frame broadcast by the second terminal;
detecting whether the distance between the second terminal and the second terminal is smaller than a preset distance threshold value by judging whether the Received Signal Strength Indication (RSSI) of the data frame exceeds the preset strength threshold value or not;
and if the distance is smaller than the preset distance threshold, sending a Bluetooth connection request to the second terminal so as to establish Bluetooth connection with the second terminal.
11. The apparatus of claim 9, the first communication connection being a Zigbee connection, or a near field communication, NFC, connection.
12. The device for accessing the wireless network is arranged at a second terminal; the second terminal has access to other wireless networks, and the other wireless networks are any wireless networks different from the AP network of the first terminal; the first terminal communicating based on a cellular network and having turned on a wireless access function that historically accessed the other wireless network, and the second terminal accessing the other wireless network through the first terminal; the method comprises the following steps:
a transmitting unit, configured to broadcast a beacon data frame to the first terminal; receiving a first communication connection request sent by the first terminal when the second terminal is judged to be the terminal interested by the first terminal according to the beacon data frame; establishing a first communication connection with the first terminal according to the first communication connection request; after the second terminal establishes a first communication connection with the first terminal, sending an acquisition request of network connection information to the first terminal through the first communication connection; the first communication connection is a close range communication connection;
a receiving unit, configured to receive network connection information of an AP network of the first terminal, where the network connection information is sent by the first terminal through the first communication connection;
an access unit, configured to migrate from the other wireless network to an own AP network of the first terminal according to the network connection information;
the network connection information comprises a Service Set Identifier (SSID) and a password of the first terminal;
and the SSID and the password are read from a system file by the first terminal.
13. The apparatus of claim 12, the first communication connection being a Zigbee connection, or a near field communication, NFC, connection.
14. The apparatus of claim 12, the first communication connection being a bluetooth connection; further comprising: a building unit;
the sending unit is further configured to broadcast a beacon data frame;
the receiving unit is further configured to receive a bluetooth connection request sent by the first terminal when determining that the distance to the second terminal is smaller than a predetermined distance threshold according to the received signal strength indication RSSI of the beacon data frame;
and the establishing unit is used for establishing the Bluetooth connection with the first terminal according to the Bluetooth connection request.
15. The apparatus of claim 12, the access unit to:
and sending the SSID and the password to the first terminal so that the first terminal verifies the SSID and the password, and when the SSID and the password pass the verification, establishing wireless network connection with the second terminal so as to access the second terminal to the AP network of the first terminal.
16. The apparatus of claim 12, the second terminal is a Wi-Fi enabled and bluetooth enabled internet of things device.
17. A computer-readable storage medium, having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of any of claims 1-3 or the method of any of claims 4-8.
18. A computing device comprising a memory having stored therein executable code and a processor that, when executing the executable code, implements the method of any of claims 1-3 or the method of any of claims 4-8.
CN202010693726.3A 2020-07-17 2020-07-17 Method and device for accessing wireless network Active CN111586665B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010693726.3A CN111586665B (en) 2020-07-17 2020-07-17 Method and device for accessing wireless network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010693726.3A CN111586665B (en) 2020-07-17 2020-07-17 Method and device for accessing wireless network

Publications (2)

Publication Number Publication Date
CN111586665A CN111586665A (en) 2020-08-25
CN111586665B true CN111586665B (en) 2021-03-19

Family

ID=72118501

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010693726.3A Active CN111586665B (en) 2020-07-17 2020-07-17 Method and device for accessing wireless network

Country Status (1)

Country Link
CN (1) CN111586665B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111918266A (en) * 2020-09-10 2020-11-10 Oppo广东移动通信有限公司 Communication connection method, device, storage medium and electronic equipment
CN112235760A (en) * 2020-09-25 2021-01-15 深圳市杉川机器人有限公司 Robot pairing method and device, terminal equipment and storage medium
CN112261651B (en) * 2020-10-20 2023-06-23 北京字节跳动网络技术有限公司 Terminal control method, device, terminal and storage medium
CN112312372A (en) * 2020-10-26 2021-02-02 Oppo广东移动通信有限公司 Network access method and system
CN115134402A (en) * 2021-03-29 2022-09-30 华为技术有限公司 Device connection method and electronic device
WO2022237721A1 (en) * 2021-05-14 2022-11-17 华为技术有限公司 Networking method, and relevant apparatus and system
CN115695063B (en) * 2021-07-28 2024-04-02 海信集团控股股份有限公司 Method and device for controlling intelligent equipment

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103369707B (en) * 2012-03-27 2016-12-14 华为终端有限公司 Wireless network establishment of connection method and terminal unit
CN103096506A (en) * 2013-01-07 2013-05-08 东莞宇龙通信科技有限公司 Terminal devices, wireless fidelity (WIFI) connection method and system
CN105636161B (en) * 2016-01-25 2019-10-22 中科创达软件股份有限公司 Access method, apparatus, communication terminal and the wireless network access point of wireless network
CN108289290B (en) * 2016-10-19 2020-03-06 上海掌门科技有限公司 Method and equipment for connecting intelligent wearable equipment and wireless access point
CN109257793B (en) * 2017-07-14 2020-12-25 腾讯科技(深圳)有限公司 Network connection method, device, equipment and storage medium
CN107465584A (en) * 2017-07-21 2017-12-12 广东美的厨房电器制造有限公司 Method for network access and device, the intelligent appliance of intelligent appliance
CN110719582A (en) * 2018-07-11 2020-01-21 惠州迪芬尼声学科技股份有限公司 Method for connecting network device with WiFi network and WiFi loudspeaker
CN110913014A (en) * 2019-12-10 2020-03-24 扬州航盛科技有限公司 Local hotspot-based noninductive interconnection method for Android mobile phone and intelligent cockpit

Also Published As

Publication number Publication date
CN111586665A (en) 2020-08-25

Similar Documents

Publication Publication Date Title
CN111586665B (en) Method and device for accessing wireless network
CN107708163B (en) Roaming link switching method, mobile terminal, network module and storage medium
EP3484196B1 (en) Method and apparatus for registering wireless device in wireless communication system
EP3259939B1 (en) Access point steering
CN110267245B (en) Communication control method and electronic device
US20140199969A1 (en) Mobile device and method for cellular assisted device-to-device communication
US20140314059A1 (en) Method for connecting peer-to-peer applications over a wireless lan, and method for maintaining a connection between the peer-to-peer applications over the wireless lan, and wireless lan-based peer terminal
CN108811035B (en) Method for accessing wireless fidelity Wi-Fi (wireless fidelity) by user equipment and Wi-Fi access node
US10524109B2 (en) Method and apparatus for network-controlled proximity device to device discovery and communication
US20110044308A1 (en) Wireless communication terminal and wireless communication method
WO2018064897A1 (en) Wireless fidelity connection hotspot switching method and hotspot access device
US9730252B2 (en) Quick connection between customized softap and STA
CN106604205B (en) Terminal communication method, unmanned aerial vehicle communication method and device
CN109845331B (en) Wireless device-to-device communication method
CN105453615B (en) Wireless terminal, search processing method of wireless terminal, and wireless communication system
US20190150041A1 (en) Access point handover method and device
JP2023500329A (en) Communication method and system, base station and terminal
EP3534648A1 (en) Access method for access point, apparatus, and system
CN106453370B (en) Method and device for registering IPC (inter-programmable logic controller) to NVR (network video recorder)
CN111065137A (en) Method for accessing intelligent equipment to network based on Bluetooth and wireless network
US20230291799A1 (en) Method and Apparatus of Network Configuration for Internet-of-Things Device
CN107124744B (en) Network switching method and wireless access point
KR20200002742A (en) Method and apparatus for registering wireless device in wireless communication system
CN114390491A (en) Networking method, device and system
CN111182512B (en) Terminal connection method, device, terminal and computer readable storage medium

Legal Events

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