New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finds shairport-sync source from iTunes on OS X, but not from iOS9 #197

Closed
ostephens opened this Issue Jan 8, 2016 · 6 comments

Comments

Projects
None yet
2 participants
@ostephens

ostephens commented Jan 8, 2016

I've recently setup a Raspberry Pi running shairport-sync.

When I use iTunes on OS X I reliably see the raspberry pi as a Airplay option.
However, when I use an iOS 9 device I don't see the raspberry pi as an option until I use iTunes on OS X to play via the Pi. The Pi seems to continue to show as a device on the iOS device for some period of time after iTunes has been used, and while it shows, it works fine. However, eventually the Pi disappears from the list and doesn't appear again until I connect via iTunes again.

Running shairport-sync I see:

pi@raspberrypi ~/shairport-sync $ shairport-sync -a "Kitchen"  -v -- -d default -c PCM
Looking for the configuration file "/etc/shairport-sync.conf".
Output device name is "default".
Mixer device name is "default".
Mixer Control name is "PCM".
Lowest dB value is a mute.
Can't get dB value corresponding to a "volume" of 1.
Hardware mixer has dB volume from -102.380000 to 4.000000.
Has mute ability.
startup
avahi: avahi_register.
avahi: register_service.
Avahi without metadata

At this point, the Pi ("Kitchen") is not visible on any iOS9 device.
On connecting via iTunes I see:

new RTSP connection.
RTSP connection closed.
closing RTSP connection.
new RTSP connection.
Play connection from user agent "iTunes/12.3.2 (Macintosh; OS X 10.11.2)".
Active-Remote string seen: "24338288".
Connection from IPv4: 192.168.0.11:52791

If I then disconnect the iTunes, and connect via the iOS9 device I see

RTSP shutdown requested.
closing RTSP connection.
Audio receiver -- Server RTP thread interrupted. terminating.
Control RTP thread interrupted. terminating.
Timing RTP thread interrupted. terminating.
rtp_timing_sender thread interrupted. terminating.
Closed and terminated timer requester thread.
Timing RTP thread terminated.
new RTSP connection.
Play connection from user agent "AirPlay/267.3".
Active-Remote string seen: "2686415979".
Connection from IPv4: 192.168.0.19:50890

Any ideas what is going on or how I can do some further analysis or debugging?

@ostephens

This comment has been minimized.

Show comment
Hide comment
@ostephens

ostephens Jan 8, 2016

This seems not entirely dissimilar to #182 - I'm going to try installing the Discovery Bonjour Browser on my phone to see if that continues to see the Pi - I'll let you know how I get on...

ostephens commented Jan 8, 2016

This seems not entirely dissimilar to #182 - I'm going to try installing the Discovery Bonjour Browser on my phone to see if that continues to see the Pi - I'll let you know how I get on...

@mikebrady

This comment has been minimized.

Show comment
Hide comment
@mikebrady

mikebrady Jan 8, 2016

Owner

Thanks Owen – I was going to suggest you have look at that alright. There have been problems that seem to relate to crossing between the wired and wireless domains on a router.

Owner

mikebrady commented Jan 8, 2016

Thanks Owen – I was going to suggest you have look at that alright. There have been problems that seem to relate to crossing between the wired and wireless domains on a router.

@ostephens

This comment has been minimized.

Show comment
Hide comment
@ostephens

ostephens Jan 8, 2016

Thanks Mike - in this case everything is on wireless. Anyhow I'll see what I find with the discovery services and see if that gives me any more information

ostephens commented Jan 8, 2016

Thanks Mike - in this case everything is on wireless. Anyhow I'll see what I find with the discovery services and see if that gives me any more information

@ostephens

This comment has been minimized.

Show comment
Hide comment
@ostephens

ostephens Jan 9, 2016

Turns out this is not a shairport-sync issue or a avahi/zero-conf issue but an issue with the wifi dongle. Documenting here in case others have the same issue in the future.

The problem was with the Wifi dongle (an Edimax EW-7811Un) on the Pi going into a low power mode. I found the solution on https://www.raspberrypi.org/forums/viewtopic.php?t=61665. The solution to this is:

In the directory /etc/modprobe.d/ make a file called 8192cu.conf
Add the following lines to the file and save it:

# Disable power management
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0

Once I'd implemented this solution and rebooted the issue went away, and also some other issues I'd noticed with the Pi not responding on the network also disappeared.

ostephens commented Jan 9, 2016

Turns out this is not a shairport-sync issue or a avahi/zero-conf issue but an issue with the wifi dongle. Documenting here in case others have the same issue in the future.

The problem was with the Wifi dongle (an Edimax EW-7811Un) on the Pi going into a low power mode. I found the solution on https://www.raspberrypi.org/forums/viewtopic.php?t=61665. The solution to this is:

In the directory /etc/modprobe.d/ make a file called 8192cu.conf
Add the following lines to the file and save it:

# Disable power management
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0

Once I'd implemented this solution and rebooted the issue went away, and also some other issues I'd noticed with the Pi not responding on the network also disappeared.

@ostephens ostephens closed this Jan 9, 2016

@ostephens

This comment has been minimized.

Show comment
Hide comment
@ostephens

ostephens Jan 9, 2016

Still not sure why iTunes was able to connect to the Pi when the iPhone wasn't - possibly iTunes/OS X keeps details of previous Airplay services it has seen on the network rather than just looking at what is available at the current time? Wild speculation at this point!

ostephens commented Jan 9, 2016

Still not sure why iTunes was able to connect to the Pi when the iPhone wasn't - possibly iTunes/OS X keeps details of previous Airplay services it has seen on the network rather than just looking at what is available at the current time? Wild speculation at this point!

@mikebrady

This comment has been minimized.

Show comment
Hide comment
@mikebrady

mikebrady Jan 9, 2016

Owner

Excellent, thanks.

Owner

mikebrady commented Jan 9, 2016

Excellent, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment