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

A few changes for WiFiSTA performance #6020

Closed
YordanYanakiev opened this issue Dec 14, 2021 · 3 comments · Fixed by #6022
Closed

A few changes for WiFiSTA performance #6020

YordanYanakiev opened this issue Dec 14, 2021 · 3 comments · Fixed by #6022
Labels
Status: Test needed Issue needs testing Type: Feature request Feature request for Arduino ESP32

Comments

@YordanYanakiev
Copy link

Related area

WiFi

Hardware specification

ESP32/ESP8266

Is your feature request related to a problem?

One of the root of the performance issues related to the Wifi.

Describe the solution you'd like

In WiFiSTA.cpp the user "mlord" ( Mark Lord ) ( https://github.com/mlord ) discovered that the performance issues is related with incoherent with the normal setup initialization in the AUTHMODE.

    if(password != NULL && password[0] != 0){
               wifi_config->sta.threshold.authmode = WIFI_AUTH_WEP;  
                _wifi_strncpy((char*)wifi_config->sta.password, password, 64);

this is incoherent with the nowdays most used WPS2 PSK, and therefore it should be :

    if(password != NULL && password[0] != 0){
               wifi_config->sta.threshold.authmode = WIFI_AUTH_WPA2_PSK;  
                _wifi_strncpy((char*)wifi_config->sta.password, password, 64);

aside of that the current scan overdo it with Scanning all chaneles:

wifi_config->sta.scan_method = WIFI_ALL_CHANNEL_SCAN;

and it should be the fast scan:

wifi_config->sta.scan_method = WIFI_FAST_SCAN;  

these changes drop significally the time for connection from 3 to 17 seconds on some setups down to almost instantly
( the problem discussed in here : #2501 (comment) )

Describe alternatives you've considered

No response

Additional context

No response

@YordanYanakiev YordanYanakiev added the Type: Feature request Feature request for Arduino ESP32 label Dec 14, 2021
@YordanYanakiev YordanYanakiev changed the title A few notes for WiFiSTA performance A few changes for WiFiSTA performance Dec 14, 2021
@me-no-dev
Copy link
Member

a change to do fast scan if channel is selected was just added today. The other change I just added here: #6022

@mlord
Copy link

mlord commented Dec 31, 2021

This fix in #6022 doesn't change anything -- best to revert it.

The authmode gets overwritten with WIFI_AUTH_WEP a few lines further on, which is where the code should get changed to select WIFI_AUTO_WPA2_PSK instead.

@VojtechBartoska
Copy link
Collaborator

@YordanYanakiev and @me-no-dev, can you please validate this changes?

@VojtechBartoska VojtechBartoska added the Status: Test needed Issue needs testing label Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Test needed Issue needs testing Type: Feature request Feature request for Arduino ESP32
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants