Closed 0xFEEDC0DE64 closed 5 months ago
more customers contacted us, they also receive NO_AP_FOUND_IN_AUTHMODE_THRESHOLD
why are these new errors emitted?
by the way the threshold is set to open in all situations in our firmware:
wifi_config_t make_sta_config(std::string_view ssid, std::string_view password, int8_t min_rssi,
std::optional<mac_t> bssid, uint8_t channel)
{
wifi_config_t wifi_config;
wifi_config.sta.channel = channel;
wifi_config.sta.listen_interval = 0;
wifi_config.sta.scan_method = WIFI_FAST_SCAN; //WIFI_ALL_CHANNEL_SCAN or WIFI_FAST_SCAN
wifi_config.sta.sort_method = WIFI_CONNECT_AP_BY_SIGNAL; //WIFI_CONNECT_AP_BY_SIGNAL or WIFI_CONNECT_AP_BY_SECURITY
wifi_config.sta.threshold.rssi = min_rssi;
wifi_config.sta.pmf_cfg.capable = true;
wifi_config.sta.pmf_cfg.required = false;
wifi_config.sta.bssid_set = 0;
std::fill(std::begin(wifi_config.sta.bssid), std::end(wifi_config.sta.bssid), 0);
wifi_config.sta.threshold.authmode = WIFI_AUTH_OPEN;
wifi_config.sta.ssid[0] = 0;
wifi_config.sta.password[0] = 0;
if (!ssid.empty())
{
copyStrToBuf(wifi_config.sta.ssid, ssid);
if (!password.empty())
{
wifi_config.sta.threshold.authmode = WIFI_AUTH_WEP;
copyStrToBuf(wifi_config.sta.password, password);
}
if (bssid)
{
wifi_config.sta.bssid_set = 1;
bssid->copyTo(wifi_config.sta.bssid);
}
}
return wifi_config;
}
Hi @0xFEEDC0DE64
If the scan fails to find the target AP, WIFI_EVENT_STA_DISCONNECTED
_ will arise and the reason code could either be WIFI_REASON_NO_AP_FOUND
or WIFI_REASON_NO_AP_FOUND_W_COMPATIBLE_SECURITY
or WIFI_REASON_NO_AP_FOUND_IN_AUTHMODE_THRESHOLD
or WIFI_REASON_NO_AP_FOUND_IN_RSSI_THRESHOLD
depending of the Station's configuration.
The possible reasons are listed above, and you can further confirm the specific reasons by opening the debug level. menuconfig -> Component config -> Log output -> Default log verbosity -> Debug
The possible reasons are listed above, and you can further confirm the specific reasons by opening the debug level. menuconfig -> Component config -> Log output -> Default log verbosity -> Debug
@mhdong Is there any api to get the the specific reasons in standard build? Sometimes, it's not possible to install a debug build on a customer's device.
I did another esp-rebase (we have already been 1300 commits behind from master) and now it seems at least one customer had success connecting to his wifi again, seems like the issue was only in a certain range of commits.
Sometimes I really wish for an open source wifi driver to better understand what is going on inside.
Hi @AxelLin NO_AP_FOUND_IN_AUTHMODE_THRESHOLD and WIFI_REASON_NO_AP_FOUND_W_COMPATIBLE_SECURITY is specific reasons for customer. Thank you very much for your suggestion. If all possible reasons are added as reason codes, it will result in too many reason codes. We will continue to add reasons that are meaningful to customers or can quickly identify issues in the future.
Hi @0xFEEDC0DE64 Thank you very much for your suggestion. For ease of use, we will continuously optimize the reason codes for scan fails to find the target AP.
If all possible reasons are added as reason codes, it will result in too many reason codes. We will continue to add reasons that are meaningful to customers or can quickly identify issues in the future.
My point is: You cannot assume every device has a console to show the prints. If there is no api to get the real reason code, it's very difficult to understand what's wrong especially when it only happens on certain customer's environment.
Thanks for reporting, will close due to short of feedback from the reporter, feel free to reopen with more updates. Thanks for using our Espressif product!
@0xFEEDC0DE64 There may be a problem with your code. wifi_config_t wifi_config is not initialized, which will cause the unset members to carry garbage values. Of course, this is not necessarily the cause of your problem.
Hi,
we are used a bit outdated esp-idf version and it seems like a lot of customers of our products receive the event WIFI_REASON_NO_AP_FOUND_W_COMPATIBLE_SECURITY since our rebase of the used esp-idf submodule.
we are using esp-idf fork: https://github.com/0xFEEDC0DE64/esp-idf/commits/fixes/ which is based on the espressif commit https://github.com/espressif/esp-idf/commit/5454d37d496a8c58542eb450467471404c606501
My question is now: Is there a reason for this error to occur now? Customers can downgrade the firmware to an old esp-idf and then their home wifi works again.
Will another esp idf rebase help in this situation?