-
Notifications
You must be signed in to change notification settings - Fork 122
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
Auto join to networks whenever not connected #133
base: master
Are you sure you want to change the base?
Conversation
I think having status with a shorter period as stand alone would be better because if you set the wifi as off, all the other methods would still be able to connect because the status won't be updated until 5 seconds later. |
As @ErrorErrorError mentioned, status updating needs a shorter period. And I suspect trying to connect saved networks all the time will interrupt and cause conflicts with the manual connecting, because the status will shift several times amid the connecting process. |
Looks like it will only reconnect to networks that are already saved and that have the auto join checked, not just any network saved |
The update right now updates status before updating networks and connecting - so I don't think there will be issues with auto join messing with a user manually joining before autojoin does. Additionally, autojoin is more likely to join before a user is able to open the wifi panel anyway if coming out of sleep and putting in a password and stuff. Autojoin will only attempt to connect to networks which are currently returned from scanning and are saved off in the keychain. Though there is the concern of a user attempting to connect after autojoin has started connecting, though 5 seconds is a short window for this to happen. I'll see what I can do about that I guess |
I meant a connecting attempt in itlwm might last like 10~15s, so "autojoin" can happen in the middle of this. Also, what if people just want to keep disconnected? |
The state during a connection attempt shouldn't be |
I think we should wait until authentication is fully implemented in itlwm, so we can at least know when it's actually authenticating/associating, and if that's so we could have a Boolean when autoconnect was active or something that notifies that auto connect made an attempt to connect so when the user decides to connect to a network we can intercept that connection. Or the other way around, check if there was an attempt to manually connect and not autoconnect in the meantime. Well I think it will all depend once itlwm auth is implemented, and just an idea :p |
According to zxystd, the driver might crash in the connecting phase, then it will reload the firmware and re-initialize the hardware, therefore an 'init' state could show up when connecting. It would be a better solution to get the result from itlwm side when trying to connect a network, but currently it is not yet implemented in itlwm. |
It's likely better to wait until such an API is put in then, at which point this PR can be reworked to use it. |
Giving a user the option on when and how to connect is a good idea Thank you all for the Great Work you've done ✔ |
Whenever HeliPort gets scanned networks, it'll compare them with stored networks and autoconnect if it matches a stored network. It will only do this when not connected.
I did move the network updates over to the same timer that updates the status, as it made it a little easier to get the scanned networks without calling
scanNetwork
again. Though, this can be changed back