Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
Method, terminal and system that the embodiment of the present invention establishes a communications link, search first terminal the second terminal automatic quick, and set up communication connection with first terminal rapidly, improved the quick and convenience establishing a communications link.
Refer to Fig. 1, Fig. 1 is the schematic flow sheet of a kind of first embodiment of communication means disclosed by the invention.Communication means shown in Fig. 1 can be applicable in the terminal equipments such as smart mobile phone (as Android mobile phone, iOS mobile phone etc.), panel computer, palmtop PC and mobile internet device (MID), PAD.As shown in Figure 1, this communication means can comprise the following steps:
S102, first terminal send the medium access control MAC Address of the wireless point-to-point WIFI P2P port of described first terminal to the second terminal, so that described the second terminal is determined and is searched described first terminal and send connection request to described first terminal when judging the MAC Address that the WIFI P2P port mac address of the terminal searching is described first terminal, wherein said first terminal is set to listening state, and described the second terminal is set to search condition.
Particularly, the medium access control MAC Address of its WIFI P2P port is sent to the second terminal by first terminal, and the second terminal receives this MAC Address.The second terminal starts search terminal around, in the time searching terminal, the WIFI P2P port mac address of this terminal and the MAC Address of the first terminal receiving are made comparisons, judge when both are identical, determine that this terminal is first terminal, the second terminal other-end that can stop search; Judge when both are not identical, the second terminal continues search other-end and by the MAC Address comparison of the MAC Address of the other-end searching and first terminal, until determine that the other-end searching is first terminal, the second terminal stops search.If search for overtimely, first terminal and the second terminal are returned to holding state, restart to carry out this method.The network port of the WIFI P2P of a terminal of cause has only medium access control MAC Address, and the port mac address of each terminal WIFI P2P is not identical, therefore, by judging MAC Address, can determine whether the terminal searching is first terminal.
In the embodiment of the present invention, send to the first terminal of the second terminal to be initiated end as connection the MAC Address of its WIFI P2P port, judge whether that using the MAC Address of first terminal the second terminal that searches first terminal and send connection request to first terminal is as connecting originating end, as long as just can initiate connection request to it because connection originating end can search to connect to be initiated to hold, as long as connecting originating end while connection can search to connect and be initiated end, also to find to connect originating end and do not need connection to be initiated end, therefore using being fixed as search condition as the state of the second terminal that connects originating end, the state of the second terminal that is initiated end as connection is fixed as to listening state, the state of first terminal and the second terminal need to not switch between listening state and stationary state.Therefore the second terminal searches the second terminal soon, has reduced the time of search.
S104, first terminal receive the connection request that described the second terminal is sent to described first terminal.
Particularly, the second terminal, searching after first terminal, is sent connection request to first terminal, and first terminal receives this connection request.
S106, described first terminal, according to described connection request, are set up WIFI P2P with described the second terminal and are connected.
Particularly, first terminal receives after the connection request of the second terminal transmission, by this connection request, sets up WIFI P2P be connected with the second terminal.The method wherein connecting is the conventional method of attachment of this area, and the present invention is not repeated herein.
Further, described first terminal is according to described connection request, setting up WIFI P2P with described the second terminal is connected and comprises: described first terminal is according to described connection request, generate the connection parameter relevant to described the second terminal, set up WIFI P2P by described connection parameter with described the second terminal and be connected.
Particularly, if once setting up WIFI P2P with the second terminal, first terminal was connected, in the system of first terminal, can preserve the group that first terminal and the second terminal are set up, in the time that first terminal receives the connection request of the second terminal again, the parameter relevant to the second terminal that the general acquiescence of first terminal generates when calling first terminal and being connected before the second terminal verifies to rebuild connection, practice shows, the needed time of this process of reconstruction regenerates the time that new parameter connects than never calling the parameter of preservation also long, therefore, in the embodiment of the present invention, no matter whether first terminal was once set up and was connected with the second terminal room, no matter whether preserve the connection parameter relevant to the second terminal in first terminal, first terminal all adopts the mode that regenerates connection parameter to connect, wherein connect parameter and include service set SSID, BSSID BSSID, connect authentication mode, connect the parameter that needs foundation in password string or other connection procedures.
The method that the embodiment of the present invention establishes a communications link, searches first terminal the second terminal automatic quick, and sets up communication connection with first terminal rapidly, has improved the quick and convenience establishing a communications link.
Refer to Fig. 2, Fig. 2 is the schematic flow sheet of second embodiment of a kind of communication means disclosed by the invention.Communication means shown in Fig. 2 can be applicable in the terminal equipments such as smart mobile phone (as Android mobile phone, iOS mobile phone etc.), panel computer, palmtop PC and mobile internet device (MID), PAD.As shown in Figure 2, this communication means can comprise the following steps:
When S202, first terminal are opened the wireless WIFI unit of described first terminal, described first terminal writes configuration file to WIFI unit, and described configuration file only includes WIFI unit and moves required basic parameter.
Particularly, first terminal is to set up WIFI P2P by the WIFI function of two terminals to be connected with the second terminal.Therefore,, if first terminal is not under WIFI functional mode, need to first open the wireless WIFI unit of first terminal.But while just having opened WIFI unit, due to the relation of priority, terminal generally can and connect WLAN or hotspot around according to the configuration file removal search of the WIFI unit of preserving, wherein in the configuration file of WIFI unit, generally comprise WLAN that the basic parameter of WIFI unit operation was once connected with terminal and title and the password of hotspot, with in the time opening WIFI unit, WLAN and the hotspot of WIFI unit meeting automatic search environment of living in, search WLAN and can automatically determine whether attempt initiating to be connected certain WLAN or hotspot according to the hot information of configuration file preservation with WIFI unit after hotspot, handle after the connection of WLAN or hotspot, WIFI unit just can start to process the connection of WIFI P2P, this has dragged slowly the speed that WIFI P2P connects of setting up to a great extent.
In the embodiment of the present invention, first terminal is in the time opening WIFI unit, write a configuration file to WIFI unit, configuration file only includes WIFI unit and moves required basic parameter, therefore open behind WIFI unit, WIFI unit can not remove to connect WLAN or hotspot around, connect but directly carry out WIFI P2P, improve the connection speed of WIFI P2P, wherein this basic parameter includes control interface title, device type title, collocation method, basic parameter needing when the default setting of P2P or the operation of some other WIFI unit etc.
Further, in order not affect the original WIFI cell location of first terminal, the embodiment of the present invention is before writing configuration file to WIFI unit, can also first back up WIFI unit configuration file originally, after the WIFI of first terminal P2P connection has been set up, the backup file of WIFI unit configuration file is originally re-write in WIFI unit, carry out WLAN around or search and the connection of hotspot.
S204, first terminal send the medium access control MAC Address of the wireless point-to-point WIFI P2P port of described first terminal to the second terminal, so that described the second terminal is determined and is searched described first terminal and send connection request to described first terminal when judging the MAC Address that the WIFI P2P port mac address of the terminal searching is described first terminal, wherein said first terminal is set to listening state, and described the second terminal is set to search condition.
Further, in the embodiment of the present invention, the mode that first terminal sends the MAC Address of the WIFI P2P port of described first terminal to the second terminal can be: described first terminal sends to the second terminal by the medium access control MAC Address of the WIFI P2P port of described first terminal in the mode of wireless near field communication NFC communication;
Or, the mode that first terminal sends the MAC Address of the WIFI P2P port of described first terminal to the second terminal can also be: first terminal generates the medium access control MAC Address of the WIFI P2P port of first terminal Quick Response Code and shows described Quick Response Code, so that Quick Response Code obtains the medium access control MAC Address of the WIFI P2P port of described first terminal described in the second terminal scanning.
S206, first terminal receive the connection request that described the second terminal is sent to described first terminal.
Particularly, the second terminal, searching after first terminal, is sent connection request to first terminal, and first terminal receives this connection request.
S208, described first terminal, according to described connection request, are set up WIFI P2P with described the second terminal and are connected.
Further, described first terminal is according to described connection request, setting up WIFI P2P with described the second terminal is connected and comprises: described first terminal is according to described connection request, generate the connection parameter relevant to described the second terminal, set up WIFI P2P by described connection parameter with described the second terminal and be connected.Particularly, no matter whether first terminal and the second terminal room once set up connection, no matter whether preserve the connection parameter relevant to the second terminal in first terminal, all adopt the mode that regenerates connection parameter to connect.
The method that the embodiment of the present invention establishes a communications link, searches first terminal the second terminal automatic quick, and sets up communication connection with first terminal rapidly, has improved the quick and convenience establishing a communications link.
Refer to Fig. 3, Fig. 3 is the schematic flow sheet of another kind of communication means first embodiment of the embodiment of the present invention.Communication means shown in Fig. 3 can be applicable in the terminal equipments such as smart mobile phone (as Android mobile phone, iOS mobile phone etc.), panel computer, palmtop PC and mobile internet device (MID), PAD.As shown in Figure 3, this communication means can comprise the following steps:
S302, the second terminal receive the medium access control MAC Address of the wireless point-to-point WIFI P2P port of the described first terminal of first terminal transmission, and wherein said first terminal is set to listening state, and described the second terminal is set to search condition;
S304, described the second terminal determine when judging the MAC Address that the WIFI P2P port mac address of the terminal searching is described first terminal and search described first terminal;
S306, described the second terminal are sent connection request to described first terminal, so that described first terminal, according to described connection request, is set up WIFI P2P with described the second terminal and is connected.
Particularly, the second terminal is sent connection request to described first terminal, and first terminal receives after the connection request of the second terminal transmission, by this connection request, sets up WIFI P2P be connected with the second terminal.The method wherein connecting is the conventional method of attachment of this area, and the present invention is not repeated herein.
Further, described the second terminal is sent connection request to described first terminal, so that described first terminal is according to described connection request, setting up WIFI P2P with described the second terminal is connected and comprises: the second terminal is sent connection request to described first terminal, so that described first terminal is according to described connection request, setting up WIFI P2P with described the second terminal is connected, set up in the process that WIFI P2P is connected in first terminal and described the second terminal, described the second terminal generates the connection parameter relevant to first terminal.
Particularly, if once setting up WIFI P2P with the second terminal, first terminal was connected, in the system of the second terminal, can preserve the group that first terminal and the second terminal are set up, when the second terminal sends connection request to first terminal again, when first terminal is set up WIFI P2P and is connected according to connection request and the second terminal, the parameter relevant to first terminal that the general acquiescence of the second terminal generates when calling first terminal and being connected before the second terminal verifies to rebuild connection, practice shows, the needed time of this process of reconstruction regenerates the time that new parameter connects than never calling the parameter of preservation also long, therefore, in the embodiment of the present invention, no matter whether first terminal and the second terminal room once set up connection, no matter whether preserve the connection parameter relevant to first terminal in the second terminal, the second terminal all adopts the mode that regenerates connection parameter to connect, wherein connect parameter and include service set SSID, BSSID BSSID, connect authentication mode, connect the parameter that needs foundation in password string or other connection procedures.
The method that the embodiment of the present invention establishes a communications link, searches first terminal the second terminal automatic quick, and sets up communication connection with first terminal rapidly, has improved the quick and convenience establishing a communications link.
Refer to Fig. 4, Fig. 4 is the schematic flow sheet of another kind of communication means second embodiment of the embodiment of the present invention.Communication means shown in Fig. 4 can be applicable in the terminal equipments such as smart mobile phone (as Android mobile phone, iOS mobile phone etc.), panel computer, palmtop PC and mobile internet device (MID), PAD.As shown in Figure 4, this communication means can comprise the following steps:
When S402, the second terminal are opened the wireless WIFI unit of described the second terminal, described the second terminal writes configuration file to WIFI unit, and described configuration file only includes WIFI unit and moves required basic parameter.
In the embodiment of the present invention, the second terminal is in the time opening WIFI unit, write a configuration file to WIFI unit, configuration file only includes WIFI unit and moves required basic parameter, therefore open behind WIFI unit, WIFI unit can not remove to connect WLAN or hotspot around, connect but directly carry out WIFI P2P, improve the connection speed of WIFI P2P, wherein this basic parameter includes control interface title, device type title, collocation method, basic parameter needing when the default setting of P2P or the operation of some other WIFI unit etc.
Further, in order not affect the original WIFI cell location of the second terminal, the embodiment of the present invention is before writing configuration file to WIFI unit, can also first back up WIFI unit configuration file originally, after the WIFI of the second terminal P2P connection has been set up, the backup file of WIFI unit configuration file is originally re-write in WIFI unit, carry out WLAN around or search and the connection of hotspot.
S404, the second terminal receive the medium access control MAC Address of the wireless point-to-point WIFI P2P port of the described first terminal of first terminal transmission, and wherein said first terminal is set to listening state, and described the second terminal is set to search condition.
Further, in the embodiment of the present invention, the mode of medium access control MAC Address that the second terminal receives the wireless point-to-point WIFI P2P port of the described first terminal that first terminal sends can be: the second terminal receives the medium access control MAC Address of the WIFI P2P port of the described first terminal that described first terminal sends in the mode of wireless near field communication NFC communication;
Or, the mode of medium access control MAC Address that the second terminal receives the wireless point-to-point WIFI P2P port of the described first terminal that first terminal sends can also be: the Quick Response Code that described in the second terminal scanning, first terminal generates the medium access control MAC Address of the WIFI P2P port of described first terminal show, obtains the medium access control MAC Address of the WIFI P2P port of described first terminal.
S406, described the second terminal determine when judging the MAC Address that the WIFI P2P port mac address of the terminal searching is described first terminal and search described first terminal.
S408, described the second terminal are sent connection request to described first terminal, so that described first terminal, according to described connection request, is set up WIFI P2P with described the second terminal and is connected.
Further, described the second terminal is sent connection request to described first terminal, so that described first terminal is according to described connection request, setting up WIFI P2P with described the second terminal is connected and comprises: described the second terminal is sent connection request to described first terminal, so that described first terminal is according to described connection request, setting up WIFI P2P with described the second terminal is connected, set up in the process that WIFI P2P is connected in first terminal and described the second terminal, described the second terminal generates the connection parameter relevant to first terminal.
Particularly, no matter whether first terminal was once set up and be connected with the second terminal room, no matter whether preserve the connection parameter relevant to first terminal in the second terminal, the second terminal all adopts the mode that regenerates connection parameter to connect.
The method that the embodiment of the present invention establishes a communications link, searches first terminal the second terminal automatic quick, and sets up communication connection with first terminal rapidly, has improved the quick and convenience establishing a communications link.
Refer to Fig. 5, Fig. 5 is the structural representation of a kind of first embodiment of terminal disclosed by the invention.Terminal shown in Fig. 5 can be the terminal equipments such as smart mobile phone (as Android mobile phone, iOS mobile phone etc.), panel computer, palmtop PC and mobile internet device (MID), PAD.As shown in Figure 5, this terminal 500 can comprise: transmitting element 501, receiving element 502 and wireless WIFI unit 503, wherein:
Transmitting element 501, for send the medium access control MAC Address of the wireless point-to-point WIFI P2P port of described terminal to the second terminal, so that described the second terminal is determined and is searched described terminal and send connection request to described terminal when judging the MAC Address that the MAC Address of the other-end searching is described terminal, wherein said terminal is set to listening state, and described the second terminal is set to search condition.
Receiving element 502, the connection request sending to described terminal for receiving described the second terminal.
Wireless WIFI unit 503, for according to described connection request, sets up WIFI P2P with described the second terminal and is connected.
Particularly, receiving element 502 receives after the connection request of the second terminal transmission, and wireless WIFI unit 503, by this connection request, is set up WIFI P2P with the second terminal and is connected.The method wherein connecting is the conventional method of attachment of this area, and the present invention is not repeated herein.
Further, wireless WIFI unit 503 also, for according to described connection request, generates the connection parameter relevant to described the second terminal, and described terminal is set up WIFI P2P by described connection parameter with described the second terminal and is connected.
Particularly, if once setting up WIFI P2P with the second terminal, terminal was connected, in the wireless WIFI unit 503 of terminal, can preserve the group that terminal and the second terminal are set up, in the time that receiving element 502 receives the connection request of the second terminal again, the parameter relevant to the second terminal that the general acquiescence in wireless WIFI unit 503 generates when calling terminal and being connected before the second terminal verifies to rebuild connection, practice shows, the needed time of this process of reconstruction regenerates the time that new parameter connects than never calling the parameter of preservation also long, therefore, in the embodiment of the present invention, whether tube terminal was not once set up and was connected with the second terminal room, no matter whether preserve the connection parameter relevant to the second terminal in wireless WIFI unit 503, wireless WIFI unit 503 all adopts the mode that regenerates connection parameter to connect, wherein connect parameter and include service set SSID, BSSID BSSID, connect authentication mode, connect the parameter that needs foundation in password string or other connection procedures.
The terminal of the embodiment of the present invention, the second terminal can search terminal automatic quick, and sets up communication connection with terminal rapidly, has improved the quick and convenience establishing a communications link.
Refer to Fig. 6, Fig. 6 is the structural representation of second embodiment of a kind of terminal disclosed by the invention.Terminal shown in Fig. 6 can be the terminal equipments such as smart mobile phone (as Android mobile phone, iOS mobile phone etc.), panel computer, palmtop PC and mobile internet device (MID), PAD.As shown in Figure 6, this terminal 600 can comprise: transmitting element 601, receiving element 602, wireless WIFI unit 603 and setting unit 604, wherein:
Setting unit 604, for opening the wireless WIFI unit 603 of described terminal, described setting unit writes configuration file to WIFI unit, and described configuration file only includes WIFI unit and moves required basic parameter.
Particularly, first terminal is to set up WIFI P2P by the WIFI function of two terminals to be connected with the second terminal.Therefore,, if first terminal is not under WIFI functional mode, need to first open the wireless WIFI unit 603 of first terminal.But while just having opened wireless WIFI unit 603, due to the relation of priority, wireless WIFI unit 603 generally can and connect WLAN or hotspot around according to the configuration file removal search of the WIFI unit of preserving, wherein in the configuration file of WIFI unit, generally comprise WLAN that the basic parameter of WIFI unit operation was once connected with terminal and title and the password of hotspot, with in the time opening wireless WIFI unit 603, WLAN and the hotspot of wireless WIFI unit 603 meeting automatic search environment of living in, search WLAN and can automatically determine whether attempt initiating to be connected certain WLAN or hotspot according to the hot information of configuration file preservation with WIFI unit after hotspot, handle after the connection of WLAN or hotspot, wireless WIFI unit 603 just can start to process the connection of WIFI P2P, this has dragged slowly the speed that WIFI P2P connects of setting up to a great extent.
In the embodiment of the present invention, first terminal is in the time opening wireless WIFI unit 603, setting unit 604 writes a configuration file to wireless WIFI unit 603, configuration file only includes wireless WIFI unit 603 and moves required basic parameter, therefore open behind wireless WIFI unit 603, wireless WIFI unit 603 can not remove to connect WLAN or hotspot around, connect but directly carry out WIFI P2P, improve the connection speed of WIFI P2P, wherein this basic parameter includes control interface title, device type title, collocation method, basic parameter needing when the default setting of P2P or the operation of some other WIFI unit etc.
Further, for the configuration originally of the wireless WIFI unit 603 that do not affect first terminal, the embodiment of the present invention can also comprise backup units, for before writing configuration file to wireless WIFI unit 603, can also first back up wireless WIFI unit 603 configuration file originally; Can also comprise recovery unit, after having set up in the WIFI of first terminal P2P connection, the backup file of Unit 603, wireless WIFI unit configuration file is originally re-write in wireless WIFI unit 603, carry out WLAN around or search and the connection of hotspot.
Transmitting element 601, for send the medium access control MAC Address of the wireless point-to-point WIFI P2P port of described terminal to the second terminal, so that described the second terminal is determined and is searched described terminal and send connection request to described terminal when judging the MAC Address that the MAC Address of the other-end searching is described terminal, wherein said terminal is set to listening state, and described the second terminal is set to search condition.
Further, in the embodiment of the present invention, the mode that transmitting element 601 sends the MAC Address of the WIFI P2P port of described terminal to the second terminal can be: transmitting element 601 comprises the first transmission subelement, and first sends subelement for the medium access control MAC Address of the WIFI P2P port of described terminal is sent to the second terminal in the mode of wireless near field communication NFC communication;
Or, the mode that transmitting element 601 sends the MAC Address of the WIFI P2P port of described terminal to the second terminal can also be: transmitting element 601 comprises the second transmission subelement, second sends subelement for the medium access control MAC Address of the WIFI P2P port of terminal is generated to Quick Response Code and shows described Quick Response Code, so that Quick Response Code obtains the medium access control MAC Address of the WIFI P2P port of described terminal described in the second terminal scanning.
Receiving element 602, the connection request sending to described terminal for receiving described the second terminal.
Wireless WIFI unit 603, for according to described connection request, sets up WIFI P2P with described the second terminal and is connected.
Further, wireless WIFI unit 603 also, for according to described connection request, generates the connection parameter relevant to described the second terminal, and described terminal is set up WIFI P2P by described connection parameter with described the second terminal and is connected.Particularly, whether tube terminal was not once set up and was connected with the second terminal room, no matter whether preserve the connection parameter relevant to the second terminal in wireless WIFI unit 603, wireless WIFI unit 603 all adopts the mode that regenerates connection parameter to connect.
The terminal of the embodiment of the present invention, the second terminal can search terminal automatic quick, and sets up communication connection with terminal rapidly, has improved the quick and convenience establishing a communications link.
Refer to Fig. 7, Fig. 7 is the structural representation of another kind of first embodiment of terminal disclosed by the invention.Terminal shown in Fig. 7 can be the terminal equipments such as smart mobile phone (as Android mobile phone, iOS mobile phone etc.), panel computer, palmtop PC and mobile internet device (MID), PAD.As shown in Figure 7, this terminal 700 can comprise: receiving element 701, search unit 702, transmitting element 703 and wireless WIFI unit 704, wherein:
Receiving element 701, for receiving the medium access control MAC Address of wireless point-to-point WIFI P2P port of the described first terminal that first terminal sends, wherein said first terminal is set to listening state, and described terminal is set to search condition;
When MAC Address that search unit 702 is described first terminal for the MAC Address by judging the other-end searching, determine and search described first terminal;
Particularly, search unit 702 starts search terminal around, in the time searching terminal, the MAC Address of the first terminal that the WIFI P2P port mac address of this terminal and receiving element 701 are received is made comparisons, judge when both are identical, determine that this terminal is first terminal, search unit 702 other-end that can stop search, judge when both are not identical, search unit 702 continues search other-ends and by the MAC Address comparison of the MAC Address of the other-end searching and first terminal, until determine that the other-end searching is first terminal, search unit 702 stops search.If search for overtimely, first terminal and the second terminal are returned to holding state, restart to carry out this method.The network port of the WIFI P2P of a terminal of cause has only medium access control MAC Address, and the port mac address of each terminal WIFI P2P is not identical, therefore, by judging MAC Address, can determine whether the terminal searching is first terminal.
Transmitting element 703, for sending connection request to described first terminal, so that described first terminal, according to described connection request, is set up WIFI P2P by wireless WIFI unit 704 and the described terminal of described terminal and is connected.
Particularly, transmitting element 703 sends connection request to described first terminal, and first terminal receives after the connection request of terminal transmission, by this connection request, sets up WIFI P2P be connected with terminal.The method wherein connecting is the conventional method of attachment of this area, and the present invention is not repeated herein.
Further, wireless WIFI unit 704, also for setting up with described terminal the process that WIFI P2P is connected at first terminal, described wireless WIFI unit 704 generates the connection parameter relevant to first terminal.Particularly, no matter whether first terminal was once set up and was connected with the second terminal room, no matter whether preserve the connection parameter relevant to first terminal in wireless WIFI unit 704, wireless WIFI unit 704 all adopts the mode that regenerates connection parameter to connect, wherein connect parameter and include service set SSID, BSSID BSSID, connect authentication mode, connect the parameter that needs foundation in password string or other connection procedures.
The terminal of the embodiment of the present invention, terminal can search first terminal automatic quick, and sets up communication connection with first terminal rapidly, has improved the quick and convenience establishing a communications link.
Refer to Fig. 8, Fig. 8 is the structural representation of second embodiment of another kind of terminal disclosed by the invention.Terminal shown in Fig. 8 can be the terminal equipments such as smart mobile phone (as Android mobile phone, iOS mobile phone etc.), panel computer, palmtop PC and mobile internet device (MID), PAD.As shown in Figure 8, this terminal 800 can comprise: receiving element 801, search unit 802, transmitting element 803, wireless WIFI unit 804 and setting unit 805, wherein:
Setting unit 805, for opening the wireless WIFI unit 804 of described terminal, described setting unit writes configuration file to WIFI unit, and described configuration file only includes WIFI unit and moves required basic parameter.
In the embodiment of the present invention, terminal is in the time opening wireless WIFI unit 804, setting unit 805 writes a configuration file to wireless WIFI unit 804, configuration file only includes WIFI unit and moves required basic parameter, therefore open behind wireless WIFI unit 804, wireless WIFI unit 804 can not connect WLAN or hotspot around, connect but directly carry out WIFI P2P, improve the connection speed of WIFI P2P, wherein this basic parameter includes control interface title, device type title, collocation method, basic parameter needing when the default setting of P2P or the operation of some other WIFI unit etc.
Further, for the configuration originally of the wireless WIFI unit 804 that do not affect terminal, the embodiment of the present invention can also comprise backup units, for before writing configuration file to wireless WIFI unit 804, can also first back up wireless WIFI unit 804 configuration file originally; Can also comprise recovery unit, after having set up in the WIFI of the second terminal P2P connection, the backup file of wireless WIFI unit 804 configuration file is originally re-write in wireless WIFI unit 804, carry out WLAN around or search and the connection of hotspot.
Receiving element 801, for receiving the medium access control MAC Address of wireless point-to-point WIFI P2P port of the described first terminal that first terminal sends, wherein said first terminal is set to listening state, and described terminal is set to search condition.
Further, receiving element 801 for the medium access control MAC Address of wireless point-to-point WIFI P2P port of the described first terminal that receives first terminal and send can be: receiving element 801 comprises the first reception subelement, and first receives the medium access control MAC Address of subelement for the WIFI P2P port of the described first terminal that receives described first terminal and send in the mode of wireless near field communication NFC communication;
Or receiving element 801 for the medium access control MAC Address of wireless point-to-point WIFI P2P port of the described first terminal that receives first terminal and send can also be: receiving element 801 comprises the second reception subelement, second receives subelement for scanning the Quick Response Code that described first terminal generates the medium access control MAC Address of the WIFI P2P port of described first terminal show, obtains the medium access control MAC Address of the WIFI P2P port of described first terminal.
When MAC Address that search unit 802 is described first terminal for the MAC Address by judging the other-end searching, determine and search described first terminal.
Transmitting element 803, for sending connection request to described first terminal, so that described first terminal, according to described connection request, is set up WIFI P2P by wireless WIFI unit 804 and the described terminal of described terminal and is connected.
Further, described wireless WIFI unit 804, also for setting up with described terminal the process that WIFI P2P is connected at first terminal, wireless WIFI unit 804 generates the connection parameter relevant to first terminal.Particularly, no matter whether first terminal was once set up and was connected with terminal room, no matter whether preserve the connection parameter relevant to first terminal in wireless WIFI unit 804, wireless WIFI unit 804 all adopts the mode that regenerates connection parameter to connect.
The terminal of the embodiment of the present invention, terminal can search first terminal automatic quick, and sets up communication connection with first terminal rapidly, has improved the quick and convenience establishing a communications link.
Refer to Fig. 9, Fig. 9 is the structural representation of a kind of communication system disclosed by the invention.Communication system shown in Fig. 9 can comprise the terminal equipments such as smart mobile phone (as Android mobile phone, iOS mobile phone etc.), panel computer, palmtop PC and mobile internet device (MID), PAD.As shown in Figure 9, this communication system 900 can comprise: terminal 901 and terminal 902, wherein:
Terminal 901 can be the terminal of arbitrary execution mode in the embodiment as shown in Fig. 5 or 6;
Terminal 902 can be the terminal of arbitrary execution mode in the embodiment as shown in Fig. 7 or 8.
Module or submodule in all embodiment of the present invention, can pass through universal integrated circuit, for example CPU(Central Processing Unit, central processing unit), or realize by ASIC (Application Specific Integrated Circuit, application-specific integrated circuit (ASIC)).
Step in embodiment of the present invention method can be carried out according to actual needs order and adjusted, merges and delete.
Module in embodiment of the present invention device or unit can merge according to actual needs, divide and delete.
One of ordinary skill in the art will appreciate that and realize all or part of flow process in method shown in Fig. 1-Fig. 4, can carry out the hardware that instruction is relevant by computer program to complete, described program can be stored in a computer read/write memory medium, this program, in the time carrying out, can comprise as the flow process of the embodiment of above-mentioned each side method.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 only preferred embodiment of the present invention, certainly can not limit with this interest field of the present invention, and the equivalent variations of therefore doing according to the claims in the present invention, still belongs to the scope that the present invention is contained.