WiiM Pro "Airplay Cast" fails connecting to shairport-sync

ralph-ralphio

Member
Joined
Sep 29, 2023
Messages
6
What I expected:
WiiM Pro has a feature to "Airplay cast" its output to an Airplay or Airplay 2 device. I expected that WiiM should connect to a common RPi4+Shairport-Sync instance as an end point. (Shairport-sync is a popular linux app that enables ability to receive Airplay/Airplay 2 streams on Raspberry Pi or other Linux streaming audio boxes).

What happened:
Shairport-Sync functions properly with my other Airplay sources (e.g. I can Airplay music to shairport-sync from my iPhones, and an android app named "AirMusic" that streams via Airplay and other protocols).

BUT, when attempting to connect WiiM device to shairport-sync, the WiiM device attempts to connect but is quickly terminated. The shairport-sync service status reports simply: `Warning: Shairport Sync can not handle NTP streams`

What's needed:
Since a bunch of other Apple ecosystem devices already work with shairport-sync endpoints, it would be good to get WiiM doing so with its Airplay Cast.

Getting into details, most of those devices automatically revert to "PTP" streaming when shairport-sync reports it doesn't handle "NTP" streams. This is documented at the shairport-sync site.

So the request: WiiM Pro to update Airplay cast to support shairport-sync
 
You could also request Shairport-Sync to support NTP streams.

Good point, and shairport-sync apparently does support NTP for Airplay 1 protocol (and not for Airplay 2 where it supports PTP). Spent a lot of time debugging this and communicating with shairport-sync dev.

The problem is: WiiM Pro appears not to revert to Airplay 1 protocol (in which shairport-sync supports NTP), even though WiiM Airplay Cast feature is claimed to support both "Airplay/Airplay 2" (i.e. Airplay1/and Airplay2 receivers). However WiiM Pro appears to ignore Airplay 1 services advertised by shairport-sync, and instead WiiM Pro chooses only Airplay 2 with NTP (and doesn't fall-back to Airplay 1 when negotiation fails).

Into details: from my testing the symptom is WiiM Pro appears to ignore shairport-sync's and maybe other devices' advertised "_raop._tcp" Airplay 1-only capability in mDNS. Instead, WiiM Pro appears by default to honor connections with receivers that advertise "_airplay._tcp" (which is only Airplay 2); and WiiM Pro doesn't fall-back to Airplay 1 protocol if Airplay 2 negotiation fails e.g. with shairport-sync. Since shairport_sync can advertise both protocols, supports NTP with Airplay 1, we can conclude that WiiM isn't reverting to, or is not choosing to discover Airplay 1 casting fully.

A possible "quick" work-around direction? Nothing can be done on the shairport-sync receiver end to "force" the WiiM Pro protocol to Airplay 1 with NTP mode. If I assume WiiM Pro developed a library to cast to Airplay/Airplay2 receivers (maybe something functionally like forked-daap or OwnTone), there may be configuration flags available to make the Wiim Pro respect Airplay 1 receiver advertisements?

For example a simple work-around enables Airplay 1 fall-back between Owntone sender and shairport-sync receiver -- it enables discovery and casting to Airplay 1 receivers in addition to Airplay 2 receivers, basically discovering both _raop._tcp (Airplay1) as well as _airplay._tcp (Airplay 2) protocols instead of defaulting to only Airplay 2 as WiiM Pro currently seems to. In this case it doesn't need a change of code -- it's an edit to the text .config file on the sending device (which -- however it's implemented -- is of course currently closed to end-users on the WiiM Pro).

Example owntone.conf configuration file on the sender, work-around is to include raop_disable=false for instance:

airplay "to_device" {
exclude = false
permanent = true
reconnect = true
...
raop_disable = false
}
 
Back
Top