Closed danielgoodell closed 2 years ago
Thanks for the post. Verbosity of 3
is too much -- a verbosity of 1
or 2
is fine, thanks.
It it possible that you were alternating the AirPlay 1 and AirPlay 2 versions on the same machine within a short time of each other? I know that clients such as the Music app get confused by this -- it seems to take a good few minutes to settle down.
If you enable statistics and a verbosity of 1
, you should see if/when a connection is made to Shairport Sync, something like this:
Aug 27 11:51:03 ubuntu2004 shairport-sync[867]: 2.981795376 "rtsp.c:3154" Connection 3. AP2 Buffered Audio Stream.
Aug 27 11:51:04 ubuntu2004 shairport-sync[867]: 1.011642876 "player.c:2652" Connection 3: Playback Started -- AirPlay 2 Buffered.
Aug 27 11:51:12 ubuntu2004 shairport-sync[867]: 7.892937253 "player.c:2489" Sync Error ms | Net Sync PPM | All Sync PPM | Min DAC Queue | Min Buffer Size | Output FPS (r) | Output FPS (c)
Aug 27 11:51:12 ubuntu2004 shairport-sync[867]: 0.000096875 "player.c:2489" -5.32 0.0 0.0 5668 125k N/A N/A
...
It may also be an AP2 Realtime Stream, beginning like this:
Aug 27 11:53:03 ubuntu2004 shairport-sync[867]: 0.050228958 "rtsp.c:3100" Connection 4. AP2 Realtime Audio Stream.
Aug 27 11:53:04 ubuntu2004 shairport-sync[867]: 0.664477042 "rtsp.c:3226" Connection 5 SETUP (RC): TCP Remote Control data port opened: 44191.
Aug 27 11:53:05 ubuntu2004 shairport-sync[867]: 1.315551543 "player.c:2649" Connection 4: Playback Started -- AirPlay 2 Realtime.
Aug 27 11:53:13 ubuntu2004 shairport-sync[867]: 1.073949334 "player.c:2489" Sync Error ms | Net Sync PPM | All Sync PPM | Missing | Late | Too Late | Resend Reqs | Min DAC Queue | Min Buffers | Max Buffers | Received FPS | Output FPS (r) | Output FPS (c)
...
So I just tried again with a fresh install of raspbian lite on a completely difference device, a raspberry pi 2.
I built exactly per the instructions, and then started it with "shairport-sync -v --statistics"
Then, I connected to it from an iPhone. It connected with no problem and I played some music with no problem.
Then, I disconnected the phone from the shairport-sync, waited a moment, and then tried to reconnect. The phone immediately says "unable to connect to audiopi2" and shairport-sync produces no additional output on the screen during this failed attempt to connect.
Here is the entire output from everything I said above: shairport-sync -v --statistics.txt .
Airplay 1 has never been on this device, nor do I even have any Airplay 1 devices afaik. So there was definitely no alternating between airplay 1 & 2 receivers in this case.
If I start it with "shairport-sync -vv --statistics" and attempt to connect to it, then the failed connection attempt log output looks like this: shairport-sync -vv --statistics.txt
For shairport-sync to display any output from a failed connection attempt, it must be started with at least -vv.
Thanks for your very thorough work! Let me try to make some sense of what you have found.
Just as a matter of interest, if you had disconnected and waited a while — a few minutes up to say 10 minutes — could you ever reconnect?
Nope. I just tried reconnecting to the same one now and it still doesn't work. Stopping and restarting shairport-sync or restarting the computer seem to have no impact.
Stopping and restarting shairport-sync or restarting the computer seem to have no impact.
That is so weird!
Could you post the output of ifconfig
on your Shairport Sync device, please?
I realise it is a slight security issue, in that you'd be publicising your MAC addresses, so perhaps don't publicise all of it. The component I'm most interested in is the one that is most similar to this:
::6b80:ee6c:9bb1:1ec0
It looks very odd to me, and I wonder where it's coming from.
Update: there's a similar odd-looking IP number in the first log: ::12f7:a304:eb73:409d
. (Search for new connection at
.)
I'll be reckless and just paste complete output of ifconfig. This is from the first device I used, the raspberry pi zero w:
pi@audiopi:~ $ ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 97 bytes 40506 (39.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 97 bytes 40506 (39.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.163 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::d7d7:77cd:38bb:4719 prefixlen 64 scopeid 0x20<link>
inet6 ::12f7:a304:eb73:409d prefixlen 64 scopeid 0x0<global>
ether b8:27:eb:99:a0:7f txqueuelen 1000 (Ethernet)
RX packets 3454 bytes 436576 (426.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 589 bytes 138763 (135.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Some additional info: I just did the same thing on a Xubuntu install running in Virtualbox and it worked flawlessly. I could disconnect and reconnect multiple times.
I also tried all of this on a raspberry pi 3 and had the same problems. The problem seems to be specific to any raspberry pi or perhaps something to do with the latest Rapsbian OS. I may try an older version next.
Thanks. I see the strange IPv6 IP number is there. This is it:
inet6 ::12f7:a304:eb73:409d prefixlen 64 scopeid 0x0<global>
My suspicion would fall on whatever is generating those odd IPv6 addresses, because they look illegal. Could there be a router or something that might be faulty or misconfigured?
Yup, that was it! Ipv6 wasn't working right on my router, probably ever since I switched to a new internet service provider. I fixed it and now it works flawlessly. I don't think I would have figured out that was the problem. Thanks!
Yup, that was it! Ipv6 wasn't working right on my router, probably ever since I switched to a new internet service provider. I fixed it and now it works flawlessly. I don't think I would have figured out that was the problem. Thanks!
Excellent stuff!
What happened?
I recently decided to try out the latest Shairport-Sync development version to see how Airplay 2 was working.
I built it on a Raspberry Pi Zero W with the latest Rapbian Lite OS. everything seemed to go smoothly and had no trouble building and installing. I connected to it from an iPhone 11 pro with IOS 15.6.1 and it played sound through the USB DAC. Then, I disconnected and could not reconnect again no matter what I did (stopping, restarting, reinstalling, etc.) Every time I try to connect the phone just says "unable to connect". If I remove it and install the normal shairport-sync airplay 1 package it works fine. I also have raspotify on there it plays just fine as well. I have no clue.
I attached a log of a failed connection attempt with the verbosity level set to 3.
Relevant log output
Version?
4.1-dev-515-g3354f66c-AirPlay2-OpenSSL-Avahi-ALSA-soxr-sysconfdir:/etc
Check previous issues