Raspberry Pi as a Car AirPlay Receiver

This can also be done with an Airport Express and a DC inverter. Using a RaspberryPi is slightly less expensive and more fun to setup.

 

Parts List:

  • $25/$35 – RaspberryPi (model A or B)
  • $8 – case
  • $9 – car usb power adapter
  • $3 – usb cable
  • $12 – usb wifi adapter (148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter)
  • $6 – 8 GB SD memory card
  • $1 – 3.5″ audio cable

Total: $64/$74 (depending on rPI model)

 

There are a lot of high quality howto guides around the net, but I haven’t found one that combines all the necessary steps. These steps are:

  1. Install Raspbian
  2. Setup Shairport
  3. Setup Wi-Fi in AP mode
  4. Configure Raspbian to boot into read-only mode
  5. Configure iPhone/iPad

1. Install Raspbian to the SD Card

2. Install shairport and configure audio:

3. Setup Wi-Fi Adapter in AP mode

/etc/hostapd/hostapd.conf
interface=wlan0
driver=nl80211
ssid=CarPi
hw_mode=g
channel=11
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=password
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

4. Configure Raspbian to boot into read-only mode

5. Connect to the rPI network

  • Select the Wi-Fi network on your iPhone. It’ll connect to the network, but without DNS and Gateway settings you’ll still be able to use your cellular connection for data, so iTunes Match, Pandora, etc will still work.

Results

At this point it works great during home testing. I can stream audio from the internet on my phone and have it play on the 3.5mm audio jack on the Raspberry Pi without stuttering or buffering. However, car testing has not worked well. I get frequent drops, which I’m attributing to Wi-Fi interference. I’m thinking a 5GHz Wi-Fi connecting will fix this problem, but I’ve yet to find a mini adapter that will work.