This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Miracast how to?

0

I have Wireshark installed on my Surface Pro 4. When I try to make a miracast connection between the Surface and a MS Wireless Display Adapter, Wireshark shows no packets at all. What am I doing wrong?

asked 22 Jan '17, 23:54

Geedsen's gravatar image

Geedsen
6112
accept rate: 0%

Are you able to capture WiFi traffic without performing Miracast?

Try connecting your Surface Pro 4 to a WiFi router. Start Wireshark and capture on the WiFi interface. Generate some traffic on the tablet (perform a web browse). Do you see any WiFi traffic?

(25 Jan '17, 07:18) Amato_C

Yes, connecting to a Wifi network captures packets just fine. I know for certain that it actually is communicating between the Adapter and the Surface, I can see that on the HDTV screen. It says 'Connecting' but it fails. That is what I am trying to solve. Microsoft support was unable to help me there.

(25 Jan '17, 07:56) Geedsen

Just to clarify - the Miracast connection is failing regardless if you are capturing with Wireshark over the WiFi interface?

I am trying to determine if the Wireshark capture is causing the Miracast failure or not.

(25 Jan '17, 10:01) Amato_C

Yes regardless, it is/was failing even before Wireshark was installed on the surface. I installed to see if I could get some information out of the miracast communication that could help me solve the problem.

(25 Jan '17, 11:38) Geedsen

One Answer:

0

Good to hear. So now we know that Wireshark is NOT causing the failure for the 2 Miracast devices to connect. So let us do some Miracast troubleshooting. For all these suggestions, please ensure that you are NOT capturing with Wireshark. I am unsure if Wireshark capturing on the WiFi interface during a Miracast connection attempt will cause an unexpected failure.

  1. Ensure both devices (tablet and adapter) support Miracast and NOT some other display protocol (e.g., Chromecast, DLNA, etc). This might seem trivial, but a lot of proprietary protocols exist out there and they all try to use wording close to Miracast or Mirroring.
  2. Verify what type of connection topology is used to establish the Miracast connection. The Miracast specification (called WiFi Display) allows for either P2P (Peer-to-Peer) or TDLS (Tunneled Direct Link Setup). P2P is the most common for Miracast connection and both topologies SHOULD be supported by the tablet and adapter. However, if one only supports P2P and the other only supports TDLS, then the connection will never be made. To test if TDLS is used, connect both the adapter and the tablet to the SAME WiFi network. For P2P, connecting to a WiFi network is not required.
  3. As stated earlier, P2P is the most common topology for a Miracast connection. With P2P, an AP is not required. Therefore, verify that neither the adapter NOR the tablet is connected to any WiFi network. There are times when a busy WiFi interface could cause a Miracast connection to fail.
  4. Try to mirror non-copyrighted material. The easiest thing to do is to try to mirror the screen of your tablet. More about copyright material in the next suggestion :)
  5. If possible, try to change the copyright settings on your adapter. Some adapters allow you to enable or disable different settings. One of the biggest culprits for causing a Miracast connection to fail is having copyright enabled (or disabled - whichever is the default of the adapter). So if your adapter's default setting for copyright is ON, try turning it OFF.

Good luck. Hope this helps!

answered 25 Jan '17, 12:58

Amato_C's gravatar image

Amato_C
1.1k142032
accept rate: 14%

Thanks Amato,

1) Both devices support the Miracast adapter. They are both Microsoft products. 2 + 3) I disconnected the Surface from any network. Then I do a 'Connect' from the Surface. The HDTV then shows 'Connecting to SURFACE', so that must mean it is trying to connect using P2P. The Surface shows 'Couldn't connect' after some time while the HDTV is still showing 'Connecting to SURFACE' for a minute or so, before going back to the start screen. 4 + 5 I never get to the mirroring part. I don't get a connection.

Interesting might be that I also have a Lumia (Microsoft) 950 XL, that one has no problem connecting to the Display Adapter. Also without having a Network connection to my AP.

(26 Jan '17, 00:08) Geedsen
  1. Regarding the copyright settings on the adapter: Some adapters allow the user to make changes BEFORE the Miracast connection is initiated. For example, the adapter connects to a TV. Using the TV's remote control, the user can access the adapter's setting menu and disable/enable the copyright settings (usually referred to as HDCP 2.0 or HDCP2.1).

  2. I checked the WiFi Alliance (WFA) website and found that neither the Surface Pro 4 nor the Lumia 950 XL were certified for Miracast. Microsoft did certify other products with the WFA for Miracast, but not the 2 you mentioned. I was hoping to find either product certified by the WFA. Then that could help us. Oh well. :(

  3. If you would like to pursue this further, my suggestion is to NOT use the Surface Pro 4 as your wireless packet capture device. Instead, you could use a laptop to capture the WiFi traffic for the attempted Miracast connection. The following link is a good starting point: https://wiki.wireshark.org/CaptureSetup/WLAN

(26 Jan '17, 06:36) Amato_C