

In the iPhone/iPod Touch acceptance response, we send back a magic GUID ( cmpg) that iTunes then stores internally. It returns the MD5 to the iPhone/iPod Touch asking "does this match?" In our case, we don't need to know anything about this MD5 because we can naïvely return back saying "yep, it matches." This also means we don't care what the user enters for a PIN. ITunes combines this PIN code with the MDNS Pair value above in what appears to be an MD5 sum. When you click, it prompts you for a 4-digit PIN code.

Once this service appears on the network, iTunes shows it along the left-edge of its screen. In my experience iTunes doesn't like working with all-0 values, so I threw one bit in there to make it happy. Michael Croes observed this MDNS format a few weeks ago. It does this by advertising a _touch-remote._tcp.local with some TXT entries with information about the remote and a 64-bit Pair hex string: When a remote client first arrives on the network, it needs to pair itself with iTunes. Which instantly gives us the tree-formatted output shown several places below. This could also have been done by extending the Wireshark DAAP plugin, but it's helpful to pipe live curl requests to the script: Here are some still screenshots:ĭuring this process I wrote a Python script to help decode the binary messages that come back from HTTP requests.
#PAIR ITUNES REMOTE WITH PC ANDROID#
The Android app uses the MjDNS Java library for all Bonjour handshaking, and the icon is a mashup of several icons from the Tango Desktop Project. Under a GPLv3 license, and you can grab it from Subversion on Google Code:
#PAIR ITUNES REMOTE WITH PC APK#
If you're interested in jumping right in, here's an APK ready to install. Here's a quick video in action on the emulator: This works out of the box without installing any extra software on your PC or Mac. Now you can remote control your iTunes from your new Android phone when it arrives later this year. With the protocol now reverse engineered, I wrote an Android client in about a week. After a few days in front of packet dumps, I have most of DACP decoded. DACP is the protocol used by the Remote app on the iPhone/iPod Touch to remote control your desktop or laptop iTunes player.ĭACP is similar to the well-known DAAP, using Bonjour MDNS to find libraries, then using HTTP requests with binary responses to transfer data. The Digital Audio Control Protocol (DACP) was recently introduced by Apple, and is built into all recent iTunes™ versions. TunesRemote: Android DACP/iTunes Remote Control Android DACP Remote Control
