-
-
Notifications
You must be signed in to change notification settings - Fork 498
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
fix(connection): 🐛 Try localhost if broadcast fails, fixes wifi being required for cabled #1962
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks amazing! 😄 there is a thing I would change. I would like to hide as much as possible socket details in connection.rs. So you can make two methods announce_broadcast()
and announce_local()
. Even better would be to handle the local fallback all inside the AnnouncerSocket, but I'm ok if you would like to show the in between status on the HUD.
Done. Changed to separate functions, left hud elements and distinction so people can see if they are connecting via cable or not :) |
I think i may have accidentally did workaround over broadcast and if i remove local connect, nothing will change |
I think udp broadcasting is not working via adb tcp forwarding,
So with wireless enabled, everything works as usually. With wireless disabled, we just don't try to broadcast. |
81123d5
to
904a453
Compare
Thanks for suggestion, i changed my existing code to not assume that there is broadcast available on TCP cabled connection I tested with: WIFI on, WIFI off, WIFI on different network, with and without client discovery - all works correctly as it should. |
Without WiFi enabled it might do a couple of attempts to properly connect, but otherwise it does connect just fine after that. |
merging as is after I test it locally |
Hi, could this change improve support for wired ethernet connection via USB adapter (router<->usb ehternet adapter<->headset)? |
Honestly, i'm not too familiar with this kind of setup... |
If you can get ip of headset when it's connected like that and put it into alvr, it should work. |
Thanks for an answer, I got it working after few tweaks. Point was I took effect for a cause. It made HMD stutter because improved bandwidth and latency let ALVR kick bitrate to the roof. Once I reduced requested bitrate to ~120-130Mbps it made actual bitrate to be in 160-210MBps range which is what Pico can decode via hardware and keep its tiny CPUs from being overloaded. |
Fyi i can easily decode 800 mbps h264 and 200-220 HEVC on pico 4 pro, on linux, with type-c cable |
This makes so that if client can't broadcast, it will try to do announce on localhost.
Thus, making wifi requirement being needed on alvr being optional.
I also added and changed some hud signs, as well as removed wiki line about client discovery - apparently if you set ip on server and have adb working, it doesn't matter if you have client discovery enabled or not, it will connect to wired in either case.