January 27th, 2016
NOTE: THIS PROGRAM CONTINUES TO WORK WITH IOS7 BUT DOES NOT WITH THE NEW IOS8. AS APPLETV HAS AN OFFICIAL SOLUTION TO THE PROBLEM OF AIRPLAY OVER SUBNETS/VLANS WHEN USING IOS8, I WILL NOT BE UPDATING THIS PROGRAM TO WORK WITH IOS8.
Airplay is brilliant. It lets you stream from your iPad or iPhone to an Apple TV or to your computer when using software like Airserver or Reflection. The problem is that it only works if your iPad or iPhone and the device you’re streaming to are on the same network. If you’re network is separated up into subnets/VLANs and the devices are on separate ones then it just won’t work.
One solution to this is a Bonjour gateway. But these have inherent problems – firstly for a home user with a simple, but sub netted, network it’s too complicated to set up. Secondly – for a large network such as a school, university, or business, these overwhelm the end user with device choices because each one is broadcast through.
“Pairplay” is a program that tells an iPad or iPhone that an “Airplay capable device (e.g. an Apple TV) exists here”. regardless of sub netting, networks, and VLANs. Only the iPad or iPhone told about this device is aware of this information.
Pairplay is free for home use (though feel free to Donate if you like it).
For business use the cost is £2 per machine license. For education and charities the cost is £1 per machine license. Licenses are per PC that you actually want to run the program on. The download is not crippled, you are free to test the program and get it working on your network before paying.
To pay please use the “Buy Now” link below. Paypal accepts all major credit cards. After choosing the price drop down and clicking the button you will be given the opportunity to set the quantity you need.
Download Pairplay by clicking this link and install it.
Pairplay is a command line program. This is so that it can be added to network startup scripts as necessary. You will find it in a folder called Pairplay in either the Program Files folder or the Program Files (x86) folder on your hard drive.
You must initiate airplay by passing the following parameters:
Name – the name you would like your iPad or iPhone to show the apple TV as. It is best, although not essential, to make this a different name to the real AppleTV name. e.g. -Airplay would make the iPad/iPhone show a device called “-Airplay”. I suggest the – sign in front because it generally sorts the name to the top of any list of devices; which is handy in a big network with many devices. (note: currently spaces are not accepted in the name)
Ipad IP Address – or iPhone ip address! This is the IP Address of the device you want to tell about the airplay service on the network. In small home networks this will nearly always be the same. In large networks it might be useful to statically assign IPs to your iPads or use reservations. On the iPad you can find your IP address by going to Settings->Wifi->and then clicking the “i” next to your connected wifi network.
Airplay IP Address – the IP address of the airplay device (AppleTV,Airserver,etc) you would like to tell the iPad/iPhone about.
Hide – a true or false value which determines what happens to the console window when the program starts. If you are running this manually from the command line you should set this value to false. If you are running from a login script then you will want to set this value to true. A true value will hide the console window from the user.
Wait – a true or false value that indicates whether or not pairplay should wait for more than a couple of seconds if the airplay device doesn’t respond to it. Normally this would be false for an apple TV but true for a software solution.
My iPad is on IP address 192.168.2.101 . I have an AppleTV on 192.168.2.100. I would like to tell my iPad that the it’s name should show as MyTV.
pairplay MyTV 192.168.2.101 192.168.2.100 false false
From a login script I would like to let the iPad on IP 192.168.2.101 know about the software airplay solution on 192.168.2.100. I would like to name it -LocalAirplay and hide the airplay program from showing.
pairplay -LocalAirplay 192.168.2.101 192.168.2.100 true true
That’s All You Need To Know. But for the curious….Here Comes The Science Bit
How airplay works…
An airplay device such as an AppleTV or their software equivalents (Airserver, Reflection, etc) announce themselves using a technology called mDNS. This is a local multicast technology. It cannot traverse subnets. UDP from device to device, of course, can.
When you initiate pairplay it first sends a UDP packet straight to the airplay device asking for information (note: it doesn’t use multicast so this is routable). The software equivalents will tend to send back data directly – i.e. not using multicast. So now airplay knows the necessary details about their airplay service. The apple TV either doesn’t reply or multicasts it or sets the TTL to 1 – I’ve not checked specifically but in any case there’s no routed response. So after a timeout period pairplay will assume that it is an apple TV and assume a default set of service details.
At this point pairplay knows the necessary details about the Airplay device. It makes a few tweaks to them – most notable it changes the name to the one you’ve specified.
It then sends this by UDP directly to the iPad/iPhone IP address your specified. By not multicasting this it is routable across subnets and means that only the device we intend to know about it knows about it (i.e. other ipads/iphones won’t add it to their airplay browse lists).
pairplay repeatedly tells your iPad/iPhone about the device, every 5 seconds, because iOS is prone to forget.