hfujita / pulseaudio-raop2

Experimental RAOP2 (Apple AirPlay2) support for PulseAudio
http://hfujita.github.io/pulseaudio-raop2/
Other
137 stars 19 forks source link

Does not work with Airport Express Gen2 #21

Open atcapollo opened 10 years ago

atcapollo commented 10 years ago

This does not work with the Airport Express Gen2.

Test and working great with Shairplay and Apple TV3. Both show up to pulseaudio with a routable DHCP IP in pavucontrol.

Network: Airport Express Gen2 of which I have 3 to test with and which all have valid routable 192.* addresses.

Issue: These show up in pulseaudio under their link local mDNS IP address of 169.* i.e. private. They have two addresses the mDNS 169.* address for discovery and then they have a routable address for routed traffic.

Proposed solution: I think pulseaudio-raop2 needs to obtain the routable address, both addresses are announced by the AE but the link local address needs to be overlooked in favour of the routable address.

hfujita commented 10 years ago

Looks like this issue is quite similar to #8. If Airport Express is also announcing 192.*, can you connect to that address? Could you paste the result of avahi-browse -atr ?

atcapollo commented 10 years ago

I cannot work out how to get raop to connect to the 192.* address. Both addresses are broadcasted by the AE as can been seen by sniffing the packets.

However avahi-browse -atr only reports the private 169.* addresses not the routable 192.* addresses for the AE's. For the Apple TV it reports both.

atcapollo commented 10 years ago

Looks like a similiar issue for a different use case was reported here https://github.com/awein/SleepProxyClient/issues/5#

I wonder if this solution could help.

atcapollo commented 10 years ago

When I reboot the AE and watch its broadcasts with Avahi-Discover it initially shows the 192.* address but by the time it is fully booted the address reverts to 169.*

There must be a way to prefer 192 > 169.

atcapollo commented 10 years ago

Okay a band aid solution which works. Defining the airport expresses in /etc/avahi/hosts as static hosts enables pulseaudio-raop to see both the LL and the routable address. Airplay now works :) hurray.

This is fine for me as my AE's are on static IP's. This should be possible to implement in code, I wonder if this is an avahi issue rather than the implementation in raop.

atcapollo commented 10 years ago

Hmm /etc/avahi/hosts has stopped working now after a reboot.

hfujita commented 9 years ago

To me it seems like this is an Avahi issue. http://lists.freedesktop.org/archives/avahi/2012-September/002183.html One thing you can do would be to load the raop sink module manually with pactl load-module module-raop-sink.

hfujita commented 9 years ago

Also I looked at https://github.com/awein/SleepProxyClient/issues/5#, but could not understand why that patch solved the problem. If someone has an explanation that would be really helpful.

priseko commented 9 years ago

Had the same issue with several Airport Express Gen1. Seems really like the mentioned avahi issue: The AEX are announcing its public IP first, followed by the link-local addresses (also for IPv6). Workaround is to provide link-local connectivity via $ avahi-autoipd --force-bind eth0.

Works like a charm now! Thanks a lot for your great work.

ckdo commented 8 years ago

I found another workround (cause I tried priseko's workaround.. no success) I disabled module module-raop-discover and loaded module module-raop-sink manually:

load-module module-raop-sink server=192.168.0.44:5000 sink_name=raop_output.AirPort-Express-de-Christophe.local sink_properties="device.description='AirPort Express de Christophe (192.168.0.44:5000)'" protocol=UDP encryption=RSA codec=ALAC channels=2 format=16 rate=44100

notdefine commented 8 years ago

For me the configuration of the device was one step to get my device working. The second part was to disable the encryption (encryption=none). Thank for your hint.

julien-gargot commented 7 years ago

@atcapollo, maybe it does not concern you anymore, but I tried @ckdo solution and it works for me too.

I just had to override default Pulse configuration by creating ~/.config/pulse/default.pa:

# Load default configuration
.include /etc/pulse/default.pa

# Load Airport Express manually (replace the 192.168.xx.xx with your Airport Device local IP address)
load-module module-raop-sink server=[192.168.xx.xx]:5000 sink_name=raop_output.Airport-Device.local sink_properties='device.description="Airport Device (192.168.xx.xx:5000)"' protocol=UDP encryption=RSA codec=ALAC channels=2 format=16 rate=44100

After that, my Airport Express is listed 3 time in the pulseaudio settings, 1 time with the local IP address (which works) and 2 times with the 169.xxx address (which not works). Just have to select the right one: with the local IP!

atcapollo commented 7 years ago

I was waiting for this to be merged into pulseaudio before trying much further.

Chris' work around works its just a pain when my airport expresses are dhcp.

On 15 Dec 2016 11:20 a.m., "Julien G." notifications@github.com wrote:

@atcapollo https://github.com/atcapollo, maybe it does not concern you anymore, but I tried @ckdo https://github.com/ckdo solution and it works for me too.

I just had to override default Pulse configuration by creating ~/.config/pulse/default.pa:

Load default configuration

.include /etc/pulse/default.pa

Load Airport Express manually (replace the 192.168.xx.xx with your Airport Device local IP address)

load-module module-raop-sink server=[192.168.xx.xx]:5000 sink_name=raop_output.Airport-Device.local sink_properties='device.description="Airport Device (192.168.xx.xx:5000)"' protocol=UDP encryption=RSA codec=ALAC channels=2 format=16 rate=44100

After that, my Airport Express is listed 3 time in the pulseaudio settings, 1 time with the local IP address (which works) and 2 times with the 169.xxx address (which not works). Just have to select the right one: with the local IP!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hfujita/pulseaudio-raop2/issues/21#issuecomment-267304168, or mute the thread https://github.com/notifications/unsubscribe-auth/AGgsRruDamKxW1uByrZ2DH2U7i_3MBaAks5rISKLgaJpZM4C0Fnt .

deesnook commented 5 years ago

I tried this too:

I just had to override default Pulse configuration by creating ~/.config/pulse/default.pa:

Load default configuration

.include /etc/pulse/default.pa

Load Airport Express manually (replace the 192.168.xx.xx with your Airport Device local IP address)

load-module module-raop-sink server=[192.168.xx.xx]:5000 sink_name=raop_output.Airport-Device.local sink_properties='device.description="Airport Device (192.168.xx.xx:5000)"' protocol=UDP encryption=RSA codec=ALAC channels=2 format=16 rate=44100

After that, my Airport Express is listed 3 time in the pulseaudio settings, 1 time with the local IP address (which works) and 2 times with the 169.xxx address (which not works). Just have to select the right one: with the local IP!

And the AirportExpress is indeed shown three times. But when I select the one with the local IP (192. .....) nothing happens. Any ideas? I use Pulseaudio 12.2

The weird thing is that it actually has worked out of the box without having to change anything. With my former router (connecting the Airport Express via WIFI), the workaround was to have the computer booted before starting up the Airport Express. With my new router connection by WIFI isn't possible anymore, so I connect the Airport Express via LAN and the mentioned workaround doesn't work anymore. However, it has worked randomly so two local 192.... IP adresses were shown. But recently I just get the 169... IP adresses. It's really weird.

Any help would be greatly appreciated!

ckdo commented 5 years ago

Hello @deesnook, You probably should have posted your issue on official pulseaudio github ( https://gitlab.freedesktop.org/pulseaudio/pulseaudio/ ), since this fujita's code have been merged into PulseAudio 11. There're multiple things in your message. First issue is unfortunately a known bug regarding avahi, which badly reports on link local address for some devices (airport express for instance...) even if there's an available routable address, the reason why I switched to a manual load of the module. You also mentionned mutiple instances of raop sinks, I assume then you did not disable module-raop-discover. About the required order of booting (router/pulseaudio), I am currently working on autoreconnect option, currently not available that solves this. I hope it willl be merged..but it do not guarantee... Fell free to build on your own if you want to test :). It's there: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/merge_requests/174

deesnook commented 5 years ago

Thanks @ckdo! I'm not an expert so I was trying to make sense of things and found this thread which seemed pertinent...didn't know that it was merged into Pulseaudio v11. I also would love to contribute to solve the problem, but unfortunately I lack the skills...the MR for autoreconnect looks promising though, fingers crossed that it'll be included.

Manually loading the module hasn't work for me so far, even if I disable module-raop-discover. I'm not even sure if I do everything correctly, I kind of have a hard time figure out which commands and syntax are correct and which config files are relevant etc. But I'll continue trying!

Thanks again!