mikebrady / shairport-sync

AirPlay and AirPlay 2 audio player
Other
7.3k stars 574 forks source link

[Problem]: Airplay device not showing up on iPhone #1733

Closed AceTheGmodGeek closed 10 months ago

AceTheGmodGeek commented 1 year ago

What happened?

I successfully installed it onto my Raspberry Pi 3B+. It works on one network, but when I switch the Pi to a different network, it doesn’t show up on my phone anymore as an airplay device. What could be the issue?

Relevant log output

No response

System Information.

Raspberry Pi 3 B+

Configuration Information.

>> Display Config Start.

From "uname -a":
 Linux Devins-Raspberry-Pi 6.1.21-v7+ #1642 SMP Mon Apr  3 17:20:52 BST 2023 armv7l GNU/Linux

From /etc/os-release:
 Raspbian GNU/Linux 11 (bullseye)

From /sys/firmware/devicetree/base/model:
 Raspberry Pi 3 Model B Plus Rev 1.3

Shairport Sync Version String:
 4.3.1-24-g7e0e3af6-AirPlay2-smi10-OpenSSL-Avahi-ALSA-sysconfdir:/etc

Command Line:
 shairport-sync --displayConfig

Configuration File:
 /etc/shairport-sync.conf

Configuration File Settings:
 general : 
 {
   name = "Devin's Room Speaker";
 };

>> Display Config End.
>> Goodbye!

PulseAudio or PipeWire installed?

How did you install Shairport Sync?

Built from source

Check previous issues

mikebrady commented 1 year ago

Thanks for the post. It sounds like a potential network issue -- the packets necessary to "advertise" the AirPlay service are getting lost. It might be a firewall or faulty setting or similar. There might be some guidance in the TROUBLESHOOTING.md guide.

AceTheGmodGeek commented 1 year ago

Hmm, I tried the firewall commands in the troubleshooting page but it didn’t work; here’s what I’m confused about: I have an Apple TV connected to the same network and that one is being advertised and works fine, but my raspberry pi isn’t able to advertise the connection; which makes me wonder if it’s a network issue or something else.

mikebrady commented 1 year ago

Hmm, yeah, the Apple TV evidence is good alright. Is there anything special about the Pi? Does it have a VPN or is it connected to multiple networks? Is anything else running on it?

AceTheGmodGeek commented 1 year ago

Nope, it is an old PI so I did reinstall from scratch right before I installed Shairplay, and it’s connected to the same network as the Apple TV. So I don’t know what the issue could be, although I will try connecting my PI to ethernet and see what happens. There isn’t anything else running on it besides VNC server, it’s a fresh install besides that.

mikebrady commented 1 year ago

Thanks. It might be worth checking through the closed issues. You can use an app called "Discovery" from TildeSoft on the Mac or iOS device and avahi-browse at the Linux end to see if the mDNS information that advertises AirPlay being generated and propagated. Some have reported issues with Ubiquiti access points.

AceTheGmodGeek commented 1 year ago

Hi!

Thank you so much for getting back to me!

I tried using ethernet and it seems like it made no change. I did use avahi-browse on the raspberry pi, and I see the speakers popping up, see below:

Server version: avahi 0.8; Host name: Devins-Raspberry-Pi.local
E Ifce Prot Name                                          Type                 Domain
: Cache exhausted
+  wlan0 IPv6 B827EB7ABF99@Devin's Room Speaker             AirTunes Remote Audio local
+  wlan0 IPv6 Devin's Room Speaker                          AirPlay Remote Video local
+  wlan0 IPv4 B827EB7ABF99@Devin's Room Speaker             AirTunes Remote Audio local
+  wlan0 IPv4 Devin's Room Speaker                          AirPlay Remote Video local
+     lo IPv4 B827EB7ABF99@Devin's Room Speaker             AirTunes Remote Audio local
+     lo IPv4 Devin's Room Speaker                          AirPlay Remote Video local
: All for now

Is that what is supposed to show up?

Thank you so much for the help!

EDIT: I did want to mention that I used Discovery on my iPhone and I don't see anything but "Digital Audio Control Protocol (iTunes)" showing up with my iPhone as the host.

mikebrady commented 1 year ago

Thanks. What this means is that it looks like Shairport Sync is advertising the AirPlay service ("Devin's Room Speaker") alright, but it's not showing up at the iPhone. It's disappearing in the network somewhere. Sometimes this is a firewall somewhere; sometimes it's a faulty router, but OTOH the Apple TV is showing up. From this distance, it's a bit of a mystery!

moritzthecat commented 1 year ago

@mikebrady thanx for the hint on avahi-browse. in my setup with different subnets/VLANs, the installation of AVAHI deamon on my openwrt router was straight forward and solved the service discovery issue.

... but OTOH the Apple TV is showing up. From this distance, it's a bit of a mystery!

this was confusing me as well as the Airplay advertising did not show up when using avahi-browse. This is plausible as both SPS and Apple TV are on a different subnet. But my MacBook discovered the Apple TV. When I turned off Bluetooth the Apple TV was not seen any more. So Apple might use a BLE supported way of service discovery more independent of the network setup.

mikebrady commented 1 year ago

Thanks. Yeah, Apple definitely use BLE for service discovery -- I should have thought of that myself.

github-actions[bot] commented 10 months ago

This issue has been inactive for 28 days so will be closed 7 days from now. To prevent this, please remove the "stale" label or post a comment.