Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple TV not found for pairing on Linux #8

Closed
HENRIKMAK opened this issue Feb 12, 2024 · 15 comments
Closed

Apple TV not found for pairing on Linux #8

HENRIKMAK opened this issue Feb 12, 2024 · 15 comments
Labels

Comments

@HENRIKMAK
Copy link

hello
I have all the services connected and working, but my Apple TV 4k 2 gen does not show it on the atvloadly web screen. On Apple TV I wait on the App Remote and Devices screen but it just doesn't show my Linux Mint notebook connected to the same network. I tested it with the Android remote control app and it worked well, can you help me? thanks.

Captura de tela de 2024-02-11 23-38-39

Captura de tela de 2024-02-11 23-38-58

@bitxeno
Copy link
Owner

bitxeno commented Feb 12, 2024

Run avahi-browse -a in your Linux host,can see AppleTV devices?

@HENRIKMAK
Copy link
Author

when I run: avahi-browse -a
It seems like I don't have any response, I waited 1 minute and it just sits there like in the image, with no response, even though it's running under root or without, I was thinking here if it were the case that the image didn't have access to the internet so it wouldn't locate the Apple TV but I'm already discarding this idea.

Captura de tela de 2024-02-12 00-31-16

@bitxeno
Copy link
Owner

bitxeno commented Feb 12, 2024

Looks like your linux host not in the same Lan network as AppleTV, atvloadly not support different subnetworks currently

@HENRIKMAK
Copy link
Author

I was testing with the Fedora Linux distribution and using the command you gave me I would have found several networks, there must be a problem with the Linux Mint distribution, so I'm going to test on Fedora which from what I understand will recognize and locate the networks.

@HENRIKMAK
Copy link
Author

I can get it on the OpenUse Linux distribution, but I know it works on any other distribution, just with some adjustments,
I had to insert the HOSTNAME in the file: /etc/nsswitch.conf as shown in image 1,
then running the command: systemctl status avahi-daemon and making sure that the service is running, as in image 2, and finally running the last command to make sure everything was ok: avahi-browse -a my network detected the Apple TV and, as shown in image 3, it says pairing successfully.
Thanks for the good work here, I managed to install: retroarch, provenance and mame.

Note: I'm very new to Linux and I don't speak English without the help of a translator and maybe some of the things I wrote aren't necessary, but that's how it worked for me.

Screenshot_20240212_230011
image 1

Screenshot_20240212_230356
image 2

Screenshot_20240212_230833
image 3

@bitxeno
Copy link
Owner

bitxeno commented Feb 15, 2024

Thank you for sharing.

@bitxeno bitxeno changed the title Apple TV not found for pairing Apple TV not found for pairing on Linux Feb 15, 2024
@bitxeno bitxeno added the FAQ label Feb 15, 2024
@bitxeno bitxeno pinned this issue Feb 15, 2024
@bitxeno bitxeno closed this as completed Feb 15, 2024
@GuyKh
Copy link
Contributor

GuyKh commented Apr 7, 2024

I still wasn't able to pair. Using docker container in Ubuntu.

avahi-browse -a | grep AppleTV
+   eno1 IPv6 70-35-50-63.1 AppleTV                         _sleep-proxy._udp    local
+   eno1 IPv4 70-35-50-63.1 AppleTV                         _sleep-proxy._udp    local
+   eno1 IPv6 AppleTV                                       _companion-link._tcp local
+   eno1 IPv4 AppleTV                                       _companion-link._tcp local
+   eno1 IPv6 C8D083D11234@AppleTV                          AirTunes Remote Audio local
+   eno1 IPv4 C8D083D11234@AppleTV                          AirTunes Remote Audio local
+   eno1 IPv6 AppleTV                                       AirPlay Remote Video local
+   eno1 IPv4 AppleTV                                       AirPlay Remote Video local

But when I enter the webpage through my iphone (when apple tv is in pairing mode) - nothing happens...

@bitxeno
Copy link
Owner

bitxeno commented Apr 8, 2024

I still wasn't able to pair. Using docker container in Ubuntu.

avahi-browse -a | grep AppleTV
+   eno1 IPv6 70-35-50-63.1 AppleTV                         _sleep-proxy._udp    local
+   eno1 IPv4 70-35-50-63.1 AppleTV                         _sleep-proxy._udp    local
+   eno1 IPv6 AppleTV                                       _companion-link._tcp local
+   eno1 IPv4 AppleTV                                       _companion-link._tcp local
+   eno1 IPv6 C8D083D11234@AppleTV                          AirTunes Remote Audio local
+   eno1 IPv4 C8D083D11234@AppleTV                          AirTunes Remote Audio local
+   eno1 IPv6 AppleTV                                       AirPlay Remote Video local
+   eno1 IPv4 AppleTV                                       AirPlay Remote Video local

But when I enter the webpage through my iphone (when apple tv is in pairing mode) - nothing happens...

It appears that you haven't correctly entered the pairing mode. When you do it right, you should see _remotepairing-manual-pairing AppleTV and make sure your tvOS version is 16.x.

+ br-lan IPv6 AppleTV                                       _remotepairing-manual-pairing._tcp local
+ br-lan IPv4 AppleTV                                       _remotepairing-manual-pairing._tcp local

@GuyKh
Copy link
Contributor

GuyKh commented Apr 8, 2024

I still wasn't able to pair. Using docker container in Ubuntu.

avahi-browse -a | grep AppleTV
+   eno1 IPv6 70-35-50-63.1 AppleTV                         _sleep-proxy._udp    local
+   eno1 IPv4 70-35-50-63.1 AppleTV                         _sleep-proxy._udp    local
+   eno1 IPv6 AppleTV                                       _companion-link._tcp local
+   eno1 IPv4 AppleTV                                       _companion-link._tcp local
+   eno1 IPv6 C8D083D11234@AppleTV                          AirTunes Remote Audio local
+   eno1 IPv4 C8D083D11234@AppleTV                          AirTunes Remote Audio local
+   eno1 IPv6 AppleTV                                       AirPlay Remote Video local
+   eno1 IPv4 AppleTV                                       AirPlay Remote Video local

But when I enter the webpage through my iphone (when apple tv is in pairing mode) - nothing happens...

It appears that you haven't correctly entered the pairing mode. When you do it right, you should see _remotepairing-manual-pairing AppleTV and make sure your tvOS version is 16.x.

+ br-lan IPv6 AppleTV                                       _remotepairing-manual-pairing._tcp local
+ br-lan IPv4 AppleTV                                       _remotepairing-manual-pairing._tcp local

I'm using tvOS 16.3.2, and I've been able to pair an iPhone, 2 macbooks and an Android remote this way, so I wonder what am I doing wrong.
I've also applied @HENRIKMAK change on the host's nsswitch.conf

@bitxeno
Copy link
Owner

bitxeno commented Apr 8, 2024

Did you navigate to the Remote and Devices -> Remote App and Devices menu on your AppleTV and leave it open?

@GuyKh
Copy link
Contributor

GuyKh commented Apr 8, 2024

Did you navigate to the Remote and Devices -> Remote App and Devices menu on your AppleTV and leave it open?

Yes

@bitxeno
Copy link
Owner

bitxeno commented Apr 8, 2024

Did you navigate to the Remote and Devices -> Remote App and Devices menu on your AppleTV and leave it open?

Yes

You can try restart AppleTV. Without the _remotepairing-manual-pairing._tcp protocol, atvloadly cannot be used. Can you connect to AppleTV on Xcode and debug app?

@GuyKh
Copy link
Contributor

GuyKh commented Apr 8, 2024

I'm able to connect and pair through my macbook.
Not sure what you want me to debug through XCode.

I've tried this on a second Ubuntu server I have on the same network (only avahi-daemon) and the result is the same.
Are you sure no Bonjour or anything else is needed?

I do see this when entering : avahi-discover -A

+ enp0s31f6 IPv6 c8:d0:83:xx:xx:xx@xxxx::cad0:xxxx:fecc:c2c-supportsRP _apple-pairable._tcp local
+ enp0s31f6 IPv4 c8:d0:83:xx:xx:xx@xxxx::cad0:xxxx:fecc:c2c-supportsRP _apple-pairable._tcp local

When opening the console through XCode and entering the pairing screen, seeing all sorts of mDNSResponder seeing all sorts of logs eg:

[R11916] DNSServiceRegister(<mask.hash: 'AsAqVNRFSDSsEybO7EJbt77w=='>, 32498) REGISTERED

@bitxeno
Copy link
Owner

bitxeno commented Apr 8, 2024

If you can see the _apple-pairable._tcp protocol, it indicates that your network is work properly. Next, execute the following command inside the atvloadly docker container.:

avahi-browse -a |grep apple

can you see _apple-pairable._tcp protocol device?

@GuyKh
Copy link
Contributor

GuyKh commented Apr 8, 2024

Unfortunatelly, no avahi-browse in the container;
I had to run apt install avahi-utils
but then -

root@f350d197a6be:/# avahi-browse -a
Failed to create client object: Access denied

One note, I'd add more debug logs (for positive and negative cases) - it makes easier debugging

Seems that the container should be privilaged:true (in docker-compose) or --privilaged in docker run.

AND ....
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants