CN103327644B - A kind of method and apparatus of wireless connections - Google Patents

A kind of method and apparatus of wireless connections Download PDF

Info

Publication number
CN103327644B
CN103327644B CN201310198537.9A CN201310198537A CN103327644B CN 103327644 B CN103327644 B CN 103327644B CN 201310198537 A CN201310198537 A CN 201310198537A CN 103327644 B CN103327644 B CN 103327644B
Authority
CN
China
Prior art keywords
terminal
wireless connections
display screen
acknowledgement frame
access
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310198537.9A
Other languages
Chinese (zh)
Other versions
CN103327644A (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

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the present invention provides a kind of method of wireless connections, described method receives the described server identification SSID of the second terminal access wireless access points AP by first terminal, media intervening layer address MAC, password PWD access described AP, thus realize the WLAN (wireless local area network) that first terminal accesses the second terminal place; And produce random number as whether connecting correct password, make first terminal and the second terminal determine whether to be connected into same WLAN (wireless local area network) by exchanging 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 (WirelessFidelitY, WIFI), bluetooth (BlueTooth, BT), close range wireless communication (NearFieldCommunication, NFC), radio frequency identification (RadioFrequencYIdentification, RFID) etc.The mode that NFC, RFID connect certification completes certification and information interaction by the close contact of terminal, and the connection of the equipment such as WIFI and bluetooth can complete wireless connections by the display screen, input through keyboard etc. of terminal.
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 selects corresponding connecting object; The connection password that terminal input is corresponding, then completes connection.
If in wireless access points (AccessPoint, the AP)/Station pattern of WIFI, as follows in the Connection Step between panel computer PAD and AP: the radio function opening PAD; The AP list information that PAD reading scan is arrived; PAD selects the AP object needing to connect; The connection password that PAD input is corresponding; Complete connection.Therefore, in the mode of WIFIAP/station, terminal all can complete the process of wireless connections by the equipment such as display screen, input through keyboard.
If in BT pattern, as follows in the Connection Step between mobile phone and bluetooth earphone: to open Bluetooth function by mobile phone interface; Mobile phone searching bluetooth equipment; Length presses bluetooth earphone start button, until mobile phone searching is to bluetooth earphone; The pairing password that mobile phone input is corresponding; Complete connection.Therefore, WIFI direct-connecting technology (the WIFIPeertoPeer of bluetooth, P2P), in mode, the P2P that wherein a lateral terminal can reach WIFI/BT as passive reciever without any need for display and input medium is connected, or connects by a button such as BT earphone.
If in NFC pattern, near field communication (NFC) contact is directly adopted to connect.Therefore, the connected mode of NFC can complete connection certification by contact, can not need the screen display by terminal itself and the input operation such as keyboard, button.
Technology such as the NFC of existing wireless connections is connected by contact, or completes connection by the terminal with display screen or input through keyboard as WIFI, bluetooth etc.
In certain application scenarios, if a WIFI terminal B needs in the WIFI local area network (LAN) by the method access WIFI terminal A place of AP/Station, B can scan all AP under current environment, but B cannot know that A is the WIFI local area network (LAN) accessing which AP place.
Summary of the invention
Embodiments provide a kind of method of wireless connections, be intended to solution WIFI terminal and how access the local area network (LAN) at another WIFI terminal place and how to verify whether above-mentioned two WIFI terminal access the problem of same local area network (LAN).
First aspect, a kind of method of wireless connections, described method comprises:
First terminal is connected by wireless compatibility checking WIFI direct-connecting technology P2P with the second terminal, receives the server identification SSID of the wireless access points AP of the described second terminal access that described second terminal sends, media intervening layer address MAC, password PWD;
Receive the random number X that described second terminal sends, produce the random number Y that described X is corresponding, preserve the corresponding relation of X and Y, and described Y is sent to described second terminal, make described second terminal preserve the corresponding relation of described X and Y;
Disconnect and being connected with the described P2P of described second terminal, access described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD;
Send the broadcast message comprising described X, make described second terminal, according to the corresponding relation of described X and Y, the acknowledgement frame comprising Y is sent to described first terminal;
When comprising the acknowledgement frame of Y described in reception, according to the corresponding relation of described X and Y, display wireless connections success.
In conjunction with first aspect, in the first possible implementation of first aspect, described first terminal is connected by P2P with the second terminal, comprising:
When first terminal has display screen, described first terminal triggers the instruction of enable P2P function by screen, and described first terminal is connected by P2P with the second terminal;
Or when first terminal is not with display screen, described first terminal triggers the instruction of enable P2P function by button, described first terminal is connected by P2P with described second terminal.
In conjunction with the first possible implementation of first aspect or first aspect, in the implementation that the second of first aspect is possible, described display wireless connections success, comprising:
When described first terminal has display screen, by display screen display wireless connections success;
When described first terminal is not with display screen, represent wireless connections success by the bright light of LED.
In conjunction with first aspect or the first possible implementation of first aspect or the possible implementation of the second of first aspect, in the third possible implementation of first aspect, described method is connected with the P2P of described second terminal in disconnection, after accessing 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 is connected by P2P with described second terminal;
Send with the information of described AP successful connection to described second terminal, after making described second terminal receive described information, send acknowledgement frame to described first terminal, disconnect and being connected with the P2P of described first terminal, and the wireless connections of recovery and described AP;
Receive the described acknowledgement frame that described second terminal sends, disconnect and being connected with the P2P of described 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 has display screen, described first terminal triggers the instruction of the wireless connections of disconnection and described AP by screen, makes the wireless connections of the disconnection of described first terminal and described AP;
Or when first terminal is not with display screen, described first terminal triggers the instruction of the wireless connections of disconnection and described AP by button, makes the wireless connections of the disconnection of described first terminal and described AP.
Second aspect, a kind of method of wireless connections, described method comprises:
Second terminal is connected by P2P with first terminal, send the described server identification SSID of described second terminal access AP to described first terminal, described media intervening layer address MAC, described password PWD access described AP, make described first terminal access described AP by described server identification SSID, described media intervening layer address MAC, described password PWD;
Random number X is sent to described first terminal, and the random number Y that the described X receiving the generation of described first terminal is corresponding, preserve the corresponding relation of X and Y;
Disconnect and being connected with the described P2P of described first terminal, access described AP;
Receive the broadcast message comprising X that described first terminal sends, according to the corresponding relation of described X and Y, the acknowledgement frame comprising Y is sent to described first terminal, makes described first terminal according to the corresponding relation of described X and Y, display wireless connections success.
In conjunction with second aspect, in the first possible implementation of second aspect, described second terminal is connected by P2P with first terminal, comprising:
When the second terminal has display screen, described second terminal triggers the instruction of enable P2P function by screen, and described second terminal is connected by P2P with first terminal;
Or when the second terminal is not with display screen, described second terminal triggers the instruction of enable P2P function by button, described second terminal is connected by P2P with described first terminal.
In conjunction with the first possible implementation of second aspect or second aspect, in the implementation that the second of second aspect is possible, described method is connected with the P2P of described first terminal in disconnection, before accessing the step of described AP, also comprises:
When described first terminal disconnects and the wireless connections of described AP, when connecting described second terminal by P2P, receive the information of the successful connection of described first terminal transmission;
Send acknowledgement frame to described first terminal, after making described first terminal receive described acknowledgement frame, disconnect and being connected with the P2P of described second terminal, and the wireless connections of recovery and described AP.
The third aspect, a kind of terminal, described terminal comprises with lower unit:
Linkage unit, is connected by wireless compatibility checking WIFI direct-connecting technology P2P with the second terminal for first terminal;
First receiving element, for receiving server identification SSID, media intervening layer address MAC, the password PWD of the wireless access points AP of the described second terminal access that described second terminal sends;
Second receiving element, for receiving the random number X that described second terminal sends, producing the random number Y that described X is corresponding, preserving the corresponding relation of X and Y, and described Y is sent to described second terminal, make described second terminal preserve the corresponding relation of described X and Y;
Switching units, is connected with the described P2P of described second terminal for disconnecting;
Access unit, for accessing described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD;
Transmitting element, for sending the broadcast message comprising described X, makes described second terminal, according to the corresponding relation of described X and Y, the acknowledgement frame comprising Y is sent to described first terminal;
Display unit, during for comprising the acknowledgement frame of Y described in receiving, according to the corresponding relation of described X and Y, display wireless connections success.
In conjunction with the third aspect, in the first possible implementation of the third aspect, described linkage unit, specifically for:
When first terminal has display screen, described first terminal triggers the instruction of enable P2P function by screen, and described first terminal is connected by P2P with the second terminal;
Or when first terminal is not with display screen, described first terminal triggers the instruction of enable P2P function by button, described first terminal is connected by P2P with described second terminal.
In conjunction with the first possible implementation of the third aspect or the third aspect, in the implementation that the second of the third aspect is possible, described display unit, specifically for:
When described first terminal has display screen, by display screen display wireless connections success;
When described first terminal is not with display screen, represent wireless connections success by the bright light of LED.
In conjunction with the third aspect or the first possible implementation of 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, described first processing unit specifically for:
The wireless connections of described first terminal disconnection and described AP;
Described first terminal is connected by P2P with described second terminal;
Send with the information of described AP successful connection to described second terminal, after making described second terminal receive described information, send acknowledgement frame to described first terminal, disconnect and being connected with the P2P of described first terminal, and the wireless connections of recovery and described AP;
Receive the described acknowledgement frame that described second terminal sends, disconnect and being connected with the P2P of described 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, perform first terminal described in step in described first processing unit and disconnect the wireless connections with described AP, comprising:
When described first terminal has display screen, described first terminal triggers the instruction of the wireless connections of disconnection and described AP by screen, makes the wireless connections of the disconnection of described first terminal and described AP;
Or when first terminal is not with display screen, described first terminal triggers the instruction of the wireless connections of disconnection and described AP by button, makes the wireless connections of the disconnection of described first terminal and described AP.In conjunction with the 4th kind of possible implementation of the third aspect or the first possible implementation of the third aspect or the possible implementation of the second of the third aspect or the third aspect, in the 5th kind of possible implementation of the third aspect, described terminal also comprises the second processing unit, and described second processing unit is used for:
Second terminal is connected by P2P with first terminal, send the described server identification SSID of described second terminal access AP to described first terminal, described media intervening layer address MAC, described password PWD access described AP, make described first terminal access described AP by described server identification SSID, described media intervening layer address MAC, described password PWD;
Random number X is sent to described first terminal, and the random number Y that the described X receiving the generation of described first terminal is corresponding, preserve the corresponding relation of X and Y;
Disconnect and being connected with the described P2P of described first terminal, access described AP;
Receive the broadcast message comprising X that described first terminal sends, according to the corresponding relation of described X and Y, the acknowledgement frame comprising Y is sent to described first terminal, makes described first terminal according to the corresponding relation of described X and Y, display wireless connections success.
In conjunction with the 5th kind of possible implementation of the third aspect, in the 6th kind of possible implementation of the third aspect, perform the second terminal described in step in described second processing unit and be connected by P2P with first terminal, comprising:
When the second terminal has display screen, described second terminal triggers the instruction of enable P2P function by screen, and described second terminal is connected by P2P with first terminal;
Or when the second terminal is not with display screen, described second terminal triggers the instruction of enable P2P function by button, described second terminal is connected by P2P with described first terminal.
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, described 3rd processing unit specifically for:
When described first terminal disconnects and the wireless connections of described AP, when connecting described second terminal by P2P, receive the information of the successful connection of described first terminal transmission;
Send acknowledgement frame to described first terminal, after making described first terminal receive described acknowledgement frame, disconnect and being connected with the P2P of described second terminal, and the wireless connections of recovery and described AP.
The embodiment of the present invention provides a kind of method of wireless connections, described method receives the described server identification SSID of the second terminal access wireless access points AP by first terminal, described media intervening layer address MAC, described password PWD access described AP, thus realize the WLAN (wireless local area network) that first terminal accesses the second terminal place; And produce random number as whether connecting correct password, make first terminal and the second terminal determine whether to be connected into same WLAN (wireless local area network) by exchanging password.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the method flow diagram of a kind of wireless connections that the embodiment of the present invention provides;
Fig. 2 is the method schematic diagram of a kind of wireless connections that the embodiment of the present invention provides;
Fig. 3 is the method schematic diagram of a kind of wireless connections that the embodiment of the present invention provides;
Fig. 4 is the method flow diagram of a kind of wireless connections that the embodiment of the present invention provides;
Fig. 5 is the method schematic diagram of a kind of wireless connections that the embodiment of the present invention provides;
Fig. 6 is the method schematic diagram of a kind of wireless connections that the embodiment of the present invention provides;
Fig. 7 is the structure drawing of device of a kind of terminal that the embodiment of the present invention provides;
Fig. 8 is the structure drawing of device of a kind of terminal that the embodiment of the present invention provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
With reference to the method flow diagram that figure 1, Fig. 1 is a kind of wireless connections that the embodiment of the present invention provides.As shown in Figure 1, said method comprising the steps of:
Step 101, first terminal is connected by wireless compatibility checking WIFI direct-connecting technology P2P with the second terminal, receives the server identification SSID of the wireless access points AP of the described second terminal access that described second terminal sends, media intervening layer address MAC, password PWD;
Alternatively, described first terminal is connected by P2P with the second terminal, comprising:
When first terminal has display screen, described first terminal triggers the instruction of enable P2P function by screen, and described first terminal is connected by P2P with the second terminal;
Or when first terminal is not with display screen, described first terminal triggers the instruction of enable P2P function by button, described first terminal is connected by P2P with described second terminal.
Concrete, referring to figs. 2 and 3, Fig. 2 is the method schematic diagram of a kind of wireless connections that the embodiment of the present invention provides, and Fig. 3 is a kind of wireless connection method schematic diagram that the embodiment of the present invention provides.
As shown in Figure 2, step 202, when first terminal B is with display screen, B triggers the instruction of enable WIFI direct technology (Wifipeertopeer, P2P) function by screen, and B is connected by P2P with the second terminal A.
As shown in Figure 3, step 302, when first terminal B is not with display screen, the enable button of P2P is pressed, enable P2P function, Light-Emitting Diode (LightEmittingDiode with the head of a household, LED) glimmer, second terminal can be arrived by other device scans, and 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 second terminal sends, produces the random number Y that described X is corresponding, preserve the corresponding relation of X and Y, and described Y is sent to described second terminal, make described second terminal preserve the corresponding relation of described X and Y;
In the present invention, by the corresponding relation of X and Y, can whether to access terminal the local area network (LAN) at A place by verification terminal B, when terminal B send X to terminal A time, terminal A search X and Y corresponding relation discovery be X corresponding be Y, then the acknowledgement frame comprising Y is sent to terminal B, terminal B also keeps the corresponding relation of X and Y simultaneously, terminal B searches the corresponding relation of X and Y after receiving the acknowledgement frame comprising Y, when terminal B knows that X and Y is corresponding, then can know that terminal B accesses terminal the local area network (LAN) at A place.
Concrete, as the step 204-step 209 of Fig. 2.
Step 204, terminal A and terminal B complete P2P and are connected;
Step 205, terminal A sends AP information to terminal B, described information comprises the wireless access points (AccessPoint of terminal A access, AP) server identification (ServiceSetIdentifier, SSID), media intervening layer address (MediaAccessControl, 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 being connected with the described P2P of described second terminal, access described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD;
Concrete, as the step 210-211 of Fig. 2.
Step 210, after terminal B preserves the corresponding relation of X and Y, terminal B disconnects the connection with terminal A;
Step 211, terminal B uses AP information to be connected with AP.
Step 104, sends the broadcast message comprising described X, makes described second terminal, according to the corresponding relation of described X and Y, the acknowledgement frame comprising Y is sent to described first terminal;
Concrete, with reference to step 219 and the step 220 of figure 2.
Step 219, when terminal A accesses described AP, terminal B sends broadcast message, in described broadcast message, carry X;
Step 220, after terminal A receives X, according to the corresponding relation of X and Y, is sent to terminal B by the acknowledgement frame comprising Y.
Step 105, when comprising the acknowledgement frame of Y described in reception, according to the corresponding relation of described X and Y, display wireless connections success.
Alternatively, described display wireless connections success, comprising:
When described first terminal has display screen, by display screen display wireless connections success;
When described first terminal is not with display screen, represent wireless connections success by the bright light of LED.
Concrete, with reference to the step 221 of figure 2.
Step 221, after terminal B receives the acknowledgement frame of A, display wireless connections success.
Concrete, with reference to the step 321 of figure 3.
Step 321, after terminal B receives the acknowledgement frame of A, LED bright light display successful connection.
As a kind of optional embodiment, described method is connected with the P2P of described second terminal in disconnection, after accessing the step of described AP, also comprises according to described server identification SSID, described media intervening layer address MAC, described password PWD:
The wireless connections of described first terminal disconnection and described AP;
Described first terminal is connected by P2P with described second terminal;
Send with the information of described AP successful connection to described second terminal, after making described second terminal receive described information, send acknowledgement frame to described first terminal, disconnect and being connected with the P2P of described first terminal, and the wireless connections of recovery and described AP;
Receive the described acknowledgement frame that described second terminal sends, disconnect and being connected with the P2P of described second terminal, and the wireless connections of recovery and described AP.
Concrete, with reference to the step 212-218 of figure 2.
Step 212, after terminal B accesses AP, the wireless connections of terminal B disconnection and AP;
Step 213, terminal B is connected by P2P with terminal A;
Step 214, terminal B sends with the information of AP successful connection to terminal A;
Step 215, terminal A sends acknowledgement frame, the connection of disconnection and terminal B;
Step 216, the wireless connections of terminal A recovery and AP;
Step 217, the connection of terminal B disconnection and terminal A;
Concrete, the connection of terminal B port and terminal A is realized 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 has display screen, described first terminal triggers the instruction of the wireless connections of disconnection and described AP by screen, makes the wireless connections of the disconnection of described first terminal and described AP;
Or when first terminal is not with display screen, described first terminal triggers the instruction of the wireless connections of disconnection and described AP by button, makes the wireless connections of the disconnection of described first terminal and 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 present invention provides a kind of method of wireless connections, described method is connected by P2P with the second terminal by first terminal, and the described server identification SSID, described media intervening layer address MAC, the described password PWD that receive the wireless access points AP of the described second terminal access that described second terminal sends access described AP; Receive the random number X that described second terminal sends, produce the random number Y that described X is corresponding, preserve the corresponding relation of X and Y, and described Y is sent to described second terminal, make described second terminal preserve the corresponding relation of described X and Y; Disconnect and being connected with the P2P of described second terminal, access described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD; When described second terminal accesses described AP, send the broadcast message comprising described X, make described second terminal, according to the corresponding relation of described X and Y, the acknowledgement frame comprising Y is sent to described first terminal; When comprising the acknowledgement frame of Y described in described first terminal receives, according to the corresponding relation of described X and Y, display wireless connections success, thus realize the WLAN (wireless local area network) that first terminal accesses 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 the method flow diagram that figure 4, Fig. 4 is a kind of wireless connections that the embodiment of the present invention provides.As shown in Figure 4, said method comprising the steps of:
Step 401, second terminal is connected by P2P with first terminal, send the server identification SSID of described second terminal access AP to described first terminal, media intervening layer address MAC, password PWD access described AP, make described first terminal access described AP by described server identification SSID, described media intervening layer address MAC, described password PWD;
Alternatively, described second terminal is connected by P2P with first terminal, comprising:
When the second terminal has display screen, described second terminal triggers the instruction of enable P2P function by screen, and described second terminal is connected by P2P with first terminal;
Or when the second terminal is not with display screen, described second terminal triggers the instruction of enable P2P function by button, described second terminal is connected by P2P with described first terminal.
Concrete, with reference to the step 303 of figure 3.
Step 303, when terminal A is with display screen, described terminal A triggers the instruction of enable P2P function by screen, and described terminal A is connected by P2P with terminal B.
With reference to the method schematic diagram that figure 5, Fig. 5 is a kind of wireless connections that the embodiment of the present invention provides.
Step 503, when terminal A is not with display screen, the long enable button of P2P by terminal A, enable P2P function, LED glimmers, the wireless connections of disconnection and AP.
Step 402, sends random number X to described first terminal, and the random number Y that the described X receiving the generation of described first terminal is corresponding, preserve the corresponding relation of X and Y;
Concrete, with reference to the step 204-step 209 of figure 2.
Step 403, disconnects and being connected with the P2P of described first terminal, access described AP;
Concrete, with reference to the step 216 of figure 2.
Step 404, receive the broadcast message comprising X that described first terminal sends, according to the corresponding relation of described X and Y, the acknowledgement frame comprising Y is sent to described first terminal, make described first terminal according to the corresponding relation of described X and Y, display wireless connections success.
Concrete, with reference to the step 219-221 of figure 2.
As a kind of optional embodiment, described method is connected with the described P2P of described first terminal in disconnection, before accessing the step of described AP, also comprises:
When described first terminal disconnects and the wireless connections of described AP, when connecting described second terminal by P2P, receive the information of the successful connection of described first terminal transmission;
Send acknowledgement frame to described first terminal, after making described first terminal receive described acknowledgement frame, disconnect and being connected with the P2P of described 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 present 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;
3rd, as shown in Figure 5, terminal B is with screen, and terminal A is not with screen;
4th, as shown in Figure 6, terminal B is not with screen, and terminal A is not with screen.
Below each step of Fig. 2, Fig. 3, Fig. 5, Fig. 6 is introduced in detail.
With reference to figure 2, step 201, terminal A accesses AP, and the mode of access adopts AP/Station pattern, and terminal A preserves the link information of current AP;
Step 202, terminal B powers on, self wireless P2P function enable, and the second terminal can be arrived by other device scans, and other equipment comprise the second terminal, also can be the terminal equipments beyond the second terminal;
Step 203, terminal A self wireless P2P function enable, now can disconnect the connection with AP;
Step 204, terminal A sweep P2P equipment, in P2P list of devices, select terminal B to connect, terminal A has been connected with the P2P of terminal B;
Step 205, terminal A pushes the AP link information of disconnection recently to terminal B, comprises the server identification (ServiceSetIdentifier, SSID) of AP, media intervening layer address (MediaAccessControl, 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, after terminal A receives the acknowledgement frame of terminal B, produces and preserves 8 random number X, sends 8 random number X to terminal B;
Step 208, after terminal B receives 8 random number X, preserves 8 random number X, terminal B and produces and preserve 8 random number Y, sends acknowledgement frame, comprises 8 random number Y in acknowledgement frame;
Step 209, after terminal A receives 8 random number Y, preserves 8 random number Y, sends acknowledgement frame;
Step 210, after terminal B receives acknowledgement frame, disconnects the connection with terminal A
Step 211, attempts using the AP information received, is connected with AP;
Step 212, after successful connection, disconnects the connection with AP;
Step 213, terminal B is switched to wireless P2P pattern, and completes the connection with 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 disconnects the connection with terminal B;
Step 216, recovers the connection with wireless aps;
Step 217, after terminal B receives the acknowledgement frame of terminal A, disconnects the connection with terminal A;
Step 218, recovers the connection with wireless aps;
Step 219, terminal B broadcast transmission 8 random number X;
Step 220, after terminal A receives 8 random number X, sends acknowledgement frame, comprises 8 random number Y;
Step 221, after terminal B receives 8 random number Y, interface display successful connection.
With reference to figure 3, step 301, terminal A accesses AP, and the mode of access adopts AP/Station pattern, and terminal A preserves the link information of current AP;
Step 302, terminal B powers on, self wireless P2P function enable, and the second terminal can be arrived by other device scans, and other equipment comprise the second terminal, also can be the terminal equipments beyond the second terminal;
Step 303, terminal A self wireless P2P function enable, now can disconnect the connection with AP;
Step 304, terminal A sweep P2P equipment, in P2P list of devices, select terminal B to connect, terminal A has been connected with the P2P of terminal B;
Step 305, terminal A pushes the AP link information of disconnection recently to terminal B, comprises the SSID of AP, the link informations such as MAC, PWD;
Step 306, terminal B receives the AP information that terminal A pushes, and preserves AP information, replys acknowledgement frame;
Step 307, after terminal A receives the acknowledgement frame of terminal B, produces and preserves 8 random number X, sends 8 random number X to terminal B;
Step 308, after terminal B receives 8 random number X, preserves 8 random number X, terminal B and produces and preserve 8 random number Y, sends acknowledgement frame, comprises 8 random number Y in acknowledgement frame;
Step 309, after terminal A receives 8 random number Y, preserves 8 random number Y, sends acknowledgement frame;
Step 310, after terminal B receives acknowledgement frame, disconnects the connection with terminal A
Step 311, attempts using the AP information received, is connected with AP;
Step 312, after successful connection, disconnects the connection with AP;
Step 313, terminal B is switched to wireless P2P pattern, and completes the connection with 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 disconnects the connection with terminal B;
Step 316, recovers the connection with wireless aps;
Step 317, after terminal B receives the acknowledgement frame of terminal A, disconnects the connection with terminal A;
Step 318, recovers the connection with wireless aps;
Step 319, terminal B broadcast transmission 8 random number X;
Step 320, after terminal A receives 8 random number X, sends acknowledgement frame, comprises 8 random number Y;
Step 321, after terminal B receives 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 AP/Station pattern, and terminal A preserves the link information of current AP;
Step 502, terminal B powers on, self wireless P2P function enable, and the second terminal can be arrived by other device scans, and other equipment comprise the second terminal, also can be the terminal equipments beyond the second terminal;
Step 503, long by the enable button of P2P on terminal A, terminal A self wireless P2P function enable, and be set to miscellaneous equipment and can scan, LED shows green blink states, now can disconnect the connection with AP;
Step 504, terminal B scans P2P equipment, and in P2P list of devices, select terminal A to connect, long by the enable button of P2P on terminal A, terminal A has been connected with the P2P of terminal B;
Step 505, terminal A pushes the AP link information of disconnection recently to terminal B, comprises the SSID of AP, the link informations such as MAC, PWD;
Step 506, terminal B receives the AP information that terminal A pushes, and preserves AP information, replys acknowledgement frame;
Step 507, after terminal A receives the acknowledgement frame of terminal B, produces and preserves 8 random number X, sends 8 random number X to terminal B;
Step 508, after terminal B receives 8 random number X, preserves 8 random number X, terminal B and produces and preserve 8 random number Y, sends acknowledgement frame, comprises 8 random number Y in acknowledgement frame;
Step 509, after terminal A receives 8 random number Y, preserves 8 random number Y, sends acknowledgement frame;
Step 510, after terminal B receives acknowledgement frame, disconnects the connection with terminal A
Step 511, attempts using the AP information received, is connected with AP;
Step 512, after successful connection, disconnects the connection with AP;
Step 513, terminal B is switched to wireless P2P pattern, and completes the connection with 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 disconnects the connection with terminal B;
Step 516, recovers the connection with wireless aps;
Step 517, after terminal B receives the acknowledgement frame of terminal A, disconnects the connection with terminal A;
Step 518, recovers the connection with wireless aps;
Step 519, terminal B broadcast transmission 8 random number X;
Step 520, after terminal A receives 8 random number X, sends acknowledgement frame, comprises 8 random number Y;
Step 521, after terminal B receives 8 random number Y, interface display successful connection.
With reference to figure 6, step 601, terminal A accesses AP, and the mode of access adopts AP/Station pattern, and terminal A preserves the link information of current AP;
Step 602, with duration by the enable button of P2P on terminal A and terminal B, terminal A has been connected with the P2P of terminal B;
Step 603, terminal A pushes the AP link information of disconnection recently to terminal B, comprises the SSID of AP, the link informations such as MAC, PWD;
Step 604, terminal B receives the AP information that terminal A pushes, and preserves AP information, replys acknowledgement frame;
Step 605, after terminal A receives the acknowledgement frame of terminal B, produces and preserves 8 random number X, sends 8 random number X to terminal B;
Step 606, after terminal B receives 8 random number X, preserves 8 random number X, terminal B and produces and preserve 8 random number Y, sends acknowledgement frame, comprises 8 random number Y in acknowledgement frame;
Step 607, after terminal A receives 8 random number Y, preserves 8 random number Y, sends acknowledgement frame;
Step 608, after terminal B receives acknowledgement frame, disconnects the connection with terminal A;
Step 609, attempts using the AP information received, is connected with AP;
Step 610, after successful connection, disconnects the connection with AP;
Step 611, with duration by the enable button of P2P on terminal A and terminal B, completes 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 disconnects the connection with terminal B;
Step 614, recovers the connection with wireless aps;
Step 615, after terminal B receives the acknowledgement frame of terminal A, disconnects the connection with terminal A;
Step 616, recovers the connection with wireless aps;
Step 617, terminal B broadcast transmission 8 random number X;
Step 618, after terminal A receives 8 random number X, sends acknowledgement frame, comprises 8 random number Y;
Step 619, after terminal B receives 8 random number Y, the normal bright expression successful connection of LED.
The embodiment of the present invention provides a kind of method of wireless connections, described method is connected by P2P with the second terminal by first terminal, and the server identification SSID, media intervening layer address MAC, the password PWD that receive the wireless access points AP of the described second terminal access that described second terminal sends access described AP; Receive the random number X that described second terminal sends, produce the random number Y that described X is corresponding, preserve the corresponding relation of X and Y, and described Y is sent to described second terminal, make described second terminal preserve the corresponding relation of described X and Y; Disconnect and being connected with the P2P of described second terminal, access described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD; When described second terminal accesses described AP, send the broadcast message comprising described X, make described second terminal, according to the corresponding relation of described X and Y, the acknowledgement frame comprising Y is sent to described first terminal; When comprising the acknowledgement frame of Y described in described first terminal receives, according to the corresponding relation of described X and Y, display wireless connections success, thus realize the WLAN (wireless local area network) that first terminal accesses 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 the structure drawing of device that figure 7, Fig. 7 is a kind of terminal that the embodiment of the present invention provides.As shown in Figure 7, described terminal comprises with lower unit:
Linkage unit 701, is connected by wireless compatibility checking WIFI direct-connecting technology P2P with the second terminal for first terminal;
Alternatively, described linkage unit 701, specifically for:
When first terminal has display screen, described first terminal triggers the instruction of enable P2P function by screen, and described first terminal is connected by P2P with the second terminal;
Or when first terminal is not with display screen, described first terminal triggers the instruction of enable P2P function by button, described first terminal is connected by P2P with described second terminal.
First receiving element 702, for receiving server identification SSID, media intervening layer address MAC, the password PWD of the wireless access points AP of the described second terminal access that described second terminal sends;
Concrete, referring to figs. 2 and 3, Fig. 2 is the method schematic diagram of a kind of wireless connections that the embodiment of the present invention provides, and Fig. 3 is a kind of wireless connection method schematic diagram that the embodiment of the present invention provides.
As shown in Figure 2, step 202, when first terminal B is with display screen, B triggers the instruction of enable WIFI direct technology (Wifipeertopeer, P2P) function by screen, and B is connected by P2P with the second terminal A.
As shown in Figure 3, step 302, when first terminal B is not with display screen, the enable button of P2P is pressed, enable P2P function, Light-Emitting Diode (LightEmittingDiode with the head of a household, LED) glimmer, second terminal can be arrived by other device scans, and other equipment comprise the second terminal, also can be the terminal equipments beyond the second terminal.
Second receiving element 703, for receiving the random number X that described second terminal sends, producing the random number Y that described X is corresponding, preserving the corresponding relation of X and Y, and described Y is sent to described second terminal, make described second terminal preserve the corresponding relation of described X and Y;
In the present invention, by the corresponding relation of X and Y, can whether to access terminal the local area network (LAN) at A place by verification terminal B, when terminal B send X to terminal A time, terminal A search X and Y corresponding relation discovery be X corresponding be Y, then the acknowledgement frame comprising Y is sent to terminal B, terminal B also keeps the corresponding relation of X and Y simultaneously, terminal B searches the corresponding relation of X and Y after receiving the acknowledgement frame comprising Y, when terminal B knows that X and Y is corresponding, then can know that terminal B accesses terminal the local area network (LAN) at A place.
Concrete, as the step 204-step 209 of Fig. 2.
Step 204, terminal A and terminal B complete P2P and are connected;
Step 205, terminal A sends AP information to terminal B, and described information comprises the described server identification SSID of the wireless access points (AccessPoint, AP) of terminal A access, described media intervening layer address MAC, described password PWD 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, is connected with the described P2P of described second terminal for disconnecting;
Access unit 705, for accessing described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD;
Concrete, as the step 210-211 of Fig. 2.
Step 210, after terminal B preserves the corresponding relation of X and Y, terminal B disconnects the connection with terminal A;
Step 211, terminal B uses AP information to be connected with AP.
Transmitting element 706, for sending the broadcast message comprising described X, makes described second terminal, according to the corresponding relation of described X and Y, the acknowledgement frame comprising Y is sent to described first terminal;
Concrete, with reference to step 219 and the step 220 of figure 2.
Step 219, when terminal A accesses described AP, terminal B sends broadcast message, in described broadcast message, carry X;
Step 220, after terminal A receives X, according to the corresponding relation of X and Y, is sent to terminal B by the acknowledgement frame comprising Y.
Display unit 707, during for comprising the acknowledgement frame of Y described in receiving, according to the corresponding relation of described X and Y, display wireless connections success.
Alternatively, described display unit 707, specifically for:
When described first terminal has display screen, by display screen display wireless connections success;
When described first terminal is not with display screen, represent wireless connections success by the bright light of LED.
Concrete, with reference to the step 221 of figure 2.
Step 221, after terminal B receives the acknowledgement frame of A, display wireless connections success.
Concrete, with reference to the step 321 of figure 3.
Step 321, after terminal B receives the acknowledgement frame of A, LED bright light display successful connection.
As a kind of optional embodiment, described terminal also comprises the first processing unit, described first processing unit specifically for:
The wireless connections of described first terminal disconnection and described AP;
Described first terminal is connected by P2P with described second terminal;
Send with the information of described AP successful connection to described second terminal, after making described second terminal receive described information, send acknowledgement frame to described first terminal, disconnect and being connected with the P2P of described first terminal, and the wireless connections of recovery and described AP;
Receive the described acknowledgement frame that described second terminal sends, disconnect and being connected with the P2P of described second terminal, and the wireless connections of recovery and described AP.
Concrete, with reference to the step 212-218 of figure 2.
Step 212, after terminal B accesses AP, the wireless connections of terminal B disconnection and AP;
Step 213, terminal B is connected by P2P with terminal A;
Step 214, terminal B sends with the information of AP successful connection to terminal A;
Step 215, terminal A sends acknowledgement frame, the connection of disconnection and terminal B;
Step 216, the wireless connections of terminal A recovery and AP;
Step 217, the connection of terminal B disconnection and terminal A;
Concrete, the connection of terminal B port and terminal A is realized by default program.
Step 218, the wireless connections of terminal B recovery and AP.
Perform the wireless connections of first terminal disconnection and described AP described in step in described first processing unit, comprise; When described first terminal has display screen, described first terminal triggers the instruction of the wireless connections of disconnection and described AP by screen, makes the wireless connections of the disconnection of described first terminal and described AP;
Or when first terminal is not with display screen, described first terminal triggers the instruction of the wireless connections of disconnection and described AP by button, makes the wireless connections of the disconnection of described first terminal and 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 second processing unit is used for:
Second terminal is connected by P2P with first terminal, send the described server identification SSID of described second terminal access AP to described first terminal, described media intervening layer address MAC, described password PWD access described AP, make described first terminal access described AP by described server identification SSID, described media intervening layer address MAC, described password PWD;
Random number X is sent to described first terminal, and the random number Y that the described X receiving the generation of described first terminal is corresponding, preserve the corresponding relation of X and Y;
Disconnect and being connected with the described P2P of described first terminal, access described AP;
Receive the broadcast message comprising X that described first terminal sends, according to the corresponding relation of described X and Y, the acknowledgement frame comprising Y is sent to described first terminal, makes described first terminal according to the corresponding relation of described X and Y, display wireless connections success.
Alternatively, perform the second terminal described in step in described second processing unit and be connected by P2P with first terminal, comprising:
When the second terminal has display screen, described second terminal triggers the instruction of enable P2P function by screen, and described second terminal is connected by P2P with first terminal;
Or when the second terminal is not with display screen, described second terminal triggers the instruction of enable P2P function by button, described second terminal is connected by P2P with described first terminal.
Concrete, with reference to the step 303 of figure 3.
Step 303, when terminal A is with display screen, described terminal A triggers the instruction of enable P2P function by screen, and described terminal A is connected by P2P with terminal B.
With reference to the method schematic diagram that figure 5, Fig. 5 is a kind of wireless connections that the embodiment of the present invention provides.
Step 503, when terminal A is not with display screen, the long enable button of P2P by terminal A, enable P2P function, LED glimmers, the wireless connections of disconnection and AP.
Alternatively, described terminal also comprises the 3rd processing unit, described 3rd processing unit specifically for:
When described first terminal disconnects and the wireless connections of described AP, when connecting described second terminal by P2P, receive the information of the successful connection of described first terminal transmission;
Send acknowledgement frame to described first terminal, after making described first terminal receive described acknowledgement frame, disconnect and being connected with the P2P of described 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 present invention provides a kind of terminal, described terminal is connected by P2P with the second terminal by first terminal, and the server identification SSID, media intervening layer address MAC, the password PWD that receive the wireless access points AP of the described second terminal access that described second terminal sends access described AP; Receive the random number X that described second terminal sends, produce the random number Y that described X is corresponding, preserve the corresponding relation of X and Y, and described Y is sent to described second terminal, make described second terminal preserve the corresponding relation of described X and Y; Disconnect and being connected with the P2P of described second terminal, access described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD; When described second terminal accesses described AP, send the broadcast message comprising described X, make described second terminal, according to the corresponding relation of described X and Y, the acknowledgement frame comprising Y is sent to described first terminal; When comprising the acknowledgement frame of Y described in described first terminal receives, according to the corresponding relation of described X and Y, display wireless connections success, thus realize the WLAN (wireless local area network) that first terminal accesses 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 that the embodiment of the present invention provides.Be a kind of terminal 800 that the embodiment of the present invention provides with reference to figure 8, Fig. 8, the specific embodiment of the invention does not limit the specific implementation of described terminal.Described terminal 800 comprises:
Processor (processor) 801, communication interface (CommunicationsInterface) 802, memory (memory) 803, bus 804.
Processor 801, communication interface 802, memory 803 completes mutual communication by bus 804.
Communication interface 802, for communicating with other equipment;
Processor 801, 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(ApplicationSpecificIntegratedCircuit), or be configured to the one or more integrated circuits implementing the embodiment of the present invention.
Memory 803, for depositing program.Memory 803 may comprise high-speed RAM memory, still may comprise nonvolatile memory (non-volatilememory), such as at least one magnetic disc store.Program specifically can comprise:
First terminal is connected by wireless compatibility checking WIFI direct-connecting technology P2P with the second terminal, receives the server identification SSID of the wireless access points AP of the described second terminal access that described second terminal sends, media intervening layer address MAC, password PWD;
Receive the random number X that described second terminal sends, produce the random number Y that described X is corresponding, preserve the corresponding relation of X and Y, and described Y is sent to described second terminal, make described second terminal preserve the corresponding relation of described X and Y;
Disconnect and being connected with the described P2P of described second terminal, access described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD;
Send the broadcast message comprising described X, make described second terminal, according to the corresponding relation of described X and Y, the acknowledgement frame comprising Y is sent to described first terminal;
When comprising the acknowledgement frame of Y described in reception, according to the corresponding relation of described X and Y, display wireless connections success.
Described first terminal is connected by P2P with the second terminal, comprising:
When first terminal has display screen, described first terminal triggers the instruction of enable P2P function by screen, and described first terminal is connected by P2P with the second terminal;
Or when first terminal is not with display screen, described first terminal triggers the instruction of enable P2P function by button, described first terminal is connected by P2P with described second terminal.
Described display wireless connections success, comprising:
When described first terminal has display screen, by display screen display wireless connections success;
When described first terminal is not with display screen, represent wireless connections success by the bright light of LED.
Be connected with the P2P of described second terminal in disconnection, after accessing 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 is connected by P2P with described second terminal;
Send with the information of described AP successful connection to described second terminal, after making described second terminal receive described information, send acknowledgement frame to described first terminal, disconnect and being connected with the P2P of described first terminal, and the wireless connections of recovery and described AP;
Receive the described acknowledgement frame that described second terminal sends, disconnect and being connected with the P2P of described 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 has display screen, described first terminal triggers the instruction of the wireless connections of disconnection and described AP by screen, makes the wireless connections of the disconnection of described first terminal and described AP;
Or when first terminal is not with display screen, described first terminal triggers the instruction of the wireless connections of disconnection and described AP by button, makes the wireless connections of the disconnection of described first terminal and described AP.
Second terminal is connected by P2P with first terminal, send the described server identification SSID of described second terminal access AP to described first terminal, described media intervening layer address MAC, described password PWD access described AP, make described first terminal access described AP by described server identification SSID, described media intervening layer address MAC, described password PWD;
Random number X is sent to described first terminal, and the random number Y that the described X receiving the generation of described first terminal is corresponding, preserve the corresponding relation of X and Y;
Disconnect and being connected with the described P2P of described first terminal, access described AP;
Receive the broadcast message comprising X that described first terminal sends, according to the corresponding relation of described X and Y, the acknowledgement frame comprising Y is sent to described first terminal, makes described first terminal according to the corresponding relation of described X and Y, display wireless connections success.
Described second terminal is connected by P2P with first terminal, comprising:
When the second terminal has display screen, described second terminal triggers the instruction of enable P2P function by screen, and described second terminal is connected by P2P with first terminal;
Or when the second terminal is not with display screen, described second terminal triggers the instruction of enable P2P function by button, described second terminal is connected by P2P with described first terminal.
Described method is connected with the P2P of described first terminal in disconnection, before accessing the step of described AP, also comprises:
When described first terminal disconnects and the wireless connections of described AP, when connecting described second terminal by P2P, receive the information of the successful connection of described first terminal transmission;
Send acknowledgement frame to described first terminal, after making described first terminal receive described acknowledgement frame, disconnect and being connected with the P2P of described 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 realized in above-described embodiment method, that the hardware that can carry out instruction relevant by computer program has come, described program can be stored in a computer read/write memory medium, this program, when performing, can comprise the flow process of the embodiment as above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-OnlYMemorY, ROM) or random access memory (RandomAccessMemorY is called for short RAM) etc.
Above disclosedly be only present pre-ferred embodiments, certainly can not limit the interest field of the present invention with this, therefore according to the equivalent variations that the claims in the present invention are done, still belong to the scope that the present invention is contained.

Claims (13)

1. a method for wireless connections, is characterized in that, described method comprises:
First terminal is connected by wireless compatibility checking WIFI direct-connecting technology P2P with the second terminal, receives the server identification SSID of the wireless access points AP of the described second terminal access that described second terminal sends, media intervening layer address MAC, password PWD;
Receive the random number X that described second terminal sends, produce the random number Y that described X is corresponding, preserve the corresponding relation of X and Y, and described Y is sent to described second terminal, make described second terminal preserve the corresponding relation of described X and Y;
Disconnect and being connected with the described P2P of described second terminal, access described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD;
Send the broadcast message comprising described X, make described second terminal, according to the corresponding relation of described X and Y, the acknowledgement frame comprising Y is sent to described first terminal;
The acknowledgement frame of Y is comprised described in reception, according to the corresponding relation of described X and Y, display wireless connections success;
Described first terminal is connected by P2P with the second terminal, comprising:
When first terminal has display screen, described first terminal triggers the instruction of enable P2P function by screen, and described first terminal is connected by P2P with the second terminal;
Or when first terminal is not with display screen, described first terminal triggers the instruction of enable P2P function by button, described first terminal is connected by P2P with described second terminal.
2. method according to claim 1, is characterized in that, described display wireless connections success, comprising:
When described first terminal has display screen, by display screen display wireless connections success;
When described first terminal is not with display screen, represent wireless connections success by the bright light of LED.
3. method according to claim 1 and 2, is characterized in that, is connected, after accessing the step of described AP, also comprises according to described server identification SSID, described media intervening layer address MAC, described password PWD in disconnection with the P2P of described second terminal:
The wireless connections of described first terminal disconnection and described AP;
Described first terminal is connected by P2P with described second terminal;
Send with the information of described AP successful connection to described second terminal, after making described second terminal receive described information, send acknowledgement frame to described first terminal, disconnect and being connected with the P2P of described first terminal, and the wireless connections of recovery and described AP;
Receive the described acknowledgement frame that described second terminal sends, disconnect and being connected with the P2P of described second terminal, and the wireless connections of recovery and described AP.
4. method according to claim 3, is characterized in that, described first terminal disconnects the wireless connections with described AP, comprising:
When described first terminal has display screen, described first terminal triggers the instruction of the wireless connections of disconnection and described AP by screen, makes the wireless connections of the disconnection of described first terminal and described AP;
Or when first terminal is not with display screen, described first terminal triggers the instruction of the wireless connections of disconnection and described AP by button, makes the wireless connections of the disconnection of described first terminal and described AP.
5. a method for wireless connections, is characterized in that, described method comprises:
Second terminal is connected by P2P with first terminal, send the server identification SSID of described second terminal access AP to described first terminal, media intervening layer address MAC, password PWD access described AP, make described first terminal access described AP by described server identification SSID, described media intervening layer address MAC, described password PWD;
Random number X is sent to described first terminal, and the random number Y that the described X receiving the generation of described first terminal is corresponding, preserve the corresponding relation of X and Y;
Disconnect and being connected with the described P2P of described first terminal, access described AP;
Receive the broadcast message comprising X that described first terminal sends, according to the corresponding relation of described X and Y, the acknowledgement frame comprising Y is sent to described first terminal, makes described first terminal according to the corresponding relation of described X and Y, display wireless connections success;
Described second terminal is connected by P2P with first terminal, comprising:
When the second terminal has display screen, described second terminal triggers the instruction of enable P2P function by screen, and described second terminal is connected by P2P with first terminal;
Or when the second terminal is not with display screen, described second terminal triggers the instruction of enable P2P function by button, described second terminal is connected by P2P with described first terminal.
6. method according to claim 5, is characterized in that, described method is connected with the P2P of described first terminal in disconnection, before accessing the step of described AP, also comprises:
When described first terminal disconnects and the wireless connections of described AP, when connecting described second terminal by P2P, receive the information of the successful connection of described first terminal transmission;
Send acknowledgement frame to described first terminal, after making described first terminal receive described acknowledgement frame, disconnect and being connected with the P2P of described second terminal, and the wireless connections of recovery and described AP.
7. a terminal, is characterized in that, described terminal comprises with lower unit:
Linkage unit, is connected by wireless compatibility checking WIFI direct-connecting technology P2P with the second terminal for first terminal;
First receiving element, for receiving server identification SSID, media intervening layer address MAC, the password PWD of the wireless access points AP of the described second terminal access that described second terminal sends;
Second receiving element, for receiving the random number X that described second terminal sends, producing the random number Y that described X is corresponding, preserving the corresponding relation of X and Y, and described Y is sent to described second terminal, make described second terminal preserve the corresponding relation of described X and Y;
Switching units, is connected with the described P2P of described second terminal for disconnecting;
Access unit, for accessing described AP according to described server identification SSID, described media intervening layer address MAC, described password PWD;
Transmitting element, for sending the broadcast message comprising described X, makes described second terminal, according to the corresponding relation of described X and Y, the acknowledgement frame comprising Y is sent to described first terminal;
Display unit, during for comprising the acknowledgement frame of Y described in receiving, according to the corresponding relation of described X and Y, display wireless connections success;
Described linkage unit, specifically for:
When first terminal has display screen, described first terminal triggers the instruction of enable P2P function by screen, and described first terminal is connected by P2P with the second terminal;
Or when first terminal is not with display screen, described first terminal triggers the instruction of enable P2P function by button, described first terminal is connected by P2P with described second terminal.
8. terminal according to claim 7, is characterized in that, described display unit, specifically for:
When described first terminal has display screen, by display screen display wireless connections success;
When described first terminal is not with display screen, represent wireless connections success by the bright light of LED.
9. the terminal according to claim 7 or 8, is characterized in that, described terminal also comprises the first place
Reason unit, described first processing unit specifically for:
The wireless connections of described first terminal disconnection and described AP;
Described first terminal is connected by P2P with described second terminal;
Send with the information of described AP successful connection to described second terminal, after making described second terminal receive described information, send acknowledgement frame to described first terminal, disconnect and being connected with the P2P of described first terminal, and the wireless connections of recovery and described AP;
Receive the described acknowledgement frame that described second terminal sends, disconnect and being connected with the P2P of described second terminal, and the wireless connections of recovery and described AP.
10. terminal according to claim 9, is characterized in that, performs in described first processing unit
First terminal described in step disconnects the wireless connections with described AP, comprising:
When described first terminal has display screen, described first terminal triggers the instruction of the wireless connections of disconnection and described AP by screen, makes the wireless connections of the disconnection of described first terminal and described AP;
Or when first terminal is not with display screen, described first terminal triggers the instruction of the wireless connections of disconnection and described AP by button, makes the wireless connections of the disconnection of described first terminal and described AP.
11. terminals according to claim 9, is characterized in that, described terminal also comprises the second process
Unit, described second processing unit is used for:
Second terminal is connected by P2P with first terminal, send the described server identification SSID of described second terminal access AP to described first terminal, described media intervening layer address MAC, described password PWD access described AP, make described first terminal access described AP by described server identification SSID, described media intervening layer address MAC, described password PWD;
Random number X is sent to described first terminal, and the random number Y that the described X receiving the generation of described first terminal is corresponding, preserve the corresponding relation of X and Y;
Disconnect and being connected with the described P2P of described first terminal, access described AP;
Receive the broadcast message comprising X that described first terminal sends, according to the corresponding relation of described X and Y, the acknowledgement frame comprising Y is sent to described first terminal, makes described first terminal according to the corresponding relation of described X and Y, display wireless connections success.
12. terminals according to claim 11, is characterized in that, perform the second terminal described in step and are connected by P2P with first terminal, comprising in described second processing unit:
When the second terminal has display screen, described second terminal triggers the instruction of enable P2P function by screen, and described second terminal is connected by P2P with first terminal;
Or when the second terminal is not with display screen, described second terminal triggers the instruction of enable P2P function by button, described second terminal is connected by P2P with described first terminal.
13. terminals according to claim 11, is characterized in that, described terminal also comprises the 3rd process
Unit, described 3rd processing unit specifically for:
When described first terminal disconnects and the wireless connections of described AP, when connecting described second terminal by P2P, receive the information of the successful connection of described first terminal transmission;
Send acknowledgement frame to described first terminal, after making described first terminal receive described acknowledgement frame, disconnect and being connected with the P2P of described 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 CN103327644A (en) 2013-09-25
CN103327644B true 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)

Families Citing this family (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
CN105357666A (en) * 2014-08-20 2016-02-24 中兴通讯股份有限公司 WIFI (Wireless Fidelity) password sharing method and terminals
US10374819B2 (en) 2014-09-19 2019-08-06 Xiaomi Inc. Methods and devices of accessing wireless network
CN110769485A (en) * 2014-09-19 2020-02-07 小米科技有限责任公司 Method for making target terminal access target wireless network provided by wireless access point
CN104580401A (en) * 2014-12-23 2015-04-29 小米科技有限责任公司 Connecting method and device
US10205776B2 (en) 2014-12-23 2019-02-12 Xiaomi Inc. Method and device for wireless connection
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
CN104994560B (en) * 2015-05-28 2019-02-26 西安诺瓦电子科技有限公司 Display screen attention rate statistical method 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
CN104955048A (en) * 2015-06-30 2015-09-30 北京奇虎科技有限公司 WiFi (wireless fidelity) network login information sharing method, server, terminal and system
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
CN105357740B (en) * 2015-09-23 2020-09-25 Tcl移动通信科技(宁波)有限公司 Wireless network access method and wireless access node
TWI590693B (en) * 2015-12-07 2017-07-01 宏碁股份有限公司 Method and system for setting network of connected 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
CN113660732B (en) * 2021-10-20 2022-03-01 翱捷科技(深圳)有限公司 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

Also Published As

Publication number Publication date
CN103327644A (en) 2013-09-25

Similar Documents

Publication Publication Date Title
CN103327644B (en) A kind of method and apparatus of wireless connections
US10993276B2 (en) Radio communication device, radio communication system, radio communication method, and program
EP3322217B1 (en) Wireless hotspot switching method, mobile terminal and storage medium
CN104254070B (en) WiFi cut-in method, intelligent terminal and routing device
US9907097B2 (en) Wireless communication device, wireless communication system, program and wireless communication method
CN103369638B (en) Communicator
CN110167201A (en) A kind of method, relevant apparatus and the system of data transmission
CN105323824A (en) WIFI equipment, electronic device and method for assisting WIFI equipment access to network
CN102469621A (en) Wireless LAN system, communication device and method of sharing setting
CN103068070A (en) Negotiation method, mobile terminal, base station and communication system of protocol version
CN103024844A (en) Switching method and device of network flow
CN103813473A (en) Communication method, terminal and system
EP3182791A1 (en) Terminal-based communication method and terminal
CN104717709A (en) Network switching method and device
CN104936258A (en) Network access method, terminal and system
US20160036579A1 (en) Method and apparatus for configuring link in wireless lan system
JP6241312B2 (en) Wireless connection apparatus, wireless connection apparatus control method, and network system including wireless connection apparatus and mobile communication terminal
CN110546973B (en) Mobile computing device, medium, and data connection switching method
US11388599B2 (en) Device-to-device subscriber identity module sharing method and associated apparatuses
CN105357671A (en) System and method for connecting wireless access points with same SSID and different passwords
EP2733992B1 (en) Method and apparatus for connecting to an access point in portable terminal
CN103281693A (en) Wireless communication authentication method, network translation equipment and terminal
CN105264943A (en) Maintenance management method and device, and device maintenance system
CN103974458A (en) Control method and device and mobile terminal
CN105682250A (en) Method and apparatus for realizing couple terminal based on Wifi Direct and terminal thereof

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