CN105682182B - A kind of discovery of equipment and equipment connection method, equipment and system - Google Patents

A kind of discovery of equipment and equipment connection method, equipment and system Download PDF

Info

Publication number
CN105682182B
CN105682182B CN201410664665.2A CN201410664665A CN105682182B CN 105682182 B CN105682182 B CN 105682182B CN 201410664665 A CN201410664665 A CN 201410664665A CN 105682182 B CN105682182 B CN 105682182B
Authority
CN
China
Prior art keywords
miracast
bssid
infrastructure network
source communication
response message
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
CN201410664665.2A
Other languages
Chinese (zh)
Other versions
CN105682182A (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.)
China Mobile Communications Group Co Ltd
Original Assignee
China Mobile Communications Group 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 China Mobile Communications Group Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201410664665.2A priority Critical patent/CN105682182B/en
Publication of CN105682182A publication Critical patent/CN105682182A/en
Application granted granted Critical
Publication of CN105682182B publication Critical patent/CN105682182B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a kind of discoveries of equipment and equipment connection method, equipment and system, source device is when broadcasting the message with the probe requests thereby based on MAC layer of determining that Miracast terminal device returns carries a BSSID of infrastructure network locating for Miracast terminal device in corresponding probe response message, it can determine whether the Miracast terminal device with source device is in same foundation facility network by judging whether the first BSSID is consistent with the 2nd BSSID of infrastructure network locating for source device, to realize the discovery for being in the Miracast terminal device of same foundation facility network with source device, and since probe requests thereby broadcast message etc. is based on MAC layer, to compared to traditional machine for carrying out equipment discovery based on UDP For system, also have many advantages, such as that data processing level is few, processing speed is fast.

Description

Method, device and system for discovering device and connecting device
Technical Field
The invention relates to the technical field of multi-screen sharing, in particular to a method, equipment and a system for equipment discovery and equipment connection.
Background
Miracast is also called WI-FI Display (wireless on screen), which is a WI-FI certificate item declared activated by the WI-FI alliance on 9/19 2012. Miracast forms connection through Wi-Fi CERTIFIED Wi-FiDirect, therefore, each Miracast terminal device (terminal device with Miracast capability) does not need to access any Wi-Fi network, and pictures, videos and the like can be rapidly transmitted among the Miracast terminal devices, for example, pictures shot by a smart phone can be browsed on a large-screen television, or live programs of a home television set top box can be watched on a tablet computer.
Specifically, the currently released Miracast specification version is based on the Miracast1.0 version of the P2P (Peer to Peer) network architecture, and in the P2P network architecture of the Miracast1.0 version (specifically, as shown in fig. 1), a Miracast connection is established between Source (Miracast Source device or Source device for short, i.e., a transmitting end) and Sink (Miracast terminal device, i.e., a receiving end or a destination end) through P2P to perform corresponding data transmission, without passing through any AP (Access Point, wireless Access node). That is, there is no method defined in the currently released Miracast version 1.0 for how to implement discovery of the Miracast device and connection of the Miracast device in the Infrastructure network architecture, and there is no other relevant standard or scheme for how to implement discovery of the Miracast device and connection of the Miracast device in the Infrastructure network architecture.
That is, there is no related scheme for implementing discovery of Miracast devices and connection of Miracast devices in the Infrastructure network architecture.
Disclosure of Invention
The embodiment of the invention provides a method, a device and a system for discovering a device and connecting the device, which are used for solving the problem that no related scheme for realizing the discovery of a Miracast device and the connection of the Miracast device in an Infrastructure network architecture exists at present.
The embodiment of the invention provides a device discovery method, which is suitable for an Infrastructure network architecture and comprises the following steps:
the method comprises the steps that a source device sends a detection request broadcast message based on a Media Access Control (MAC) layer to determine whether Miracast terminal equipment with Miracast capability exists around the source device;
for a probe response message returned by any Miracast terminal device, if it is determined that the probe response message carries a first BSSID (Basic Service set identifier) of an infrastructure network where the Miracast terminal device is located, determining whether the first BSSID is consistent with a second BSSID of the infrastructure network where the source device is located, and if so, determining that the Miracast terminal device is a Miracast terminal device located in the same infrastructure network as the source device.
Further, an embodiment of the present invention provides an apparatus connection method based on the apparatus discovery method in the embodiment of the present invention, including:
aiming at any Miracast terminal equipment which is determined by source equipment and is in the same infrastructure network with the source equipment, the source equipment acquires the MAC address of the Miracast terminal equipment according to the MAC address of the Miracast terminal equipment carried in a detection response message returned by the Miracast terminal equipment; and are
According to the obtained MAC address of the Miracast terminal device, determining the IP (Internet Protocol) address of the Miracast terminal device by using RASP (reverse Address resolution Protocol), and establishing connection with the Miracast terminal device according to the determined IP address.
Further, an embodiment of the present invention provides another device discovery method, where the method is applied to an Infrastructure network architecture, and includes:
the method comprises the steps that Miracast terminal equipment receives a detection request broadcast message sent by source equipment based on an MAC layer;
if the source device is determined to be in the infrastructure network, returning a probe response message carrying a first BSSID of the infrastructure network where the source device is located to the source device, and determining whether the Miracast terminal device is the Miracast terminal device in the same infrastructure network as the source device by judging whether the first BSSID is consistent with a second BSSID of the infrastructure network where the source device is located according to the first BSSID carried in the probe response message by the source device.
Further, an embodiment of the present invention further provides an apparatus connection method, where the method is applied to an Infrastructure network architecture, and includes:
the method comprises the steps that Miracast terminal equipment receives a detection request broadcast message sent by source equipment based on an MAC layer;
if the source equipment is determined to be in the infrastructure network, returning a detection response message carrying a first BSSID of the infrastructure network where the source equipment is located and a MAC address of the source equipment to the source equipment, determining the IP address of the Miracast terminal equipment according to the MAC address after the source equipment determines that the Miracast terminal equipment is the Miracast terminal equipment which is in the same infrastructure network as the source equipment by determining that the first BSSID is consistent with a second BSSID of the infrastructure network where the source equipment is located, and establishing connection with the Miracast terminal equipment according to the determined IP address.
Further, an embodiment of the present invention further provides a source device, where the source device is applicable to an ifrasstructure network architecture, and includes:
a sending unit, configured to send a probe request broadcast message based on an MAC layer to determine whether there is a Miracast terminal device with Miracast capability around the source device;
a receiving unit, configured to receive a probe response message returned by each Miracast terminal device;
and the processing unit is used for responding to a detection response message returned by any Miracast terminal equipment, judging whether the first BSSID is consistent with the second BSSID of the infrastructure network where the source equipment is located if the detection response message carries the first BSSID of the infrastructure network where the Miracast terminal equipment is located, and if the first BSSID is consistent with the second BSSID of the infrastructure network where the source equipment is located, determining that the Miracast terminal equipment is the Miracast terminal equipment which is located in the same infrastructure network with the source equipment.
Further, an embodiment of the present invention further provides a source device, including:
a sending unit, configured to send a probe request broadcast message based on an MAC layer to determine whether there is a Miracast terminal device with Miracast capability around the source device;
a receiving unit, configured to receive a probe response message returned by each Miracast terminal device;
a processing unit, configured to determine, for a probe response message returned by any Miracast terminal device, if it is determined that the probe response message carries a first BSSID of an infrastructure network where the Miracast terminal device is located, whether the first BSSID is consistent with a second BSSID of the infrastructure network where the source device is located, and if so, determine that the Miracast terminal device is a Miracast terminal device in the same infrastructure network as the source device; and the number of the first and second groups,
any one to the definite with source equipment is in the Miracast terminal equipment of same infrastructure network, according to carry in the detection response message that Miracast terminal equipment returned Miracast terminal equipment's MAC address acquires Miracast terminal equipment's MAC address, and according to acquireing Miracast terminal equipment's MAC address utilizes RASP, confirms Miracast terminal equipment's IP address, and, according to confirming the IP address with Miracast terminal equipment establishes the connection.
Further, an embodiment of the present invention further provides Miracast terminal equipment, including:
a receiving unit, configured to receive a probe request broadcast message sent by a source device based on an MAC layer;
a sending unit, configured to, if it is determined that the source device is in the infrastructure network, return a probe response message carrying a first BSSID of the infrastructure network where the source device is located to the source device, and determine, by the source device according to the first BSSID carried in the probe response message, whether the Miracast terminal device is a Miracast terminal device that is in the same infrastructure network as the source device by determining whether the first BSSID is consistent with a second BSSID of the infrastructure network where the source device is located.
Further, an embodiment of the present invention further provides another Miracast terminal device, including:
a receiving unit, configured to receive a probe request broadcast message sent by a source device based on an MAC layer;
a sending unit, configured to return a probe response message carrying a first BSSID of the infrastructure network where the source device is located and a MAC address of the source device to the source device if the source device is determined to be in the infrastructure network, so that the source device determines that the Miracast terminal device is a Miracast terminal device in the same infrastructure network as the source device in a manner that the first BSSID is consistent with a second BSSID of the infrastructure network where the source device is located, and then determines an IP address of the Miracast terminal device according to the MAC address and establishes a connection with the Miracast terminal device according to the determined IP address.
Further, an embodiment of the present invention further provides a device discovery system, where the system is applied to an ifrasstructure network architecture, and includes:
the source device is used for sending a detection request broadcast message based on an MAC layer so as to determine whether Miracast terminal equipment with Miracast capability exists around the source device or not, and for a detection response message returned by any Miracast terminal equipment, if the detection response message is determined to carry a first BSSID of an infrastructure network where the Miracast terminal equipment is located, whether the first BSSID is consistent with a second BSSID of the infrastructure network where the source device is located is judged, and if yes, the Miracast terminal equipment is determined to be Miracast terminal equipment which is located in the same infrastructure network as the source device;
and the Miracast terminal device is used for receiving the detection request broadcast message sent by the source device based on the MAC layer, and returning a detection response message carrying the first BSSID of the infrastructure network where the Miracast terminal device is located to the source device if the Miracast terminal device is determined to be located in the infrastructure network.
Further, an embodiment of the present invention further provides an apparatus connection system, where the system is applied to an ifrasstructure network architecture, and includes:
the source device is used for sending a detection request broadcast message based on an MAC layer so as to determine whether Miracast terminal equipment with Miracast capability exists around the source device or not, and for a detection response message returned by any Miracast terminal equipment, if the detection response message is determined to carry a first BSSID of an infrastructure network where the Miracast terminal equipment is located, whether the first BSSID is consistent with a second BSSID of the infrastructure network where the source device is located is judged, and if yes, the Miracast terminal equipment is determined to be Miracast terminal equipment which is located in the same infrastructure network as the source device; and the number of the first and second groups,
aiming at any determined Miracast terminal equipment which is in the same infrastructure network with the source equipment, acquiring the MAC address of the Miracast terminal equipment according to the MAC address of the Miracast terminal equipment carried in a detection response message returned by the Miracast terminal equipment, determining the IP address of the Miracast terminal equipment by using RASP according to the acquired MAC address of the Miracast terminal equipment, and establishing connection with the Miracast terminal equipment according to the determined IP address;
and the Miracast terminal device is used for receiving the detection request broadcast message sent by the source device based on the MAC layer, and returning a detection response message carrying the first BSSID of the infrastructure network where the Miracast terminal device is located and the MAC address of the Miracast terminal device to the source device if the Miracast terminal device is determined to be located in the infrastructure network.
The invention has the following beneficial effects:
in the technical solution of the embodiment of the present invention, when it is determined that a probe response message corresponding to a probe request broadcast message based on a MAC layer returned by a Miracast terminal device carries a first BSSID of an infrastructure network where the Miracast terminal device is located, a source device may determine whether the Miracast terminal device and the source device are in the same infrastructure network by judging whether the first BSSID is consistent with a second BSSID of the infrastructure network where the source device is located, so that on the basis of a discovery mechanism compatible with Miracast1.0, a discovery mechanism of the Miracast terminal device based on an infrastructure network architecture is provided, and since a probe request broadcast message and the like sent by the source device are based on the MAC layer, a conventional UDP (User Datagram Protocol, user packet protocol), the mechanism has the advantages of less data processing layers, high processing speed and the like.
In addition, in the technical solution of the embodiment of the present invention, for any determined Miracast terminal device that is in the same Infrastructure network as the source device, the source device may further obtain the MAC address of the Miracast terminal device according to the MAC address of the Miracast terminal device carried in a probe response message returned by the Miracast terminal device, determine the IP address of the Miracast terminal device by using RASP according to the obtained MAC address of the Miracast terminal device, and establish a connection with the Miracast terminal device according to the determined IP address, so that the connection establishment of the Miracast terminal device based on the Infrastructure network may also be implemented, and a gap in a related scheme for implementing the connection of the Miracast device in an Infrastructure network architecture is filled up.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a P2P network architecture of Miracast1.0 version;
fig. 2 is a schematic flowchart illustrating a device discovery method according to a first embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating the device connection method according to the second embodiment of the present invention;
fig. 4 is a schematic flowchart illustrating a device discovery method according to a third embodiment of the present invention;
fig. 5 is a schematic flow chart illustrating a device connection method according to a fourth embodiment of the present invention;
fig. 6 is a schematic flowchart illustrating a method for device discovery and device connection according to a fifth embodiment of the present invention;
fig. 7 is a schematic structural diagram of the source device according to a sixth embodiment of the present invention;
fig. 8 is a schematic structural diagram of another source device according to a sixth embodiment of the present invention;
fig. 9 is a schematic structural diagram of a Miracast terminal device according to a sixth embodiment of the present invention;
fig. 10 is a schematic structural diagram of another Miracast terminal device according to a sixth embodiment of the present invention;
fig. 11 is a schematic structural diagram of a device discovery system according to a sixth embodiment of the present invention;
fig. 12 is a schematic structural diagram of an apparatus connection system according to a sixth embodiment of the present invention.
Detailed Description
The Miracast working group of the WiFi alliance is making the Miracast2.0 version of the specification, and at this stage, the requirements are determined and the requirement solicitation scheme is being addressed.
Among the requirements that have been identified, the following are described:
1. the method comprises the steps of 'Support for streaming audio-video content over Wi-Fiifrastrecture network', namely, supporting streaming media audio-video file transmission based on a Wi-Fi basic network architecture;
2. "If a Miracast R2Device connected to an IP network over Wi-FiinFrastratreture, it shell distributed Miracast R2Device connected to the same IP subnet over Wi-Fi infra structure", that is, If a certain Miracast terminal Device is connected to the corresponding IP network through the Wi-Fi basic network structure, it should be able to discover other Miracast terminal Devices in the network connected to the same IP network through the Wi-Fi basic network structure;
3. "A Miracast R2Device connections to a Wi-Fi infrastructure network short support P2P same-channel current operation", that is, a Miracast terminal Device connected to a Wi-Fi infrastructure network should simultaneously support a P2P network mechanism.
That is, as can be seen from the description of the requirements, Miracast2.0 requires that a Source device (Source) and a Miracast terminal device (Sink) can implement device discovery, device connection, and data communication in an Infrastructure network architecture, so as to solve the problem that there is no existing related scheme for implementing the discovery of the Miracast device and the connection of the Miracast device in the Infrastructure network architecture.
On this basis, in the technical solution described in the embodiment of the present invention, when it is determined that a probe response message corresponding to a probe request broadcast message based on an MAC layer returned by a Miracast terminal device carries a first BSSID of an infrastructure network where the Miracast terminal device is located, a source device may determine whether the Miracast terminal device and the source device are in the same infrastructure network by judging whether the first BSSID is consistent with a second BSSID of the infrastructure network where the source device is located, so that on the basis of a discovery mechanism compatible with Miracast1.0, a discovery mechanism of the Miracast terminal device based on an infrastructure network architecture is provided, and since a probe request broadcast message and the like sent by the source device are based on the MAC layer, compared with a conventional mechanism for performing device discovery based on UDP in the infrastructure network, and the method also has the advantages of less data processing layers, high processing speed and the like.
In addition, in the technical solution of the embodiment of the present invention, for any determined Miracast terminal device that is in the same Infrastructure network as the source device, the source device may further obtain the MAC address of the Miracast terminal device according to the MAC address of the Miracast terminal device carried in a probe response message returned by the Miracast terminal device, determine the IP address of the Miracast terminal device by using RASP according to the obtained MAC address of the Miracast terminal device, and establish a connection with the Miracast terminal device according to the determined IP address, so that the connection establishment of the Miracast terminal device based on the Infrastructure network may also be implemented, and a gap in a related scheme for implementing the connection of the Miracast device in an Infrastructure network architecture is filled up.
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The first embodiment is as follows:
an apparatus discovery method according to a first embodiment of the present invention is provided, as shown in fig. 2, which is a schematic flow diagram of the apparatus discovery method according to the first embodiment of the present invention, and the method may include the following steps:
step 201: the source equipment sends a detection request broadcast message based on the MAC layer so as to determine whether Miracast terminal equipment with Miracast capability exists around the source equipment.
Specifically, the Source device (i.e., Source) may send a Probe Request (Probe Request broadcast message) carrying Miracast IE in the MAC layer according to the P2P specification, so as to inquire whether the peripheral device has a corresponding Miracast capability, and in a specific implementation process, each message based on the MAC layer (e.g., a Probe Request broadcast message based on the MAC layer and a Probe response message corresponding to the Probe Request broadcast message that is subsequently related) may complete corresponding transceiving processing in WiFi chip firmware of the corresponding device without being processed by an application processor that is transferred to the corresponding device, so that the processing efficiency of the message may be greatly improved, which is not described in detail in the embodiments of the present invention.
It should be noted that, unless otherwise specified, the source device described in the embodiment of the present invention may generally be a source device in a corresponding infrastructure network architecture, and details of the embodiment of the present invention are not described herein again.
Step 202: aiming at a detection response message returned by any Miracast terminal equipment, if the detection response message is determined to carry a first BSSID of an infrastructure network where the Miracast terminal equipment is located, whether the first BSSID is consistent with a second BSSID of the infrastructure network where the source equipment is located is judged according to the first BSSID, and if the first BSSID is consistent with the second BSSID, the Miracast terminal equipment is determined to be the Miracast terminal equipment which is located in the same infrastructure network with the source equipment.
Thus, discovery of each Miracast terminal device in the same infrastructure network as the source device can be achieved.
Wherein, the first BSSID is the MAC address of the AP associated with the Miracast terminal device (i.e., Sink); the second BSSID is the MAC address of the AP associated with the source device. And according to the definition of the 802.11wifi specification, the first BSSID may be located in an Address3 (third Address) field of a MAC frame corresponding to the probe response message returned by the Miracast terminal device.
That is to say, in the embodiment of the present invention, after receiving the ProbeRequest, each terminal device located around the source device may return, according to the definition of the 802.11wifi specification, a Probe Response (Probe Response message) carrying the BSSID of the infrastructure network where the terminal device is located to the source device, if it is determined that the terminal device itself has the Miracast capability (that is, it is determined that the terminal device itself is the Miracast terminal device) and it is determined that the terminal device itself is located in the corresponding infrastructure network, so as to notify that the terminal device itself has the Miracast capability.
It should be noted that, after receiving the Probe Request, each terminal device located around the source device may return a Probe response message not carrying a relevant BSSID to the source device if it is determined that the terminal device has Miracast capability and is not located in a corresponding infrastructure network, so as to notify that the source device has Miracast capability; or, if it is determined that the source device does not have the Miracast capability, it is not necessary to return a corresponding probe response message to the source device, which is not described in detail in this embodiment of the present invention.
Accordingly, in the embodiment of the present invention, the method may further include:
for a probe response message returned by any Miracast terminal device, if it is determined that the probe response message carries a first BSSID of an infrastructure network where the Miracast terminal device is located and it is determined that the first BSSID is not consistent with a second BSSID of the infrastructure network where the source device is located, it is determined that the Miracast terminal device and the source device are not located in the same infrastructure network; or,
aiming at a detection response message returned by any Miracast terminal equipment, if the detection response message returned by the Miracast terminal equipment is determined not to carry a relevant BSSID, the Miracast terminal equipment can be determined not to be in any infrastructure network, namely the Miracast terminal equipment and the source equipment are not in the same infrastructure network.
In addition, it should be noted that the probe response message returned by the Miracast terminal device may carry a first BSSID of the infrastructure network where the Miracast terminal device is located, and may also carry a first SSID (Service Set Identifier) of the infrastructure network where the Miracast terminal device is located, where the first SSID of the infrastructure network where the Miracast terminal device is located is an SSID of an AP associated with the Miracast terminal device, that is, network name information of a network that is learned when a user searches for a network. And according to the definition of the 802.11wifi specification, the first SSID may be located in a Frame body (Frame entity) domain of a MAC Frame corresponding to the probe response message returned by the Miracast terminal device.
Accordingly, step 202 determines that the Miracast terminal device is a Miracast terminal device in the same infrastructure network as the source device, and may further perform:
and if the first BSSID is determined to be consistent with a second BSSID of an infrastructure network where the source equipment is located, and the first SSID is determined to be consistent with a second SSID of the infrastructure network where the source equipment is located, determining that the Miracast terminal equipment is Miracast terminal equipment which is located in the same infrastructure network with the source equipment.
Further, after discovering each Miracast terminal device in the same infrastructure network as the source device, the method may further include:
and displaying the determined Miracast terminal equipment which is in the same infrastructure network with the source equipment.
Specifically, the source device may display, to each User, each determined Miracast terminal device in the same infrastructure network as the source device through a User Interface (UI), so that each User can view, on a display screen of the source device, all Miracast terminal devices in the same infrastructure network as the source device around the source device.
It should be noted that, at this time, the source device does not need to display other Miracast terminal devices that are not in the same infrastructure network as the source device, and details of this embodiment of the present invention are not described herein.
In addition, it should be noted that, in the embodiment of the present invention, how Source discovers Sink is mainly taken as an example, and a discovery mechanism of a Miracast terminal device based on an infrastructure network architecture is described correspondingly, and it should be noted that a flow of Sink discovering Source is similar to a flow of Source discovering Sink, and details are not repeated here.
That is to say, in the technical solution of the first embodiment of the present invention, when determining that the probe response message returned by the Miracast terminal device and corresponding to the probe request broadcast message based on the MAC layer carries the first BSSID of the infrastructure network where the Miracast terminal device is located, the source device may determine whether the Miracast terminal device and the source device are in the same infrastructure network by judging whether the first BSSID is consistent with the second BSSID of the infrastructure network where the source device is located, so that on the basis of the discovery mechanism compatible with Miracast1.0, the discovery mechanism of the Miracast terminal device based on the infrastructure network architecture is provided, and since the probe request broadcast message sent by the source device and the probe response message returned by the Miracast terminal device are based on the MAC layer, and in a specific implementation process, each message based on the MAC layer may complete corresponding transceiving process, in firmware of the WiFi chip, The device discovery method does not need to be transmitted to an application processor for processing, and therefore compared with a traditional device discovery mechanism based on UDP in an infrastructure network, the device discovery method also has the advantages of being few in data processing level, high in processing speed and the like.
Example two:
an embodiment of the present invention provides an apparatus connection method based on the apparatus discovery method described in the embodiment one of the present invention, as shown in fig. 3, which is a schematic flow diagram of the apparatus connection method described in the embodiment two of the present invention, and the method may include the following steps:
step 301: any one determined for the source equipment and Miracast terminal equipment of which the source equipment is in the same infrastructure network are obtained by the source equipment according to the MAC address of the Miracast terminal equipment carried in the detection response message returned by the Miracast terminal equipment.
Specifically, according to the definition of the 802.11wifi specification, Probe Response returned to a source device by a Miracast terminal device in a corresponding infrastructure network may generally carry a MAC Address of the Miracast terminal device, in addition to carrying a first BSSID of the infrastructure network where the Miracast terminal device is located, and specifically, the MAC Address of the Miracast terminal device may generally be located in an Address2 (second Address) field of a MAC frame corresponding to a Probe Response message returned by the Miracast terminal device.
Step 302: and determining the IP address of the Miracast terminal equipment by using RASP according to the obtained MAC address of the Miracast terminal equipment, and establishing connection with the Miracast terminal equipment according to the determined IP address.
Specifically, according to the MAC address of the Miracast terminal device, the RASP is used to determine the IP address of the Miracast terminal device, and the following steps S1 to S2 may be specifically executed:
step S1: the source device sends a RARP broadcast message, wherein the RARP broadcast message carries the MAC address of the Miracast terminal device, so as to inquire which MAC address of the device in the network is the MAC address in the message and request the response message to carry the IP address corresponding to the MAC address;
step S2: receiving the response message of the IP address corresponding to the MAC address of the Miracast terminal equipment, carried by the Miracast terminal equipment, and determining the IP address of the Miracast terminal equipment according to the received RARP response message of the IP address corresponding to the MAC address of the Miracast terminal equipment, carried by the Miracast terminal equipment.
It should be noted that, the establishing of the connection with the Miracast terminal device according to the determined IP address may be specifically implemented as:
and establishing session connection with the Miracast terminal equipment by utilizing a Real Time Streaming Protocol (RTSP) protocol defined by Miracast1.0 according to the determined IP address.
That is to say, different from the device connection method described in the existing Miracast1.0 specification, after Source finds Sink, it can directly obtain the IP address of Sink according to the MAC address of Sink by using RARP mechanism, and then establish RTSP connection with Sink, without executing the process of establishing P2P connection with Sink and then allocating IP addresses by DHCP (Dynamic Host Configuration Protocol) or auto IP (automatic IP acquisition) and the like described in the existing Miracast1.0 specification, thereby implementing connection establishment of the Miracast terminal device based on the Infrastructure network, and filling up the blank of the related scheme that connection of the Miracast device is not implemented in the Infrastructure network architecture at present.
In addition, it should be noted that after the connection is established between the source device and the Miracast terminal device, when communicating with the Miracast terminal device, the source device may communicate according to the Miracast1.0 version specification, which is not described in detail in this embodiment of the present invention. That is to say, the technical scheme of the present invention is compatible with Miracast1.0 version, and the change is small, so that the present invention also has the advantage of easy implementation.
Further, it should be noted that, in the embodiment of the present invention, how Source establishes device connection with Sink is mainly taken as an example, and device connection of Miracast terminal device based on infrastructure network architecture is described correspondingly, and it should be noted that a flow of establishing device connection between Sink and Source is similar to a flow of establishing device connection between Source and Sink, and details are not described here again.
The second embodiment of the present invention provides a device connection establishment method based on the device discovery method in the first embodiment of the present invention, where for any determined Miracast terminal device that is in the same Infrastructure network as the source device, the source device may obtain the MAC address of the Miracast terminal device according to the MAC address of the Miracast terminal device that is carried in a probe response message returned by the Miracast terminal device, determine the IP address of the Miracast terminal device by using RASP according to the obtained MAC address of the Miracast terminal device, and establish a connection with the Miracast terminal device according to the determined IP address, so as to further implement connection establishment of the Miracast terminal device based on an Infrastructure network, and fill a blank that no related scheme for implementing connection of the Miracast device in an ifrastructure network architecture at present. In addition, the technical scheme of the invention is compatible with the Miracast1.0 version and has small change, so the invention also has the advantage of easy realization.
Example three:
in the third embodiment of the present invention, Miracast terminal device is taken as an example of an action executing party, and the device discovery method in the first embodiment of the present invention is further described, as shown in fig. 4, which is a schematic flow chart of the device discovery method in the third embodiment of the present invention, and the method may include the following steps:
step 401: and the Miracast terminal equipment receives the detection request broadcast message sent by the source equipment based on the MAC layer.
The Probe Request broadcast message may be a Probe Request carrying Miracast IE of the MAC layer sent by the source device according to the P2P specification, and in a specific implementation process, each message based on the MAC layer (e.g., the Probe Request broadcast message based on the MAC layer and a Probe response message corresponding to the Probe Request broadcast message related subsequently) may complete corresponding transceiving processing in WiFi chip firmware of the corresponding device without being passed to an application processor of the corresponding device for processing, so that processing efficiency of the message may be greatly improved.
Step 402: if the source device is determined to be in the infrastructure network, returning a probe response message carrying a first BSSID of the infrastructure network where the source device is located to the source device, and determining whether the Miracast terminal device is the Miracast terminal device in the same infrastructure network as the source device by judging whether the first BSSID is consistent with a second BSSID of the infrastructure network where the source device is located according to the first BSSID carried in the probe response message by the source device.
Wherein, the first BSSID is the MAC address of the AP associated with the Miracast terminal device; the second BSSID is the MAC address of the AP associated with the source device. And according to the definition of the 802.11wifi specification, the first BSSID may be located in the Address3 field of the MAC frame corresponding to the probe response message returned by the Miracast terminal device.
That is to say, in the embodiment of the present invention, after receiving the Probe Request, each Miracast terminal device (Miracast-capable terminal device) located around the source device may return, according to the definition of the 802.11wifi specification, Probe Response carrying the BSSID of the infrastructure network where the Miracast terminal device is located to the source device based on the MAC layer, so as to notify that the source device itself has the Miracast capability if the Miracast terminal device determines that the Miracast terminal device is located in the corresponding infrastructure network.
It should be noted that after receiving the Probe Request, if it is determined that each Miracast terminal device (terminal device with Miracast capability) located around the source device is not located in the corresponding infrastructure network, a Probe response message not carrying a relevant BSSID may be returned to the source device to notify that the source device has the Miracast capability, which is not described in detail in this embodiment of the present invention.
It should be noted that, in the probe response message returned to the source device by the Miracast terminal device in the infrastructure network, in addition to carrying the first BSSID of the infrastructure network where the Miracast terminal device is located, the probe response message may also carry the first SSID of the infrastructure network where the Miracast terminal device is located, so that the source device determines, according to the first BSSID and the first SSID carried in the probe response, whether the Miracast terminal device is the Miracast terminal device in the same infrastructure network as the source device in a manner of determining whether the first BSSID and the first SSID are consistent with the second BSSID and the second SSID of the infrastructure network where the source device is located, which is not described in detail in this embodiment of the present invention.
The first SSID of the infrastructure network where the Miracast terminal device is located is an SSID of an AP associated with the Miracast terminal device, that is, network name information of a network that is acquired when a user searches for the network. And according to the definition of the 802.11wifi specification, the first SSID may be located in a Frame body area of a MAC Frame corresponding to the probe response message returned by the Miracast terminal device, which is also not described in detail in the embodiments of the present invention.
That is to say, in the technical solution of the third embodiment of the present invention, when determining that the Miracast terminal device is in the infrastructure network, the Miracast terminal device may return a probe response message carrying a first BSSID of the infrastructure network where the Miracast terminal device is located to the source device, and determine, by the source device according to the first BSSID carried in the probe response message, whether the Miracast terminal device is a Miracast terminal device in the same infrastructure network as the source device by determining whether the first BSSID is consistent with a second BSSID of the infrastructure network where the source device is located, so as to implement discovery of the Miracast terminal device in the same infrastructure network as the source device, and since the probe request broadcast message and the probe response message are based on a MAC layer, compared with a conventional mechanism for performing device discovery based on UDP, the Miracast terminal device further has fewer data processing layers, The processing speed is high, and the like.
Example four
In the fourth embodiment of the present invention, Miracast terminal device is taken as an example of an action executing party, and the device connection method in the second embodiment of the present invention is further described, as shown in fig. 5, which is a schematic flow chart of the device connection method in the fourth embodiment of the present invention, and the method may include the following steps:
step 501: and the Miracast terminal equipment receives the detection request broadcast message sent by the source equipment based on the MAC layer.
The Probe Request broadcast message may be a Probe Request carrying Miracast IE of the MAC layer sent by the source device according to the P2P specification, and in a specific implementation process, each message based on the MAC layer (e.g., the Probe Request broadcast message based on the MAC layer and a Probe response message corresponding to the Probe Request broadcast message related subsequently) may complete corresponding transceiving processing in WiFi chip firmware of the corresponding device without being passed to an application processor of the corresponding device for processing, so that processing efficiency of the message may be greatly improved.
Step 502: if the source equipment is determined to be in the infrastructure network, returning a detection response message carrying a first BSSID of the infrastructure network where the source equipment is located and a MAC address of the source equipment to the source equipment, determining the IP address of the Miracast terminal equipment according to the MAC address after the source equipment determines that the Miracast terminal equipment is the Miracast terminal equipment which is in the same infrastructure network as the source equipment by determining that the first BSSID is consistent with a second BSSID of the infrastructure network where the source equipment is located, and establishing connection with the Miracast terminal equipment according to the determined IP address.
That is to say, in the embodiment of the present invention, after each Miracast terminal device (terminal device with Miracast capability) located around the source device receives the Probe Request, if it is determined that it is located in the corresponding infrastructure network, it may return, according to the definition of 802.11wifi, a Probe Response carrying the first BSSID of the infrastructure network where it is located and the MAC address of itself to the source device based on the MAC layer to notify that the source device itself has the Miracast capability, and after the source device determines that the Miracast terminal device is a Miracast terminal device located in the same infrastructure network as the source device by determining that the first BSSID is consistent with the second BSSID of the infrastructure network where the source device is located, determine the IP address of the Miracast terminal device according to the MAC address, and establish a connection with the Miracast terminal device according to the determined IP address.
The first BSSID is the MAC address of the AP associated with the Miracast terminal device, and the second BSSID is the MAC address of the AP associated with the source device. And according to the definition of the 802.11wifi specification, the first BSSID may be located in an Address3 field of a MAC frame corresponding to a Probe Response returned by the Miracast terminal device to the source device, and a MAC Address of the Miracast terminal device itself may be located in an Address2 field of a MAC frame corresponding to the Probe Response, which is not described in detail in the embodiment of the present invention.
That is to say, in the fourth technical solution of the embodiment of the present invention, after receiving the probe request broadcast message sent by the source device based on the MAC layer, if it is determined that the source device is in the infrastructure network, a probe response message carrying the first BSSID of the infrastructure network where the source device is located and the MAC address of the source device is returned to the source device, after determining, by the source device, that the Miracast terminal device is a Miracast terminal device in the same infrastructure network as the source device by determining that the first BSSID matches a second BSSID of the infrastructure network where the source device is located, determining the IP address of the Miracast terminal equipment according to the MAC address, establishing connection with the Miracast terminal equipment according to the determined IP address, therefore, the connection establishment of the Miracast terminal equipment based on the Infrastructure network is realized, and the blank that no related scheme for realizing the connection of the Miracast equipment in the Infrastructure network architecture exists at present is filled. In addition, because the probe request broadcast message, the probe response message and the like are based on the MAC layer, compared with the conventional mechanism for performing device discovery based on UDP, the method also has the advantages of less data processing layers, high processing speed and the like.
Example five:
fifth, in an embodiment of the present invention, a method for device discovery and device connection according to first to fourth embodiments of the present invention is further described with reference to an example of interactive execution of a source device and a Miracast terminal device, as shown in fig. 6, which is a schematic flow diagram of the method for device discovery and device connection according to fifth embodiment of the present invention, where the method may include the following steps:
step 601: the source equipment sends a detection request broadcast message based on the MAC layer so as to determine whether Miracast terminal equipment with Miracast capability exists around the source equipment.
Step 602: and receiving the detection request broadcast message by the Miracast terminal equipment.
It should be noted that, besides the Miracast terminal device, other terminal devices without Miracast capability may also receive the probe request broadcast message, but since the terminal devices do not have Miracast capability, it is not necessary to report a corresponding probe response message to the source terminal, that is, it is not necessary to perform each subsequent step.
Step 603: the Miracast terminal device judges whether the Miracast terminal device is in the infrastructure network, if the Miracast terminal device is determined to be in the infrastructure network, the Miracast terminal device returns a detection response message carrying the first BSSID of the infrastructure network where the Miracast terminal device is located to the source device, and if not, the Miracast terminal device returns a detection response message not carrying the related BSSID to the source device.
The first BSSID is a MAC Address of an AP associated with the Miracast terminal device, and is defined according to an 802.11wifi specification, and the first BSSID may be located in an Address3 domain of a MAC frame corresponding to a probe response message returned by the Miracast terminal device.
In addition, it should be noted that the probe response message returned by the Miracast terminal device in the infrastructure network to the source device may also carry the first SSID of the infrastructure network where the Miracast terminal device is located, in addition to the first BSSID of the infrastructure network where the Miracast terminal device is located, where the first SSID of the infrastructure network where the Miracast terminal device is located is an SSID of an AP associated with the Miracast terminal device, that is, network name information of a network that is obtained when the user searches for the network. And according to the definition of the 802.11wifi specification, the first SSID may be located in a Frame body area of a MAC Frame corresponding to the probe response message returned by the Miracast terminal device, which is not described in detail herein in this embodiment of the present invention.
Step 604: the method comprises the steps that source equipment receives detection response messages returned by various Miracast terminal equipment, and for the detection response messages returned by any Miracast terminal equipment, if the detection response messages are confirmed to carry first BSSIDs of infrastructure networks where the Miracast terminal equipment is located, whether the first BSSIDs are consistent with second BSSIDs of the infrastructure networks where the source equipment is located or not is judged according to the first BSSIDs, and if yes, the Miracast terminal equipment is determined to be the Miracast terminal equipment which is located in the same infrastructure network with the source equipment.
Thus, discovery of each Miracast terminal device in the same infrastructure network as the source device can be achieved.
Further, step 604 may further include:
for a probe response message returned by any Miracast terminal device, if it is determined that the probe response message carries a first BSSID of an infrastructure network where the Miracast terminal device is located and it is determined that the first BSSID is not consistent with a second BSSID of the infrastructure network where the source device is located, it is determined that the Miracast terminal device and the source device are not located in the same infrastructure network; or,
aiming at a detection response message returned by any Miracast terminal equipment, if the detection response message returned by the Miracast terminal equipment is determined not to carry a relevant BSSID, the Miracast terminal equipment can be determined not to be in any infrastructure network, namely the Miracast terminal equipment and the source equipment are not in the same infrastructure network.
In addition, it should be noted that, for any Miracast terminal device, if the probe response message returned by the Miracast terminal device carries the first BSSID of the infrastructure network where the Miracast terminal device is located, and also carries the first SSID of the infrastructure network where the Miracast terminal device is located, then, correspondingly, step 604 determines that the Miracast terminal device is a Miracast terminal device that is in the same infrastructure network as the source device, and may further perform:
and if the first BSSID is determined to be consistent with a second BSSID of an infrastructure network where the source equipment is located, and the first SSID is determined to be consistent with a second SSID of the infrastructure network where the source equipment is located, determining that the Miracast terminal equipment is Miracast terminal equipment which is located in the same infrastructure network with the source equipment. Wherein the second BSSID is a MAC address of an AP associated with the source device.
Further, after discovering each Miracast terminal device in the same infrastructure network as the source device, the method may further include:
step 605: and the source equipment displays the determined Miracast terminal equipment which is positioned in the same infrastructure network with the source equipment.
Further, after the discovery process of the Miracast terminal device in step 601-605 is completed, the process of establishing connection with the Miracast terminal device may be further continuously executed, where it needs to be noted that, according to the definition of the 802.11wifi specification, a probe response message returned from the Miracast terminal device in the infrastructure network to the source device carries, in addition to the first BSSID of the infrastructure network where the Miracast terminal device is located, the MAC address of the Miracast terminal device itself, and then the process of establishing connection between the source device and the Miracast terminal device may be as follows:
step 606: any one determined for the source equipment and Miracast terminal equipment of which the source equipment is in the same infrastructure network are obtained by the source equipment according to the MAC address of the Miracast terminal equipment carried in the detection response message returned by the Miracast terminal equipment.
Specifically, according to the definition of the 802.11wifi specification, the MAC Address of the Miracast terminal device may be generally located in the Address2 field of the MAC frame corresponding to the probe response message returned by the Miracast terminal device, which is not described in detail herein in this embodiment of the present invention.
Step 607: and the source equipment determines the IP address of the Miracast terminal equipment by using RASP according to the obtained MAC address of the Miracast terminal equipment, and establishes connection with the Miracast terminal equipment according to the determined IP address.
Specifically, the source device determines the IP address of the Miracast terminal device by using RASP according to the obtained MAC address of the Miracast terminal device, and the method may specifically perform the following steps S1 to S2:
step S1: the source device sends a RARP broadcast message, wherein the RARP broadcast message carries the MAC address of the Miracast terminal device, so as to inquire which MAC address of the device in the network is the MAC address in the message and request the response message to carry the IP address corresponding to the MAC address;
step S2: receiving the response message of the IP address corresponding to the MAC address of the Miracast terminal equipment, carried by the Miracast terminal equipment, and determining the IP address of the Miracast terminal equipment according to the received RARP response message of the IP address corresponding to the MAC address of the Miracast terminal equipment, carried by the Miracast terminal equipment.
It should be noted that, the establishing of the connection with the Miracast terminal device according to the determined IP address may be specifically implemented as: and establishing session connection with the Miracast terminal equipment by utilizing an RTSP protocol defined by Miracast1.0 according to the determined IP address.
That is to say, in the technical solution provided in the embodiment of the present invention, when determining that the first BSSID of the infrastructure network where the Miracast terminal device is located is carried in the probe response message, corresponding to the probe request broadcast message based on the MAC layer, returned by the Miracast terminal device, it may be determined whether the Miracast terminal device is in the same infrastructure network as the source device by determining whether the first BSSID matches a second BSSID of the infrastructure network in which the source device is located, thus, on the basis of the discovery mechanism compatible with Miracast1.0, the discovery mechanism of the Miracast terminal device based on the infrastructure network architecture is provided, and since the detection request broadcast message and the like sent by the source device are based on the MAC layer, compared with the traditional mechanism for discovering the equipment based on UDP in the infrastructure network, the method has the advantages of less data processing level, high processing speed and the like.
In addition, in the technical solution provided in the embodiment of the present invention, for any determined Miracast terminal device that is in the same Infrastructure network as the source device, the source device may further obtain the MAC address of the Miracast terminal device according to the MAC address of the Miracast terminal device carried in a probe response message returned by the Miracast terminal device, determine the IP address of the Miracast terminal device by using RASP according to the obtained MAC address of the Miracast terminal device, and establish a connection with the Miracast terminal device according to the determined IP address, so that the connection establishment of the Miracast terminal device based on the Infrastructure network may also be implemented, and a blank of a related scheme for implementing the connection of the Miracast device in an Infrastructure network architecture is filled up at present.
EXAMPLE six
Based on the same inventive concept as the first embodiment of the present invention, a sixth embodiment of the present invention provides a source device, and the specific implementation of the source device may refer to the related description in the first embodiment of the method, and repeated parts are not repeated, and a schematic structural diagram of the source device is shown in fig. 7, where the source device mainly includes:
a sending unit 71, configured to send a probe request broadcast message based on an MAC layer to determine whether there is a Miracast terminal device with Miracast capability around the source device;
a receiving unit 72, configured to receive a probe response message returned by each Miracast terminal device;
the processing unit 73 may be configured to determine, for a probe response message returned by any Miracast terminal device, if it is determined that the probe response message carries a first BSSID of an infrastructure network where the Miracast terminal device is located, whether the first BSSID is consistent with a second BSSID of the infrastructure network where the source device is located, and if so, determine that the Miracast terminal device is a Miracast terminal device located in the same infrastructure network as the source device.
The first BSSID is a MAC Address of an AP associated with the Miracast terminal device, and is defined according to an 802.11wifi specification, and the first BSSID may be located in an Address3 domain of a MAC frame corresponding to a probe response message returned by the Miracast terminal device; the second BSSID is the MAC address of the AP associated with the source device.
Further, the processing unit 73 may be further configured to, for a probe response message returned by any Miracast terminal device, determine that the probe response message carries a first BSSID of an infrastructure network where the Miracast terminal device is located and that the first BSSID is not consistent with a second BSSID of the infrastructure network where the source device is located, or determine that the Miracast terminal device and the source device are not in the same infrastructure network if the probe response message does not carry a related BSSID.
Further, in an embodiment, the apparatus may further include:
and the display unit 74 may be configured to display the determined Miracast terminal devices in the same infrastructure network as the source device.
Further, based on the same inventive concept as the second embodiment of the present invention, a sixth embodiment of the present invention further provides another source device, and the specific implementation of the device may refer to the related description in the second embodiment of the method, and repeated details are not repeated, and the schematic structural diagram of the device is shown in fig. 8, where the device mainly includes:
a sending unit 81, configured to send a probe request broadcast message based on an MAC layer to determine whether there is a Miracast terminal device with Miracast capability around the source device;
a receiving unit 82, configured to receive a probe response message returned by each Miracast terminal device;
a processing unit 83, configured to determine, for a probe response message returned by any Miracast terminal device, if it is determined that the probe response message carries a first BSSID of an infrastructure network where the Miracast terminal device is located, whether the first BSSID is consistent with a second BSSID of the infrastructure network where the source device is located, and if so, determine that the Miracast terminal device is a Miracast terminal device in the same infrastructure network as the source device; and the number of the first and second groups,
any one to the definite with source equipment is in the Miracast terminal equipment of same infrastructure network, according to carry in the detection response message that Miracast terminal equipment returned Miracast terminal equipment's MAC address acquires Miracast terminal equipment's MAC address, and according to acquireing Miracast terminal equipment's MAC address utilizes RASP, confirms Miracast terminal equipment's IP address, and, according to confirming the IP address with Miracast terminal equipment establishes the connection.
The method comprises the steps that for any Miracast terminal equipment which is located in the same infrastructure network with source equipment, according to 802.11wifi specification definition, the MAC Address of the Miracast terminal equipment can be located in the Address2 domain of the MAC frame corresponding to the detection response message returned by the Miracast terminal equipment.
Specifically, the processing unit 83 may be specifically configured to send RARP broadcast messages carrying the MAC address of the Miracast terminal device for any Miracast terminal device with the source device being in the same infrastructure network, and determine the IP address of the Miracast terminal device according to the received RARP response message carrying the IP address corresponding to the MAC address of the Miracast terminal device returned by the Miracast terminal device.
Further, based on the same inventive concept as that in the third embodiment of the present invention, a sixth embodiment of the present invention further provides a Miracast terminal device, and specific implementation of the device may refer to related descriptions in the third embodiment of the method, repeated details are not repeated, a schematic structural diagram of the Miracast terminal device is shown in fig. 9, and the Miracast terminal device may mainly include:
a receiving unit 91, configured to receive a probe request broadcast message sent by a source device based on a MAC layer; a sending unit 92, configured to return, to the source device, a probe response message carrying a first BSSID of an infrastructure network where the source device is located if the source device is determined to be located in the infrastructure network, and determine, by the source device, whether the Miracast terminal device is a Miracast terminal device that is located in the same infrastructure network as the source device by determining, according to the first BSSID carried in the probe response message, whether the first BSSID is consistent with a second BSSID of the infrastructure network where the source device is located.
The first BSSID is the MAC Address of the AP associated with the Miracast terminal device and is defined according to 802.11wifi specification, and the first BSSID is located in an Address3 field of the MAC frame corresponding to the probe response message; the second BSSID is the MAC address of the AP associated with the source device.
Further, based on the same inventive concept as the fourth embodiment of the present invention, a sixth embodiment of the present invention further provides another Miracast terminal device, and specific implementation of the device may refer to related descriptions in the fourth embodiment of the method, and repeated descriptions are omitted, a schematic structural diagram of the Miracast terminal device is shown in fig. 10, where the Miracast terminal device mainly includes:
a receiving unit 101, configured to receive a probe request broadcast message sent by a source device based on a MAC layer;
the sending unit 102 is configured to, if it is determined that the source device is in the infrastructure network, return a probe response message carrying a first BSSID of the infrastructure network where the source device is located and a MAC address of the source device to the source device, determine, by the source device, that the Miracast terminal device is the Miracast terminal device in the same infrastructure network as the source device in a manner that the first BSSID is consistent with a second BSSID of the infrastructure network where the source device is located, determine, according to the MAC address, an IP address of the Miracast terminal device, and establish a connection with the Miracast terminal device according to the determined IP address.
The first BSSID is a MAC Address of an AP associated with the Miracast terminal device, and is defined according to an 802.11wifi specification, and the first BSSID may be located in an Address3 field of a MAC frame corresponding to the probe response message; the second BSSID is a MAC address of an AP associated with the source device; the MAC Address may be located in an Address2 field of a MAC frame corresponding to the probe response message.
It should be noted that, structures, functions, and the like of the source device and the Miracast terminal device described in the sixth embodiment of the present invention may also be interchanged, that is, for any device, the device may simultaneously have the structures and functions of the source device and the Miracast terminal device described in the sixth embodiment of the present invention, which is not described in detail in the embodiment of the present invention.
Further, based on the same inventive concept as the first and third embodiments of the present invention, a sixth embodiment of the present invention further provides an apparatus discovery system, and the specific implementation of the system may refer to the related description in the first and third embodiments of the method, and repeated details are not repeated, and a schematic structural diagram of the system is shown in fig. 11, and the apparatus discovery system may mainly include:
the source device 111 may be configured to send a probe request broadcast message based on a MAC layer, to determine whether Miracast terminal devices 112 with Miracast capability exist around the source device 111, and to determine, for a probe response message returned by any Miracast terminal device 112, if it is determined that the probe response message carries a first BSSID of an infrastructure network where the Miracast terminal device 112 is located, whether the first BSSID is consistent with a second BSSID of the infrastructure network where the source device 111 is located, and if so, determine that the Miracast terminal device 112 is a Miracast terminal device 112 in the same infrastructure network as the source device 111;
the Miracast terminal device 112 may be configured to receive a probe request broadcast message sent by the source device 111 based on the MAC layer, and if it is determined that the Miracast terminal device is in the infrastructure network, return a probe response message carrying the first BSSID of the infrastructure network where the Miracast terminal device is located to the source device 111.
Further, based on the same inventive concept as that of the second and fourth embodiments of the present invention, a sixth embodiment of the present invention further provides an apparatus connection system, and specific implementation of the system may refer to related descriptions in the second and fourth embodiments of the method, and repeated descriptions are omitted, a schematic structural diagram of the system is shown in fig. 12, and the apparatus connection system mainly includes:
the source device 121 may be configured to send a probe request broadcast message based on an MAC layer, to determine whether Miracast terminal devices 122 with Miracast capability exist around the source device 121, and determine, for a probe response message returned by any Miracast terminal device 122, if it is determined that the probe response message carries a first BSSID of an infrastructure network in which the Miracast terminal device 122 is located, whether the first BSSID is consistent with a second BSSID of the infrastructure network in which the source device 121 is located, and if so, determine that the Miracast terminal device 122 is the Miracast terminal device 122 located in the same infrastructure network as the source device 121; and the number of the first and second groups,
for any determined Miracast terminal device 122 which is in the same infrastructure network as the source device 121, acquiring the MAC address of the Miracast terminal device 122 according to the MAC address of the Miracast terminal device 122 carried in a probe response message returned by the Miracast terminal device 122, determining the IP address of the Miracast terminal device 122 by using RASP according to the acquired MAC address of the Miracast terminal device 122, and establishing connection with the Miracast terminal device 122 according to the determined IP address;
the Miracast terminal device 122 may be configured to receive a probe request broadcast message sent by the source device 121 based on the MAC layer, and if it is determined that the source device 121 is in the infrastructure network, return a probe response message carrying the first BSSID of the infrastructure network where the source device is located and the MAC address of the source device 121.
That is to say, in the technical solution provided in the sixth embodiment of the present invention, when determining that the first BSSID of the infrastructure network where the Miracast terminal device is located is carried in the probe response message, corresponding to the probe request broadcast message based on the MAC layer, returned by the Miracast terminal device, it may be determined whether the Miracast terminal device is in the same infrastructure network as the source device by determining whether the first BSSID matches a second BSSID of the infrastructure network in which the source device is located, therefore, on the basis of the discovery mechanism compatible with Miracast1.0, the discovery mechanism of the Miracast terminal device based on the infrastructure network architecture is provided, and since the detection request broadcast message and the like sent by the source device are based on the MAC layer, compared with the traditional mechanism for discovering the equipment based on UDP in the infrastructure network, the method has the advantages of less data processing level, high processing speed and the like.
In addition, in the technical solution provided in the sixth embodiment of the present invention, for any determined Miracast terminal device that is in the same Infrastructure network as the source device, the source device may further obtain the MAC address of the Miracast terminal device according to the MAC address of the Miracast terminal device carried in a probe response message returned by the Miracast terminal device, determine the IP address of the Miracast terminal device by using RASP according to the obtained MAC address of the Miracast terminal device, and establish a connection with the Miracast terminal device according to the determined IP address, so that the connection establishment of the Miracast terminal device based on the Infrastructure network may also be implemented, and a blank of a related scheme for implementing the connection of the Miracast device in an Infrastructure network architecture is not filled up at present.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus (device), or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (24)

1. A method for discovering a communication device, the method being applicable to infrastructure network architecture, comprising:
the method comprises the steps that a source communication device sends a detection request broadcast message based on a Media Access Control (MAC) layer to determine whether Miracast terminal equipment with Miracast capability exists around the source communication device;
aiming at a detection response message returned by any Miracast terminal equipment, if the detection response message is determined to carry a first Basic Service Set Identifier (BSSID) of an infrastructure network where the Miracast terminal equipment is located, whether the first BSSID is consistent with a second BSSID of the infrastructure network where the source communication equipment is located is judged, and if the detection response message is determined to carry the first BSSID, the Miracast terminal equipment is determined to be the Miracast terminal equipment which is located in the same infrastructure network with the source communication equipment.
2. The method of claim 1,
the first BSSID is an MAC Address of an access point AP associated with the Miracast terminal device, and the first BSSID is located in a third Address3 domain of an MAC frame corresponding to a probe response message returned by the Miracast terminal device;
the second BSSID is a MAC address of an AP with which the source communication device is associated.
3. The method of claim 1, wherein the method further comprises:
for a probe response message returned by any Miracast terminal device, if it is determined that the probe response message carries a first BSSID of an infrastructure network where the Miracast terminal device is located and it is determined that the first BSSID is not consistent with a second BSSID of the infrastructure network where the source communication device is located, or if it is determined that the probe response message does not carry a related BSSID, it is determined that the Miracast terminal device and the source communication device are not located in the same infrastructure network.
4. The method of claim 1, wherein the method further comprises:
and displaying the determined Miracast terminal equipment which is in the same infrastructure network with the source communication equipment.
5. A communication device connection method based on the communication device discovery method of claim 1, comprising:
aiming at any Miracast terminal equipment which is determined by source communication equipment and is in the same infrastructure network with the source communication equipment, the source communication equipment acquires a Media Access Control (MAC) address of the Miracast terminal equipment according to the MAC address of the Miracast terminal equipment carried in a detection response message returned by the Miracast terminal equipment; and are
And determining the IP address of the network interconnection protocol of the Miracast terminal equipment by utilizing a reverse address translation protocol RASP according to the obtained MAC address of the Miracast terminal equipment, and establishing connection with the Miracast terminal equipment according to the determined IP address.
6. The communication device connection method according to claim 5,
aiming at any Miracast terminal equipment which is positioned in the same infrastructure network with the source communication equipment, the MAC Address of the Miracast terminal equipment is positioned in a second Address2 domain of the MAC frame corresponding to the detection response message returned by the Miracast terminal equipment.
7. The method for connecting communication equipment according to claim 5, wherein determining the IP address of the Miracast terminal equipment by using RASP according to the obtained MAC address of the Miracast terminal equipment includes:
sending RARP broadcast message carrying the MAC address of the Miracast terminal equipment; and are
And determining the IP address of the Miracast terminal equipment according to the received RARP response message which is returned by the Miracast terminal equipment and carries the IP address corresponding to the MAC address of the Miracast terminal equipment.
8. A method for discovering a communication device, the method being applicable to infrastructure network architecture, comprising:
the method comprises the steps that Miracast terminal equipment receives a detection request broadcast message sent by source communication equipment based on a Media Access Control (MAC) layer;
if the source communication device is determined to be in the infrastructure network, returning a probe response message carrying a first Basic Service Set Identifier (BSSID) of the infrastructure network where the source communication device is located to the source communication device, and determining whether the Miracast terminal device is the Miracast terminal device in the same infrastructure network as the source communication device by judging whether the first BSSID is consistent with a second BSSID of the infrastructure network where the source communication device is located according to the first BSSID carried in the probe response message by the source communication device.
9. The method of claim 8,
the first BSSID is a MAC Address of an access point AP associated with the Miracast terminal device, and the first BSSID is located in a third Address3 field of a MAC frame corresponding to the probe response message.
10. A method for connecting a communication device, the method being adapted for use in an infrastructure network architecture, comprising:
the method comprises the steps that Miracast terminal equipment receives a detection request broadcast message sent by source communication equipment based on a Media Access Control (MAC) layer;
if the source communication device is determined to be in the infrastructure network, returning a detection response message carrying a first Basic Service Set Identifier (BSSID) of the infrastructure network where the source communication device is located and a MAC address of the source communication device to the source communication device, determining that the Miracast terminal device is the Miracast terminal device in the same infrastructure network as the source communication device by determining that the first BSSID is consistent with a second BSSID of the infrastructure network where the source communication device is located by the source communication device, determining a network Interconnection Protocol (IP) address of the Miracast terminal device according to the MAC address, and establishing connection with the Miracast terminal device according to the determined IP address.
11. The method of claim 10,
the first BSSID is an MAC Address of an access point AP associated with the Miracast terminal device, and the first BSSID is located in a third Address3 field of an MAC frame corresponding to the probe response message;
the MAC Address is located in the second Address2 field of the MAC frame corresponding to the probe response message.
12. A source communication device, comprising:
a sending unit, configured to send a probe request broadcast message based on a media access control MAC layer to determine whether Miracast terminal devices with Miracast capability exist around the source communication device;
a receiving unit, configured to receive a probe response message returned by each Miracast terminal device;
and the processing unit is used for determining whether the first BSSID is consistent with the second BSSID of the infrastructure network where the source communication equipment is located or not according to a detection response message returned by any Miracast terminal equipment, if the detection response message carries the first BSSID of the infrastructure network where the Miracast terminal equipment is located, and if the first BSSID is consistent with the second BSSID of the infrastructure network where the source communication equipment is located, the Miracast terminal equipment is determined to be the Miracast terminal equipment which is located in the same infrastructure network with the source communication equipment.
13. The apparatus of claim 12,
the first BSSID is an MAC Address of an access point AP associated with the Miracast terminal device, and the first BSSID is located in a third Address3 domain of an MAC frame corresponding to a probe response message returned by the Miracast terminal device;
the second BSSID is a MAC address of an AP with which the source communication device is associated.
14. The apparatus of claim 12,
the processing unit is further configured to determine, for a probe response message returned by any Miracast terminal device, that the Miracast terminal device and the source communication device are not in the same infrastructure network if it is determined that the probe response message carries a first BSSID of the infrastructure network where the Miracast terminal device is located and it is determined that the first BSSID is not consistent with a second BSSID of the infrastructure network where the source communication device is located, or if it is determined that the probe response message does not carry a related BSSID.
15. The apparatus of claim 12, wherein the apparatus further comprises:
and the display unit is used for displaying the determined Miracast terminal equipment which is positioned in the same infrastructure network with the source communication equipment.
16. A source communication device, comprising:
a sending unit, configured to send a probe request broadcast message based on a media access control MAC layer to determine whether Miracast terminal devices with Miracast capability exist around the source communication device;
a receiving unit, configured to receive a probe response message returned by each Miracast terminal device;
a processing unit, configured to determine, for a probe response message returned by any Miracast terminal device, if it is determined that the probe response message carries a first basic service set identifier BSSID of an infrastructure network where the Miracast terminal device is located, whether the first BSSID is consistent with a second BSSID of the infrastructure network where the source communication device is located, and if so, determine that the Miracast terminal device is a Miracast terminal device in the same infrastructure network as the source communication device; and the number of the first and second groups,
any one to confirm with source communication equipment is in the Miracast terminal equipment of same infrastructure network, according to carry in the detection response message that Miracast terminal equipment returned Miracast terminal equipment's MAC address acquires Miracast terminal equipment's MAC address, and according to acquireing Miracast terminal equipment's MAC address utilizes reverse address translation protocol RASP, confirms Miracast terminal equipment's internet protocol IP address, and, according to confirming the IP address with Miracast terminal equipment establishes the connection.
17. The apparatus of claim 16,
aiming at any Miracast terminal equipment which is positioned in the same infrastructure network with the source communication equipment, the MAC Address of the Miracast terminal equipment is positioned in a second Address2 domain of the MAC frame corresponding to the detection response message returned by the Miracast terminal equipment.
18. The apparatus of claim 16,
the processing unit is specifically used for sending the RARP broadcast message carrying the MAC address of the Miracast terminal equipment aiming at any Miracast terminal equipment which is positioned in the same infrastructure network with the source communication equipment, and determining the IP address of the Miracast terminal equipment according to the received RARP response message carrying the IP address corresponding to the MAC address of the Miracast terminal equipment returned by the Miracast terminal equipment.
19. A Miracast terminal device, comprising:
a receiving unit, configured to receive a probe request broadcast message sent by a source communication device based on a media access control MAC layer;
a sending unit, configured to, if it is determined that the source communication device is in an infrastructure network, return a probe response message carrying a first basic service set identifier BSSID of the infrastructure network where the source communication device is located to the source communication device, and determine, by the source communication device according to the first BSSID carried in the probe response message, whether the Miracast terminal device is a Miracast terminal device that is in the same infrastructure network as the source communication device by determining whether the first BSSID is consistent with a second BSSID of the infrastructure network where the source communication device is located.
20. The apparatus of claim 19,
the first BSSID is a MAC Address of an access point AP associated with the Miracast terminal device, and the first BSSID is located in a third Address3 field of a MAC frame corresponding to the probe response message.
21. A Miracast terminal device, comprising:
a receiving unit, configured to receive a probe request broadcast message sent by a source communication device based on a media access control MAC layer;
a sending unit, configured to return a probe response message carrying a first basic service set identifier BSSID of an infrastructure network where the sending unit is located and a MAC address of the sending unit to the source communication device if the sending unit determines that the sending unit is located in the infrastructure network, so that the source communication device determines, after determining that the Miracast terminal device is a Miracast terminal device located in the same infrastructure network as the source communication device in a manner that the first BSSID is consistent with a second BSSID of the infrastructure network where the source communication device is located, the source communication device determines, according to the MAC address, a network interconnection protocol IP address of the Miracast terminal device, and establishes a connection with the Miracast terminal device according to the determined IP address.
22. The apparatus of claim 21,
the first BSSID is an MAC Address of an access point AP associated with the Miracast terminal device, and the first BSSID is located in a third Address3 field of an MAC frame corresponding to the probe response message;
the MAC Address is located in the second Address2 field of the MAC frame corresponding to the probe response message.
23. A communication device discovery system adapted for use in an infrastructure network architecture, comprising:
the source communication device is used for sending a detection request broadcast message based on a Media Access Control (MAC) layer so as to determine whether Miracast terminal equipment with Miracast capability exists around the source communication device or not, and for a detection response message returned by any Miracast terminal equipment, if the detection response message is determined to carry a first Basic Service Set Identifier (BSSID) of an infrastructure network where the Miracast terminal equipment is located, whether the first BSSID is consistent with a second BSSID of the infrastructure network where the source communication equipment is located is judged, and if the detection response message is determined to carry the first BSSID, the Miracast terminal equipment is determined to be Miracast terminal equipment which is located in the same infrastructure network as the source communication equipment;
and the Miracast terminal device is used for receiving the detection request broadcast message sent by the source communication device based on the MAC layer, and returning a detection response message carrying the first BSSID of the infrastructure network where the Miracast terminal device is located to the source communication device if the Miracast terminal device is determined to be located in the infrastructure network.
24. A communication device connection system adapted for use in an infrastructure network architecture, comprising:
the source communication device is used for sending a detection request broadcast message based on a Media Access Control (MAC) layer so as to determine whether Miracast terminal equipment with Miracast capability exists around the source communication device or not, and for a detection response message returned by any Miracast terminal equipment, if the detection response message is determined to carry a first Basic Service Set Identifier (BSSID) of an infrastructure network where the Miracast terminal equipment is located, whether the first BSSID is consistent with a second BSSID of the infrastructure network where the source communication equipment is located is judged, and if the detection response message is determined to carry the first BSSID, the Miracast terminal equipment is determined to be Miracast terminal equipment which is located in the same infrastructure network as the source communication equipment; and the number of the first and second groups,
aiming at any determined Miracast terminal equipment which is in the same infrastructure network with the source communication equipment, acquiring the MAC address of the Miracast terminal equipment according to the MAC address of the Miracast terminal equipment carried in a detection response message returned by the Miracast terminal equipment, determining the IP address of the Miracast terminal equipment by using a reverse address translation protocol RASP according to the acquired MAC address of the Miracast terminal equipment, and establishing connection with the Miracast terminal equipment according to the determined IP address;
and the Miracast terminal device is used for receiving the detection request broadcast message sent by the source communication device based on the MAC layer, and returning a detection response message carrying the first BSSID of the infrastructure network where the Miracast terminal device is located and the MAC address of the Miracast terminal device to the source communication device if the Miracast terminal device is determined to be located in the infrastructure network.
CN201410664665.2A 2014-11-19 2014-11-19 A kind of discovery of equipment and equipment connection method, equipment and system Active CN105682182B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410664665.2A CN105682182B (en) 2014-11-19 2014-11-19 A kind of discovery of equipment and equipment connection method, equipment and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410664665.2A CN105682182B (en) 2014-11-19 2014-11-19 A kind of discovery of equipment and equipment connection method, equipment and system

Publications (2)

Publication Number Publication Date
CN105682182A CN105682182A (en) 2016-06-15
CN105682182B true CN105682182B (en) 2019-05-31

Family

ID=56944937

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410664665.2A Active CN105682182B (en) 2014-11-19 2014-11-19 A kind of discovery of equipment and equipment connection method, equipment and system

Country Status (1)

Country Link
CN (1) CN105682182B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6561965B2 (en) * 2016-10-28 2019-08-21 京セラドキュメントソリューションズ株式会社 Communication device and communication program
US10602557B2 (en) 2016-11-30 2020-03-24 Microsoft Technology Licensing, Llc Discovering and protecting data streams in multi-path communication environments
US10455632B2 (en) 2016-11-30 2019-10-22 Microsoft Technology Licensing, Llc Dynamic identification of network connection preferences
CN108200567B (en) * 2018-01-18 2021-04-16 浙江大华技术股份有限公司 Device discovery method and device
CN109167730B (en) * 2018-08-02 2021-09-07 深圳市共进电子股份有限公司 User equipment detection method, device, equipment and storage medium based on multicast
CN113746945B (en) * 2020-05-30 2023-09-12 华为技术有限公司 Reverse address resolution method and electronic equipment
CN114339709A (en) * 2020-09-30 2022-04-12 华为技术有限公司 Wireless communication method and terminal device
CN113099438A (en) * 2021-03-25 2021-07-09 深圳市铭博达科技有限公司 Wireless screen mirroring method and device based on IP network connection
CN115087132A (en) * 2022-06-08 2022-09-20 苏州华启智能科技有限公司 Miracast-based screen projection method, electronic device and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010072282A1 (en) * 2008-12-23 2010-07-01 Panasonic Corporation Optimized home link detection
CN103476146A (en) * 2013-09-18 2013-12-25 深圳市同洲电子股份有限公司 Data transmission method and system compatible with Miracast
CN103546575A (en) * 2013-10-30 2014-01-29 乐视致新电子科技(天津)有限公司 Method and device for data transmission

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010072282A1 (en) * 2008-12-23 2010-07-01 Panasonic Corporation Optimized home link detection
CN103476146A (en) * 2013-09-18 2013-12-25 深圳市同洲电子股份有限公司 Data transmission method and system compatible with Miracast
CN103546575A (en) * 2013-10-30 2014-01-29 乐视致新电子科技(天津)有限公司 Method and device for data transmission

Also Published As

Publication number Publication date
CN105682182A (en) 2016-06-15

Similar Documents

Publication Publication Date Title
CN105682182B (en) A kind of discovery of equipment and equipment connection method, equipment and system
EP3041183B1 (en) Remote wireless screen sharing method, device and system
US10264038B2 (en) Discovery and management of synchronous audio or video streaming service to multiple sinks in wireless display system
KR102113060B1 (en) Method and system for establishing wireless fidelity direct(wfd) connection in a wfd network environment
CN105100137B (en) A kind of method and electronic equipment of service discovery
CN111427527B (en) Screen projection method, device, equipment and computer readable storage medium
US9781579B2 (en) Method and device for realizing terminal WIFI talkback
US20100011110A1 (en) Mobile terminal to media server connection apparatus, system, and method
US10728344B2 (en) Service discovery method, related device, and system
EP3000214A1 (en) Method for establishing device-to-device communication
EP3114820B1 (en) Method and system for establishing a service session between seeker device and advertiser device
CN106134164A (en) The method and apparatus assigned for fast IP address
JP2018506874A5 (en)
WO2017020790A1 (en) Multi-screen control method and device
CN103856374A (en) Data transmission method, terminal and home interconnected system
WO2018103400A1 (en) Wireless fidelity wifi connection method and related product
WO2015088481A1 (en) Switching to advertising locator after connection establishment
CN103167046B (en) Method, device and system for acquiring multicast address
US11388205B2 (en) Systems and methods for establishing a shared augmented reality session
CN111954162B (en) Method for realizing wireless screen transmission through autonomous networking among multiple devices, screen transmission end and receiving end
CN113573381A (en) Transmission processing method, equipment, device and medium for non-IP type data
CN106713287A (en) Method, apparatus and system for automatically registering wireless access point
CN104284383A (en) Method and device for keeping service continuity
CN105722037B (en) A kind of method and apparatus that wlan device is interacted with WFD equipment
US20180183847A1 (en) Methods and apparatus for collaborative content rendering

Legal Events

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