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

Setting timeout_ms to esp_wifi_wps_start() has no effect (IDFGH-8996) #10407

Closed
3 tasks done
AxelLin opened this issue Dec 20, 2022 · 10 comments
Closed
3 tasks done

Setting timeout_ms to esp_wifi_wps_start() has no effect (IDFGH-8996) #10407

AxelLin opened this issue Dec 20, 2022 · 10 comments
Assignees
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@AxelLin
Copy link
Contributor

AxelLin commented Dec 20, 2022

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v5.1-dev-2356-gedd815af2e

Operating System used.

Linux

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

None

Development Kit.

ESP32C3DevKit-M1

Power Supply used.

USB

What is the expected behavior?

The comment says "timeout_ms : maximum blocking time before API return.":
https://github.com/espressif/esp-idf/blob/master/components/wpa_supplicant/esp_supplicant/include/esp_wps.h#L104-L106
So I would expect setting timeout_ms should work.

But the esp_wifi_wps_start() function does not use the timeout_ms at all.

What is the actual behavior?

Setting timeout_ms to esp_wifi_wps_start has no effect

Steps to reproduce.

You can set timeout_ms for esp_wifi_wps_start() in wps example code.

Debug Logs.

No response

More Information.

No response

@AxelLin AxelLin added the Type: Bug bugs in IDF label Dec 20, 2022
@espressif-bot espressif-bot added the Status: Opened Issue is new label Dec 20, 2022
@github-actions github-actions bot changed the title Setting timeout_ms to esp_wifi_wps_start() has no effect Setting timeout_ms to esp_wifi_wps_start() has no effect (IDFGH-8996) Dec 20, 2022
@kriegste
Copy link

I'd rather have a parameter to specify how long WPS is attempted. It is now 120 seconds, but it would be helpful if we can set a shorter time.

@kapilkedawat
Copy link
Collaborator

This variable was deprecated long time back, we now use events to update WPS status to application. We will update the API doc to reflect the same.

@kriegste This is as per specification. Also 120 secs is the max time, if the AP is available, it will take very minimal time.

@kriegste
Copy link

The AP has to provide WPS for 120 seconds. Are you sure this specification is for the client, too? On the ESP8266 the WPS timeout is only 15 seconds!

@kapilkedawat
Copy link
Collaborator

Yes, walk time for an enrollee is defined as 120 sec by default, you can use a lower value but that messes up the registrar logic in some registrar where monitor time is 120 secs and any two probes from two enrollee will be considered as WPS overlap.

Also why do you want to decrease this value? Can you explain the usecase in detail?

@AxelLin
Copy link
Contributor Author

AxelLin commented Dec 28, 2022

#987 (comment)

@kriegste
Copy link

kriegste commented Dec 28, 2022

To setup WiFi we use WPS or the SoftAP (and an HTTP server on the ESP32, so the user can enter the password manually).
Not all users have WPS as an option!

In initial tests, we had problems with the stability of the SoftAP during WPS. On the ESP8266 the SoftAP was not available at all during WPS. But there it took only 15 seconds and then WPS ran into the timeout. So the user did not have to wait too long.
On the ESP32 this takes 120 seconds. Lowering it to 15 seconds (like on the ESP8266) by editing the IDF solved the issue for us.

The devices do not have buttons or displays. So upon first boot, WPS is tried automatically.

@espressif-bot espressif-bot added Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: Opened Issue is new Resolution: NA Issue resolution is unavailable labels Jan 25, 2023
@kriegste
Copy link

Same problem (disconnect due to WPS) here:
#9825

@AxelLin
Copy link
Contributor Author

AxelLin commented May 7, 2023

@kapilkedawat

I don't understand the meaning of this issue status.
It's marked as Resolution: Done for several months, but the issue is still open. What is fixed?

@kapilkedawat
Copy link
Collaborator

This variable was deprecated long time back, we now use events to update WPS status to application. We will update the API doc to reflect the same.

As mentioned in comment API has been updated since the argument has no effect. 142f339

@AxelLin AxelLin closed this as completed May 7, 2023
@kapilkedawat
Copy link
Collaborator

In initial tests, we had problems with the stability of the SoftAP during WPS. On the ESP8266 the SoftAP was not available at all during WPS. But there it took only 15 seconds and then WPS ran into the timeout. So the user did not have to wait too long.

@kriegste this will be taken care in next releases. During the scan, softAP will come back to home channel to do tx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

4 participants