Haywire



Haywire is the codename for the video adapters available for the Lightning Connector. These adapters run an embedded operating system based on XNU that takes a compressed video stream over Lightning, and transcodes the signal to one suitable for a standard video output protocol. The iOS device uploads firmware to the adapter upon connection, which then boots to the firmware and continuously outputs video until disconnected.

Based on the ChipID found in, the ARM SoC used is the Samsung S5L8747. Its part number is H9TKNNN2GD. It has 256MB RAM.

There are two variants:


 * B137AP: Lightning Digital AV (i.e. HDMI) Adapter, with ApBoardID=0x00
 * B165AP: Lightning VGA Adapter, with ApBoardID=0x02

The two adapters are the only remaining Samsung S5L-based products still on sale and supported.

Output quality and reliability
There is some discussion regarding the output image quality of the adapters, as the Haywire firmware appears to upscale from an 1600×900 image sent over Lightning, to 1080p with visible (MPEG) compression artifacts. A supposed Apple engineer wrote in 2013:

Airplay is not involved in the operation of this adapter.

It is true that the kernel the adapter SoC boots is based off of XNU, but that’s where the similarities between iOS and the adapter firmware end. The firmware environment doesn’t even run launchd. There’s no shell in the image, there’s no utilities (analogous to what we used to call the “BSD Subsystem” in Mac OS X). It boots straight into a daemon designed to accept incoming data from the host device, decode that data stream, and output it through the A/V connectors. There’s a set of kernel modules that handle the low level data transfer and HDMI output, but that’s about it. I wish I could offer more details then this but I’m posting as AC for a damned good reason.

The reason why this adapter exists is because Lightning is simply not capable of streaming a “raw” HDMI signal across the cable. Lightning is a serial bus. There is no clever wire multiplexing involved. Contrary to the opinions presented in this thread, we didn’t do this to screw the customer. We did this to specifically shift the complexity of the “adapter” bit into the adapter itself, leaving the host hardware free of any concerns in regards to what was hanging off the other end of the Lightning cable. If you wanted to produce a Lightning adapter that offered something like a GPIB port (don’t laugh, I know some guys doing exactly this) on the other end, then the only support you need to implement on the iDevice is in software- not hardware. The GPIB adapter contains all the relevant Lightning -> GPIB circuitry.

It’s vastly the same thing with the HDMI adapter. Lightning doesn’t have anything to do with HDMI at all. Again, it’s just a high speed serial interface. Airplay uses a bunch of hardware h264 encoding technology that we’ve already got access to, so what happens here is that we use the same hardware to encode an output stream on the fly and fire it down the Lightning cable straight into the ARM SoC the guys at Panic discovered. Airplay itself (the network protocol) is NOT involved in this process. The encoded data is transferred as packetized data across the Lightning bus, where it is decoded by the ARM SoC and pushed out over HDMI.

This system essentially allows us to output to any device on the planet, irregardless of the endpoint bus (HDMI, DisplayPort, and any future inventions) by simply producing the relevant adapter that plugs into the Lightning port. Since the iOS device doesn’t care about the hardware hanging off the other end, you don’t need a new iPad or iPhone when a new A/V connector hits the market.

Certain people are aware that the quality could be better and others are working on it. For the time being, the quality was deemed to be suitably acceptable. Given the dynamic nature of the system (and the fact that the firmware is stored in RAM rather then ROM), updates **will** be made available as a part of future iOS updates. When this will happen I can’t say for anonymous reasons, but these concerns haven’t gone unnoticed.

Additionally, based on user reviews of the adapters, the hardware appears to have an unusually high failure rate, in which the adapter ceases to produce any video output. It is unclear why this happens.