CN112448964B - Device discovery method and P2P device - Google Patents

Device discovery method and P2P device Download PDF

Info

Publication number
CN112448964B
CN112448964B CN201910737053.4A CN201910737053A CN112448964B CN 112448964 B CN112448964 B CN 112448964B CN 201910737053 A CN201910737053 A CN 201910737053A CN 112448964 B CN112448964 B CN 112448964B
Authority
CN
China
Prior art keywords
channel
probe request
request frame
state
devices
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
CN201910737053.4A
Other languages
Chinese (zh)
Other versions
CN112448964A (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.)
Honor Device Co Ltd
Original Assignee
Honor Device 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN201910737053.4A priority Critical patent/CN112448964B/en
Priority to PCT/CN2020/106884 priority patent/WO2021027639A1/en
Publication of CN112448964A publication Critical patent/CN112448964A/en
Application granted granted Critical
Publication of CN112448964B publication Critical patent/CN112448964B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1061Peer-to-peer [P2P] networks using node-based peer discovery mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application provides a device discovery method and a P2P device, relates to the technical field of short-distance communication and the field of distributed hardware, and can shorten the time-consuming duration of mutual discovery between the P2P devices, so that the P2P devices can complete device discovery quickly. The specific scheme comprises the following steps: the first P2P device listens to the first channel in the list state of the find phase; the duration of the first P2P device listening to the first channel is greater than or equal to a preset time threshold; the first P2P device receives a probe request frame from the second P2P device on the first channel. The duration of the first P2P device listening to the first channel in the listen state is greater than or equal to a preset time threshold, where the preset time threshold is 300 TU. The method can be applied to the scenes of screen projection of a mobile phone, Wi-Fi direct connection or HuaShare and the like.

Description

Device discovery method and P2P device
Technical Field
The embodiment of the application relates to the technical field of short-distance communication, in particular to a device discovery method and a peer-to-peer (P2P) device.
Background
Wi-Fi (Wireless fidelity) is a wireless local area network technology that the Wi-Fi alliance has established under the Institute of Electrical and Electronics Engineers (IEEE) 802.11 standard. Wi-Fi P2P, alternatively referred to as Wi-Fi direct (direct), is an important specification introduced by the Wi-Fi alliance in the art.
The device supporting Wi-Fi P2P (referred to as P2P device for short) can discover other peripheral P2P devices through Wi-Fi P2P technical specifications, and can realize Wi-Fi P2P connection with the discovered P2P devices without hot spots and routers so as to perform data transmission.
In the conventional technology, in order to realize mutual discovery between P2P devices, the P2P device needs to go through a scan (scan) phase and a discovery (find) phase. During the scan phase, P2P devices may send Probe Request (Probe Request) frames on various channels supported by Wi-Fi to actively scan for other P2P devices. In the find phase find (search) state, the P2P device may sequentially send Probe Request frames on Wi-Fi supported partial channels to actively scan other P2P devices. In the listen (listen) state of the find phase, the P2P device may listen to one of the partial channels to receive Probe Request frames from other P2P devices and reply to Probe Response (Probe Response) frames to other P2P devices in Response to the received Probe Request frames to complete device discovery.
Wherein, one P2P device (e.g. P2P device 1) is in search state, and when a channel sends a probe request frame, if other P2P devices (e.g. P2P device 2) happen to be in list state, they are listening to the channel; then, the P2P device 2 may receive the probe request frame from the P2P device 1 on the channel and reply with a probe response frame to the P2P device 1 in response to the received probe request frame to complete device discovery. However, when P2P device 1 is in the search state, P2P device 2 is not necessarily in the list state. Therefore, it may take a long time for the P2P device 1 to wait until an opportunity "the P2P device 1 is in search state sending a probe request frame on a channel, and the P2P device 2 is just in listen state on the channel". It can be seen that the time consumption for mutual discovery between P2P devices is long, resulting in a long time required for establishing Wi-Fi P2P connection between P2P devices.
Disclosure of Invention
The embodiment of the application provides a device discovery method and a P2P device, which can shorten the time-consuming duration of mutual discovery between P2P devices, so that the P2P device can complete device discovery quickly.
In order to achieve the purpose, the technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a device discovery method, which may be applied to a first P2P device. The method can comprise the following steps: the first P2P device listens to the first channel in the listening state of the find phase; the first P2P device receives a probe request frame from the second P2P device on the first channel. Wherein the first P2P device and the second P2P device both support Wi-Fi P2P. It should be noted that the duration of the first P2P device listening to the first channel is greater than or equal to the preset time threshold. The preset time threshold is 300 Time Units (TU). Among them, the IEEE802.11 standard specifies 1TU 1024 microseconds. 1024 microseconds equals approximately 1 millisecond.
Generally, after the P2P device enters the listen state, the time length of the listen state can be randomly selected among 100TU, 200TU and 300 TU. That is, the time length of each listen state may be 100TU, 200TU, or 300 TU.
In the embodiment of the present application, the duration of the first P2P device listening to the first channel is greater than or equal to 300 TU. In one case, the first P2P device does not switch back and forth between the list state and the search state during the find phase, but is in the list state all the time to listen to the first channel. In this case, the length of time of the listen state is greater than 300 TU. In another case, the first P2P device may switch back and forth between a list state and a search state during the find phase; however, the time length of each listen state is greater than or equal to 300 TU.
In summary, the first P2P device has an extended duration of listening to the first channel compared to the prior art. In this way, the likelihood of the first P2P device receiving a probe request frame from the second P2P device on the first channel may be increased. In this way, the time-consuming time for mutual discovery between P2P devices can be shortened, so that the P2P device can complete device discovery quickly.
With reference to the first aspect, in another possible design, the first P2P device may send a probe request frame carrying channel indication information. The channel indication information is used to indicate a first channel to which the first P2P device listens.
After receiving the probe request frame carrying the channel indication information sent by the first P2P device, the second P2P device may parse the probe request frame to obtain the channel indication information. Thus, the second P2P device may know that the first P2P device listens to the first channel. Then, after the second P2P device enters the find phase, it can send probe request frames on the first channel preferentially in the search state. As such, the likelihood of the first P2P device receiving a probe request frame on the first channel may be increased.
With reference to the first aspect, in another possible design, the channel indication information is included in a frame entity of a probe request frame.
With reference to the first aspect, in another possible design, the channel indication information is included in a reserved field of the frame entity. The reserved field may be customized by the device vendor. The equipment manufacturer can design and use the reserved field to transmit different data according to the functional requirements of the product.
With reference to the first aspect, in another possible design, the channel indication information is included in other fields of the frame entity. For example, it may be included in reserved bits of other fields. The reserved bits are bytes in other fields that have not been used.
With reference to the first aspect, in another possible design, the first P2P device may send a probe request frame carrying channel indication information in a scan phase. The first P2P device sends the probe request frame carrying the channel indication information in the scan phase, so that other P2P devices can learn earlier that the first P2P device listens to the first channel.
With reference to the first aspect, in another possible design, although the first P2P device sends the probe request frame carrying the channel indication information in the scan phase, other P2P devices may know earlier that the first P2P device listens to the first channel. However, the time of the scan phase is short (e.g. 1s), and the probe request frame carrying the channel indication information sent by the first P2P device in the scan phase may not be received by the second P2P device. Based on this, the first P2P device may send probe request frames carrying channel indication information in both the scan phase and the find phase.
With reference to the first aspect, in another possible design, the first channel is one of a plurality of search channels. The plurality of search channels are a plurality of channels of Wi-Fi supported channels, the frequency spectrums of which do not overlap with each other.
With reference to the first aspect, in another possible design manner, the plurality of search channels are channel 1, channel 6, and channel 11 at 2.4GHz specified in the IEEE802.11 standard.
In a second aspect, embodiments of the present application provide a device discovery method, which may be applied to a second P2P device supporting Wi-Fi P2P. The method can comprise the following steps: the second P2P equipment receives a probe request frame carrying channel indication information, wherein the channel indication information is used for indicating that the first P2P equipment supporting Wi-Fi P2P monitors a first channel; the first channel is one of a plurality of search channels; in the search state of the find phase, the second P2P device first sends a probe request frame on the first channel and then sends probe request frames on the other channels of the plurality of search channels.
After receiving the probe request frame carrying the channel indication information sent by the first P2P device, the second P2P device may parse the probe request frame to obtain the channel indication information. Thus, the second P2P device may know that the first P2P device listens to the first channel. Then, after the second P2P device enters the find phase, it can send probe request frames on the first channel preferentially in the search state. As such, the likelihood of the first P2P device receiving a probe request frame on the first channel may be increased. In this way, the time-consuming time for mutual discovery between P2P devices can be shortened, so that the P2P device can complete device discovery quickly.
In one case, if the second P2P device receives the probe request frame carrying the channel indication information sent by the first P2P device, the second P2P device is in the find phase search state; then, the second P2P device may first send a probe request frame on the first channel in the search state, and then send a probe request frame on the other channels of the plurality of search channels.
In another case, if the second P2P device receives the probe request frame carrying the channel indication information sent by the first P2P device, the second P2P device is in a list state of a find phase; then, after the second P2P device switches from the list state to the search state, in the search state, the probe request frame may be sent first on the first channel and then sent on the other channels of the plurality of search channels.
In either case, the second P2P device will also enter the search state (referred to as the other search state) after the search state. In the other search state, the second P2P device may first send the probe request frame on the first channel and then send the probe request frame on the other channels of the plurality of search channels. Alternatively, in the other search state, the second P2P device does not need to first send the probe request frame on the first channel and then send the probe request frame on the other channels of the plurality of search channels.
With reference to the second aspect, in one possible design, the first channel is one of a plurality of search channels. The plurality of search channels are a plurality of channels of Wi-Fi supported channels, the frequency spectrums of which do not overlap with each other.
In combination with the above, in another possible design, the plurality of search channels are channel 1, channel 6, and channel 11 at 2.4GHz specified in the IEEE802.11 standard.
With reference to the second aspect, in another possible design manner, the method according to the embodiment of the present application may further include: the second P2P device receiving the probe response frame from the first P2P device; the second P2P device displaying a first interface including a Service Set Identifier (SSID) option of one or more P2P devices, the one or more P2P devices including the first P2P device; and the second P2P device receives the click operation of the user on the SSID option of the first P2P device and establishes a Wi-Fi P2P connection with the first P2P device. That is, the second P2P device discovers the first P2P device upon receiving the probe response frame from the first P2P device. At this point, the second P2P device may display a first interface including the SSID option of the first P2P device, select the SSID option of the first P2P device by the user, trigger the second P2P device to establish a Wi-Fi P2P connection with the first P2P device.
In a third aspect, embodiments of the present application provide a P2P device, where the P2P device is the first P2P device described in the first aspect and any possible design manner thereof. The P2P device may include a memory, a Wi-Fi module, and one or more processors. The Wi-Fi module supports Wi-Fi P2P. The memory, Wi-Fi module, and processor are coupled. The memory is for storing computer program code. The computer program code comprises computer instructions which, when executed by a processor, cause the above-mentioned P2P apparatus to perform the method as set forth in the first aspect and any of its possible designs.
With reference to the third aspect, in a possible design manner, the P2P apparatus may further include a display screen. The display screen is coupled to the processor. For example, in a cell phone screen projection scenario, the display screen may be used to display the screen projection interface of the second P2P device.
In a fourth aspect, embodiments of the present application provide a P2P plant, where the P2P plant is the second P2P plant described in the second aspect and any possible design thereof. The P2P device may include a display screen, a memory, a Wi-Fi module, and one or more processors. The Wi-Fi module supports Wi-Fi P2P. The memory, Wi-Fi module, and processor are coupled. The memory is for storing computer program code. The computer program code comprises computer instructions which, when executed by a processor, cause the above-mentioned P2P apparatus to perform the method according to the second aspect and any of its possible designs.
In a fifth aspect, an embodiment of the present application provides a Wi-Fi P2P communication system, where the system may include: a first P2P apparatus as set forth in the third aspect and any of its designs; and the second P2P device of the fourth aspect and any design thereof.
In a sixth aspect, embodiments of the present application provide a Wi-Fi chip that supports Wi-Fi peer-to-peer P2P. The Wi-Fi chip is applied to a P2P device (such as the first P2P device or the second P2P device mentioned above), so that the P2P device supports Wi-Fi P2P. The Wi-Fi chip includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected through a line; the interface circuitry is to receive signals from the memory of the P2P device and to send the signals to the processor, the signals including computer instructions stored in the memory; when the processor executes the computer instructions, the P2P device performs the method as described in the first aspect or the second aspect, and any possible design thereof.
In a seventh aspect, the present application provides a computer storage medium comprising computer instructions that, when run on a P2P device that supports Wi-Fi P2P, cause the P2P device to perform the method of the first aspect, the second aspect, and any possible design thereof.
In an eighth aspect, the present application provides a computer program product for causing a computer to perform the method according to the first aspect, the second aspect or any one of its possible designs when the computer program product runs on the computer.
It should be understood that, for the P2P device according to the third aspect or the fourth aspect, the Wi-Fi P2P communication system according to the fifth aspect, the Wi-Fi chip according to the sixth aspect, the computer storage medium according to the seventh aspect, and the computer program product according to the eighth aspect, reference may be made to the beneficial effects of the first aspect, the second aspect, and any possible design manner thereof, and no further description is provided herein.
Drawings
Fig. 1 is a flowchart of discovery of a P2P device provided in the prior art;
fig. 2 is a schematic diagram of a frequency spectrum distribution of a channel according to an embodiment of the present application;
fig. 3 is a schematic diagram of a hardware structure of a television according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a hardware structure of a mobile phone according to an embodiment of the present disclosure;
fig. 5 is a schematic view of a display interface of a screen projection of a mobile phone according to an embodiment of the present disclosure;
fig. 6 is a schematic view of a display interface of a television screen projection provided in an embodiment of the present application;
fig. 7A is a flowchart of a device discovery method according to an embodiment of the present application;
fig. 7B is a flowchart of another device discovery method provided in the embodiment of the present application;
fig. 7C is a flowchart of another device discovery method provided in the embodiment of the present application;
fig. 8A is a schematic frame structure diagram of a Probe Request frame according to an embodiment of the present application;
fig. 8B is a flowchart of another device discovery method provided in the embodiment of the present application;
fig. 8C is a flowchart of another device discovery method provided in the embodiment of the present application;
fig. 9A is a flowchart of a device discovery method according to an embodiment of the present application;
fig. 9B is a flowchart of another device discovery method provided in the embodiment of the present application;
fig. 9C is a flowchart of another device discovery method provided in the embodiment of the present application;
fig. 9D is a flowchart of another device discovery method provided in the embodiment of the present application;
fig. 9E is a flowchart of another device discovery method provided in the embodiment of the present application;
fig. 10 is a schematic structural diagram of a Wi-Fi chip according to an embodiment of the present application.
Detailed Description
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. For example, a first P2P device and a second P2P device are used to represent different P2P devices. The P2P device (e.g., the first P2P device or the second P2P device) in the embodiments of the present application is a Wi-Fi P2P (or Wi-Fi direct) enabled device.
The P2P device can discover other peripheral P2P devices through Wi-Fi P2P technical specifications, and can realize Wi-Fi P2P connection with the discovered P2P device without a hotspot and a router so as to perform data transmission. The Wi-Fi P2P specification may support one-to-one direct connection between P2P devices, or may support simultaneous connection of multiple P2P devices.
It should be noted that the Wi-Fi P2P specification can be applied to Wi-Fi devices that support any IEEE802.11 standard. The IEEE802.11 standard may include: IEEE802.11 b/g standard, IEEE802.11a standard, IEEE802.11 b standard, IEEE802.11 g standard, IEEE802.11 ac standard, IEEE802.11 n standard and the like. Wherein, the P2P devices supporting the same standard can be directly interconnected. For example, a P2P device supporting the IEEE802.11a standard and a P2P device supporting the IEEE802.11a standard may be directly interconnected. The P2P devices supporting different standards may also be directly interconnected. For example, a P2P device supporting IEEE802.11a standard and a P2P device supporting IEEE802.11 b standard may be directly interconnected.
The embodiment of the application provides a device discovery method, which can be applied to a device supporting Wi-Fi P2P (P2P device for short). In particular, the method can be applied to the device discovery process before the Wi-Fi P2P connection is established between P2P devices.
The following describes a mutual discovery process between P2P devices, taking the discovery flows of P2P device 1 and P2P device 2 as an example, with reference to fig. 1.
When the Wi-Fi P2P function of the P2P device 1 is turned on, the P2P device 1 may be triggered to start discovering (start discovery) other P2P devices. When the Wi-Fi P2P functionality of the P2P device 2 is turned on, the P2P device 2 may be triggered to start discovering (start discovery) other P2P devices.
As shown in fig. 1, after the P2P device 1 and the P2P device 2 trigger the start discovery process, they both need to go through the scan (scan) stage and the discovery (find) stage, and may discover each other. For detailed description of the Wi-Fi P2P function activation of the P2P device (e.g., P2P device 1), reference may be made to the following description in the following embodiments, which are not repeated herein.
A (one) scan phase.
In the scan phase, P2P devices send Probe Request (Probe Request) frames on various channels supported by Wi-Fi to actively scan for other P2P devices. The P2P device will not respond to probe request frames from other P2P devices during the scan phase. Wherein the duration of the scan phase is generally short, such as lasting 1 s.
The above channels are also called channels (channels) or frequency bands. Referring to table 1, a schematic diagram of bandwidth and center frequency of 14 channels of a common 2.4GHz band division is shown.
TABLE 1
Figure BDA0002162572190000051
Figure BDA0002162572190000061
As shown in table 1, the 2.4GHz band may be divided into 14 channels, each having an effective width of 20 megahertz (MHz). Wherein the channel 14 is not normally used. The 802.11b/g standard, or the 802.11a/b/g/n/ac standard, generally supports 13 channels, channel 1 through channel 13. In other words, the above-mentioned Wi-Fi supported channels may include 13 channels of channel 1 to channel 13.
For example, as shown in fig. 1, the P2P device 1 and the P2P device 2 can both transmit probe request frames on 13 channels, i.e., channel 1, channel 2, channel 3, and channel 4, respectively, during the scan phase. It is noted that in the scan phase, both P2P device 1 and P2P device 2 may send one or more probe request frames per channel supported by Wi-Fi. Fig. 1 takes as an example that the P2P device 1 and the P2P device 2 transmit a probe request frame on each channel in the scan phase.
And (II) a find stage.
After the scan phase is finished, the P2P device enters the find phase. The find stage comprises: listen (listen) state and find (search) state. In the find phase, the P2P device toggles between the list state and the search state. For example, as shown in FIG. 1, P2P device 1 first enters into listen state 1 during the find phase; then, switching from the list state 1 to the search state 1; and switching from the search state 1 to the list state 2, and repeating the steps to switch back and forth between the list state and the search state until the P2P device 1 finds other P2P devices.
(1) search status.
In the search state, the P2P device may send probe request frames on multiple search channels. The plurality of search channels are channels which are not overlapped with each other in frequency spectrum in channels supported by Wi-Fi. In other words, the plurality of search channels are a plurality of channels that do not interfere with each other. For example, as shown in fig. 2, the frequency spectrums of channel 1, channel 2 and channel 6 do not overlap with each other. The plurality of search channels may include channel 1, channel 2, and channel 6. As can be seen from fig. 2, the frequency spectrums of the following two groups of channels, except channel 1, channel 2 and channel 6, among the channels supported by Wi-Fi do not overlap each other. Group (1): channel 2, channel 7, and channel 12. Group (2): channel 3, channel 8, and channel 13.
The IEEE802.11 standard specifies 2.4GHz channels 1, 6, and 11 as the plurality of search channels. For example, as shown in fig. 1, in the search state 1, the P2P device 1 sequentially sends probe request frames on channel 1, channel 6, and channel 11; in the search state a, the P2P device 2 sends probe request frames on channel 1, channel 6, and channel 11 in sequence.
It is noted that in the search state, the P2P device 1 and the P2P device 2 may send one or more probe request frames on each of channel 1, channel 6, and channel 11. Fig. 1 takes as an example that in the search state, the P2P device 1 and the P2P device 2 send one probe request frame on each of the channel 1, the channel 6, and the channel 11. And, in the search state, the P2P device may send probe request frames on channel 1, channel 6, and channel 11 in sequence; and not probe request frames from other P2P devices.
(2) A listen state.
On the one hand, in the listen state, the P2P device randomly selects one of the above channels 1, 6 and 11 to listen, so as to receive Probe request frames from other P2P devices, and replies a Probe Response (Probe Response) frame to other P2P devices in Response to the received Probe request frame.
Specifically, when the P2P device enters the list state for the first time in the find phase, it randomly selects one channel from the above channels 1, 6 and 11 to listen. Thus, the next time the P2P device enters a list state in this find phase, it will also listen to the channel randomly selected for the first list state.
For example, as shown in fig. 1, when the P2P device 1 enters a list state (e.g., list state 1) for the first time in the find phase, it may randomly select channel 1 from channel 1, channel 6, and channel 11 for listening; then P2P device 1 also listens to channel 1 in both listen state 2 and listen state 3.
In this case, the P2P device 1 may not listen to the probe request frames transmitted by other P2P devices on channel 1 in the listen state, and may also listen to the probe request frames transmitted by other P2P devices on channel 1. For example, as shown in fig. 1, P2P device 1 does not listen to probe request frames sent on channel 1 by other P2P devices in both listen state 1 and listen state 2; the P2P device 1 in listen state 3 can listen for the probe request frame sent by the P2P device 2 on channel 1 and reply to the P2P device 2 with a probe response frame.
For another example, as shown in fig. 1, when the P2P device 2find phase enters a listen state (e.g., listen state a) for the first time, it may randomly select channel 6 from channel 1, channel 6, and channel 11 to listen; then P2P device 1 also listens to channel 6 in the listen state b.
In this case, the P2P device 2 may not listen to the probe request frames transmitted by other P2P devices on the channel 6 in the listen state, and may also listen to the probe request frames transmitted by other P2P devices on the channel 6. For example, as shown in fig. 1, the P2P device 2 does not hear the probe request frame sent by the P2P device 1 on channel 6 in the listen state a; the P2P device 2 in the listen state b may listen for the probe request frame sent by the P2P device 1 on channel 6 and reply to the P2P device 1 with a probe response frame.
On the other hand, after the P2P device enters the listen state, the time length of the listen state may also be randomly selected among 100 Time Units (TUs), 200 TUs, and 300 TU. Among them, the IEEE802.11 standard specifies 1TU 1024 microseconds. 1024 microseconds equals approximately 1 millisecond.
The P2P device is in different listen states and different lengths of time can be selected. For example, as shown in fig. 1, the P2P device 1 may select the length of time of the listen state 1 as 200TU, the length of time of the listen state 2 as 100TU, and the length of time of the listen state 3 as 100 TU; the P2P device 2 may select the length of time of the listen state a to be 200TU and the length of time of the listen state b to be 300 TU. Wherein 100TU is a fixed time length specified by IEEE802.11 standard.
From the above description it follows that: the P2P equipment needs to go through a scan phase and a find phase; also, P2P devices may need to switch back and forth between the list state and the search state multiple times during the find phase before they may discover each other. The P2P device takes a long time to discover other P2P devices in the periphery. For example, as shown in fig. 1, the P2P device 1 in the search state 2 can receive the probe response frame replied by the P2P device 2, and discover the P2P device 2.
The embodiment of the present application provides a device discovery method, and when a P2P device is in the above find phase, the device may not switch back and forth between a list state and a search state, but always be in the list state to listen to a channel. Thus, the P2P device can stay in the list state for a longer duration of time and listen to a channel at all times. The probability that the P2P device receives the probe request frame sent by other P2P devices on the channel can be raised, so that the P2P device receives the probe request frame sent by other P2P devices on the channel as soon as possible and sends the probe response frame to other devices. In this way, the time-consuming time for mutual discovery between P2P devices can be shortened, so that the P2P device can complete device discovery quickly.
For example, the P2P device (e.g., the first P2P device or the second P2P device) in the embodiment of the present application may be a household device (e.g., a television, a refrigerator, an air conditioner, or the like), a tablet computer, a projector, a mobile phone, a desktop, a laptop, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and a Wi-Fi P2P-supporting device such as a cellular phone, a Personal Digital Assistant (PDA), an Augmented Reality (AR), a Virtual Reality (VR) device, and the embodiment of the present application does not particularly limit the specific form of the P2P device.
It should be noted that the first P2P device and the second P2P device may be the same kind of devices. For example, the first P2P device and the second P2P device are both cell phones. Alternatively, the first P2P device and the second P2P device may be heterogeneous devices. For example, the first P2P device may be a television and the second P2P device may be a cell phone.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
For example, a structure of a P2P device will be described with an example in which the P2P device (e.g., the first P2P device) is a television. Please refer to fig. 3, which is a schematic structural diagram of a television 300 according to an embodiment of the present disclosure.
As shown in fig. 3, the television 300 may include: processor 310, external memory interface 320, internal memory 321, Universal Serial Bus (USB) interface 330, power management module 340, antenna, wireless communication module 360, audio module 370, speaker 370A, microphone 370C, speaker interface 370B, sensor module 380, buttons 390, indicator 391, camera 393, and display 392, among others. The sensor module 380 may include a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, and the like.
It is to be understood that the illustrated structure of the present embodiment does not specifically limit the television 300. In other embodiments, the television 300 may include more or fewer components than shown, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 310 may include one or more processing units, such as: the processor 310 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller may be the neural center and the command center of the television 300. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 310 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 310. If the processor 310 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 310, thereby increasing the efficiency of the system.
In some embodiments, processor 310 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, and/or a USB interface, etc.
The power management module 340 is used for connecting a power supply. The power management module 340 may also be connected to the processor 310, the internal memory 321, the display 392, the camera 393, the wireless communication module 360, and the like. The power management module 340 receives power input and supplies power to the processor 310, the internal memory 321, the display 392, the camera 393, the wireless communication module 360, and the like. In some embodiments, the power management module 340 may also be disposed in the processor 310.
The wireless communication function of the television 300 may be implemented by an antenna and the wireless communication module 360, etc. The wireless communication module 360 may provide a solution for wireless communication applied to the television 300, including Wireless Local Area Networks (WLANs) (such as Wi-Fi) networks, Bluetooth (BT), Global Navigation Satellite Systems (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), infrared (infrared, IR), and the like. In the embodiment of the present application, the wireless communication module 360 may support Wi-Fi P2P. The tv 300 may receive the Probe Request frame transmitted by the other P2P device through the wireless communication module 360, and reply the Probe Response frame to the other P2P device in Response to the received Probe Request frame.
The wireless communication module 360 may be one or more devices integrating at least one communication processing module. The wireless communication module 360 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 310. The wireless communication module 360 may also receive a signal to be transmitted from the processor 310, frequency-modulate and amplify the signal, and convert the signal into electromagnetic waves via the antenna to radiate the electromagnetic waves. In some embodiments, the antenna of the television 300 and the wireless communication module 360 are coupled such that the television 300 can communicate with networks and other devices through wireless communication techniques.
The television 300 implements display functions via the GPU, the display screen 392, and the application processor. The GPU is an image processing microprocessor coupled to a display screen 392 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 392 is used to display images, video, and the like. The display screen 392 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like.
The television 300 may implement a shooting function through the ISP, the camera 393, the video codec, the GPU, the display 392, and the application processor. The ISP is used to process the data fed back by the camera 393. In some embodiments, the ISP may be located in camera 393.
Camera 393 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, television set 300 may include 1 or N cameras 393, N being a positive integer greater than 1. For example, camera 393 may be disposed at an upper edge of display screen 392 of television set 300. Of course, the position of the camera 393 on the television 300 is not limited in the embodiment of the present application.
Alternatively, the television 300 may not include a camera, i.e., the camera 393 is not disposed in the television 300. The television 300 may be externally connected to the camera 393 via an interface, such as the USB interface 330. The circumscribing camera 393 may be secured to the television 300 by an external fixture (e.g., a camera cradle with clips). For example, the external camera 393 may be secured by external fasteners at the edge, e.g., upper edge, of the display 392 of the television 300.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the television 300 is in frequency bin selection, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy. Video codecs are used to compress or decompress digital video. The television 300 may support one or more video codecs. In this way, the television 300 can play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. The NPU can realize applications such as intelligent recognition of the television 300, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 320 may be used to connect an external memory card, such as a Micro SD card, to extend the storage capability of the television 300. The external memory card communicates with the processor 310 through the external memory interface 320 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 321 may be used to store computer-executable program code, which includes instructions. The processor 310 executes various functional applications of the television 300 and data processing by executing instructions stored in the internal memory 321. For example, in the embodiment of the present application, the processor 310 may execute instructions stored in the internal memory 321, and the internal memory 321 may include a program storage area and a data storage area.
The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (e.g., audio data, a phonebook, etc.) created during use of the television 300, and the like. In addition, the internal memory 321 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like.
The tv 300 can implement audio functions through the audio module 370, the speaker 370A, the microphone 370C, the speaker interface 370B, and the application processor. Such as music playing, recording, etc.
The audio module 370 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 370 may also be used to encode and decode audio signals. In some embodiments, the audio module 370 may be disposed in the processor 310, or some functional modules of the audio module 370 may be disposed in the processor 310. The speaker 370A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. Microphone 370C, also known as a "microphone," is used to convert sound signals into electrical signals.
Speaker interface 370B is used to connect to a wired speaker. Speaker interface 370B may be USB interface 330, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
Keys 390 include a power-on key, a volume key, etc. The keys 390 may be mechanical keys. Or may be touch keys. The television 300 may receive key inputs to generate key signal inputs related to user settings and function controls of the television 300.
The indicator 391 may be an indicator light, and may be used to indicate that the television 300 is in an on state, a standby state, an off state, or the like. For example, turning off the light may indicate that the television 300 is in the off state; the indicator light is green or blue, and can indicate that the television 300 is in a standby state; the indicator light is red to indicate that the television 300 is in a standby state.
Typically, the television 300 will be equipped with a remote control. The remote controller is used to control the television 300. The remote controller may include: a plurality of keys, such as a power key, a volume key, and other plurality of selection keys. The keys on the remote controller can be mechanical keys or touch keys. The remote controller may receive key inputs, generate key signal inputs related to user settings and function controls of the television 300, and transmit corresponding control signals to the television 300 to control the television 300. For example, the remote controller may transmit a control signal to the television 300 through an infrared signal or the like. The remote controller can also comprise a battery accommodating cavity for accommodating a battery and supplying power to the remote controller.
Also, for example, a structure of a P2P device will be described with a case where the P2P device (e.g., the second P2P device) is a cellular phone. Please refer to fig. 4, which is a schematic structural diagram of a mobile phone 400 according to an embodiment of the present disclosure.
As shown in fig. 4, the mobile phone 400 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. Wherein, the sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.
It is to be understood that the illustrated structure of the embodiment of the present invention is not intended to limit the mobile phone 400. In other embodiments of the present application, the handset 400 may include more or fewer components than shown, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
For a detailed description of the processor 110, reference may be made to the description of the processor 310 of the television 300 in the foregoing embodiment, which is not repeated herein. The processor 110 may include one or more interfaces. For a detailed description of the interface, reference may be made to the above-mentioned embodiments to describe the interface in the processor 310, and details of the embodiments of the present application are not described herein.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the mobile phone 400 can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. The mobile communication module 150 may provide a solution including wireless communication of 2G/3G/4G/5G, etc. applied to the cellular phone 400. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The wireless communication module 160 may provide a solution for wireless communication applied to the mobile phone 400, including WLAN (e.g., Wi-Fi) network), BT, GNSS, FM, NFC, IR, and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves. In the embodiment of the present application, the wireless communication module 360 may support Wi-Fi P2P. The handset 400 may receive the Probe Request frame sent by the other P2P device through the wireless communication module 360, and reply to the other P2P device with a Probe Response frame in Response to the received Probe Request frame.
The mobile phone 400 implements the display function through the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel can adopt LCD, OLED, AMOLED, FLED, Miniled, MicroLed, Micro-oLed, QLED and the like. In some embodiments, the cell phone 400 may include 1 or N display screens 194, with N being a positive integer greater than 1.
The mobile phone 400 can implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, the application processor, and the like. The mobile phone 400 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playing, recording, etc. The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc. The SIM card interface 195 is used to connect a SIM card. The SIM card can be attached to and detached from the cellular phone 400 by being inserted into the SIM card interface 195 or being pulled out from the SIM card interface 195. The handset 400 can support 1 or N SIM card interfaces, N being a positive integer greater than 1. The mobile phone 400 interacts with the network through the SIM card to implement functions such as communication and data communication.
The methods in the following embodiments may be implemented in a P2P device having the above hardware structure.
It should be noted that Wi-Fi P2P functionality of some P2P devices (referred to as class 1P 2P devices) is enabled by default. The Wi-Fi P2P functionality of these P2P devices is automatically turned on as the P2P devices are turned on. For example, household devices such as televisions, refrigerators, air conditioners and the like, wearable devices such as smartwatches, earphones, helmets and the like, and P2P devices such as printers, projectors and the like often need to be actively discovered by other P2P devices in the device discovery process of Wi-Fi P2P. Thus, the Wi-Fi P2P functionality of these P2P devices is typically enabled by default.
While Wi-Fi P2P functionality of other P2P devices (referred to as class 2P 2P devices) is off by default, requiring manual enablement by the user. After the Wi-Fi P2P function of such a P2P device is turned on and after the scan phase, the P2P device switches back and forth between the list state and the search state in the find phase, and may actively discover other P2P devices and may also be actively discovered by other P2P devices. For example, a P2P device such as a mobile phone, a tablet computer, a laptop computer, or a television, the device discovery process in Wi-Fi P2P may actively discover other devices, and may also be actively discovered by other P2P devices. These P2P devices may turn on Wi-Fi P2P functionality in response to a user turn-on operation.
For example, the opening operation may be an opening operation of a "screen projection" function (such as a "mobile phone screen projection" function), a "Wi-Fi direct" function, or a "hua share" function by a user. In response to a user's turn-on operation of any of the above functions, the P2P device may turn on the Wi-Fi P2P function.
For example, the mobile phone may display the screen projection setting interface 501 shown in (a) in fig. 5. The screen-projection setting interface 501 includes a screen-projection switch button 502. As shown in fig. 5 (a), the projection switch button 502 is in an off state. The above-described opening operation may be a click operation of the screen-projection switch button 502 by the user. In response to the click operation of the screen-projection switch button 502 by the user, the mobile phone can turn on the Wi-Fi P2P function to support the mobile phone to use the "screen projection" function.
After the mobile phone starts the Wi-Fi P2P function, the device discovery process shown in fig. 1 may be executed, and after a scan stage and a find stage, the mobile phone discovers surrounding P2P devices with each other. For example, the mobile phone may display the screen-projection setting interface 503 shown in (b) in fig. 5. Search prompt information 504, such as "available devices being searched … …," is included in the screen-projection settings interface 503. In the screen-projection setting interface 503, the screen-projection switch button 503 is in an on state.
After the cell phone discovers surrounding P2P devices (e.g., the cell phone receives Probe Response frames sent by other P2P devices, as shown in fig. 1, device found), the cell phone may display the available device list 505 shown in (c) of fig. 5 on the screen projection setting interface. The device list 505 includes options 506 for P2P devices (e.g., televisions) discovered by the handset. In response to a user clicking on option 506 of the television, the handset may establish a Wi-Fi P2P connection with the television and then screen the television.
For another example, as shown in fig. 6 (a), the home interface of the television set may include icons of a plurality of applications, such as an icon of a calendar application, an icon of a weather application, an icon of a setup application, and an icon 601 of a screen-casting application. The opening operation may be a click operation of the user on the icon 601 of the screen projection application. The click operation may be a click operation of the user on an icon 601 of a screen projection application displayed on the television set through a remote controller. In response to a user clicking on the icon 601 of the screen-casting application, the television may turn on the Wi-Fi P2P function to enable the television to use the "screen-casting" function.
After the Wi-Fi P2P function is turned on, the tv may execute the device discovery process shown in fig. 1, and discover surrounding P2P devices through a scan phase and a find phase. For example, the television set may display a wait for connection interface shown in (b) of fig. 6. The wait for connection interface includes a connection prompt 602, such as "television ABC123456 is waiting for connection … …". After the tv is discovered by the surrounding P2P devices (e.g., the cellular phone HuaweiP30), a prompt message 603 as shown in (c) of fig. 6 can be displayed, such as "Wi-Fi direct has been established with the cellular phone HuaweiP30, i.e., about to screen! ". Subsequently, the television can receive the screen projection of the cellular phone HuaweiP30, and display a corresponding screen projection interface.
Example one
In this embodiment, the first P2P device is the tv 710 shown in fig. 7B, and the second P2P device is the mobile phone 720 shown in fig. 7B. Wherein the Wi-Fi P2P function of the television 710 is enabled by default; while the Wi-Fi P2P function of the handset 720 is off by default.
It will be appreciated that since the Wi-Fi P2P function of the television 710 is enabled by default; thus, the Wi-Fi P2P function of the television 710 is already turned on with the television 710 turned on. When the Wi-Fi P2P function of the tv 710 is turned on, the tv 710 may enter the scan phase and enter the find phase after the scan phase is finished.
From the above description it follows that: television 710 may have entered the find phase before handset 720 turns on Wi-Fi P2P functionality to enter the scan phase. As shown in fig. 7B, when the handset 720 is in the scan phase, the tv 710 has already entered the find phase.
An embodiment of the present application provides a device discovery method, and as shown in fig. 7A, the device discovery method may include S701-SS 702.
S701, the tv 710 listens to the first channel in the list state of the find stage. The duration of the television 710 listening to the first channel in the listen state is greater than or equal to the preset time threshold. The preset time threshold is 300 TU.
As shown in fig. 7B, in the find phase, the tv 710 does not switch back and forth between the list state and the search state; but is always in a listen state.
In this case, the tv 710 may listen to one channel (i.e., the first channel) of the plurality of search channels (e.g., channel 1, channel 6, and channel 11) in the listen state to receive a Probe Request (Probe Request) frame sent by other P2P devices on the channel, and reply to other P2P devices with a Probe Response (Probe Response) frame in Response to the received Probe Request frame. It should be noted that the channel to be listened to by the P2P device in the listen state may be preset by the P2P device at the time of factory shipment. For example, as shown in FIG. 7B, television 710 listens to channel 6 in the listen state.
The mobile phone 720 may turn on the Wi-Fi P2P function in response to a turn-on operation of the user. As shown in fig. 7B, the mobile phone 720 turning on the Wi-Fi P2P function may trigger a start discovery procedure to enter a scan phase. For a specific method for the mobile phone 720 to start the Wi-Fi P2P function in response to the start operation of the user, reference may be made to the detailed description in the foregoing embodiments, which is not repeated herein.
The handset 720 may send probe request frames on various channels supported by Wi-Fi (e.g., channel 1 through channel 13, above) during the scan phase to actively scan other P2P devices (e.g., television 710). The probe request frame sent by the cell phone 720 in the scan phase may be used to probe the Wi-Fi network environment around the cell phone 720, such as how many Wi-Fi devices are around the cell phone 720.
After the scan phase is finished, the handset 720 may enter the find phase. As shown in fig. 7B, the handset 720 may first enter a listen state (e.g., listen state 1) for channel 1 to receive probe request frames sent on channel 1 by other P2P devices, and reply with probe response frames to other P2P devices in response to the received probe request frames. The channel 1 monitored by the cell phone 720 in the list state 1 may be preset by the cell phone 720 when it leaves the factory. As shown in fig. 7B, the handset 720 may also randomly select the listen state 1 with a time length of 100TU from 100TU, 200TU and 300 TU.
As shown in fig. 7B, after the 100TU in the list state 1 is finished, the handset 720 may switch from the list state to the search state (e.g., search state 1). In the search state 1, the handset 720 may send probe request frames on channel 1, channel 6, and channel 11 in sequence to actively discover other P2P devices. Thus, when the handset 720 sends a probe request frame on channel 6, the tv 710 listens to channel 6 (i.e., the first channel) and can receive the probe request frame from the handset 720.
S702, the tv 710 receives the probe request frame from the handset 720 on the first channel.
It can be understood that the handset 720 is in the search state (e.g. search state 1), and when a channel (e.g. channel 6) sends a probe request frame, if other P2P devices happen to be in the listen state, the channel is monitored; then the other P2P device may receive the probe request frame sent by the handset 720 in the channel and reply with a probe response frame to the handset 720 in response to the received probe request frame to complete device discovery. However, the handset 720 is in the search state (e.g., search state 1), and when a probe request frame is sent in one channel (e.g., channel 6), the other P2P devices are not necessarily in the list state. Therefore, it may take a long time for the handset 720 to wait until the "handset 720 is in search state and sends probe request frame on a channel, and other P2P devices are in listen state on the channel", so that the handset 720 may find other P2P devices and P2P devices to find each other.
In the embodiment of the present application, the tv 710 is always in the listen state to monitor a channel (e.g. channel 6). Therefore, as long as the handset 720 is in the search state (e.g., search state 1) and transmits the probe request frame (e.g., probe request frame 1) on the channel 6, the tv 710 may receive the probe request frame 1 transmitted by the handset 720 on the channel 6 and reply to the handset 720 with the probe response frame 1 to complete device discovery. In this way, the time-consuming time for mutual discovery between P2P devices can be shortened, so that the P2P device can complete device discovery quickly.
It should be noted that, in the method of the embodiment of the present application, the P2P device may not only discover other P2P devices actively, but also be discovered by other P2P devices. For example, as shown in fig. 7C, the cell phone 720 may not only actively discover the tv 710; a probe request frame sent by the tablet 730 may also be received on channel 1 in listen state 2 and a probe response frame may be replied to the tablet 730. At this point, the cell phone 720 is discovered by the tablet 730.
Also, one P2P device may be discovered by multiple other P2P devices. For example, as shown in FIG. 7C, television 710 is not only found by cell phone 720; the probe request frame sent by the tablet 730 may also be received on channel 6 in the listen state, and the probe response frame may be replied to the tablet 730 and discovered by the tablet 730.
In summary, the method of the embodiment of the present application may be applied to a mutual discovery scenario of multiple P2P devices. The plurality of P2P devices may be two or more P2P devices.
Example two
This embodiment briefly introduces a frame structure of a Probe Request frame in the embodiment of the present application. The Probe Request Frame is a Management Frame (Management Frame) in IEEE 802.11. A P2P device (e.g., handset 720 shown in fig. 7B) may actively discover surrounding P2P devices (e.g., tv 710 shown in fig. 7B) by actively sending Probe Request frames.
Please refer to fig. 8A, which illustrates an example of a frame structure of a Probe Request frame provided in the present application. As shown in fig. 8A, the Probe Request frame 800 may include: a Frame header (i.e., MAC header) 801, a Frame entity (Frame Body)802, and a Frame Check (FCS) field 803. The MAC header 801 is a Media Access Control (MAC) header.
As shown in fig. 8A, the MAC header 801 may include a Frame Control field (Frame Control)8011, a Duration/ID (Duration/ID)8012, an Address field (Address)8013, a Sequence Control field (Sequence Control)8014, and the like.
The frame control field 8011 may include a Protocol Version field (Protocol Version)801a, a type field 801b, and the like. The protocol version field 801a is used to indicate the protocol version, typically 0, to which the Probe Request frame 800 conforms. The Type field 801b may include a Type for indicating that the corresponding frame is a management frame, a data frame, or a control frame, and a Subtype for indicating a Subtype of the frame, and for example, when the Type is 00, may indicate that the corresponding frame is a management frame. At this time, the Subtype may indicate which of the Beacon frame, the Probe Request frame, or the Probe Response frame, etc., the management frame is. For example, when Type is 00, the corresponding frame may be indicated as a management frame. At this time, the Subtype may indicate which of the management frames is a Beacon (Beacon) frame, a Probe Request frame, or a Probe Response frame. The address field 8013 may include address information such as a source address, a destination address, a transmitting station address, and a receiving station address, where the destination address may be any one of a Unicast address (Unicast address), a Multicast address (Multicast address), and a Broadcast address (Broadcast address).
As shown in fig. 8A, the frame entity 802 includes an SSID field 8021, a Supported rate (Supported Rates)8080, an Extended Supported rate (Extended Supported Rates)8023, and a reserved field 8024. Wherein, the supported rate 8022 and the extended supported rate 8023 are used to indicate a set of rates supported by the handset or the wireless router. Reserved field 8024 may be customized by the device manufacturer. The device manufacturer can design and use the reserved field 8024 to transmit different data according to the functional requirements of its product.
It should be noted that the Probe Request frame described in any embodiment of the present application may follow the frame structure shown in fig. 8A. The difference is that the Probe Request frame described in the first embodiment may be the same as the Probe Request frame in the conventional technology. The Probe Request frames in the other embodiments (such as the third embodiment, the fourth embodiment, the fifth embodiment, the sixth embodiment and the seventh embodiment) are different from the Probe Request frames in the conventional art. For example, the Probe Request frame may carry channel indication information of the P2P device. The channel indication information may be used to indicate a channel to be listened to in the list state after the P2P device enters the find phase. For a detailed description of the channel indication information and a specific manner in which the Probe Request frame carries the channel indication information of the P2P device, reference may be made to the related description in the following embodiments, which are not repeated herein.
EXAMPLE III
In this embodiment, the first P2P device is the tv 910 shown in fig. 9A, and the second P2P device is the mobile phone 920 shown in fig. 9A. Wherein, the Wi-Fi P2P functions of the television 910 and the mobile phone 920 are turned off by default.
It will be appreciated that since the Wi-Fi P2P functionality of both the television 910 and the handset 920 are off by default; therefore, both the television 910 and the handset 920 may turn on the Wi-Fi P2P function in response to a user's turn-on operation. As shown in fig. 9A, the tv 910 and the mobile phone 920 start the Wi-Fi P2P function, and may trigger a start discovery process to enter a scan phase. However, the television 910 and handset 920 may enter the scan phase at different times. For example, as shown in fig. 9A, the tv 910 enters the scan phase earlier than the cell phone 920. For a specific method for turning on the Wi-Fi P2P function by the television 910 or the mobile phone 920 in response to the turning-on operation of the user, reference may be made to the detailed description in the foregoing embodiments, which is not repeated herein.
An embodiment of the present application provides a device discovery method, and as shown in fig. 8B, the device discovery method may include S801-S804.
S801, the television 910 sends a probe request frame carrying channel indication information at a scan stage. The channel indication information is used to indicate the first channel monitored by the television 910.
S802, the television 910 listens to the first channel in the find phase.
In the scan phase, the tv 910 or the handset 920 may send probe request frames on various channels supported by Wi-Fi (such as channel 1 to channel 13 described above) to actively scan for other P2P devices. The probe request frame sent by the television 910 or the handset 920 in the scan phase may be used to probe the surrounding Wi-Fi network environment, such as how many surrounding Wi-Fi devices are.
It should be emphasized that, in order for the handset 920 to quickly discover the tv 910, as shown in fig. 9A, the tv 910 carries the channel indication information of the tv 910 in the probe request frame sent in the scan phase. The channel indication information is used to indicate the first channel to be listened to in the list state after the tv set 910 enters the find phase.
When the tv 910 enters the scan phase, it can listen to one channel (i.e. the first channel, such as channel 6) of the plurality of search channels (such as channel 1, channel 6, and channel 11). The television 910 may then transmit a channel indication message that carries information indicating the first channel (e.g., channel 6) that the television 910 is listening to.
Illustratively, the above-mentioned channel indication information may be carried in a frame entity 802 of a Probe Request (Probe Request) frame 800 shown in fig. 8A. For example, the channel indication information may be carried in the reserved field 8024 of the frame entity 802. Alternatively, the channel indication information may also be carried in reserved bits of other fields (such as the extended supported rate field 8023 or the supported rate field 8022) of the frame entity 802. The reserved bits refer to bytes in other fields that have not been used. In the embodiment of the present application, for example, the channel indication information may also be carried in the reserved field 8024 of the frame entity 802.
It is assumed that the channel indication information indicates that the tv 910 listens to the channel 6. Please refer to table 2, which illustrates the composition and corresponding description of the channel indication information carried in the reserved field 8024 of the frame entity 802 shown in fig. 8A.
TABLE 2
Figure BDA0002162572190000161
For example, the channel indication information follows TLV (type, length, value) format. A type of 0x21 indicates that carried in the reserved field 8024 is the identity of the channel to which the television 910 is to listen. A length of 0x02 indicates that value is 2 bytes in length. A value of 0x0006 means that the tv set 910 listens to channel 6 in the list state after entering the find phase. value is 0x0001 and indicates that after the tv 910 enters the find phase, it listens to channel 1 in the list state. A value of 0x000B indicates that the tv set 910 is listening to the channel 11 in the list state after entering the find phase. As shown in table 2, the type has a length of 1 byte, the length has a length of 1 byte, and the value has a length of 2 bytes.
It should be noted that, the information related to the present application, such as the identifier of the channel to be monitored by television 910 and the length of the identifier, among the information carried by the Probe Request frame, is given by way of example only in this application. The Probe Request frame described herein includes, but is not limited to, the above information, and other information carried in the Probe Request frame is not described in detail herein.
S803, the mobile phone 920 receives the probe request frame carrying the channel indication information, and obtains the channel indication information.
It can be understood that, after receiving the probe request frame carrying the channel indication information sent by the television 910, the mobile phone 920 may parse the probe request frame to obtain the channel indication information. Thus, the handset 920 can know the channel (e.g., channel 6) to be listened to in the list state after the tv 910 enters the find phase.
S804, in the search state of the find phase, the mobile phone 920 first sends a probe request frame in the first channel, and then sends probe request frames in other channels of the multiple device listening channels.
In this embodiment, after the handset 920 enters the find phase, in the search state (e.g., the search state 1 shown in fig. 9A), the probe request frame (e.g., the probe request frame 2 shown in fig. 9A) may be preferentially sent on the channel (e.g., the channel 6) indicated by the above-mentioned channel indication information. Since the television 910 listens to channel 6; therefore, the handset 920 preferentially transmits the probe request frame 2 on the channel 6, which can improve the possibility that the television 910 receives the probe request frame 2 on the channel 6 earlier.
Further, as shown in fig. 8C, S802 in fig. 8B may be S802'.
S802', tv set 9100 listens to the first channel in the listen state during the find phase. The duration of the television 910 listening to the first channel in the listen state is greater than or equal to the preset time threshold. The preset time threshold is 300 TU.
In the embodiment of the application, the television 710 does not switch back and forth between the list state and the search state in the find stage; as shown in fig. 9A, but is always in a listen state. As shown in fig. 9A, the tv set 910 listens to the channel 6 indicated by the channel indication information in the listen state. As can be seen from the description of the first embodiment: the tv 910 is always in the listen state to listen to a channel (e.g. channel 6), which can shorten the time period for P2P devices to discover each other, so that the P2P devices can complete device discovery quickly.
It should be noted that fig. 9A only illustrates the discovery process of two P2P devices (such as the tv 910 and the mobile phone 920) to describe the method of the embodiment of the present application. The method of the embodiment of the application can be applied to a mutual discovery scene of a plurality of P2P devices.
For example, the method of the embodiment of the present application may also be applied to the mutual discovery process of the television 910, the mobile phone 920, and the smart sound box 930 shown in fig. 9B. Here, smart sound box 930 shown in fig. 9B may also perform S801-S802 (or S802'). As shown in fig. 9B, the smart sound box 930 may execute S801, and send a probe request frame carrying channel indication information of the smart sound box 930 in a scan phase. The channel indication information of smart sound box 930 is used to indicate channel 1 monitored by smart sound box 930. As shown in fig. 9B, smart sound box 930 listens to channel 1 in the listen state.
In this way, the mobile phone 920 shown in fig. 9B can receive not only the probe request frame carrying the channel indication information sent by the smart sound box 930, but also the probe request frame carrying the channel indication information sent by the television 910. In this case, as shown in fig. 9B, the handset 920 may first send a probe request frame on channel 1 monitored by the smart sound box 930 and channel 6 monitored by the handset 910; the probe request frame is then transmitted on another channel, such as channel 11.
In one case, the mobile phone 920 receives the probe request frame carrying the channel indication information sent by the television 910 in the scan phase or the listen state, and then receives the probe request frame carrying the channel indication information sent by the smart sound box 930. In this case, as shown in fig. 9B, the mobile phone 920 may first send a probe request frame on channel 6 monitored by the television 910, and then send a probe request frame on channel 1 monitored by the smart sound box 930; finally, a probe request frame is sent on channel 11.
In another case, the handset 920 receives the probe request frame carrying the channel indication information sent by the television 910 and the smart speaker 930 simultaneously in the scan phase or the listen state. In this case, the handset 920 may randomly select one channel (e.g. channel 6) from channel 6 monitored by the tv 910 and channel 1 monitored by the smart sound box 930 (referred to as a priority monitoring channel); firstly, sending a detection request frame on the channel 1, and then sending the detection request frame on another preferential monitoring channel (such as the channel 1); finally, a probe request frame is sent on channel 11.
Example four
In this embodiment, the first P2P device is the tv 910 shown in fig. 9C, and the second P2P device is the mobile phone 920 shown in fig. 9C. Wherein, the Wi-Fi P2P functions of the television 910 and the mobile phone 920 are turned off by default.
It should be noted that, reference may be made to the detailed description in the third embodiment for the interaction manner between the television 910 and the mobile phone 920 in the scan phase and the find phase, which is not described herein again in this embodiment of the application.
In contrast, to improve the possibility that the tv 910 receives the probe request frame 2 on the channel 6, the handset 920 may further extend the time length for transmitting the probe request frame on the channel 6 indicated by the channel indication information in the search state.
The time length of the mobile phone 920 in the search state is constant. For example, the time length may be referred to as a preset search time. In general, the preset search time may be equally divided into three consecutive periods. The handset 920 may send a probe request frame in channel 1 at a preset search time of the first 1/3; then sending probe request frame in channel 6 at the second preset search time 1/3; finally, a probe request frame is sent on channel 11 at the third preset search time 1/3. In the scenario shown in fig. 9A, the handset 920 may send a probe request frame on channel 6 at the first preset search time 1/3.
In this embodiment, the mobile phone 930 may preferentially send the probe request frame on the channel 6; the length of time that a probe request frame is sent on channel 6 in the search state may also be extended. For example, as shown in fig. 9C, when the handset 920 is in the search state 1, the time length for sending the probe request frame on the channel 6 is longer than the time length for sending the probe request frame on the channel 1 or the channel 11.
It can be appreciated that the handset 920 may be enabled to transmit more probe request frames on channel 6 by extending the length of time that the handset 920 transmits probe request frames on channel 6 in the search state. In this way, the likelihood of the television 910 receiving probe request frame 2 on channel 6 may be increased. Accordingly, the time-consuming period for mutual discovery between P2P devices can be shortened, so that the P2P device can complete device discovery quickly.
EXAMPLE five
In this embodiment, the first P2P device is the tv 910 shown in fig. 9D, and the second P2P device is the mobile phone 920 shown in fig. 9D. Wherein, the Wi-Fi P2P functions of the television 910 and the mobile phone 920 are turned off by default.
It should be noted that, reference may be made to the detailed description in the third embodiment for the interaction manner between the television 910 and the mobile phone 920 in the scan phase and the find phase, which is not described herein again in this embodiment of the application.
In contrast, in order to improve the possibility that the tv 910 receives the probe request frame 2 on the channel 6, the handset 920 may transmit the probe request frame only on the channel 6 indicated by the above-mentioned channel indication information, but not on the channels 1 and 11 in the search state. Thus, the handset 920 can send more probe request frames on channel 6. In this way, the likelihood of the television 910 receiving probe request frame 2 on channel 6 may be increased. Accordingly, the time-consuming period for mutual discovery between P2P devices can be shortened, so that the P2P device can complete device discovery quickly.
EXAMPLE six
In this embodiment, the first P2P device is the tablet pc 1000 shown in fig. 9E, and the second P2P device is the mobile phone 920 shown in fig. 9E. The Wi-Fi P2P functions of the tablet computer 1000 and the mobile phone 920 are turned off by default.
It should be noted that, for the interaction manner of the tablet computer 1000 and the mobile phone 920 in the scan phase and the find phase, reference may be made to detailed description of the interaction manner of the tablet computer 1000 and the mobile phone 920 in the scan phase and the find phase in the third embodiment, which is not described herein again in this embodiment of the application.
In contrast, after the tablet 1000 enters the find phase, it switches back and forth between the list state and the search state. As shown in fig. 9E, the tablet computer 1000 enters a list state (e.g., list state a), then enters a search state (e.g., search state a), and then enters a list state (e.g., list state B) in the find phase, and so on.
Generally, the tablet computer 1000 may randomly select a length of time of the listen state (e.g., listen state a or listen state B) among 100TU, 200TU, and 300 TU. In this embodiment, in order to improve the possibility that the tablet 1000 receives the probe request frame 2 on the channel 6, the tablet 1000 may select the duration of each listen state to be 300TU (i.e., a preset time threshold). For example, as shown in fig. 9E, the length of time of both the listen state a and the listen state B is 300 TU.
In the embodiment of the present application, after the tablet computer 1000 enters the find phase, the state is switched back and forth between the list state and the search state; however, the tablet 1000 may select the longest time duration 300TU in each listen state. In this way, the probability that the tablet 1000 receives the probe request frame 2 on the channel 6 may be increased. Therefore, the time consumption for mutual discovery among P2P devices can be shortened, and the P2P device can complete device discovery quickly.
Of course, the tablet computer 1000 may also set the duration of the listen state to be greater than 300TU (i.e., a preset time threshold). For example, the tablet computer 1000 may also set 100TU of the listen state with a time length N times, where N is a positive integer greater than 3. In this way, the probability that the tablet 1000 receives the probe request frame 2 on the channel 6 may also be increased. Therefore, the time consumption for mutual discovery among P2P devices can be shortened, and the P2P device can complete device discovery quickly.
EXAMPLE seven
In this embodiment, the first P2P device is the tablet pc 1000 shown in fig. 9E, and the second P2P device is the mobile phone 920 shown in fig. 9E. The Wi-Fi P2P functions of the tablet computer 1000 and the mobile phone 920 are turned off by default.
It should be noted that, for the interaction manner of the tablet computer 1000 and the mobile phone 920 in the scan phase and the find phase, reference may be made to detailed description of the interaction manner of the tablet computer 1000 and the mobile phone 920 in the scan phase and the find phase in the seventh embodiment, which is not described herein again in this embodiment of the application.
In contrast, after the tablet computer 1000 enters the find phase, the time duration in the list state may be a fixed 300 TU; or randomly selecting a time length among 100TU, 200TU and 300 TU.
Moreover, considering that the time of the scan phase is short (e.g., 1s), the probe request frame carrying the channel indication information sent by the tablet 1000 in the scan phase may not be received by the handset 920. In this case, the handset 920 cannot preferentially transmit the probe request frame on the channel indicated by the channel indication information.
For this situation, in this embodiment, the tablet computer 1000 may also send a probe request frame carrying channel indication information in the search state of the find phase. Thus, the possibility that the mobile phone 920 knows the channel to be monitored by the tablet computer 1000 in the listen state can be improved.
With reference to the above description in the embodiment, after knowing the channel to be monitored by the tablet computer 1000 in the listen state, the mobile phone 920 may preferentially send the probe request frame in the channel monitored by the tablet computer 1000. The likelihood that the television 910 receives the probe request frame 2 on channel 6 may be increased. Therefore, the time consumption for mutual discovery among P2P devices can be shortened, and the P2P device can complete device discovery quickly.
It should be noted that, any of the third to seventh embodiments above only take the discovery process of two P2P devices (such as the tv 910 and the mobile phone 920) as an example to describe the method of the embodiment of the present application. The method of the embodiment of the application can be applied to a mutual discovery scene of a plurality of P2P devices. For the discovery process of three or more P2P devices, reference may be made to the discovery process of the television 910 and the mobile phone 920, which is not described herein again in this embodiment of the present application.
It should be noted that, without conflict, some or all of the features of any of the above embodiments may be combined to form a new embodiment. For example, all of the features of the sixth and seventh embodiments described above may be combined to provide a new embodiment. In this new embodiment, the tablet computer 1000 may send the probe request frame carrying the channel indication information not only in the scan phase, but also in the search state of the find phase. Also, the tablet computer 1000 may select the time length of each listen state to be 300 TU. In the description of the embodiments of the present application, "a plurality" means two or more unless otherwise specified.
Example eight
Some embodiments of the present application provide a P2P device (e.g., a first P2P device). The P2P device may include: one or more processors, memory, and a Wi-Fi module. The Wi-Fi module supports Wi-Fi P2P. The P2P device may also include a display screen. The memory, display screen, and Wi-Fi module are coupled to the processor. The memory is for storing computer program code comprising computer instructions. When the processor executes the computer instructions, the P2P device may perform the various functions or steps performed by the first P2P device in the above-described method embodiments. The structure of the P2P device can refer to the structure of the television 300 shown in fig. 3.
Some embodiments of the present application provide a P2P device (e.g., a second P2P device). The P2P device may include: one or more processors, memory, and a Wi-Fi module. The Wi-Fi module supports Wi-Fi P2P. The P2P device may also include a display screen. The memory, display screen, and Wi-Fi module are coupled to the processor. The memory is for storing computer program code comprising computer instructions. When the processor executes the computer instructions, the P2P device may perform the various functions or steps performed by the second P2P device in the above-described method embodiments. The structure of the P2P device can refer to the structure of the handset 400 shown in fig. 4.
The embodiment of the application also provides a Wi-Fi chip. The Wi-Fi chip supports Wi-Fi point-to-point P2P. The Wi-Fi chip is applied to a P2P device (such as the first P2P device or the second P2P device mentioned above), so that the P2P device supports Wi-Fi P2P. As shown in fig. 10, the Wi-Fi chip includes at least one processor 1001 and at least one interface circuit 1002. The processor 1001 and the interface circuit 1002 may be interconnected by wires. For example, the interface circuit 1002 may be used to receive signals from other devices (e.g., the memory of a P2P device). Also for example, the interface circuit 1002 may be used to send signals to other devices (e.g., the processor 1001 or a display screen of a P2P device). Illustratively, the interface circuit 1002 may read instructions stored in the memory and send the instructions to the processor 1001. The instructions, when executed by the processor 1001, may cause the P2P device to perform the various steps in the embodiments described above. Of course, the Wi-Fi chip may also include other discrete devices, which is not specifically limited in this embodiment.
Embodiments of the present application further provide a computer storage medium, where the computer storage medium includes computer instructions, and when the computer instructions are executed on the P2P device, the P2P device executes each function or step executed by the P2P device in the foregoing method embodiments.
Embodiments of the present application also provide a computer program product, which when run on a computer, causes the computer to perform the functions or steps performed by the P2P apparatus in the above method embodiments.
Through the description of the above embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical functional division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another device, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or a plurality of physical units, that is, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partially contributed to by the prior art, or all or part of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (15)

1. A device discovery method applied to a first peer-to-peer P2P device, the method comprising:
the first P2P device monitors a first channel in a list state of a find stage; wherein the duration of the first P2P device listening to the first channel in the listen state is greater than or equal to a preset time threshold, the preset time threshold is 300 time units TU, and the first P2P device does not switch between the listen state and the search state in the find phase;
the first P2P device receives a probe request frame from a second P2P device on the first channel.
2. The method of claim 1, further comprising:
the first P2P device sends a probe request frame carrying channel indication information, where the channel indication information is used to indicate the first channel monitored by the first P2P device.
3. The method of claim 2, wherein the channel indication information is included in a frame entity of a probe request frame.
4. The method of claim 3, wherein the channel indication information is included in a reserved field of the frame entity.
5. The method according to any of claims 1-4, wherein the first P2P device sending a probe request frame carrying channel indication information comprises:
the first P2P equipment sends a detection request frame carrying the channel indication information in a scan phase; or,
and the first P2P equipment sends a probe request frame carrying the channel indication information in the search state of the scan phase or the find phase.
6. The method of any of claims 1-4, wherein the first channel is one of a plurality of search channels;
wherein the plurality of search channels are a plurality of channels of Wi-Fi supported channels, the frequency spectrums of which do not overlap with each other.
7. The method of claim 6, wherein the plurality of search channels comprise channel 1, channel 6, and channel 11.
8. A device discovery method applied to a second peer-to-peer P2P device, the method comprising:
the second P2P device receives a probe request frame carrying channel indication information, where the channel indication information is used to indicate a first channel monitored by a first P2P device; the first channel is one of a plurality of search channels; the first P2P device does not switch between a list state and a search state in the find phase;
and in the search state of the find phase, the second P2P device firstly sends the probe request frame on the first channel and then sends the probe request frame on other channels in the plurality of search channels.
9. The method of claim 8, wherein the plurality of search channels are ones of Wi-Fi supported channels whose frequency spectra do not overlap with each other.
10. The method of claim 9, wherein the plurality of search channels comprise channel 1, channel 6, and channel 11.
11. The method according to any one of claims 8-10, further comprising:
the second P2P device receiving a probe response frame from the first P2P device;
the second P2P device displaying a first interface including Service Set Identification (SSID) options for one or more P2P devices, the one or more P2P devices including the first P2P device;
the second P2P device receives the click operation of the SSID option of the first P2P device from the user, and establishes a Wi-Fi P2P connection with the first P2P device.
12. A peer-to-peer P2P device, the P2P device comprising: a display screen, a memory, a Wi-Fi module, and one or more processors; the Wi-Fi module supports Wi-Fi P2P; the display screen, the memory, the Wi-Fi module, and the processor are coupled; the memory for storing computer program code comprising computer instructions which, when executed by the processor, the P2P apparatus performs the method of any one of claims 1-11.
13. A wireless fidelity Wi-Fi peer-to-peer P2P communication system, the system comprising a first P2P device and a second P2P device, the first P2P device and the second P2P device each supporting the Wi-Fi P2P;
the first P2P device to perform the method of any one of claims 1-7;
the second P2P device is configured to perform the method of any of claims 8-11.
14. A wireless fidelity Wi-Fi chip, wherein the Wi-Fi chip supports Wi-Fi peer-to-peer P2P, the Wi-Fi chip being applied to peer-to-peer P2P devices such that the P2P devices support the Wi-Fi P2P; the Wi-Fi chip comprises one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected through a line; the interface circuitry to receive signals from the memory of the P2P device and to send the signals to the processor, the signals including computer instructions stored in the memory; the P2P device, when the processor executes the computer instructions, performs the method of any of claims 1-11.
15. A computer storage medium comprising computer instructions that, when run on a point-to-point P2P device, cause the P2P device to perform the method of any one of claims 1-11, the P2P device supporting wireless fidelity Wi-Fi P2P.
CN201910737053.4A 2019-08-10 2019-08-10 Device discovery method and P2P device Active CN112448964B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910737053.4A CN112448964B (en) 2019-08-10 2019-08-10 Device discovery method and P2P device
PCT/CN2020/106884 WO2021027639A1 (en) 2019-08-10 2020-08-04 Device finding method and p2p device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910737053.4A CN112448964B (en) 2019-08-10 2019-08-10 Device discovery method and P2P device

Publications (2)

Publication Number Publication Date
CN112448964A CN112448964A (en) 2021-03-05
CN112448964B true CN112448964B (en) 2022-04-05

Family

ID=74570894

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910737053.4A Active CN112448964B (en) 2019-08-10 2019-08-10 Device discovery method and P2P device

Country Status (2)

Country Link
CN (1) CN112448964B (en)
WO (1) WO2021027639A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113382457B (en) * 2021-05-17 2022-09-02 Tcl通讯(宁波)有限公司 WiFi P2P connection method and device, mobile terminal and storage medium
CN114565070B (en) * 2022-02-23 2023-11-10 Tcl通讯科技(成都)有限公司 Label binding method and device and mobile terminal
CN118540687A (en) * 2023-02-22 2024-08-23 华为技术有限公司 Method, device, equipment and system for equipment communication

Citations (5)

* 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
CN103916879A (en) * 2012-12-31 2014-07-09 华为终端有限公司 Equipment discovery method, apparatus and system
CN103997795A (en) * 2013-02-18 2014-08-20 三星电子株式会社 Electronic apparatus and Wi-Fi P2P connection method thereof
CN104023375A (en) * 2013-02-28 2014-09-03 株式会社理光 Network node discovery method and device
CN105451367A (en) * 2014-08-27 2016-03-30 华为技术有限公司 Wireless network connection method, device and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101869292B1 (en) * 2014-02-27 2018-07-20 삼성전자주식회사 Method for setting communication channel of device, method for setting communication channel between a plurality of devices, and device

Patent Citations (5)

* 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
CN103916879A (en) * 2012-12-31 2014-07-09 华为终端有限公司 Equipment discovery method, apparatus and system
CN103997795A (en) * 2013-02-18 2014-08-20 三星电子株式会社 Electronic apparatus and Wi-Fi P2P connection method thereof
CN104023375A (en) * 2013-02-28 2014-09-03 株式会社理光 Network node discovery method and device
CN105451367A (en) * 2014-08-27 2016-03-30 华为技术有限公司 Wireless network connection method, device and system

Also Published As

Publication number Publication date
WO2021027639A1 (en) 2021-02-18
CN112448964A (en) 2021-03-05

Similar Documents

Publication Publication Date Title
WO2020253695A1 (en) Smart home device access method and electronic device
CN115209195B (en) Terminal equipment, method and system for realizing one touch screen through remote controller
CN113630297B (en) Method and terminal for controlling first equipment
CN111372325B (en) Method and device for establishing Wi-Fi point-to-point connection
US20170311240A1 (en) Discovery method and an electronic device thereof
CN112448964B (en) Device discovery method and P2P device
CN111010693B (en) Method for providing wireless fidelity network access service and electronic equipment
CN114499587B (en) Audio synchronization communication method, system, wireless earphone, terminal and storage medium
CN112449336B (en) Equipment capability discovery method and P2P equipment
WO2022062739A1 (en) Communication method and system for bluetooth pairing of multiple devices
CN112469014A (en) Method and electronic equipment for configuring Bluetooth connection parameters
CN115696280A (en) Network distribution method and device
CN116981108B (en) Wireless screen-throwing connection method, mobile terminal and computer readable storage medium
CN114285737B (en) Method and device for configuring device
US20240314388A1 (en) Combined display method, mobile device, and electronic device
WO2024104173A1 (en) Wireless communication method, storage medium, and terminal device
CN115022853B (en) Device discovery method and electronic device
US20240354047A1 (en) First electronic device, second electronic device, and projection processing method
WO2024093597A1 (en) Method for configuring a plurality of devices, device, and system
WO2023024889A1 (en) First electronic device, second electronic device, and method for screen-casting
CN118870108A (en) Screen projection method and device
CN116069277A (en) Control device switching system, control device switching method and control device switching device
CN116974587A (en) Application deployment method, electronic device, storage medium and chip system
CN115884140A (en) Cross-device connection method, electronic device, and storage medium
CN118215066A (en) Method, system and computer storage medium for transmitting data in local area network

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210429

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Applicant after: Honor Device Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Applicant before: HUAWEI TECHNOLOGIES Co.,Ltd.

GR01 Patent grant
GR01 Patent grant