CN103327644A - Method and equipment for wireless connection - Google Patents

Method and equipment for wireless connection Download PDF

Info

Publication number
CN103327644A
CN103327644A CN2013101985379A CN201310198537A CN103327644A CN 103327644 A CN103327644 A CN 103327644A CN 2013101985379 A CN2013101985379 A CN 2013101985379A CN 201310198537 A CN201310198537 A CN 201310198537A CN 103327644 A CN103327644 A CN 103327644A
Authority
CN
China
Prior art keywords
terminal
wireless connections
connection
display screen
acknowledgement frame
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.)
Granted
Application number
CN2013101985379A
Other languages
Chinese (zh)
Other versions
CN103327644B (en
Inventor
亢治
黄波
方文仪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201310198537.9A priority Critical patent/CN103327644B/en
Publication of CN103327644A publication Critical patent/CN103327644A/en
Application granted granted Critical
Publication of CN103327644B publication Critical patent/CN103327644B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a method and equipment for wireless connection. The method comprises the steps of through a first terminal, receiving the server identification SSID, the media intervention layer address MAC, the password PWD accessed AP, accessing the wireless visit access point AP of the second terminal, so that the first terminal accesses a wireless local network where the second terminal is located; generating a random number as a password for accurate connection, so that the first terminal and the second terminal are enabled to confirm whether to access the same wireless local network through exchange of the password.

Description

A kind of method and apparatus of wireless connections
Technical field
The present invention relates to the communications field, refer more particularly to a kind of method and apparatus of wireless connections.
Background technology
Be wirelessly connected in current each Terminal Type and generally use, common are wireless compatibility checking (Wireless FidelitY, WIFI), bluetooth (Blue Tooth, BT), close range wireless communication (Near Field Communication, NFC), radio frequency identification (Radio FrequencY Identification, RFID) etc.The mode that NFC, RFID connect authentication is to finish authentication and information interaction by the close contact of terminal, and WIFI is connected the connection meeting of equipment to finish wireless connections by the display screen of terminal, keyboard input etc. with bluetooth.
The basic step of the authentication mode of the wireless connections that WIFI, bluetooth etc. are common is as follows: terminal open wireless function; The corresponding connecting object end that terminal meeting reading scan is arrived connects; Terminal is selected corresponding connecting object; Then connection password corresponding to terminal input finish connection.
If in the wireless access points (Access Point, AP) of WIFI/Station pattern, as follows such as the Connection Step between panel computer PAD and the AP: the radio function of opening PAD; The AP list information that the PAD reading scan is arrived; PAD need to select the AP object of connection; Connection password corresponding to PAD input; Finish connection.Therefore, in the mode of WIFI AP/station, terminal all can be finished by equipment such as display screen, keyboard inputs the process of wireless connections.
If in the BT pattern, as follows such as the Connection Step between mobile phone and the bluetooth earphone: as to open Bluetooth function by mobile phone interface; The mobile phone searching bluetooth equipment; Length is pressed the bluetooth earphone start button, until mobile phone searching is to bluetooth earphone; Pairing password corresponding to mobile phone input; Finish connection.Therefore, the WIFI direct-connecting technology of bluetooth (WIFI Peer to Peer, P2P) in the mode, wherein a lateral terminal is connected the P2P connection that reaches WIFI/BT as passive receive side without any need for showing with input medium, perhaps connects by a button such as BT earphone.
If in the NFC pattern, directly adopt the near field communication (NFC) contact to connect.Therefore, the connected mode of NFC can be finished by contact and connect authentication, can not need to by screen display and the input operations such as keyboard, button of terminal itself.
Technology such as the NFC of existing wireless connections connect by contact, perhaps such as WIFI, bluetooth etc. by finishing connection with the terminal of display screen or keyboard input.
In certain application scenarios, if a WIFI terminal B need to access by the method for AP/Station in the WIFI local area network (LAN) at WIFI terminal A place, B can scan all AP under the current environment, is the WIFI local area network (LAN) that accesses which AP place but B can't know A.
Summary of the invention
The embodiment of the invention provides a kind of method of wireless connections, is intended to solve a WIFI terminal and how accesses the local area network (LAN) at another WIFI terminal place and how to verify whether above-mentioned two WIFI terminals access the problem of same local area network (LAN).
First aspect, a kind of method of wireless connections, described method comprises:
First terminal be connected terminal and connect by wireless compatibility checking WIFI direct-connecting technology P2P, receive server identification SSID, media intervening layer address MAC, the password PWD of the wireless access points AP of described the second terminal access that described the second terminal sends;
Receive the random number X that described the second terminal sends, produce random number Y corresponding to described X, preserve the corresponding relation of X and Y, and described Y is sent to described the second terminal, so that described the second terminal is preserved the corresponding relation of described X and Y;
Disconnect and be connected the described P2P connection of the second terminal, access described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD;
Transmission comprises the broadcast message of described X, so that described the second terminal sends to described first terminal according to the acknowledgement frame that the corresponding relation of described X and Y will comprise Y;
When receiving the described acknowledgement frame that comprises Y, according to the corresponding relation of described X and Y, the display radio successful connection.
In conjunction with first aspect, in the possible implementation of the first of first aspect, described first terminal be connected terminal and connect by P2P, comprising:
When first terminal had display screen, described first terminal triggered the instruction enable the P2P function by screen so that described first terminal be connected terminal and connect by P2P;
Perhaps, when first terminal was not with display screen, described first terminal triggered the instruction enable the P2P function by button so that described first terminal be connected the second terminal and connect by P2P.
In conjunction with the possible implementation of the first of first aspect or first aspect, in the possible implementation of the second of first aspect, described display radio successful connection comprises:
When described first terminal has display screen, by the successful connection of display screen display radio;
When described first terminal was not with display screen, the bright light by LED represented the wireless connections success.
In conjunction with the possible implementation of the first of first aspect or first aspect or the possible implementation of the second of first aspect, in the third possible implementation of first aspect, described method disconnects and is being connected the P2P connection of the second terminal, access after the step of described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD, also comprise:
The wireless connections of described first terminal disconnection and described AP;
Described first terminal be connected the second terminal and connect by P2P;
The information with described AP successful connection of sending is to described the second terminal, so that after described the second terminal receives described information, send acknowledgement frame to described first terminal, disconnects and is connected the P2P connection of first terminal and the wireless connections of recovery and described AP;
Receive the described acknowledgement frame that described the second terminal sends, disconnect and be connected the P2P connection of the second terminal and the wireless connections of recovery and described AP.
In conjunction with the third possible implementation of first aspect, in the 4th kind of possible implementation of first aspect, described first terminal disconnects the wireless connections with described AP, comprising:
When described first terminal had display screen, described first terminal triggered the instruction of the wireless connections of disconnection and described AP by screen, so that described first terminal disconnects and the wireless connections of described AP;
Perhaps, when first terminal was not with display screen, described first terminal triggered the instruction of the wireless connections of disconnection and described AP by button, so that described first terminal disconnects and the wireless connections of described AP.
Second aspect, a kind of method of wireless connections, described method comprises:
The second terminal is connected P2P with first terminal and is connected, the described server identification SSID from described the second terminal access AP to described first terminal, described media intervening layer address MAC, the described password PWD that send access described AP, so that described first terminal accesses described AP by described server identification SSID, described media intervening layer address MAC, described password PWD;
Send random number X to described first terminal, and receive random number Y corresponding to described X that described first terminal produces, preserve the corresponding relation of X and Y;
Disconnect and be connected the described P2P connection of first terminal, access described AP;
Receive the broadcast message that comprises X that described first terminal sends, according to the corresponding relation of described X and Y, the acknowledgement frame that will comprise Y sends to described first terminal, so that described first terminal is according to the corresponding relation of described X and Y, and the display radio successful connection.
In conjunction with second aspect, in the possible implementation of the first of second aspect, described the second terminal is connected P2P with first terminal and is connected, and comprising:
When the second terminal had display screen, described the second terminal triggered the instruction that enables the P2P function by screen, connect so that described the second terminal is connected P2P with first terminal;
Perhaps, when the second terminal was not with display screen, described the second terminal triggered the instruction enable the P2P function by button so that described the second terminal be connected first terminal and connect by P2P.
In conjunction with the possible implementation of the first of second aspect or second aspect, in the possible implementation of the second of second aspect, described method accesses before the step of described AP disconnecting and being connected the P2P connection of first terminal, also comprises:
When the wireless connections of described first terminal disconnection and described AP, when connecting described the second terminal by P2P, receive the information of the successful connection of described first terminal transmission;
Send acknowledgement frame to described first terminal, so that after described first terminal receives described acknowledgement frame, disconnect and be connected the P2P connection of the second terminal and the wireless connections of recovery and described AP.
The third aspect, a kind of terminal, described terminal comprise with lower unit:
Linkage unit is used for first terminal and is connected terminal by wireless compatibility checking WIFI direct-connecting technology P2P connection;
The first receiving element is used for receiving server identification SSID, media intervening layer address MAC, the password PWD of the wireless access points AP of described the second terminal access that described the second terminal sends;
The second receiving element is used for receiving the random number X that described the second terminal sends, and produces random number Y corresponding to described X, preserves the corresponding relation of X and Y, and described Y is sent to described the second terminal, so that described the second terminal is preserved the corresponding relation of described X and Y;
Switching units be used for to disconnect and is connected the described P2P connection of the second terminal;
Access unit is used for accessing described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD;
Transmitting element be used for to send the broadcast message that comprises described X, so that described the second terminal sends to described first terminal according to the acknowledgement frame that the corresponding relation of described X and Y will comprise Y;
Display unit, when being used for receiving the acknowledgement frame of the described Y of comprising, according to the corresponding relation of described X and Y, the display radio successful connection.
In conjunction with the third aspect, in the possible implementation of the first of the third aspect, described linkage unit specifically is used for:
When first terminal had display screen, described first terminal triggered the instruction enable the P2P function by screen so that described first terminal be connected terminal and connect by P2P;
Perhaps, when first terminal was not with display screen, described first terminal triggered the instruction enable the P2P function by button so that described first terminal be connected the second terminal and connect by P2P.
In conjunction with the possible implementation of the first of the third aspect or the third aspect, in the possible implementation of the second of the third aspect, described display unit specifically is used for:
When described first terminal has display screen, by the successful connection of display screen display radio;
When described first terminal was not with display screen, the bright light by LED represented the wireless connections success.
In conjunction with the possible implementation of the first of the third aspect or the third aspect or the possible implementation of the second of the third aspect, in the third possible implementation of the third aspect, described terminal also comprises the first processing unit, and described the first processing unit specifically is used for:
The wireless connections of described first terminal disconnection and described AP;
Described first terminal be connected the second terminal and connect by P2P;
The information with described AP successful connection of sending is to described the second terminal, so that after described the second terminal receives described information, send acknowledgement frame to described first terminal, disconnects and is connected the P2P connection of first terminal and the wireless connections of recovery and described AP;
Receive the described acknowledgement frame that described the second terminal sends, disconnect and be connected the P2P connection of the second terminal and the wireless connections of recovery and described AP.
In conjunction with the third possible implementation of the third aspect, in the 4th kind of possible implementation of the third aspect, the wireless connections of the described first terminal disconnection of execution in step and described AP in described the first processing unit comprise:
When described first terminal had display screen, described first terminal triggered the instruction of the wireless connections of disconnection and described AP by screen, so that described first terminal disconnects and the wireless connections of described AP;
Perhaps, when first terminal was not with display screen, described first terminal triggered the instruction of the wireless connections of disconnection and described AP by button, so that described first terminal disconnects and the wireless connections of described AP.In conjunction with the possible implementation of the second of the possible implementation of the first of the third aspect or the third aspect or the third aspect or the 4th kind of possible implementation of the third aspect, in the 5th kind of possible implementation of the third aspect, described terminal also comprises the second processing unit, and described the second processing unit is used for:
The second terminal is connected P2P with first terminal and is connected, the described server identification SSID from described the second terminal access AP to described first terminal, described media intervening layer address MAC, the described password PWD that send access described AP, so that described first terminal accesses described AP by described server identification SSID, described media intervening layer address MAC, described password PWD;
Send random number X to described first terminal, and receive random number Y corresponding to described X that described first terminal produces, preserve the corresponding relation of X and Y;
Disconnect and be connected the described P2P connection of first terminal, access described AP;
Receive the broadcast message that comprises X that described first terminal sends, according to the corresponding relation of described X and Y, the acknowledgement frame that will comprise Y sends to described first terminal, so that described first terminal is according to the corresponding relation of described X and Y, and the display radio successful connection.
In conjunction with the 5th kind of possible implementation of the third aspect, in the 6th kind of possible implementation of the third aspect, described the second terminal of execution in step is connected P2P with first terminal and is connected in described the second processing unit, comprising:
When the second terminal had display screen, described the second terminal triggered the instruction that enables the P2P function by screen, connect so that described the second terminal is connected P2P with first terminal;
Perhaps, when the second terminal was not with display screen, described the second terminal triggered the instruction enable the P2P function by button so that described the second terminal be connected first terminal and connect by P2P.
In conjunction with the 5th kind of possible implementation of the third aspect or the 6th kind of possible implementation of the third aspect, in the 7th kind of possible implementation of the third aspect, described terminal also comprises the 3rd processing unit, and described the 3rd processing unit specifically is used for:
When the wireless connections of described first terminal disconnection and described AP, when connecting described the second terminal by P2P, receive the information of the successful connection of described first terminal transmission;
Send acknowledgement frame to described first terminal, so that after described first terminal receives described acknowledgement frame, disconnect and be connected the P2P connection of the second terminal and the wireless connections of recovery and described AP.
The embodiment of the invention provides a kind of method of wireless connections, described method accesses described AP by described server identification SSID, described media intervening layer address MAC, the described password PWD that first terminal receives the second terminal access wireless access points AP, thereby realizes that first terminal accesses the WLAN (wireless local area network) at the second terminal place; And produce random number as whether connecting correct password, so that first terminal and the second terminal determine whether to be connected into same WLAN (wireless local area network) by the exchange password.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, the below will do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art, apparently, accompanying drawing in the following describes only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the method flow diagram of a kind of wireless connections of providing of the embodiment of the invention;
Fig. 2 is the method schematic diagram of a kind of wireless connections of providing of the embodiment of the invention;
Fig. 3 is the method schematic diagram of a kind of wireless connections of providing of the embodiment of the invention;
Fig. 4 is the method flow diagram of a kind of wireless connections of providing of the embodiment of the invention;
Fig. 5 is the method schematic diagram of a kind of wireless connections of providing of the embodiment of the invention;
Fig. 6 is the method schematic diagram of a kind of wireless connections of providing of the embodiment of the invention;
Fig. 7 is the structure drawing of device of a kind of terminal of providing of the embodiment of the invention;
Fig. 8 is the structure drawing of device of a kind of terminal of providing of the embodiment of the invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
With reference to figure 1, Fig. 1 is the method flow diagram of a kind of wireless connections of providing of the embodiment of the invention.As shown in Figure 1, said method comprising the steps of:
Step 101, first terminal be connected terminal and connect by wireless compatibility checking WIFI direct-connecting technology P2P, receive server identification SSID, media intervening layer address MAC, the password PWD of the wireless access points AP of described the second terminal access that described the second terminal sends;
Alternatively, described first terminal be connected terminal and connect by P2P, comprising:
When first terminal had display screen, described first terminal triggered the instruction enable the P2P function by screen so that described first terminal be connected terminal and connect by P2P;
Perhaps, when first terminal was not with display screen, described first terminal triggered the instruction enable the P2P function by button so that described first terminal be connected the second terminal and connect by P2P.
Concrete, be the method schematic diagram of a kind of wireless connections of providing of the embodiment of the invention referring to figs. 2 and 3, Fig. 2, Fig. 3 is a kind of wireless connection method schematic diagram that the embodiment of the invention provides.
As shown in Figure 2, step 202, as first terminal B during with display screen, B triggers the instruction that enables WIFI direct technology (Wifi peer to peer, P2P) function by screen so that B be connected terminal A and connect by P2P.
As shown in Figure 3, step 302, when first terminal B is not with display screen, enable button with the head of a household by P2P, enable the P2P function, Light-Emitting Diode (Light Emitting Diode, LED) flicker, so that the second terminal can be arrived by other device scans, other equipment comprise the second terminal, also can be the terminal equipments beyond the second terminal.
Step 102 receives the random number X that described the second terminal sends, and produces random number Y corresponding to described X, preserves the corresponding relation of X and Y, and described Y is sent to described the second terminal, so that described the second terminal is preserved the corresponding relation of described X and Y;
Among the present invention, corresponding relation by X and Y, whether can verification terminal B access terminal the local area network (LAN) at A place, when terminal B sends X to terminal A, the corresponding relation that terminal A searches X and Y find be X corresponding be Y, the acknowledgement frame that then will comprise Y sends to terminal B, terminal B also keeps the corresponding relation of X and Y simultaneously, terminal B receives the corresponding relation of searching X and Y behind the acknowledgement frame that comprises Y, and it is corresponding knowing X and Y as terminal B, then can know the access terminal local area network (LAN) at A place of terminal B.
Concrete, such as the step 204-step 209 of Fig. 2.
Step 204, terminal A is connected P2P and connects with terminal B;
Step 205, terminal A sends AP information to terminal B, described information comprises wireless access points (the Access Point of terminal A access, AP) server identification (Service Set Identifier, SSID), media intervening layer address (Media Access Control, MAC), password (Password, PWD);
Step 206, terminal B preserves AP information and replys;
Step 207, terminal A sends 8 random number X to terminal B,
Step 208, terminal B preserves X and replys 8 random number Y;
Step 209, terminal A preserves 8 random number Y, and replys.
Step 103 disconnects and is connected the described P2P connection of the second terminal, accesses described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD;
Concrete, such as the step 210-211 of Fig. 2.
Step 210, behind the corresponding relation of terminal B preservation X and Y, terminal B disconnection is connected with terminal A's;
Step 211, terminal B uses AP information to be connected with AP.
Step 104 sends the broadcast message comprise described X, so that described the second terminal sends to described first terminal according to the acknowledgement frame that the corresponding relation of described X and Y will comprise Y;
Concrete, with reference to step 219 and the step 220 of figure 2.
Step 219, when terminal A accessed described AP, terminal B sent broadcast message, carries X in described broadcast message;
Step 220, after terminal A received X, according to the corresponding relation of X and Y, the acknowledgement frame that will comprise Y sent to terminal B.
Step 105, when receiving the described acknowledgement frame that comprises Y, according to the corresponding relation of described X and Y, the display radio successful connection.
Alternatively, described display radio successful connection comprises:
When described first terminal has display screen, by the successful connection of display screen display radio;
When described first terminal was not with display screen, the bright light by LED represented the wireless connections success.
Concrete, with reference to the step 221 of figure 2.
Step 221, after terminal B receives the acknowledgement frame of A, the display radio successful connection.
Concrete, with reference to the step 321 of figure 3.
Step 321, after terminal B received the acknowledgement frame of A, the LED bright light showed successful connection.
As a kind of optional embodiment, described method disconnects and is being connected the P2P connection of the second terminal, accesses after the step of described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD, also comprises:
The wireless connections of described first terminal disconnection and described AP;
Described first terminal be connected the second terminal and connect by P2P;
The information with described AP successful connection of sending is to described the second terminal, so that after described the second terminal receives described information, send acknowledgement frame to described first terminal, disconnects and is connected the P2P connection of first terminal and the wireless connections of recovery and described AP;
Receive the described acknowledgement frame that described the second terminal sends, disconnect and be connected the P2P connection of the second terminal and the wireless connections of recovery and described AP.
Concrete, with reference to the step 212-218 of figure 2.
Step 212, behind terminal B access AP, the wireless connections of terminal B disconnection and AP;
Step 213, terminal B is connected P2P with terminal A and connects;
Step 214, the information of terminal B transmission and AP successful connection is to terminal A;
Step 215, terminal A sends acknowledgement frame, disconnects being connected connection with terminal B;
Step 216, the wireless connections of terminal A recovery and AP;
Step 217, terminal B disconnects is connected connection with terminal A;
Concrete, terminal B port is connected connection with terminal A be to realize by default program.
Step 218, the wireless connections of terminal B recovery and AP.
Described first terminal disconnects the wireless connections with described AP, comprising:
When described first terminal had display screen, described first terminal triggered the instruction of the wireless connections of disconnection and described AP by screen, so that described first terminal disconnects and the wireless connections of described AP;
Perhaps, when first terminal was not with display screen, described first terminal triggered the instruction of the wireless connections of disconnection and described AP by button, so that described first terminal disconnects and the wireless connections of described AP.
Concrete, with reference to the step 212 of figure 2 and the step 312 of Fig. 3.
Step 212 triggers the instruction of the wireless connections of disconnection and described AP by screen, step 312 triggers the instruction of the wireless connections of disconnection and described AP by long button.
The embodiment of the invention provides a kind of method of wireless connections, described method by first terminal be connected terminal and connect by P2P, the described server identification SSID, described media intervening layer address MAC, the described password PWD that receive the wireless access points AP of described the second terminal access that described the second terminal sends access described AP; Receive the random number X that described the second terminal sends, produce random number Y corresponding to described X, preserve the corresponding relation of X and Y, and described Y is sent to described the second terminal, so that described the second terminal is preserved the corresponding relation of described X and Y; Disconnect and be connected the P2P connection of the second terminal, access described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD; When described the second terminal accesses described AP, send the broadcast message comprise described X, so that described the second terminal sends to described first terminal according to the acknowledgement frame that the corresponding relation of described X and Y will comprise Y; When described first terminal is received the acknowledgement frame of the described Y of comprising, corresponding relation according to described X and Y, the display radio successful connection, thereby realize that first terminal accesses the WLAN (wireless local area network) at the second terminal place, and first terminal is by determining whether to be connected into same WLAN (wireless local area network) with the second terminal interaction information.
With reference to figure 4, Fig. 4 is the method flow diagram of a kind of wireless connections of providing of the embodiment of the invention.As shown in Figure 4, said method comprising the steps of:
Step 401, the second terminal is connected P2P with first terminal and is connected, the server identification SSID from described the second terminal access AP to described first terminal, media intervening layer address MAC, the password PWD that send access described AP, so that described first terminal accesses described AP by described server identification SSID, described media intervening layer address MAC, described password PWD;
Alternatively, described the second terminal is connected P2P with first terminal and is connected, and comprising:
When the second terminal had display screen, described the second terminal triggered the instruction that enables the P2P function by screen, connect so that described the second terminal is connected P2P with first terminal;
Perhaps, when the second terminal was not with display screen, described the second terminal triggered the instruction enable the P2P function by button so that described the second terminal be connected first terminal and connect by P2P.
Concrete, with reference to the step 303 of figure 3.
Step 303, when terminal A band display screen, described terminal A triggers the instruction that enables the P2P function by screen, connect so that described terminal A is connected P2P with terminal B.
With reference to figure 5, Fig. 5 is the method schematic diagram of a kind of wireless connections of providing of the embodiment of the invention.
Step 503, when terminal A was not with display screen, long P2P by terminal A enabled button, enables the P2P function, LED flicker, the wireless connections of disconnection and AP.
Step 402 sends random number X to described first terminal, and receives random number Y corresponding to described X that described first terminal produces, and preserves the corresponding relation of X and Y;
Concrete, with reference to the step 204-step 209 of figure 2.
Step 403 disconnects and is connected the P2P connection of first terminal, accesses described AP;
Concrete, with reference to the step 216 of figure 2.
Step 404, receive the broadcast message that comprises X that described first terminal sends, according to the corresponding relation of described X and Y, the acknowledgement frame that will comprise Y sends to described first terminal, so that described first terminal is according to the corresponding relation of described X and Y, the display radio successful connection.
Concrete, with reference to the step 219-221 of figure 2.
As a kind of optional embodiment, described method accesses before the step of described AP disconnecting and being connected the described P2P connection of first terminal, also comprises:
When the wireless connections of described first terminal disconnection and described AP, when connecting described the second terminal by P2P, receive the information of the successful connection of described first terminal transmission;
Send acknowledgement frame to described first terminal, so that after described first terminal receives described acknowledgement frame, disconnect and be connected the P2P connection of the second terminal and the wireless connections of recovery and described AP.
Concrete, with reference to the step 212-218 of figure 2.
Embodiment of the invention application scenarios has following four kinds of situations:
The first, as shown in Figure 2, terminal B is with screen, and terminal A is with screen;
The second, as shown in Figure 3, terminal B is not with screen, and terminal A is with screen;
The 3rd, as shown in Figure 5, terminal B is with screen, and terminal A is not with screen;
The 4th, as shown in Figure 6, terminal B is not with screen, and terminal A is not with screen.
Below introduce in detail each step of Fig. 2, Fig. 3, Fig. 5, Fig. 6.
With reference to figure 2, step 201, terminal A accesses AP, and the mode of access adopts the AP/Station pattern, and terminal A preserves the link information of current AP;
Step 202, terminal B powers on, and enables the wireless P2P function of self, and so that the second terminal can be arrived by other device scans, other equipment comprise the second terminal, also can be the terminal equipment beyond the second terminal;
Step 203, terminal A enables self wireless P2P function, and can disconnect and being connected of AP this moment;
Step 204, terminal A sweep P2P equipment in the P2P list of devices, selects terminal B to connect, and terminal A is connected with the P2P of terminal B and finishes;
Step 205, terminal A pushes the AP link information of recently disconnection to terminal B, comprises server identification (Service Set Identifier, SSID), media intervening layer address (the Media Access Control of AP, MAC), the link information such as password (Password, PWD);
Step 206, terminal B receives the AP information that terminal A pushes, and preserves AP information, replys acknowledgement frame;
Step 207, terminal A receives after the acknowledgement frame of terminal B, produces and preserve 8 random number X, sends 8 random number X to terminal B;
Step 208 after terminal B receives 8 random number X, is preserved 8 random number X, and terminal B produces and preserve 8 random number Y, sends acknowledgement frame, comprises 8 random number Y in the acknowledgement frame;
Step 209 after terminal A receives 8 random number Y, is preserved 8 random number Y, sends acknowledgement frame;
Step 210, terminal B receives after the acknowledgement frame, disconnects and being connected of terminal A
Step 211 attempts using the AP information of receiving, is connected with AP;
Step 212, after the successful connection, disconnection is connected with AP's;
Step 213, terminal B switches to wireless P2P pattern, and finishes and being connected of terminal A;
Step 214 sends with AP successful connection information to terminal A;
Step 215 after terminal A receives the successful connection information of terminal B, sends acknowledgement frame, and being connected of disconnection and terminal B;
Step 216, recovery is connected with wireless aps;
Step 217, terminal B receives after the acknowledgement frame of terminal A, disconnects and being connected of terminal A;
Step 218, recovery is connected with wireless aps;
Step 219,8 random number X of terminal B broadcast transmission;
Step 220 after terminal A receives 8 random number X, sends acknowledgement frame, comprises 8 random number Y;
Step 221, terminal B receives after 8 random number Y, the interface display successful connection.
With reference to figure 3, step 301, terminal A accesses AP, and the mode of access adopts the AP/Station pattern, and terminal A preserves the link information of current AP;
Step 302, terminal B powers on, and enables the wireless P2P function of self, and so that the second terminal can be arrived by other device scans, other equipment comprise the second terminal, also can be the terminal equipment beyond the second terminal;
Step 303, terminal A enables self wireless P2P function, and can disconnect and being connected of AP this moment;
Step 304, terminal A sweep P2P equipment in the P2P list of devices, selects terminal B to connect, and terminal A is connected with the P2P of terminal B and finishes;
Step 305, terminal A pushes the AP link information of recently disconnection to terminal B, comprises the SSID of AP, MAC, the link informations such as PWD;
Step 306, terminal B receives the AP information that terminal A pushes, and preserves AP information, replys acknowledgement frame;
Step 307, terminal A receives after the acknowledgement frame of terminal B, produces and preserve 8 random number X, sends 8 random number X to terminal B;
Step 308 after terminal B receives 8 random number X, is preserved 8 random number X, and terminal B produces and preserve 8 random number Y, sends acknowledgement frame, comprises 8 random number Y in the acknowledgement frame;
Step 309 after terminal A receives 8 random number Y, is preserved 8 random number Y, sends acknowledgement frame;
Step 310, terminal B receives after the acknowledgement frame, disconnects and being connected of terminal A
Step 311 attempts using the AP information of receiving, is connected with AP;
Step 312, after the successful connection, disconnection is connected with AP's;
Step 313, terminal B switches to wireless P2P pattern, and finishes and being connected of terminal A;
Step 314 sends with AP successful connection information to terminal A;
Step 315 after terminal A receives the successful connection information of terminal B, sends acknowledgement frame, and being connected of disconnection and terminal B;
Step 316, recovery is connected with wireless aps;
Step 317, terminal B receives after the acknowledgement frame of terminal A, disconnects and being connected of terminal A;
Step 318, recovery is connected with wireless aps;
Step 319,8 random number X of terminal B broadcast transmission;
Step 320 after terminal A receives 8 random number X, sends acknowledgement frame, comprises 8 random number Y;
Step 321, terminal B receives after 8 random number Y, the normal bright expression successful connection of LED.
With reference to figure 5, step 501, terminal A accesses AP, and the mode of access adopts the AP/Station pattern, and terminal A preserves the link information of current AP;
Step 502, terminal B powers on, and enables the wireless P2P function of self, and so that the second terminal can be arrived by other device scans, other equipment comprise the second terminal, also can be the terminal equipment beyond the second terminal;
Step 503 long enables button by the P2P on the terminal A, and terminal A enables self wireless P2P function, and is made as miscellaneous equipment and can scans, and LED shows green blink states, can disconnect this moment and being connected of AP;
Step 504, terminal B scanning P2P equipment in the P2P list of devices, selects terminal A to connect, and longly enables button by the P2P on the terminal A, and terminal A is connected with the P2P of terminal B and finishes;
Step 505, terminal A pushes the AP link information of recently disconnection to terminal B, comprises the SSID of AP, MAC, the link informations such as PWD;
Step 506, terminal B receives the AP information that terminal A pushes, and preserves AP information, replys acknowledgement frame;
Step 507, terminal A receives after the acknowledgement frame of terminal B, produces and preserve 8 random number X, sends 8 random number X to terminal B;
Step 508 after terminal B receives 8 random number X, is preserved 8 random number X, and terminal B produces and preserve 8 random number Y, sends acknowledgement frame, comprises 8 random number Y in the acknowledgement frame;
Step 509 after terminal A receives 8 random number Y, is preserved 8 random number Y, sends acknowledgement frame;
Step 510, terminal B receives after the acknowledgement frame, disconnects and being connected of terminal A
Step 511 attempts using the AP information of receiving, is connected with AP;
Step 512, after the successful connection, disconnection is connected with AP's;
Step 513, terminal B switches to wireless P2P pattern, and finishes and being connected of terminal A;
Step 514 sends with AP successful connection information to terminal A;
Step 515 after terminal A receives the successful connection information of terminal B, sends acknowledgement frame, and being connected of disconnection and terminal B;
Step 516, recovery is connected with wireless aps;
Step 517, terminal B receives after the acknowledgement frame of terminal A, disconnects and being connected of terminal A;
Step 518, recovery is connected with wireless aps;
Step 519,8 random number X of terminal B broadcast transmission;
Step 520 after terminal A receives 8 random number X, sends acknowledgement frame, comprises 8 random number Y;
Step 521, terminal B receives after 8 random number Y, the interface display successful connection.
With reference to figure 6, step 601, terminal A accesses AP, and the mode of access adopts the AP/Station pattern, and terminal A preserves the link information of current AP;
Step 602 enables button with duration by the P2P on terminal A and the terminal B, and terminal A is connected with the P2P of terminal B and finishes;
Step 603, terminal A pushes the AP link information of recently disconnection to terminal B, comprises the SSID of AP, MAC, the link informations such as PWD;
Step 604, terminal B receives the AP information that terminal A pushes, and preserves AP information, replys acknowledgement frame;
Step 605, terminal A receives after the acknowledgement frame of terminal B, produces and preserve 8 random number X, sends 8 random number X to terminal B;
Step 606 after terminal B receives 8 random number X, is preserved 8 random number X, and terminal B produces and preserve 8 random number Y, sends acknowledgement frame, comprises 8 random number Y in the acknowledgement frame;
Step 607 after terminal A receives 8 random number Y, is preserved 8 random number Y, sends acknowledgement frame;
Step 608, terminal B receives after the acknowledgement frame, disconnects and being connected of terminal A;
Step 609 attempts using the AP information of receiving, is connected with AP;
Step 610, after the successful connection, disconnection is connected with AP's;
Step 611 enables button with duration by the P2P on terminal A and the terminal B, finishes terminal B and is connected with the P2P of terminal A, and terminal B sends with AP successful connection information to terminal A;
Step 612 sends with AP successful connection information to terminal A;
Step 613 after terminal A receives the successful connection information of terminal B, sends acknowledgement frame, and being connected of disconnection and terminal B;
Step 614, recovery is connected with wireless aps;
Step 615, terminal B receives after the acknowledgement frame of terminal A, disconnects and being connected of terminal A;
Step 616, recovery is connected with wireless aps;
Step 617,8 random number X of terminal B broadcast transmission;
Step 618 after terminal A receives 8 random number X, sends acknowledgement frame, comprises 8 random number Y;
Step 619, terminal B receives after 8 random number Y, the normal bright expression successful connection of LED.
The embodiment of the invention provides a kind of method of wireless connections, described method by first terminal be connected terminal and connect by P2P, the server identification SSID, media intervening layer address MAC, the password PWD that receive the wireless access points AP of described the second terminal access that described the second terminal sends access described AP; Receive the random number X that described the second terminal sends, produce random number Y corresponding to described X, preserve the corresponding relation of X and Y, and described Y is sent to described the second terminal, so that described the second terminal is preserved the corresponding relation of described X and Y; Disconnect and be connected the P2P connection of the second terminal, access described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD; When described the second terminal accesses described AP, send the broadcast message comprise described X, so that described the second terminal sends to described first terminal according to the acknowledgement frame that the corresponding relation of described X and Y will comprise Y; When described first terminal is received the acknowledgement frame of the described Y of comprising, corresponding relation according to described X and Y, the display radio successful connection, thereby realize that first terminal accesses the WLAN (wireless local area network) at the second terminal place, and first terminal is by determining whether to be connected into same WLAN (wireless local area network) with the second terminal interaction information.
With reference to figure 7, Fig. 7 is the structure drawing of device of a kind of terminal of providing of the embodiment of the invention.As shown in Figure 7, described terminal comprises with lower unit:
Linkage unit 701 is used for first terminal and is connected terminal by wireless compatibility checking WIFI direct-connecting technology P2P connection;
Alternatively, described linkage unit 701 specifically is used for:
When first terminal had display screen, described first terminal triggered the instruction enable the P2P function by screen so that described first terminal be connected terminal and connect by P2P;
Perhaps, when first terminal was not with display screen, described first terminal triggered the instruction enable the P2P function by button so that described first terminal be connected the second terminal and connect by P2P.
The first receiving element 702 is used for receiving server identification SSID, media intervening layer address MAC, the password PWD of the wireless access points AP of described the second terminal access that described the second terminal sends;
Concrete, be the method schematic diagram of a kind of wireless connections of providing of the embodiment of the invention referring to figs. 2 and 3, Fig. 2, Fig. 3 is a kind of wireless connection method schematic diagram that the embodiment of the invention provides.
As shown in Figure 2, step 202, as first terminal B during with display screen, B triggers the instruction that enables WIFI direct technology (Wifi peer to peer, P2P) function by screen so that B be connected terminal A and connect by P2P.
As shown in Figure 3, step 302, when first terminal B is not with display screen, enable button with the head of a household by P2P, enable the P2P function, Light-Emitting Diode (Light Emitting Diode, LED) flicker, so that the second terminal can be arrived by other device scans, other equipment comprise the second terminal, also can be the terminal equipments beyond the second terminal.
The second receiving element 703, be used for receiving the random number X that described the second terminal sends, produce random number Y corresponding to described X, preserve the corresponding relation of X and Y, and described Y sent to described the second terminal, so that described the second terminal is preserved the corresponding relation of described X and Y;
Among the present invention, corresponding relation by X and Y, whether can verification terminal B access terminal the local area network (LAN) at A place, when terminal B sends X to terminal A, the corresponding relation that terminal A searches X and Y find be X corresponding be Y, the acknowledgement frame that then will comprise Y sends to terminal B, terminal B also keeps the corresponding relation of X and Y simultaneously, terminal B receives the corresponding relation of searching X and Y behind the acknowledgement frame that comprises Y, and it is corresponding knowing X and Y as terminal B, then can know the access terminal local area network (LAN) at A place of terminal B.
Concrete, such as the step 204-step 209 of Fig. 2.
Step 204, terminal A is connected P2P and connects with terminal B;
Step 205, terminal A sends AP information to terminal B, and described information comprises that described server identification SSID, described media intervening layer address MAC, the described password PWD of the wireless access points (Access Point, AP) of terminal A access access described AP;
Step 206, terminal B preserves AP information and replys;
Step 207, terminal A sends 8 random number X to terminal B,
Step 208, terminal B preserves X and replys 8 random number Y;
Step 209, terminal A preserves 8 random number Y, and replys.
Switching units 704 be used for to disconnect and is connected the described P2P connection of the second terminal;
Access unit 705 is used for accessing described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD;
Concrete, such as the step 210-211 of Fig. 2.
Step 210, behind the corresponding relation of terminal B preservation X and Y, terminal B disconnection is connected with terminal A's;
Step 211, terminal B uses AP information to be connected with AP.
Transmitting element 706 be used for to send the broadcast message that comprises described X, so that described the second terminal sends to described first terminal according to the acknowledgement frame that the corresponding relation of described X and Y will comprise Y;
Concrete, with reference to step 219 and the step 220 of figure 2.
Step 219, when terminal A accessed described AP, terminal B sent broadcast message, carries X in described broadcast message;
Step 220, after terminal A received X, according to the corresponding relation of X and Y, the acknowledgement frame that will comprise Y sent to terminal B.
Display unit 707, when being used for receiving the acknowledgement frame of the described Y of comprising, according to the corresponding relation of described X and Y, the display radio successful connection.
Alternatively, described display unit 707 specifically is used for:
When described first terminal has display screen, by the successful connection of display screen display radio;
When described first terminal was not with display screen, the bright light by LED represented the wireless connections success.
Concrete, with reference to the step 221 of figure 2.
Step 221, after terminal B receives the acknowledgement frame of A, the display radio successful connection.
Concrete, with reference to the step 321 of figure 3.
Step 321, after terminal B received the acknowledgement frame of A, the LED bright light showed successful connection.
As a kind of optional embodiment, described terminal also comprises the first processing unit, and described the first processing unit specifically is used for:
The wireless connections of described first terminal disconnection and described AP;
Described first terminal be connected the second terminal and connect by P2P;
The information with described AP successful connection of sending is to described the second terminal, so that after described the second terminal receives described information, send acknowledgement frame to described first terminal, disconnects and is connected the P2P connection of first terminal and the wireless connections of recovery and described AP;
Receive the described acknowledgement frame that described the second terminal sends, disconnect and be connected the P2P connection of the second terminal and the wireless connections of recovery and described AP.
Concrete, with reference to the step 212-218 of figure 2.
Step 212, behind terminal B access AP, the wireless connections of terminal B disconnection and AP;
Step 213, terminal B is connected P2P with terminal A and connects;
Step 214, the information of terminal B transmission and AP successful connection is to terminal A;
Step 215, terminal A sends acknowledgement frame, disconnects being connected connection with terminal B;
Step 216, the wireless connections of terminal A recovery and AP;
Step 217, terminal B disconnects is connected connection with terminal A;
Concrete, terminal B port is connected connection with terminal A be to realize by default program.
Step 218, the wireless connections of terminal B recovery and AP.
The wireless connections of the described first terminal disconnection of execution in step and described AP comprise in described the first processing unit; When described first terminal had display screen, described first terminal triggered the instruction of the wireless connections of disconnection and described AP by screen, so that described first terminal disconnects and the wireless connections of described AP;
Perhaps, when first terminal was not with display screen, described first terminal triggered the instruction of the wireless connections of disconnection and described AP by button, so that described first terminal disconnects and the wireless connections of described AP.
Concrete, with reference to the step 212 of figure 2 and the step 312 of Fig. 3.
Step 212 triggers the instruction of the wireless connections of disconnection and described AP by screen, step 312 triggers the instruction of the wireless connections of disconnection and described AP by long button.
As another kind of optional embodiment, described terminal also comprises the second processing unit, and described the second processing unit is used for:
The second terminal is connected P2P with first terminal and is connected, the described server identification SSID from described the second terminal access AP to described first terminal, described media intervening layer address MAC, the described password PWD that send access described AP, so that described first terminal accesses described AP by described server identification SSID, described media intervening layer address MAC, described password PWD;
Send random number X to described first terminal, and receive random number Y corresponding to described X that described first terminal produces, preserve the corresponding relation of X and Y;
Disconnect and be connected the described P2P connection of first terminal, access described AP;
Receive the broadcast message that comprises X that described first terminal sends, according to the corresponding relation of described X and Y, the acknowledgement frame that will comprise Y sends to described first terminal, so that described first terminal is according to the corresponding relation of described X and Y, and the display radio successful connection.
Alternatively, described the second terminal of execution in step is connected P2P with first terminal and is connected in described the second processing unit, comprising:
When the second terminal had display screen, described the second terminal triggered the instruction that enables the P2P function by screen, connect so that described the second terminal is connected P2P with first terminal;
Perhaps, when the second terminal was not with display screen, described the second terminal triggered the instruction enable the P2P function by button so that described the second terminal be connected first terminal and connect by P2P.
Concrete, with reference to the step 303 of figure 3.
Step 303, when terminal A band display screen, described terminal A triggers the instruction that enables the P2P function by screen, connect so that described terminal A is connected P2P with terminal B.
With reference to figure 5, Fig. 5 is the method schematic diagram of a kind of wireless connections of providing of the embodiment of the invention.
Step 503, when terminal A was not with display screen, long P2P by terminal A enabled button, enables the P2P function, LED flicker, the wireless connections of disconnection and AP.
Alternatively, described terminal also comprises the 3rd processing unit, and described the 3rd processing unit specifically is used for:
When the wireless connections of described first terminal disconnection and described AP, when connecting described the second terminal by P2P, receive the information of the successful connection of described first terminal transmission;
Send acknowledgement frame to described first terminal, so that after described first terminal receives described acknowledgement frame, disconnect and be connected the P2P connection of the second terminal and the wireless connections of recovery and described AP.
Concrete, with reference to the step 212-218 of figure 2.
The embodiment of the invention provides a kind of terminal, described terminal by first terminal be connected terminal and connect by P2P, the server identification SSID, media intervening layer address MAC, the password PWD that receive the wireless access points AP of described the second terminal access that described the second terminal sends access described AP; Receive the random number X that described the second terminal sends, produce random number Y corresponding to described X, preserve the corresponding relation of X and Y, and described Y is sent to described the second terminal, so that described the second terminal is preserved the corresponding relation of described X and Y; Disconnect and be connected the P2P connection of the second terminal, access described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD; When described the second terminal accesses described AP, send the broadcast message comprise described X, so that described the second terminal sends to described first terminal according to the acknowledgement frame that the corresponding relation of described X and Y will comprise Y; When described first terminal is received the acknowledgement frame of the described Y of comprising, corresponding relation according to described X and Y, the display radio successful connection, thereby realize that first terminal accesses the WLAN (wireless local area network) at the second terminal place, and first terminal is by determining whether to be connected into same WLAN (wireless local area network) with the second terminal interaction information.
Fig. 8 is the structure drawing of device of a kind of terminal of providing of the embodiment of the invention.With reference to figure 8, Fig. 8 is a kind of terminal 800 that the embodiment of the invention provides, and the specific embodiment of the invention is not done restriction to the specific implementation of described terminal.Described terminal 800 comprises:
Processor (processor) 801, communication interface (Communications Interface) 802, memory (memory) 803, bus 804.
Processor 801, communication interface 802, memory 803 is finished mutual communication by bus 804.
Communication interface 802 is used for communicating with other equipment;
Processor 801 is used for executive program.
Particularly, program can comprise program code, and described program code comprises computer-managed instruction.
Processor 801 may be a central processor CPU, or specific integrated circuit ASIC(Application Specific Integrated Circuit), or be configured to implement one or more integrated circuits of the embodiment of the invention.
Memory 803 is used for depositing program.Memory 803 may comprise the high-speed RAM memory, also may also comprise nonvolatile memory (non-volatile memory), for example at least one magnetic disc store.Program specifically can comprise:
First terminal be connected terminal and connect by wireless compatibility checking WIFI direct-connecting technology P2P, receive server identification SSID, media intervening layer address MAC, the password PWD of the wireless access points AP of described the second terminal access that described the second terminal sends;
Receive the random number X that described the second terminal sends, produce random number Y corresponding to described X, preserve the corresponding relation of X and Y, and described Y is sent to described the second terminal, so that described the second terminal is preserved the corresponding relation of described X and Y;
Disconnect and be connected the described P2P connection of the second terminal, access described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD;
Transmission comprises the broadcast message of described X, so that described the second terminal sends to described first terminal according to the acknowledgement frame that the corresponding relation of described X and Y will comprise Y;
When receiving the described acknowledgement frame that comprises Y, according to the corresponding relation of described X and Y, the display radio successful connection.
Described first terminal be connected terminal and connect by P2P, comprising:
When first terminal had display screen, described first terminal triggered the instruction enable the P2P function by screen so that described first terminal be connected terminal and connect by P2P;
Perhaps, when first terminal was not with display screen, described first terminal triggered the instruction enable the P2P function by button so that described first terminal be connected the second terminal and connect by P2P.
Described display radio successful connection comprises:
When described first terminal has display screen, by the successful connection of display screen display radio;
When described first terminal was not with display screen, the bright light by LED represented the wireless connections success.
Disconnect and be connected the P2P connection of the second terminal, accessing after the step of described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD, also comprising:
The wireless connections of described first terminal disconnection and described AP;
Described first terminal be connected the second terminal and connect by P2P;
The information with described AP successful connection of sending is to described the second terminal, so that after described the second terminal receives described information, send acknowledgement frame to described first terminal, disconnects and is connected the P2P connection of first terminal and the wireless connections of recovery and described AP;
Receive the described acknowledgement frame that described the second terminal sends, disconnect and be connected the P2P connection of the second terminal and the wireless connections of recovery and described AP.
Described first terminal disconnects the wireless connections with described AP, comprising:
When described first terminal had display screen, described first terminal triggered the instruction of the wireless connections of disconnection and described AP by screen, so that described first terminal disconnects and the wireless connections of described AP;
Perhaps, when first terminal was not with display screen, described first terminal triggered the instruction of the wireless connections of disconnection and described AP by button, so that described first terminal disconnects and the wireless connections of described AP.
The second terminal is connected P2P with first terminal and is connected, the described server identification SSID from described the second terminal access AP to described first terminal, described media intervening layer address MAC, the described password PWD that send access described AP, so that described first terminal accesses described AP by described server identification SSID, described media intervening layer address MAC, described password PWD;
Send random number X to described first terminal, and receive random number Y corresponding to described X that described first terminal produces, preserve the corresponding relation of X and Y;
Disconnect and be connected the described P2P connection of first terminal, access described AP;
Receive the broadcast message that comprises X that described first terminal sends, according to the corresponding relation of described X and Y, the acknowledgement frame that will comprise Y sends to described first terminal, so that described first terminal is according to the corresponding relation of described X and Y, and the display radio successful connection.
Described the second terminal is connected P2P with first terminal and is connected, and comprising:
When the second terminal had display screen, described the second terminal triggered the instruction that enables the P2P function by screen, connect so that described the second terminal is connected P2P with first terminal;
Perhaps, when the second terminal was not with display screen, described the second terminal triggered the instruction enable the P2P function by button so that described the second terminal be connected first terminal and connect by P2P.
Described method accesses before the step of described AP disconnecting and being connected the P2P connection of first terminal, also comprises:
When the wireless connections of described first terminal disconnection and described AP, when connecting described the second terminal by P2P, receive the information of the successful connection of described first terminal transmission;
Send acknowledgement frame to described first terminal, so that after described first terminal receives described acknowledgement frame, disconnect and be connected the P2P connection of the second terminal and the wireless connections of recovery and described AP.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in above-described embodiment method, to come the relevant hardware of instruction to finish by computer program, described program can be stored in the computer read/write memory medium, this program can comprise the flow process such as the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-OnlY MemorY, ROM) or random access memory (Random Access MemorY is called for short RAM) etc.
Above disclosed is preferred embodiment of the present invention only, certainly can not limit with this interest field of the present invention, and the equivalent variations of therefore doing according to claim of the present invention still belongs to the scope that the present invention is contained.

Claims (16)

1. the method for wireless connections is characterized in that, described method comprises:
First terminal be connected terminal and connect by wireless compatibility checking WIFI direct-connecting technology P2P, receive server identification SSID, media intervening layer address MAC, the password PWD of the wireless access points AP of described the second terminal access that described the second terminal sends;
Receive the random number X that described the second terminal sends, produce random number Y corresponding to described X, preserve the corresponding relation of X and Y, and described Y is sent to described the second terminal, so that described the second terminal is preserved the corresponding relation of described X and Y;
Disconnect and be connected the described P2P connection of the second terminal, access described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD;
Transmission comprises the broadcast message of described X, so that described the second terminal sends to described first terminal according to the acknowledgement frame that the corresponding relation of described X and Y will comprise Y;
Receive the described acknowledgement frame that comprises Y, according to the corresponding relation of described X and Y, the display radio successful connection.
2. method according to claim 1 is characterized in that, described first terminal be connected terminal and connect by P2P, comprising:
When first terminal had display screen, described first terminal triggered the instruction enable the P2P function by screen so that described first terminal be connected terminal and connect by P2P;
Perhaps, when first terminal was not with display screen, described first terminal triggered the instruction enable the P2P function by button so that described first terminal be connected the second terminal and connect by P2P.
3. method according to claim 1 and 2 is characterized in that, described display radio successful connection comprises:
When described first terminal has display screen, by the successful connection of display screen display radio;
When described first terminal was not with display screen, the bright light by LED represented the wireless connections success.
4. the described method of any one according to claim 1-3, it is characterized in that, disconnect and be connected the P2P connection of the second terminal, accessing after the step of described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD, also comprising:
The wireless connections of described first terminal disconnection and described AP;
Described first terminal be connected the second terminal and connect by P2P;
The information with described AP successful connection of sending is to described the second terminal, so that after described the second terminal receives described information, send acknowledgement frame to described first terminal, disconnects and is connected the P2P connection of first terminal and the wireless connections of recovery and described AP;
Receive the described acknowledgement frame that described the second terminal sends, disconnect and be connected the P2P connection of the second terminal and the wireless connections of recovery and described AP.
5. method according to claim 4 is characterized in that, described first terminal disconnects the wireless connections with described AP, comprising:
When described first terminal had display screen, described first terminal triggered the instruction of the wireless connections of disconnection and described AP by screen, so that described first terminal disconnects and the wireless connections of described AP;
Perhaps, when first terminal was not with display screen, described first terminal triggered the instruction of the wireless connections of disconnection and described AP by button, so that described first terminal disconnects and the wireless connections of described AP.
6. the method for wireless connections is characterized in that, described method comprises:
The second terminal is connected P2P with first terminal and is connected, the server identification SSID from described the second terminal access AP to described first terminal, media intervening layer address MAC, the password PWD that send access described AP, so that described first terminal accesses described AP by described server identification SSID, described media intervening layer address MAC, described password PWD;
Send random number X to described first terminal, and receive random number Y corresponding to described X that described first terminal produces, preserve the corresponding relation of X and Y;
Disconnect and be connected the described P2P connection of first terminal, access described AP;
Receive the broadcast message that comprises X that described first terminal sends, according to the corresponding relation of described X and Y, the acknowledgement frame that will comprise Y sends to described first terminal, so that described first terminal is according to the corresponding relation of described X and Y, and the display radio successful connection.
7. method according to claim 6 is characterized in that, described the second terminal is connected P2P with first terminal and is connected, and comprising:
When the second terminal had display screen, described the second terminal triggered the instruction that enables the P2P function by screen, connect so that described the second terminal is connected P2P with first terminal;
Perhaps, when the second terminal was not with display screen, described the second terminal triggered the instruction enable the P2P function by button so that described the second terminal be connected first terminal and connect by P2P.
8. according to claim 6 or 7 described methods, it is characterized in that, described method accesses before the step of described AP disconnecting and being connected the P2P connection of first terminal, also comprises:
When the wireless connections of described first terminal disconnection and described AP, when connecting described the second terminal by P2P, receive the information of the successful connection of described first terminal transmission;
Send acknowledgement frame to described first terminal, so that after described first terminal receives described acknowledgement frame, disconnect and be connected the P2P connection of the second terminal and the wireless connections of recovery and described AP.
9. a terminal is characterized in that, described terminal comprises with lower unit:
Linkage unit is used for first terminal and is connected terminal by wireless compatibility checking WIFI direct-connecting technology P2P connection;
The first receiving element is used for receiving server identification SSID, media intervening layer address MAC, the password PWD of the wireless access points AP of described the second terminal access that described the second terminal sends;
The second receiving element is used for receiving the random number X that described the second terminal sends, and produces random number Y corresponding to described X, preserves the corresponding relation of X and Y, and described Y is sent to described the second terminal, so that described the second terminal is preserved the corresponding relation of described X and Y;
Switching units be used for to disconnect and is connected the described P2P connection of the second terminal;
Access unit is used for accessing described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD;
Transmitting element be used for to send the broadcast message that comprises described X, so that described the second terminal sends to described first terminal according to the acknowledgement frame that the corresponding relation of described X and Y will comprise Y;
Display unit, when being used for receiving the acknowledgement frame of the described Y of comprising, according to the corresponding relation of described X and Y, the display radio successful connection.
10. terminal according to claim 9 is characterized in that, described linkage unit specifically is used for:
When first terminal had display screen, described first terminal triggered the instruction enable the P2P function by screen so that described first terminal be connected terminal and connect by P2P;
Perhaps, when first terminal was not with display screen, described first terminal triggered the instruction enable the P2P function by button so that described first terminal be connected the second terminal and connect by P2P.
11. according to claim 9 or 10 described terminals, it is characterized in that, described display unit specifically is used for:
When described first terminal has display screen, by the successful connection of display screen display radio;
When described first terminal was not with display screen, the bright light by LED represented the wireless connections success.
12. the described terminal of any one is characterized in that according to claim 9-11, described terminal also comprises the first processing unit, and described the first processing unit specifically is used for:
The wireless connections of described first terminal disconnection and described AP;
Described first terminal be connected the second terminal and connect by P2P;
The information with described AP successful connection of sending is to described the second terminal, so that after described the second terminal receives described information, send acknowledgement frame to described first terminal, disconnects and is connected the P2P connection of first terminal and the wireless connections of recovery and described AP;
Receive the described acknowledgement frame that described the second terminal sends, disconnect and be connected the P2P connection of the second terminal and the wireless connections of recovery and described AP.
13. terminal according to claim 12 is characterized in that, the wireless connections of the described first terminal disconnection of execution in step and described AP in described the first processing unit comprise:
When described first terminal had display screen, described first terminal triggered the instruction of the wireless connections of disconnection and described AP by screen, so that described first terminal disconnects and the wireless connections of described AP;
Perhaps, when first terminal was not with display screen, described first terminal triggered the instruction of the wireless connections of disconnection and described AP by button, so that described first terminal disconnects and the wireless connections of described AP.
14. the described terminal of any one is characterized in that according to claim 9-13, described terminal also comprises the second processing unit, and described the second processing unit is used for:
The second terminal is connected P2P with first terminal and is connected, the described server identification SSID from described the second terminal access AP to described first terminal, described media intervening layer address MAC, the described password PWD that send access described AP, so that described first terminal accesses described AP by described server identification SSID, described media intervening layer address MAC, described password PWD;
Send random number X to described first terminal, and receive random number Y corresponding to described X that described first terminal produces, preserve the corresponding relation of X and Y;
Disconnect and be connected the described P2P connection of first terminal, access described AP;
Receive the broadcast message that comprises X that described first terminal sends, according to the corresponding relation of described X and Y, the acknowledgement frame that will comprise Y sends to described first terminal, so that described first terminal is according to the corresponding relation of described X and Y, and the display radio successful connection.
15. terminal according to claim 14 is characterized in that, described the second terminal of execution in step is connected P2P with first terminal and is connected in described the second processing unit, comprising:
When the second terminal had display screen, described the second terminal triggered the instruction that enables the P2P function by screen, connect so that described the second terminal is connected P2P with first terminal;
Perhaps, when the second terminal was not with display screen, described the second terminal triggered the instruction enable the P2P function by button so that described the second terminal be connected first terminal and connect by P2P.
16. according to claim 14 or 15 described terminals, it is characterized in that, described terminal also comprises the 3rd processing unit, and described the 3rd processing unit specifically is used for:
When the wireless connections of described first terminal disconnection and described AP, when connecting described the second terminal by P2P, receive the information of the successful connection of described first terminal transmission;
Send acknowledgement frame to described first terminal, so that after described first terminal receives described acknowledgement frame, disconnect and be connected the P2P connection of the second terminal and the wireless connections of recovery and described AP.
CN201310198537.9A 2013-05-24 2013-05-24 A kind of method and apparatus of wireless connections Active CN103327644B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310198537.9A CN103327644B (en) 2013-05-24 2013-05-24 A kind of method and apparatus of wireless connections

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310198537.9A CN103327644B (en) 2013-05-24 2013-05-24 A kind of method and apparatus of wireless connections

Publications (2)

Publication Number Publication Date
CN103327644A true CN103327644A (en) 2013-09-25
CN103327644B CN103327644B (en) 2016-03-30

Family

ID=49196093

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310198537.9A Active CN103327644B (en) 2013-05-24 2013-05-24 A kind of method and apparatus of wireless connections

Country Status (1)

Country Link
CN (1) CN103327644B (en)

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104080194A (en) * 2014-06-25 2014-10-01 扬州芯云智能系统有限公司 Method for wirelessly configuring WIFI access parameters of zero-input terminal equipment through mobile phone
CN104159219A (en) * 2014-08-04 2014-11-19 深圳市晶讯软件通讯技术有限公司 WiFi terminals and method and system for quick access of WiFi terminals to WiFi AP
CN104581647A (en) * 2015-01-30 2015-04-29 青岛海尔智能家电科技有限公司 Network access method and device of intelligent equipment
CN104797002A (en) * 2015-03-12 2015-07-22 上海汉物天物联网技术有限公司 Method for rapid joining of field device in wireless highway addressable remote transducer (HART) network
CN104955048A (en) * 2015-06-30 2015-09-30 北京奇虎科技有限公司 WiFi (wireless fidelity) network login information sharing method, server, terminal and system
CN104967995A (en) * 2015-06-30 2015-10-07 北京奇虎科技有限公司 Method for acquiring WIFI network password, client and server
CN104980927A (en) * 2015-06-30 2015-10-14 北京奇虎科技有限公司 Method and device for sharing WiFi passwords
CN104994560A (en) * 2015-05-28 2015-10-21 西安诺瓦电子科技有限公司 Display screen attention measuring method and system
CN105050085A (en) * 2015-07-06 2015-11-11 广东欧珀移动通信有限公司 WiFi connecting method and device
CN105357740A (en) * 2015-09-23 2016-02-24 惠州Tcl移动通信有限公司 Wireless network access method and wireless access node
CN105357666A (en) * 2014-08-20 2016-02-24 中兴通讯股份有限公司 WIFI (Wireless Fidelity) password sharing method and terminals
WO2016041329A1 (en) * 2014-09-19 2016-03-24 小米科技有限责任公司 Method and device for accessing wireless network
WO2016101482A1 (en) * 2014-12-23 2016-06-30 小米科技有限责任公司 Connection method and device
WO2017020246A1 (en) * 2015-08-04 2017-02-09 华为技术有限公司 Network connection method and related equipment
CN106851608A (en) * 2015-12-07 2017-06-13 宏碁股份有限公司 Network setting method and system for networking device
CN107172617A (en) * 2017-04-18 2017-09-15 鲁学敏 The wireless connection method and system of a kind of smart machine and intelligent terminal
CN108629882A (en) * 2018-04-24 2018-10-09 四川斐讯信息技术有限公司 A kind of voting method and system
US10205776B2 (en) 2014-12-23 2019-02-12 Xiaomi Inc. Method and device for wireless connection
US10374819B2 (en) 2014-09-19 2019-08-06 Xiaomi Inc. Methods and devices of accessing wireless network
CN111757421A (en) * 2020-06-09 2020-10-09 四川虹美智能科技有限公司 Method and device for intelligent equipment network distribution
CN113660732A (en) * 2021-10-20 2021-11-16 翱捷科技(深圳)有限公司 Earphone communication method and system and earphone

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102315864A (en) * 2011-09-07 2012-01-11 百度在线网络技术(北京)有限公司 Method of point-to-point data transmission for mobile device and device
CN102420876A (en) * 2012-01-06 2012-04-18 重庆国虹科技发展有限公司 Active peer-to-peer file transmission method for android-based intelligent mobile terminal
CN102711175A (en) * 2012-05-16 2012-10-03 中兴通讯股份有限公司南京分公司 Method and device for transmitting data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102315864A (en) * 2011-09-07 2012-01-11 百度在线网络技术(北京)有限公司 Method of point-to-point data transmission for mobile device and device
CN102420876A (en) * 2012-01-06 2012-04-18 重庆国虹科技发展有限公司 Active peer-to-peer file transmission method for android-based intelligent mobile terminal
CN102711175A (en) * 2012-05-16 2012-10-03 中兴通讯股份有限公司南京分公司 Method and device for transmitting data

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104080194A (en) * 2014-06-25 2014-10-01 扬州芯云智能系统有限公司 Method for wirelessly configuring WIFI access parameters of zero-input terminal equipment through mobile phone
CN104159219A (en) * 2014-08-04 2014-11-19 深圳市晶讯软件通讯技术有限公司 WiFi terminals and method and system for quick access of WiFi terminals to WiFi AP
CN105357666A (en) * 2014-08-20 2016-02-24 中兴通讯股份有限公司 WIFI (Wireless Fidelity) password sharing method and terminals
WO2016026317A1 (en) * 2014-08-20 2016-02-25 中兴通讯股份有限公司 Wifi password sharing method, terminal and computer storage medium
US10374819B2 (en) 2014-09-19 2019-08-06 Xiaomi Inc. Methods and devices of accessing wireless network
WO2016041329A1 (en) * 2014-09-19 2016-03-24 小米科技有限责任公司 Method and device for accessing wireless network
US10205776B2 (en) 2014-12-23 2019-02-12 Xiaomi Inc. Method and device for wireless connection
WO2016101482A1 (en) * 2014-12-23 2016-06-30 小米科技有限责任公司 Connection method and device
CN104581647A (en) * 2015-01-30 2015-04-29 青岛海尔智能家电科技有限公司 Network access method and device of intelligent equipment
CN104797002B (en) * 2015-03-12 2018-04-27 上海汉物天物联网技术有限公司 A kind of method for allowing field device to rapidly join WirelessHART network
CN104797002A (en) * 2015-03-12 2015-07-22 上海汉物天物联网技术有限公司 Method for rapid joining of field device in wireless highway addressable remote transducer (HART) network
CN104994560A (en) * 2015-05-28 2015-10-21 西安诺瓦电子科技有限公司 Display screen attention measuring method and system
CN104994560B (en) * 2015-05-28 2019-02-26 西安诺瓦电子科技有限公司 Display screen attention rate statistical method and system
CN104955048A (en) * 2015-06-30 2015-09-30 北京奇虎科技有限公司 WiFi (wireless fidelity) network login information sharing method, server, terminal and system
CN104980927A (en) * 2015-06-30 2015-10-14 北京奇虎科技有限公司 Method and device for sharing WiFi passwords
CN104967995A (en) * 2015-06-30 2015-10-07 北京奇虎科技有限公司 Method for acquiring WIFI network password, client and server
CN105050085A (en) * 2015-07-06 2015-11-11 广东欧珀移动通信有限公司 WiFi connecting method and device
WO2017020246A1 (en) * 2015-08-04 2017-02-09 华为技术有限公司 Network connection method and related equipment
WO2017049984A1 (en) * 2015-09-23 2017-03-30 惠州Tcl移动通信有限公司 Wireless network access method and wireless access node
CN105357740A (en) * 2015-09-23 2016-02-24 惠州Tcl移动通信有限公司 Wireless network access method and wireless access node
CN106851608A (en) * 2015-12-07 2017-06-13 宏碁股份有限公司 Network setting method and system for networking device
CN107172617A (en) * 2017-04-18 2017-09-15 鲁学敏 The wireless connection method and system of a kind of smart machine and intelligent terminal
CN108629882A (en) * 2018-04-24 2018-10-09 四川斐讯信息技术有限公司 A kind of voting method and system
CN111757421A (en) * 2020-06-09 2020-10-09 四川虹美智能科技有限公司 Method and device for intelligent equipment network distribution
CN113660732A (en) * 2021-10-20 2021-11-16 翱捷科技(深圳)有限公司 Earphone communication method and system and earphone

Also Published As

Publication number Publication date
CN103327644B (en) 2016-03-30

Similar Documents

Publication Publication Date Title
CN103327644A (en) Method and equipment for wireless connection
CN104254070B (en) WiFi cut-in method, intelligent terminal and routing device
US9420461B2 (en) Access authentication method and device for wireless local area network hotspot
CN105162748B (en) The processing of electronic user identification module application identifier
US10425980B2 (en) Method and apparatus for connecting to access point in portable terminal
CN105682015A (en) Method and device for establishing wireless connection
CN103037477A (en) Method, server side and client side of family media device accessing to wireless fidelity (wifi) hotspot
CN103826323A (en) Wireless network connection method, terminal and mobile terminal
CN102209324A (en) Mobile terminal and method for accessing mobile terminal into wireless local area network (WLAN) hotspot
US10887745B2 (en) Method and device for sharing file between different terminals
CN105323824A (en) WIFI equipment, electronic device and method for assisting WIFI equipment access to network
CN105472699A (en) Access method and system of smart home device
CN103987038A (en) Radio communication method and system
CN106507444A (en) A kind of method and device of scanning WAP
CN105430596A (en) Communication method and communication apparatus bases on virtual SIM card
CN112312518B (en) Method and device for connecting household appliance with dual-frequency router
JP6009242B2 (en) Authentication method, access point, and program for connecting third-party wireless terminal to user-owned access point
CN103281693A (en) Wireless communication authentication method, network translation equipment and terminal
EP2733992B1 (en) Method and apparatus for connecting to an access point in portable terminal
CN105357671A (en) System and method for connecting wireless access points with same SSID and different passwords
CN111050380A (en) Hotspot opening method and device, terminal equipment and storage medium
CN105873026A (en) Method for activating eSIM (Embedded Subscriber Identity Module), mobile terminal and server
KR101262693B1 (en) mobile communication system switching and searching an optimal WiFi path using a dual WiFi chip and controlling method therefor
CN105848251A (en) Hotspot access method, device and terminal
CN106658667B (en) Method and device for quickly connecting embedded equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant