Digital Foundry on how the controller was reverse-engineered - and exactly how it works.
More at the link
The GamePad itself isn't anywhere near as complex as even the most basic Android tablet - essentially it's a standard game controller, with a touch-screen and a WiFi card, paired up with a decoder chip for the incoming video stream. Controller inputs themselves are beamed back to the Wii U via the same WiFi channel (180 times per second no less), in contrast to the Bluetooth employed by the Wiimote.
"Video is compressed using h.264 (baseline profile, so no B frames)," Bourdon shares. "Audio is usually uncompressed, but we've found mentions of compressed audio formats in the firmware... We found mentions of [Miracast] when we started working on the GamePad, but it turned out to be false. There is no Miracast anywhere in that GamePad. Audio, video and input streaming is done over custom protocols."
"I don't see any reason why it could not send GamePad video/audio to the internet (both internet and GamePad might be difficult/impossible)," offers Bourdon. "The firmware of the chip handling communication with the GamePad (called DRH) can be upgraded, so this might be in Nintendo's future plans. Only speculation though, we didn't see anything in the firmware that would indicate they are planning to do this."
More at the link