mikebrady / shairport-sync

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

[SOLVED] Shairport-sync on Raspberry PI zero w: service visible but can't connect #1169

Closed BurgerKing64 closed 3 years ago

BurgerKing64 commented 3 years ago

I installed the version from GitHub (3.3.8rc3-OpenSSL-Avahi-ALSA-soxr-sysconfdir:/etc) on RaspiOS Buster running on a RPI zero w. The problem is that I can see the service from my ios devices, but can't connect. Following the answers to similar problems I tried to check with avahi-browse, but everything seems ok:

pi@raspberrypi:~/shairport-sync $ avahi-browse -a
+  wlan0 IPv6 871D4655FAF3@Rotel                            AirTunes Remote Audio local
+  wlan0 IPv4 871D4655FAF3@Rotel                            AirTunes Remote Audio local

On ios side I installed Discovery: under the dacp section I can see the service, but when I try to open it the program gives an error. Shairport appears to be up and running:

* shairport-sync.service - Shairport Sync - AirPlay Audio Receiver
   Loaded: loaded (/lib/systemd/system/shairport-sync.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2021-03-22 15:30:25 GMT; 5min ago
 Main PID: 1052 (shairport-sync)
    Tasks: 4 (limit: 877)
   CGroup: /system.slice/shairport-sync.service
           `-1052 /usr/local/bin/shairport-sync

mar 22 15:30:25 raspberrypi shairport-sync[1052]:          0.000112999 "shairport.c:1917" loudness is 0.
mar 22 15:30:25 raspberrypi shairport-sync[1052]:          0.000127998 "shairport.c:1918" loudness reference level is -20.000000
mar 22 15:30:25 raspberrypi shairport-sync[1052]:          0.016247747 "audio_alsa.c:1943" keep_dac_busy is now "no"
mar 22 15:30:25 raspberrypi shairport-sync[1052]:          0.083180707 "mdns_avahi.c:209" avahi: service '871D4655FAF3@Rotel' group is not yet committed.
mar 22 15:30:25 raspberrypi shairport-sync[1052]:          0.011734818 "mdns_avahi.c:251" avahi: request to add "_raop._tcp" service without metadata
mar 22 15:30:25 raspberrypi shairport-sync[1052]:          0.016235747 "mdns_avahi.c:375" avahi_dacp_monitor_start Avahi DACP monitor successfully started
mar 22 15:30:25 raspberrypi shairport-sync[1052]:          0.001087983 "mdns_avahi.c:213" avahi: service '871D4655FAF3@Rotel' group is registering.
mar 22 15:30:26 raspberrypi shairport-sync[1052]:          0.857376672 "mdns_avahi.c:180" avahi: service '871D4655FAF3@Rotel' successfully added.
mar 22 15:30:27 raspberrypi shairport-sync[1052]:          0.532454723 "shairport.c:194" soxr_delay_index: 15.
mar 22 15:30:27 raspberrypi shairport-sync[1052]:          0.004673927 "shairport.c:201" "soxr" interpolation has been chosen.

Any idea on how to debug this? Thanks in advance for the support.

mikebrady commented 3 years ago

Thanks for the post. Shairport Sync looks like it is working. So, what could it be that isn't working?

Could I suggest you take a look through the TROUBLESHOOTING.md page? Failing that, there is a [long] issue report at #727 that might help.

BurgerKing64 commented 3 years ago

Thank you for the quick answer. I checked thoroughfully the troubleshoowing page, but i didn't find anything that could match my situation:

To be sure I tried to remove the program as you suggested in your guide and to reinstall it from the scratch, but the situation didn't change. I only noticed two new facts:

  1. Shairport seems to disappear from the services seen by iphone after a while. The only way to have it back is to stop the service, than restart it. I checked with Discovery and it's the whole _raop_tcp that disappears (maybe this is normal since Shairport is the only Airport service present).
  2. When the service is visible i succeded in getting a log from Discovery. This is what I found:
    
    Remote Audio Output Protocol (AirTunes)

raspberrypi.local:5000 192.168.1.137:5000 fe80::656a:7ed0:5683:ce9c%en0:5000

am = ShairportSync ch = 2 cn = 0,1 da = true ek = 1 et = 0,1 fv = 76400.10 md = 0,1,2 pw = false sf = 0x4 sr = 44100 ss = 16 sv = false tp = TCP,UDP txtvers = 1 vn = 65537 vs = 105.1


3. Also when the service disappears, the status read from the Pi reports Shairport running, as in the log I copied in the first post.
Could you suggest any other way to debug the issue? I know that it's probably some stupid setting on my setup, but I've run out of ideas on what to check...). 

Thanks again for the support and for your work
BurgerKing64 commented 3 years ago

Looking at another issue where the cause was the modem I had the idea to move both the Raspberry and the iphone to another network made with a cheap DLink access point: everything worked fine. I still wonder what's wrong with my main modem, which otherwise works well: probably, since it is a VDSL one provided by the telephone company for FTTH and lacking many fine settings, probably there is some parameter set that is not visible to me.
I think that the issue can be considered solved. Many thanks for the help and, of course, for the software!

mistakenideas commented 3 years ago

@BurgerKing64 I know some VDSL routers have settings which prevent devices on the wireless network from communicating with each other which can cause problems. Could be worth checking the wireless security settings?

BurgerKing64 commented 3 years ago

@mistakenideas Likely it is so, but unfortunately the modem is a Technicolor AG plus VDNT-S Router VDSL2 with a firmware customised by the internet provider, so all the advanced settings are not present. I can only change the modem address, enable/disable the NAT and the DHCP. Nothing about security, apart a basic firewall whose deactivation doesn't change much. Thank you for the advice anyway.

github-actions[bot] commented 3 years ago

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