Skip to content

nascentobjects/AirPlayExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Nascent AirPlay Example

Turn any Nascent Objects device with a speaker module into an AirPlay-enabled speaker.

Compatible Devices

This process will work with any Nascent Objects product that contains a speaker module. Some examples of supported products include:

Connecting to Your Device

To setup your device as an AirPlay-enabled speaker you first need to setup its wifi and connect to it.

  • Start by inserting your main module, speaker module, and any other modules into your shape and plug it in.

  • Wait 2 minutes for it to boot.

  • Once booted, press the button on the back of your main module to enable wifi setup. Once pressed, the button's light should blink on and off.

Connect Image

The main module is now broadcasting as a wireless access point.

  • Connect your computer or mobile device to:
SSID:Nascent Main
Password:prototype
  • Once successfully connected to the access point, open a web browser and navigate to:

http://192.168.42.1

  • Use the device setup web portal to set your:

    1. SSH Password
    2. Device Name
    3. Home Wifi Network
  • Once the device is connected to your wireless network, connect your computer or mobile phone back to your home wireless network.

You should now be able to ssh into the device with a command similar to:

ssh root@[DEVICE_NAME].local

Where [DEVICE_NAME] and the ssh password are the ones you specified.

The rest of this setup process should be performed on device from an active SSH session.

Installing Dependencies

You will be setting up AirPlay support using shairport-sync. To do that, you must first install a few dependencies:

Avahi

By default your Nascent Main Module uses mdns for zero-conf networking, but Shairport-Sync wants Avahi.

opkg update
systemctl stop mdns
opkg install avahi
systemctl enable avahi-daemon
systemctl start avahi-daemon
systemctl disable mdns
opkg install avahi-dev

libconfig

opkg install coreutils
wget --no-check-certificate http://www.hyperrealm.com/libconfig/libconfig-1.5.tar.gz
cd libconfig-1.5
./configure --prefix=/usr
make
make install
cd ..

Other Dependencies

opkg install libdaemon-dev
opkg install libpopt-dev
opkg install alsa-lib-dev

Compiling Shairport-Sync

git clone https://github.com/mikebrady/shairport-sync

getent group shairport-sync &>/dev/null || groupadd -r shairport-sync >/dev/null
getent passwd shairport-sync &> /dev/null || useradd -r -M -g shairport-sync -s /usr/bin/nologin -G audio shairport-sync >/dev/null

cd shairport-sync
autoreconf -i -f
./configure --with-alsa --with-avahi --with-ssl=openssl --with-systemd
make
make install
cd ..

Configure Shairport-Sync

You now need to configure shairport sync to use your speaker module. You can configure this manually by editing /etc/shairport-sync.conf to whatever settings you like, but to make things easy we've included a script to generate a config file that will be compatible with your nascent device.

git clone https://github.com/nascentobjects/AirPlayExample
cd AirPlayExample
bash ./generate_shairport_conf.sh
cd ./shairport-sync.conf /etc/

Start and Enable Shairport-Sync Service

Enable the systemd service to start your airplay speaker service automatically at boot.

systemctl enable shairport-sync
systemctl start shairport-sync

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages