alvr-org / alvr-visionos

Experimental visionOS client for ALVR - SteamVR on Apple Vision Pro!
MIT License
418 stars 29 forks source link

Server not found when running on device due to lack of multicast entitlement #4

Open robbiet480 opened 7 months ago

robbiet480 commented 7 months ago

Having some really weird behavior when trying to run on device. Logs look like this:

ALVR v20.6.1
hostname: 9977.client.alvr
IP: 10.0.0.189

Cannot connect to the internet

Over and over again. Manually adding the device by name and IP from the Windows side does nothing, it never connects. I've confirmed with nmap that the port is open randomly, it seems to only stay open when discovery is happening which is for a few milliseconds. I'm sometimes able to connect like this:

robbiet480@Roberts-MBP ALVR % nmap 10.0.0.189
Starting Nmap 7.94 ( https://nmap.org ) at 2024-02-05 23:37 PST
Nmap scan report for AppleVisionPro (10.0.0.189)
Host is up (0.0067s latency).
Not shown: 997 closed tcp ports (conn-refused)
PORT      STATE SERVICE
9943/tcp  open  unknown
49152/tcp open  unknown
62078/tcp open  iphone-sync

Nmap done: 1 IP address (1 host up) scanned in 5.53 seconds
robbiet480@Roberts-MBP ALVR % telnet 10.0.0.189 9943
Trying 10.0.0.189...
telnet: connect to address 10.0.0.189: Connection refused
telnet: Unable to connect to remote host
robbiet480@Roberts-MBP ALVR % telnet 10.0.0.189 9943
Trying 10.0.0.189...
Connected to applevisionpro.
Escape character is '^]'.
Connection closed by foreign host.

I've tried everything to get the local network prompt to pop on device, so far no dice. I even attempted to run a simple HTTP request to a totally unrelated service on the same box running ALVR but it worked fine. The Settings app doesn't show local network access granted. I do get the popup on iOS but only after the app crashes out from a black screen.

robbiet480 commented 7 months ago

Oh and I thought at first it was a OS bug but other apps successfully requested local network access.

robbiet480 commented 7 months ago

Hey I finally got it to pop after a reboot + opening the app from the launcher instead of Xcode. However, the Windows side still can't find it.

robbiet480 commented 7 months ago

I'm wondering if the app requires the multicast entitlement to function on device which is required for sending or receiving any kind of non-unicast UDP traffic...

robbiet480 commented 7 months ago

Brought up the requirement for a mDNS discovery protocol to avoid the entitlement on the ALVR Discord at here

panthurrr commented 7 months ago

@robbiet480 Check if PR https://github.com/zhuowei/VisionOSALVRClient/pull/6 helps you connect; I at least get a connection to Windows from the updated ALVRClientCore.xcframework with Vision Pro hardware when adding it manually. The stream itself needs a lot of work for me but it connects and shows VR Home when I combine the new xcframework with PR https://github.com/zhuowei/VisionOSALVRClient/pull/3

robbiet480 commented 7 months ago

Yeah I'm able to get connected now but its not pretty as the headset only sends out discovery packets for a few seconds and if the Windows client isn't searching at the same moment they don't link.