Skip to content

example/softap_sta: fix missing STA_DISCONNECTED handler (IDFGH-17730)#18662

Open
hphuc15 wants to merge 1 commit into
espressif:release/v5.5from
hphuc15:fix/softap_sta_missing_disconnect_handler
Open

example/softap_sta: fix missing STA_DISCONNECTED handler (IDFGH-17730)#18662
hphuc15 wants to merge 1 commit into
espressif:release/v5.5from
hphuc15:fix/softap_sta_missing_disconnect_handler

Conversation

@hphuc15
Copy link
Copy Markdown

@hphuc15 hphuc15 commented May 29, 2026

Description

The WIFI_EVENT_STA_DISCONNECTED handler was missing, causing WIFI_FAIL_BIT
to never be set after connection failure. This results in
xEventGroupWaitBits() blocking indefinitely in app_main().

Also removed failure_retry_cnt from STA config to be consistent with
the getting_started/station example which uses app-level retry only.

Related

N/A

Testing

Tested on ESP32/ESP32-S3 with incorrect WiFi credentials to verify WIFI_FAIL_BIT
is set correctly after EXAMPLE_ESP_MAXIMUM_RETRY attempts. Device exits
xEventGroupWaitBits() as expected with WIFI_FAIL_BIT set.


Checklist

Before submitting a Pull Request, please ensure the following:

  • This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

- Without this handler, WIFI_FAIL_BIT is never set after connection
failure. s_retry_num was declared but never incremented.

- Also remove failure_retry_cnt from STA config to be consistent with
the getting_started/station example with uses app-level retry only.

Signed-off-by: Võ Hồng Phúc <hphuc15@outlook.com.vn>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 29, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot changed the title example/softap_sta: fix missing STA_DISCONNECTED handler example/softap_sta: fix missing STA_DISCONNECTED handler (IDFGH-17730) May 29, 2026
@espressif-bot espressif-bot added the Status: Opened Issue is new label May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Opened Issue is new

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants