CN110446276A - Establish the method and device of WiFi P2P connection - Google Patents

Establish the method and device of WiFi P2P connection Download PDF

Info

Publication number
CN110446276A
CN110446276A CN201810421012.XA CN201810421012A CN110446276A CN 110446276 A CN110446276 A CN 110446276A CN 201810421012 A CN201810421012 A CN 201810421012A CN 110446276 A CN110446276 A CN 110446276A
Authority
CN
China
Prior art keywords
scene
wifi
connection
interim
permanent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810421012.XA
Other languages
Chinese (zh)
Other versions
CN110446276B (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.)
Spreadtrum Communications Shanghai Co Ltd
Original Assignee
Spreadtrum Communications Shanghai 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 Spreadtrum Communications Shanghai Co Ltd filed Critical Spreadtrum Communications Shanghai Co Ltd
Priority to CN201810421012.XA priority Critical patent/CN110446276B/en
Publication of CN110446276A publication Critical patent/CN110446276A/en
Application granted granted Critical
Publication of CN110446276B publication Critical patent/CN110446276B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Abstract

The present invention provides a kind of method and device for establishing WiFi P2P connection.The described method includes: receiving WiFi P2P connection establishes request;Establishing request according to the WiFi P2P connection judges corresponding P2P scene for interim P2P scene or permanent P2P scene;WiFi P2P connection is established using corresponding WiFi P2P connection building process according to the P2P scene determined.The present invention can establish WiFi P2P connection using different processes according to different P2P scenes, and WiFi P2P establishment of connection process is more reasonable.

Description

Establish the method and device of WiFi P2P connection
Technical field
The present invention relates to wireless communication technology field more particularly to a kind of method and devices for establishing WiFi P2P connection.
Background technique
P2P (Peer-to-Peer, end-to-end) is a kind of end-to-end scene technology in Wi-Fi technology, two or more A equipment may be implemented to communicate between each other by just constituting a small-scale network architecture after the connection of P2P technology.
As shown in Figure 1, existing Wi-Fi P2P establish before connection need to be scanned (scan), monitor (listen), Search for (search) three phases.Wherein, scan phase is to carry out all channel scanning in channel 1~13, and the search phase is to believe Road 1,6,11 carries out.
P2P usage scenario is generally divided into two kinds: interim P2P scene and permanent P2P scene.
Interim P2P scene: after establishing P2P connection between two mobile phones, interim group is just it has been established that if third platform Cell phone apparatus wants that connection is added, and does not need again to scan 1~13 all channel of Wi-Fi again one time, because group before builds Vertical just to have determined that channel, in spite of there is all channel scanning, the suitable channel that finally can all negotiate to confirm to one is built Vertical connection.
Permanent P2P scene: for a printer scene, when thering is other equipment to want to be added, due to being to build A permanent group is found, equipment must carry out all channel scanning, can just find suitable equipment and establish connection therewith.
Currently, whether interim P2P scene or permanent P2P scene, will carry out complete when establishing WiFi P2P connection Scan channel, and do not need to carry out all channel scanning, therefore existing WiFi P2P in fact for interim P2P scene Establishment of connection process is not reasonable.
Summary of the invention
The method and device provided by the invention for establishing WiFi P2P connection, can be according to different P2P scenes using not Same process establishes WiFi P2P connection, and WiFi P2P establishment of connection process is more reasonable.
In a first aspect, the present invention provides a kind of method for establishing WiFi P2P connection, comprising:
It receives WiFi P2P connection and establishes request;
Establishing request according to the WiFi P2P connection judges corresponding P2P scene for interim P2P scene or P2P permanent Scape;
WiFi P2P connection is established using corresponding WiFi P2P connection building process according to the P2P scene determined.
Optionally, described to be established according to the P2P scene determined using corresponding WiFi P2P connection building process WiFi P2P connection includes: successively to carry out channel-monitoring when the P2P scene determined is interim P2P scene and channel is searched Rope establishes the WiFi P2P connection under interim P2P scene.
Optionally, described to be established according to the P2P scene determined using corresponding WiFi P2P connection building process WiFi P2P connection includes: successively to carry out all channel scanning, channel prison when the P2P scene determined is permanent P2P scene It listens and channel search, establishes the WiFi P2P connection under permanent P2P scene.
Optionally, described established according to the WiFi P2P connection requests to judge corresponding P2P scene for interim P2P scene Or permanent P2P scene includes: to judge corresponding P2P scene for interim P2P according to the attribute value of Persistent P2P Group Scene or permanent P2P scene.
Optionally, the attribute value according to Persistent P2P Group judges corresponding P2P scene for interim P2P Scene or permanent P2P scene include: to determine that corresponding P2P scene is when the attribute value of Persistent P2P Group is 1 Permanent P2P scene;When the attribute value of Persistent P2P Group is 0, determine that corresponding P2P scene is interim P2P Scape.
Second aspect, the present invention provide a kind of device for establishing WiFi P2P connection, comprising:
Receiving unit establishes request for receiving WiFi P2P connection;
Judging unit requests to judge corresponding P2P scene to be P2P interim for being established according to the WiFi P2P connection Scape or permanent P2P scene;
Unit is established, the P2P scene for being determined according to the judging unit uses corresponding WiFi P2P connection Establishing process establishes WiFi P2P connection.
Optionally, described to establish unit, the P2P scene for being determined when the judging unit is interim P2P scene When, channel-monitoring and channel search are successively carried out, the WiFi P2P connection under interim P2P scene is established.
Optionally, described to establish unit, for when the determined P2P scene of the judging unit be permanent P2P scene when, All channel scanning, channel-monitoring and channel search are successively carried out, the WiFi P2P connection under permanent P2P scene is established.
Optionally, the judging unit, for judging corresponding P2P according to the attribute value of Persistent P2P Group Scene is interim P2P scene or permanent P2P scene.
Optionally, the judging unit, for determining to correspond to when the attribute value of Persistent P2P Group is 1 P2P scene be permanent P2P scene;When the attribute value of Persistent P2P Group is 0, corresponding P2P scene is determined For interim P2P scene.
The method and device provided in an embodiment of the present invention for establishing WiFi P2P connection is asked according to WiFi P2P connection foundation It asks and judges corresponding P2P scene for interim P2P scene or permanent P2P scene, when the P2P scene determined is interim P2P Jing Shi successively carries out channel-monitoring and channel search, establishes the WiFi P2P connection under interim P2P scene;When what is determined When P2P scene is permanent P2P scene, all channel scanning, channel-monitoring and channel search are successively carried out, permanent P2P scene is established Under WiFi P2P connection.Compared with prior art, the present invention can be established according to different P2P scenes using different processes WiFi P2P connection, WiFi P2P establishment of connection process are more reasonable.
Detailed description of the invention
Fig. 1 is the flow diagram for establishing WiFi P2P connection in the prior art;
Fig. 2 is the flow chart of the method provided in an embodiment of the present invention for establishing WiFi P2P connection;
Fig. 3 is the flow diagram that WiFi P2P connection is established under interim P2P scene provided in an embodiment of the present invention;
Fig. 4 is the flow diagram that WiFi P2P connection is established under permanent P2P scene provided in an embodiment of the present invention;
Fig. 5 is the structural schematic diagram of the device provided in an embodiment of the present invention for establishing WiFi P2P connection.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only It is only a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill Personnel's every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
The embodiment of the present invention provides a kind of method for establishing WiFi P2P connection, as shown in Figure 2, which comprises
S11, WiFi P2P connection foundation request is received.
S12, according to the WiFi P2P connection establish request judge corresponding P2P scene for interim P2P scene or permanently P2P scene.
S13, WiFi P2P company is established using corresponding WiFi P2P connection building process according to the P2P scene determined It connects.
Specifically, when the P2P scene determined is interim P2P scene, channel-monitoring and channel search are successively carried out, Establish the WiFi P2P connection under interim P2P scene;
When the P2P scene determined is permanent P2P scene, all channel scanning, channel-monitoring and channel are successively carried out Search, establishes the WiFi P2P connection under permanent P2P scene.
The method provided in an embodiment of the present invention for establishing WiFi P2P connection establishes request judgement according to WiFi P2P connection Corresponding P2P scene is interim P2P scene or permanent P2P scene, when the P2P scene determined is interim P2P scene, according to Secondary progress channel-monitoring and channel search establish the WiFi P2P connection under interim P2P scene;When the P2P scene determined When for permanent P2P scene, all channel scanning, channel-monitoring and channel search are successively carried out, the WiFi under permanent P2P scene is established P2P connection.Compared with prior art, the present invention can establish WiFi P2P using different processes according to different P2P scenes Connection, WiFi P2P establishment of connection process are more reasonable.
Specifically, can be eated dishes without rice or wine according to Wi-Fi packet in Persistent P2P Group attribute value judge it is corresponding P2P scene is interim P2P scene or permanent P2P scene.Persistent P2P Group is defined as follows shown in table.
Wi-Fi eat dishes without rice or wine packet in Beacon frames, Probe Request frames, Probe Response frames Persistent P2P Group field attribute value is judged.
Optionally, when the attribute value of Persistent P2P Group is 1, determine that corresponding P2P scene is permanent P2P Scene;When the attribute value of Persistent P2P Group is 0, determine that corresponding P2P scene is interim P2P scene.
As shown in figure 3, for interim P2P group, two equipment can directly negotiate the company of foundation under interim P2P scene It connects, modifies scanning process in Discovery procedures, remove all channel scanning, successively carry out channel-monitoring and channel Search, establishes the WiFi P2P connection under interim P2P scene.
As shown in figure 4, for permanent P2P group, two equipment needs find suitable permanent under permanent P2P scene Equipment can retain all channel scanning, successively carry out all channel scanning, channel-monitoring and channel search, establish permanent P2P scene Under WiFi P2P connection.
The embodiment of the present invention also provides a kind of device for establishing WiFi P2P connection, as shown in figure 5, described device includes:
Receiving unit 11 establishes request for receiving WiFi P2P connection;
Judging unit 12 judges corresponding P2P scene for interim P2P for establishing request according to the WiFi P2P connection Scene or permanent P2P scene;
Unit 13 is established, the P2P scene for being determined according to the judging unit is connected using corresponding WiFi P2P It connects Establishing process and establishes WiFi P2P connection.
Optionally, described to establish unit 13, the P2P scene for being determined when the judging unit 12 is interim P2P When scene, channel-monitoring and channel search are successively carried out, the WiFi P2P connection under interim P2P scene is established.
Optionally, described to establish unit 13, for being permanent P2P when the determined P2P scene of the judging unit 12 Jing Shi successively carries out all channel scanning, channel-monitoring and channel search, establishes the WiFi P2P connection under permanent P2P scene.
Optionally, the judging unit 12, it is corresponding for being judged according to the attribute value of Persistent P2P Group P2P scene is interim P2P scene or permanent P2P scene.
Optionally, the judging unit 12, for when the attribute value of Persistent P2P Group be 1 when, determine pair The P2P scene answered is permanent P2P scene;When the attribute value of Persistent P2P Group is 0, determine P2P corresponding Scape is interim P2P scene.
The device provided in an embodiment of the present invention for establishing WiFi P2P connection establishes request judgement according to WiFi P2P connection Corresponding P2P scene is interim P2P scene or permanent P2P scene, when the P2P scene determined is interim P2P scene, according to Secondary progress channel-monitoring and channel search establish the WiFi P2P connection under interim P2P scene;When the P2P scene determined When for permanent P2P scene, all channel scanning, channel-monitoring and channel search are successively carried out, the WiFi under permanent P2P scene is established P2P connection.Compared with prior art, the present invention can establish WiFi P2P using different processes according to different P2P scenes Connection, WiFi P2P establishment of connection process are more reasonable.
The device of the present embodiment can be used for executing the technical solution of above method embodiment, realization principle and technology Effect is similar, and details are not described herein again.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in a computer-readable storage medium In, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any In the technical scope disclosed by the present invention, any changes or substitutions that can be easily thought of by those familiar with the art, all answers It is included within the scope of the present invention.Therefore, protection scope of the present invention should be subject to the protection scope in claims.

Claims (10)

1. a kind of method for establishing WiFi P2P connection characterized by comprising
It receives WiFi P2P connection and establishes request;
Establishing request according to the WiFi P2P connection judges corresponding P2P scene for interim P2P scene or permanent P2P scene;
WiFi P2P connection is established using corresponding WiFi P2P connection building process according to the P2P scene determined.
2. the method according to claim 1, wherein it is described according to the P2P scene determined using corresponding WiFi P2P connection building process establish WiFi P2P connection include: when the P2P scene determined be interim P2P scene when, Channel-monitoring and channel search are successively carried out, the WiFi P2P connection under interim P2P scene is established.
3. the method according to claim 1, wherein it is described according to the P2P scene determined using corresponding WiFi P2P connection building process establish WiFi P2P connection include: when the P2P scene determined be permanent P2P scene when, All channel scanning, channel-monitoring and channel search are successively carried out, the WiFi P2P connection under permanent P2P scene is established.
4. according to the method in any one of claims 1 to 3, which is characterized in that described according to the WiFi P2P connection It establishes request and judges that corresponding P2P scene for interim P2P scene or permanent P2P scene includes: according to Persistent P2P The attribute value of Group judges corresponding P2P scene for interim P2P scene or permanent P2P scene.
5. according to the method described in claim 4, it is characterized in that, the attribute value according to Persistent P2P Group Judge corresponding P2P scene for the attribute that interim P2P scene or permanent P2P scene include: as Persistent P2P Group When value is 1, determine that corresponding P2P scene is permanent P2P scene;When the attribute value of Persistent P2P Group is 0, sentence Fixed corresponding P2P scene is interim P2P scene.
6. a kind of device for establishing WiFi P2P connection characterized by comprising
Receiving unit establishes request for receiving WiFi P2P connection;
Judging unit, for established according to the WiFi P2P connection request to judge corresponding P2P scene for interim P2P scene or Permanent P2P scene;
Unit is established, the P2P scene for being determined according to the judging unit is established using corresponding WiFi P2P connection Process establishes WiFi P2P connection.
7. device according to claim 6, which is characterized in that it is described to establish unit, for being sentenced when the judging unit When the P2P scene made is interim P2P scene, channel-monitoring and channel search are successively carried out, is established under interim P2P scene WiFi P2P connection.
8. device according to claim 6, which is characterized in that it is described to establish unit, for being sentenced when the judging unit When to make P2P scene be permanent P2P scene, all channel scanning, channel-monitoring and channel search are successively carried out, permanent P2P is established WiFi P2P connection under scene.
9. the device according to any one of claim 6 to 8, which is characterized in that the judging unit is used for basis The attribute value of Persistent P2P Group judges corresponding P2P scene for interim P2P scene or permanent P2P scene.
10. device according to claim 6, which is characterized in that the judging unit, for working as Persistent P2P When the attribute value of Group is 1, determine that corresponding P2P scene is permanent P2P scene;When the category of Persistent P2P Group Property value be 0 when, determine corresponding P2P scene be interim P2P scene.
CN201810421012.XA 2018-05-04 2018-05-04 Method and device for establishing WiFi P2P connection Active CN110446276B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810421012.XA CN110446276B (en) 2018-05-04 2018-05-04 Method and device for establishing WiFi P2P connection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810421012.XA CN110446276B (en) 2018-05-04 2018-05-04 Method and device for establishing WiFi P2P connection

Publications (2)

Publication Number Publication Date
CN110446276A true CN110446276A (en) 2019-11-12
CN110446276B CN110446276B (en) 2022-12-27

Family

ID=68427974

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810421012.XA Active CN110446276B (en) 2018-05-04 2018-05-04 Method and device for establishing WiFi P2P connection

Country Status (1)

Country Link
CN (1) CN110446276B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112654074A (en) * 2020-09-28 2021-04-13 华为技术有限公司 Wi-Fi P2P connection method, electronic equipment and computer-readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103780672A (en) * 2012-10-22 2014-05-07 三星电子株式会社 Wi-fi p2p communication terminal device and communication method thereof
US20140223019A1 (en) * 2013-02-06 2014-08-07 Research In Motion Limited Persistent network negotiation for peer to peer devices
CN105472778A (en) * 2015-12-24 2016-04-06 小米科技有限责任公司 Method and device for establishing wireless connection

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103780672A (en) * 2012-10-22 2014-05-07 三星电子株式会社 Wi-fi p2p communication terminal device and communication method thereof
US20140223019A1 (en) * 2013-02-06 2014-08-07 Research In Motion Limited Persistent network negotiation for peer to peer devices
CN105472778A (en) * 2015-12-24 2016-04-06 小米科技有限责任公司 Method and device for establishing wireless connection

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112654074A (en) * 2020-09-28 2021-04-13 华为技术有限公司 Wi-Fi P2P connection method, electronic equipment and computer-readable storage medium

Also Published As

Publication number Publication date
CN110446276B (en) 2022-12-27

Similar Documents

Publication Publication Date Title
CN109451549A (en) Voice backing method, device and terminal device
US20150350875A1 (en) Device and Method for Basic Service Set Transition Management
CN101873637B (en) Mobile communication devices, methods and systems of priority load balance
US9769721B2 (en) Channel switching method, apparatus, and device
US8880063B2 (en) Method and user equipment with dual RF transceivers to perform PLMN list generation or PLMN search
CN107801222A (en) Bluetooth and WiFi switching method and system, client and wireless access point equipment
CN103916923B (en) The method, apparatus and system that terminal redirects under a kind of multimode network state
CN109275162A (en) Connection control method, base station, user equipment and mobile management entity
CN103533592B (en) Multimode terminal and communication means
US20150063206A1 (en) Method and apparatus for local area network implementation
CN101965058B (en) Method and device for carrier level cell selection
WO2017193658A1 (en) Cell reselection method and device, and storage medium
WO2016082656A1 (en) Method and device for mobile terminal to select a resident cell
EP3439363A2 (en) Access point switching method and device
EP3787343B1 (en) Method and device for recovering and establishing wireless backhaul link
CN108012301A (en) A kind of mobile terminal and its method for connecting network, computer-readable recording medium
CN108966331A (en) Cell registration method, apparatus, wireless routing device, terminal and storage medium
CN107666697A (en) A kind of method for searching network based on cloud service, terminal and Cloud Server
CN105282830A (en) Network access method and mobile terminal
CN108934006A (en) Method for network access, device, user equipment and base station
CN109327886A (en) Method, apparatus, terminal and the base station that synchronization signal is sent
CN110446276A (en) Establish the method and device of WiFi P2P connection
CN105594292A (en) Method for establishing network connection by means of WPS, and mobile Wi-Fi device
KR101433237B1 (en) A method of inter base station communication, a base station and telecommunication network
WO2023207713A1 (en) Wireless access processing method, information transmission method, and device

Legal Events

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