AirPlay WiFi speaker

2013-12-21 18:11 | Categories: In English, Projektai, Užrašai

caraplay_rApple portable devices have nice feature to listen for music over the air. It is called AirPlay. On the other hand OpenWrt has tools (avahi and shairport) to play audio stream from your gadgets. It would be shame not to use Carambola2 board to play music from Apple device. Let’s build WiFi speaker for AirPlay devices.

Easy setup instructions

If you wish to use wireless speaker and don’t care about how it works, these instructions are for you:

  • Connect USB cable to Carambola and run terminal (putty, minicom, picocom, screen, or any other)
  • Ensure you have network connectivity by pinging your favorite web page
  • Type in Carambola’s terminal
cd /tmp
sysupgrade -v -n carambola2_shairport.bin


Wait until firmware is flashed and setup preferred network connectivity again, because all your settings are gone.


Connection diagram

To connect to your wireless home router adjust config files like this (STA mode):

uci set wireless.@wifi-device[0].disabled=0
uci set wireless.@wifi-iface[0].network='wwan'
uci set wireless.@wifi-iface[0].mode='sta'
uci set wireless.@wifi-iface[0].ssid='_your_home_router_'
uci set wireless.@wifi-iface[0].key='_password_to_router_'
uci set wireless.@wifi-iface[0].encryption='psk2'

uci set network.wwan=interface
uci set network.wwan.proto=dhcp

uci commit

 Some notes:

  • If you have questions about configuring OpenWrt 8devices wiki is good place to get started
  • I had failure by using WAN port, so use LAN port (on the same side as USB connector) or Wireless interface

Use with Macbook

  • Set some music playing or movie on your mac computer
  • Go to: MAC -> System Preferences / Sound / Output
  • Select AirPort / AirPlay
Screenshot 2013-12-21 19.19.08

Change output to AirPlay device

Use with iOS 7 gadget

From lock screen select AirPlay / <device_name>

2013-12-21 22.10.042013-12-21 22.04.31
















Build your own system

  • Checkout latest Carambola sources
  • Add Shairport repository to feeds (add new source to the end of feeds.conf.default)
src-git jlars git://;master
  • enable packages: kmod-usb-audio kmod-usb-ohci kmod-usb2 shairport
  • build (make)
  • Edit file
  •  Find and and comment line
// tFamily = AF_INET6;
  • Build again (make)
  • You should have compiled openwrt image with enabled shairport.
  1. Saulius Lukšė
    2013-12-21 21:26

    Just tested Android tablet with AirAudio application – works!

  2. ThorstenS
    2013-12-23 20:41

    sounds really nice dude!
    Please, would you also tell us about your audio hardware (speaker/soundcard)?

    thanks alot

  3. Saulius Lukšė
    2013-12-23 21:24

    ThorstenS, I tried couple of USB sound cards. One was branded by Logitech, another was unknown Chinese crap. Both worked. Look for information if sound cards is supported by Linux and there is great chance it will work. Speakers – your choice :)

  4. ThorstenS
    2014-02-24 19:23

    thank you!

You must be logged in to post a comment.