Skip to content

Fix Improv WiFi issues with Power Management - #246

Merged
CarlosDerSeher merged 1 commit into
CarlosDerSeher:developfrom
blattm:fix/improv-light-sleep
Nov 3, 2026
Merged

CarlosDerSeher merged 1 commit into
CarlosDerSeher:developfrom
blattm:fix/improv-light-sleep

Conversation

@blattm

@blattm blattm commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

I had issues provisioning a new snapcast device, that were caused by PM interfering with improv's UART connection. I added a sleep lock around the improv code, to prevent this problem.

With CONFIG_PM_ENABLE and tickless idle, automatic light sleep stops the
UART from receiving, so Improv requests over serial were never answered.
Hold an ESP_PM_APB_FREQ_MAX lock from improv_init() until improv_deinit().

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@blattm blattm changed the title Fix Improve WiFi issues with Power Management Fix Improv WiFi issues with Power Management Oct 25, 2026
@CarlosDerSeher

CarlosDerSeher commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Wouldn't this prevent light sleep at all times? I am uncertain about how the implementation works, it has been a while. But I believe improv is always active? Or is it disabled after successfull provisioning?

@blattm

blattm commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

I think improv_deinit is called after 3 minutes from wifi_interface.c, so sleep should work again after this time.

@CarlosDerSeher

Copy link
Copy Markdown
Owner

I think you are right. Could you still verify this and then we definitely can merge.

@blattm

blattm commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

I just restarted a snapclient, looked at the logs and it deinitializes as expected

[esp32-udp-logger-1F38] I (180997) WIFI_IF: Deinitiating improv provisioning (after 180000 ms)
[esp32-udp-logger-1F38] I (180999) IMPROV: UART0 deinitialized

@CarlosDerSeher
CarlosDerSeher merged commit a5ec0ef into CarlosDerSeher:develop Nov 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants