postlund / pyatv

A client library for Apple TV and AirPlay devices
https://pyatv.dev
MIT License
841 stars 91 forks source link

Incorrect authentication method is picked for RAOP pairing #2092

Closed postlund closed 11 months ago

postlund commented 12 months ago

Describe the bug

When pairing RAOP with an Apple TV, legacy authentication is picked instead of HAP so AirPlay 2 features are not used. This causes a mismatch later when connecting, as the device is discovered as an AirPlay 2 device but the keys are for AirPlay 1.

Error log

<place log here>

How to reproduce the bug?

$ atvremote -s ip --debug --protocol raop pair | grep 
... [pyatv.protocols.airplay.auth]: Setting up new AirPlay Pair-Setup procedure with type AuthenticationType.Legacy

What is expected behavior?

Should be AuthenticationType.HAP.

Operating System

Any

Python

3.10

pyatv

0.13.0

Device

Apple TV 4 and later

Additional context

https://github.com/home-assistant/core/issues/95993#issue-comment-box