Musicbox, Pi Zero and AirPlay

Hi everyone, I’m pretty new to this sort of thing and I am hoping someone can help me work out what I am doing wrong.

My question is: where do I look on MusicBox for logs or other things which might help me work out why airplay keeps failing?

The reason I’m asking for help is that I also have 4 other rPi devices running Kodi. And they all work perfectly with AirPlay. But on the MusicBox Pi it seems to be very intermittent. Sometimes I can see the MusicBox device in the AirPlay list. Sometimes I can’t. Sometimes a reboot fixes it, sometimes it doesn’t.

I’ve read other posts about how AirPlay multicast can struggle with certain routers and hopping between 2.4GHz and 5GHz Wi-Fi bands so I get that there may not be a solution to that. But the fact that the othe Pi’s don’t have this issue suggests it’s not that.

The problematic device is a raspberry pi ZeroW with MusicBox running on it. I am using a JustBoom zero DAC to connect to an old iPhone speaker dock (via a 30pin adapter cable with usb for power and 3.5mm audio to the DAC).

Thanks,

Richard

Shairport-sync doesn’t have any logs in pimusicbox so by far the easiest way to debug something like this is to:

  • Disable the Shairport-sync service
  • Login via ssh and run shairport-sync -vvv

Thanks, that’s really helpful. Is there any way to leave that running? When the ssh session closes, I assume shairport-sync will stop? Could I pipe to a text file and review when I find I can’t connect?

Richard

Hi Dickieblack,

In linux you can always use the screen program to leave a session open when you disconnect from ssh.

First, you will need to check if you have it installed. Connect as root via SSH and enter the following command:

apt-cache policy screen

If the software is installed, you will see something similar to

MusicBox# apt-cache policy screen
screen:
Installed: 4.1.0~20120320gitdb59704-7+deb7u1
Candidate: 4.1.0~20120320gitdb59704-7+deb7u1
Version table:
*** 4.1.0~20120320gitdb59704-7+deb7u1 0
500 Index of /raspbian wheezy/main armhf Packages
100 /var/lib/dpkg/status

If it is not installed, then enter the following command

apt-get -y install screen

And now you can start screen with the following command:

screen

The first time it will appear the license summary, press enter and the you will go into the screen session. Now you can exit from it but keep it running pressing “ctrl+a” and then “d”, without the quotes. This will detach the screen session from the ssh.

Now you can logout from ssh.

Next time you login again, you can attach to the previous session please enter the following command

screen -r

This will attach the screen to your actual ssh session. If you have more than one, this command will display all of them and you can select which one you want to connect to. If you start without the -r, it will spawn a new screen session, so don’t forget it.

To learn more about screen, you can read in this link.

Regards,

Nacho

1 Like