FDH2 / UxPlay

AirPlay Unix mirroring server
GNU General Public License v3.0
1.35k stars 72 forks source link

not sure how to debug avahi #79

Closed qrkourier closed 2 years ago

qrkourier commented 2 years ago

Symptom of the problem: run uxplay on Linux and wait a long time for it to appear in screen mirroring list of AirPlay servers. Sometimes it appears and disappears for no apparent reason. Sometimes when it appears and I tap it then uxplay's verbose messages don't show any activity, as though it's not beginning to connect at all.

Things I've tried:

It did seem to help when I repositioned the antennae and so I suspect a poor signal could play a part, and that's obviously outside the scope of this repo. :slightly_smiling_face:

I just don't know much yet about how uxplay uses avahi to advertise itself so I'm wondering what to look for in avahi logs or uxplay logs to see a clue about the advertising success or failure that might point me toward the root cause.

Thank you for any insights!

fduncanh commented 2 years ago

@qrkourier I had issues with avahi for a long time but they are now fixed. (I'm not quite sure what I did to fix them)

The tool avahi-browse (avahi-browse --all) should be installed (it's in avahi-utils) and can help see what is going on.

I wish I could tell you what to do, but after intermittent tinkering, one day it was working perfectly, and the "-t n" option I added was unnecessary. Most users dont seem to have these issues, I think it was my local network setup. (I have dns-masq providing nameserver services on the router, not a simple ".local" mdns setup.) Some extra configuration was necessary.

fduncanh commented 2 years ago

The magic is called DNS-SD ("service discovery")

http://www.dns-sd.org/

https://wiki.archlinux.org/title/avahi

https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwiZisnKnMb2AhXdlYkEHbCFDXIQFnoECAoQAQ&url=https%3A%2F%2Fwww.win.tue.nl%2F~johanl%2Feduc%2FIoT-Course%2FmDNS-SD%2520Tutorial.pdf&usg=AOvVaw2xn_n28i-kl-DQpmRzkWqJ

https://stevessmarthomeguide.com/multicast-dns/

fduncanh commented 2 years ago

Hope that helped. Good luck! Uxplay logs wont give any info. Its purely an Avahi issue

A HOWTO for avahi would be very useful.....

This isnt a UxPlay issue so closing.