Filed under AirPort Express , General , iHomeServer , iTunes
So you've built a multi-room AirPlay setup; an Airport Express in every room hooked to a killer amp. It's all working just great, but then just as you're about to woo the girl of your dreams by playing "Wonderful Tonight" simultaneously in every room of the house, you get the dreaded 'drop-out' or worse still, 'Bedroom Speakers' disappears from the speakers menu of your iPhone Remote App!
By and large, if your network is configured properly, and your Wifi network isn't stretched, AirPlay works just fine. However, this blog post aims to list the top 10 things that we have found can improve AirPlay performance, particularly with AirPort Expresses. Hope you find them useful:
1. Check your firewall settings
If AirPlay doesn't work at all, you have a firewall issue. Windows Firewall (and other third party software) aggressively blocks incoming ports that AirPlay relies on so ensure you leave exclusions open for your AirPlay devices. On the computer that is running iTunes, ensure at least the following ports are open bidirectionarlly:
TCP: 80, 443, 3689 (for Remote)
For ease, unless you are paranoid about security, you can open all ports to and from your AirPort Express devices, or define "allow all" rules for your internal subnet to talk to itself.
2. Choose a clear channel on your WiFi network
One major cause of drop-outs when trying to stream audio or video over Wifi is poor signal strength. When Wifi routers start up, most scan the Wifi frequency range to look for an unoccupied area in which to sit. They then set their channel to correspond to this area. The problem is that things change - eg channel 5 was fine at 2pm, but then the neighbours get home from holiday, turn their Wifi on/off and bam, you end up conflicting for the same frequency which can cripple your bandwidth.
Use an app like 'inSSIDer 2.0' to view the Wifi frequency spectrum. Sample it over hours, over days - look for patterns and find out which part of the frequency spectrum is the least crowded. Then log on to your wifi router and force the channel to correspond to this range. Keep checking back over time to make sure you still own your frequency space!
Our test wifi "testwifi" is shown below with a clear amount of frequency space around it lowering the risk of interference from other wifi sources:
3. Switch from the 2.4Ghz range to the less crowded 802.11n 5Ghz range
Just because you bought an 802.11n compatible Wifi router, doesn't mean you're actually using it!!!! Many routers come configured by default to use g/n compatibility mode which actually means they run in the 2.4Ghz range. Everybody's using this range so it is the most crowded and therefore must susceptible to interference. Log in to your router and switch from mixed mode to the dedicated 5Ghz (n) mode.
Unless your neighbours all read this, you may well end up (as I do) as the only 5Ghz user so you can enjoy the 5Ghz bandwidth to yourself!! See the inSSIDer graph for the 5GHz range in my location below:
4. Go wired instead of wireless, or use a HomePlug
If you have continual problems with Wifi AirPlay devices, consider switching to a wired network instead. For example, if you have low signal strength in an area that you wish to place some AirPort Express attached speakers, either plumb some CAT5 Ethernet cable in or install a couple of HomePlug devices. A pair of these can be bought from Amazon for 40UKP, are easy to set up and don't suffer from the same types of interference that Wifi does. Whilst they make for a less elegant/compact solution (two boxes instead of one!), they are invaluable way of getting over your Wifi media streaming woes.
5. Use static IP addresses instead of DHCP
In this blog, we're looking at ways of minimising outage; reducing reasons why an Airport Express can drop off a network, temporarily or permanently! DHCP is a great protocol, however, in our testing, some Airport Expresses, particularly the early ones, would give up the ghost if they couldn't get an IP address over wireless rapidly. We eliminate this by always giving Airport Expresses static IP addresses removing the requirement for a DHCP handshake and making you know with certainly what IP address they are using.
6. Use up-to-date firmware
Sounds obvious but is worth double checking - always use the latest firmware that is available for your individual devices. The early Airport Expresses (the ones that don't support 'N') should be running at least firmware 6.3. The latter 'N' Airport Expresses should be running 7.5.2 or later.
7. Continuously ping your Airport Expresses
This one is slightly controversial, however, in our experience, Airport Expresses that are on the edge of our wifi network stay up for longer when we continuously ping them, eg
ping 10.0.0.205 /t
... where 10.0.0.205 is the address of the AirPort Express. There isn't much science behind this, other than we wonder whether the AE's go into a power conservation mode if they are not used for a while and the ping prevents this. However, this is just conjecture!
8. Synchronise your AirPort Express time using NTP
Some forum members are convinced that synchronised clocks are required for multi-room streaming. We are less convinced, but configure it out of habit anyway. In the AirPort Utility configuration, under AirPort / General, click 'Set the time automatically' and then enter ensure that it is set to an NTP source that is reachable from that device. If you have a Domain Controller in your network, set it to the domain controller.
9. Ensure all your devices are on the same subnet
AirPlay devices communicate using broadcast addresses which must reside within the same network subnet. For the vast majority of home users this is not a problem, however, if you have multiple routers or configure your wifi router to create a separate network off of your main wired network then you will potentially be operating two subnets across which AirPlay cannot traverse. Create a flat network by ensuring all your network devices operate in 'bridged mode' except for the router that connects to your internet connection. Check the subnet masks of each computer network adaptor and network device to ensure they are consistent.
10. Turn off IPv6 on your computer
AirPort Expresses, by default, advertise their services (including AirPlay services) as being available on both IPv4 and IPv6 addresses. If you have IPv6 active on your computer, it is possible that iTunes will try to use the IPv6 stack to communicate with your Airport Express. Unless IPv6 is configured correctly, this may not succeed, or at least is a lot harder to root-cause-diagnose unless you've read Dummy's Guide to IPv6!
Instead, simply turn off the IPv6 stack on your computer by following these steps:
- Click Start / Control Panel
- Click 'Network and Sharing Center'
- Click 'Change Adaptor Settings'
- Right click your network adaptor and select 'Properties...'
- Untick 'Internet Protocol Version 6 (TCP/IPv6):
11 If all else fails - analyse your mDNS (multi-cast DNS) traffic
AirPlay devices advertise themselves using the mDNS or multicast DNS protocol. You can inspect this using Wireshark on a Windows PC where you will see periodic requests for services from your iTunes machine and multiple responses from the AirPlay devices on your network. We use the wonderful "mDNS Watch" which is a free app available on iOS to understand how mDNS is working on our networks.
Once installed, open the App, and then click 'local.', then 'Remote Audio Output Protocol' as follows:
You should now get a list of all the devices that are advertising themselves as AirPlay audio devices. If you are missing a device from this list, then there is a connectivity or configuration issue preventing it from advertising itself on the network. This could be any of the issues above, however, if mDNS Watch can't find it, then there is no way that iTunes will so at least you know the problem is outside of the iTunes domain!
Once you have found the AirPlay device you are interested in, click on the device name, and you will see further information about that device:
Here you can see capabilities metadata associated with the device (eg sr=44100 = the maximum sample rate available). More importantly, you can see the IP address that the AirPlay device thinks that it should be listening on and it's port.
Ensure that at least one of these addresses is on the same subnet as your iTunes instance. You will also notice in the example above, a 169.254.x.x address and an IPv6 address. I haven't worked out what the 169.254.x.x actually corresponds to; the AE is configured to create a new wifi network but connect into my core network in bridge mode. The IPv6 address is advertised and is valid, however, will not get used unless your computer is also configured with an IPv6 address.
So I realise number  isn't exactly a quick fix way of improving the performance of your AirPort Expresses, however it's a useful way of diagnosing AirPlay issues
12 Switch or upgrade your wireless router
If you only get issues when using wifi (and not, for example, if your AirPort Express is wired into your LAN), then focus more on your wireless router. We saw a Netgear WNDR-3400 router which was giving its owner lots of AirPlay grief - airport expresses just disappearing off the network. We upgraded the router to use the brilliant opensource DD-WRT firmware instead of the Netgear stock and all the AirPlay issues disappeared overnight. Highly recommended if DD-WRT supports your router model.
Hope these suggestions have been of use to you. If you know of any others, please leave me a comment and I'll add them in! Happy Air-Playing....!