My miracast dongle arrived today so i thought i'd report my findings so far...
I bought a
Measy A2W, just £20 from Ebay.
The dongle is advertised as being compatible with Windows/Mac OS X/iOS and Android.
To configure the dongle you need to install a client program on your device, so on my Galaxy S3 i installed the
EZCast application.
I first got EZCast working in 'cast' mode, it enables me to display media, web content and other stuff on my HD TV - the EZCast app casting the content to the external display.
Next i tried the 'mirror' mode - this was the mode that was most important to me and of course it didn't work!
Followed the instructions many times, rebooted a few times but it didn't work.
Everything progressed as expected and the S3 'Screen mirroring' activity showed a toast message saying it'd successfully connected to the dongle.
But that was always immediately followed by a message box that said 'Unable to start Screen Mirroring because of a hardware issue'.
A Google showed it to be a common problem, there's a
thread on xda that explains the problem:
A modified (rooted) device fails the HDCP protection check and therefore any attempts to enable screen mirroring fail.
(My S3 is rooted).
That thread shows hows to overwite the default 'libWFD_ENGINE.so' file with a modified version that has this HDCP protection check disabled.
The thread is not aimed at the S3 though and i didn't feel like bricking my S3 with a modification intended for a different Samsung device.
A bit more Googling led me to the
ScreenMirroring Patch utility on the Play Store.
Seems that a lot of Samsung users have had a device with working AllShare Cast and then updated their firmware and found that AllShare Cast no longer works.
This seems to have happened with official Samsung firmware updates - it's not something that only applies to custom ROMs.
So the ScreenMirroring Patch patches some system file(s) and
hopefully AllShare Cast will now work again.
And a last Google found
this thread where it mentions rooted Samsung devices not working with AllShare Cast and suggests using
Triangle Away to reset the device's internal 'flash counter' back to zero.
Resetting the flash counter to zero means that the device appears as though it's not been rooted and therefore doesn't fail the HDCP protection check.
Triangle Away is not free but it is only £1.99.
(Though if you're an xda forum member you can search for and find it available for free on the xda forum).
So i ran Triangle Away and the ScreenMirroring Patch and rebooted and at last my dongle worked as a 'normal' mircast dongle mirroring the device screen to my TV.
I then ran the demo project from post #2 in this thread and it worked - the CWAC-Presentation library successfully detecting the external monitor and displaying my custom content on it

.
EZCast also worked perfectly in 'cast' mode on both my 7" Tab2 and Moto G but so far i've been unable to get mirror mode to work on these two devices.
Neither device officially supports miracast and both need a bit of a hack to even try to get mirror mode to work:
The Tab2 required me to install the
Wifi Display helper, free from the Play Store.
The Wifi Display helper simply starts the 'Wireless display' settings activity, there's no way to start this activity by default on the Tab2.
The Moto G required a hack to the device's 'build.prop' configuration file.
I changed the line:
persist.debug.wfd.enable=0
to:
persist.debug.wfd.enable=1
and rebooted.
By default the Moto G (with KitKat) allows the user to start the 'Wireless display' settings activity, but the all important checkbox to 'Enable wireless display' is not shown.
The build.prop hack enables display of this checkbox.
So the Tab2 and Moto G both now have the available software settings to enable and configure mirror mode, and
in theory(!) they both have the required hardware but so far i've not got it working.
I suspect mirror mode has not been enabled on these two devices for a reason (it doesn't work lol) and hacking the device isn't gonna change the fact that it doesn't work.
Anyway - my next experiment is to connect two external displays to my S3!
One connected with my MHL adapter and one with the Measy A2W in mirror mode.
The CWAC-Presentation library requests all 'presentation capable' external displays from the device, the device returns an array of zero or more connected presentation capable external displays.
If this array has a size of more than zero then the CWAC-Presentation library takes the first display in that array and raises the
ShowPresentation(Display1 As Display) event.
Any other displays in that array are simply not actioned - the original android library didn't anticipate a device having more than one external display connected at any one time.
So i'll be trying to get two external displays to work at the same time and that might involve an update to the CWAC-Presentation library if successful.
And i've now researched the various methods available to connect to a Chromecast and am planning to start the B4A Chromecast library this weekend.
I'll keep this thread updated.
Martin.