Cannot connect via Miracast

I’m trying to connect my tablet to my WD TV player using Miracast, but have not succeeded.
Here is the scenario.
Tablet: Xperia Z2 with Android 4.4
Media Device: WD TV Media Player WDBPUF0000NBK-AESN Firmware 1.02.17.
Miracast option is On. Device Pairing is Auto Accept.
Action on Tablet: Settings>Xperia Connectivity>Screen mirroring>Turn on Screen mirroring>Start searching>WDTV>selectOK
TV displays “Connecting to Xperia Tablet Z_8da5. Please wait…” for about 10 seconds then goes black.
At the same time, the Tablet displays “Preparing to mirror”.
After the TV has gone black, the tablet displays “Unfortunately, Wfd Service has stopped. OK”
A second Tablet message briefly says “Could not turn on Screen mirroring. Please try again later.”
The wifi signal is strong and the tablet is next to the WDTV player.
These are the symptoms, can anyone suggest a cause and solution.

Hi and welcome to the WD community.

I have not tried this since i don’t have this tablet, but lets see if another user can share some tips and information on this matter.

The error you get happened to me just once on my Galaxy S4 phone. I disabled wifi on my phone, then tried screen mirroring again and it worked. Just keep trying and it will connect.

Remember that your home wifi network has nothing to do with Miracast. Miracast is a separte wi-fi connection. It’s possible that your home wifi is interferring with the Miracast connection. Try disabling your tablet’s wifi, then select screen mirroring again. The tablet wifi will then turn back on again by itself and attempt to connect to the WDTV.

Also, you don’t need your tablet next to the WDTV. Perhaps you have the tablet too close. Don’t confuse wifi-direct with NFC! Miracast works fine from several metres away.