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

Faster wifi connecting (up to 2sec restart -> connected) #1297

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NonPIayerCharacter
Copy link
Contributor

BK7231 only (N tested, don't have T).
Originally just used hardcoded values for myself.
After wifi first connected to ap, calculate PSK, then store it, bssid, channel and security type to LFS.
After reboot, these values will be used, allowing to drastically reduce connection time (WIFI_STA_CONNECTED in 1.5-2s after force reboot and before even Info:MAIN:Time 1).
Will mark as draft, feel free to adopt, as i have no desire to further fix/improve it.
Currently have no idea, how it will react, if anything on ap side changed.

@DeDaMrAzR
Copy link
Contributor

@NonPIayerCharacter

I tried this PR but when I hardcoded my values the N module I use for testing froze on boot. Can you elaborate a bit more on the usage so we can test this a bit more because it has great potential?

Thanks.

@NonPIayerCharacter
Copy link
Contributor Author

NonPIayerCharacter commented Oct 1, 2024

@DeDaMrAzR pushed an update, now it stores data to cfg, making it easier to repair (just erase cfg). In essence, on first successful connection, it calculates PSK (i was unable to get already calculated one), then saves all the required data for bk_wlan_start_sta_adv (channel, security, psk, bssid).
Another problem is, that if any saved data is incorrect (like channel == 0), then no wifi event is sent, making it appear dead.

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

Successfully merging this pull request may close these issues.

2 participants