-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
[TW#15357] WPS always gets Timed Out at 2 minutes / 120000 ms #987
Comments
Hi Raienryu97, the time 2 minutes is ruled by protocol, used to check whether WPS progress can finish in 2 minutes, and we have set it in the firmware, it can't be changed, I am not sure whether my answer can be satisfied with you. |
@XinDeng11 , In this function /**
* @brief WPS starts to work.
*
* @attention WPS can only be used when ESP32 station is enabled.
*
* @param timeout_ms : maximum blocking time before API return.
* - 0 : non-blocking
* - 1~120000 : blocking time (not supported in IDF v1.0)
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_WIFI_WPS_TYPE : wps type is invalid
* - ESP_ERR_WIFI_WPS_MODE : wifi is not in station mode or sniffer mode is on
* - ESP_ERR_WIFI_WPS_SM : wps state machine is not initialized
* - ESP_ERR_WIFI_FAIL : wps initialization fails
*/
esp_err_t esp_wifi_wps_start(int timeout_ms); taken from here , what does the blocking timeout represent then? Thanks for the response :) |
@Raienryu97 Hi, this parameter is use to block the API until timeout, it is another time different with 2 minutes , and the feature will add in the future, we are on plan, thanks. |
Board : ESP32 Dev Module
Latest Local Commit : 050ae50
Issue:
Setting
timeout_ms
parameter inesp_err_t esp_wifi_wps_start(int timeout_ms);
does not make a difference, ESP times out only at 120000ms or 2 minutesI have tried changing
timeout_ms
to 1/2/1000/5000 and all of them still timeout only after 2 minutes including 0 too.I am not sure if it is a bug or if I'm doing something wrong in the code. I've just edited the inbuilt example and changed only the
timeout_ms
parameter.Here is my serial log. You can observe that the timeout happens at 120506 ms and the event loop starts at 496 ms , timeout happens after 120000 ms instead of the coded 5000 ms
Code:
Also I dont think the code is actually blocking since wps started at 496th ms and the next
ESP_LOGI
line of code got executed at 1806th msPlease let me know if there is any additional configuration required or if this is a bug in the WPS
Thank You
The text was updated successfully, but these errors were encountered: