espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.33k stars 7.2k forks source link

Wi-Fi Easy Connect not working on ESP32-S3 (DPP) (IDFGH-10959) #12151

Open Stencht opened 1 year ago

Stencht commented 1 year ago

Answers checklist.

General issue report

Hi,

I'm trying to implement the Wi-Fi Easy Connect (DPP) for my ESP32-S3 project using ESP-IDF v5.0, using the dpp_enrollee example.

The project compiles without issues and the program displays the QR-Code. When I scan the code and try to add the device, I get following output in the serial monitor:

I (888) phy_init: phy_version 610,2bff4c8,Jul 27 2023,20:22:14
I (928) wifi:mode : sta (f4:12:fa:db:91:d8)
I (928) wifi:enable tsf
I (938) wifi dpp-enrollee: Started listening for DPP Authentication
I (16848) wifi dpp-enrollee: DPP Auth failed (Reason: ESP_ERR_DPP_FAILURE), retry...

If I keep on trying this it eventually works (sometimes 3 times, sometimes +10 times), but this is obviously not workable. The same issue occurs with ESP-IDF v5.1 and v5.2 (master-branch).

II also tried setting some extra config options as described in #10615:

CONFIG_WPA_11KV_SUPPORT=y
CONFIG_WPA_SCAN_CACHE=y
CONFIG_WPA_MBO_SUPPORT=y
CONFIG_WPA_DPP_SUPPORT=y

But this results in the same problem. I've tried with multiple ESP32-S3's, which have no additional HW connected.

agsagmf commented 7 months ago

same issue here. Any update on this ?

kapilkedawat commented 7 months ago

Hi @agsagmf, we are still working on mitigating this issue.

The problem arises when a station is connected to an AP and attempts to initiate DPP on another channel with an ESP device. The issue is that it doesn't wait long enough for the ESP to send a reply. Since the station moves away from the channel before the ESP can send a response, leading to transmission failures of DPP packets and eventually DPP failure.

jgujarathi commented 7 months ago

Hi @Stencht , We have a potential fix that has proved to be helpful in mitigating the occurrence of this issue. Can you please try this fix as well and let us know if it works in your environment?

Steps to test fix :

  1. Download and unzip the following zip file : potential_fix.zip
  2. Apply the patch titled dpp_tx_fail_fix.patch after executing a git pull on the release/v5.1 branch (git apply {path/to/file})
  3. Replace the file libpp.a within the esp-idf repository stored at components/esp_wifi/lib/esp32s3/ with the libpp.a file within the zip file.
  4. Build and run the DPP enrollee example to test the solution.

Please note that this is a provisional solution only made for esp32s3 on the release/v5.1 branch. Please reach out if you have any additional queries.

jgujarathi commented 6 months ago

Hi @Stencht , Have you had the chance to try the above mentioned fix in your environment?

michael-betz commented 1 month ago

One more data-point: DPP is also broken in esp-idf v5.2.1

@jgujarathi if you prepare your potential_fix for the esp32 or esp32c3 I can test it against an Android 14 phone (LineageOS).

ryanrampage1 commented 1 month ago

Any updates on this?

kapilkedawat commented 1 month ago

Hi @michael-betz @ryanrampage1 apologies.. could you please try the fix mentioned in https://github.com/espressif/esp-idf/issues/10615#issuecomment-2250107634 and let us know if that helps?

AxelLin commented 1 month ago

Hi @michael-betz @ryanrampage1 apologies.. could you please try the fix mentioned in #10615 (comment) and let us know if that helps?

@kapilkedawat Please take a look at https://github.com/espressif/esp-idf/issues/10615#issuecomment-2260666752 https://github.com/espressif/esp-idf/issues/10615#issuecomment-2270656550