On V3.4.2 with Core3 and using screensaver mode a user reported that he could not wake…
- User
On V3.4.2 with Core3 and using screensaver mode a user reported that he could not wake the dsiplay up. Can you check what could have caused that and fix it (keep it V3.4.2)?
Assistant
Good — current checkout is V3.4.2. Now let's examine the touch reading path and M5.update() call to see if touch is actually refreshed when screen is off on CoreS3.
Assistant
I found the likely root cause. Before applying a fix, one thing needs your input.
Assistant
Now let's re-apply the fix, keeping V3.4.2 (no version bump this time).
Assistant
Now check other callers of
connect_wifito make sure the new default arg doesn't break them.Assistant
All other callers keep defaulting to
wait_for_result = true, unaffected. Now verify no leftover trace of doc file reference and confirm build compiles.Assistant
Now let's verify the build compiles for CoreS3 (and Core2) targets.
Assistant
Build succeeds for CoreS3. Confirming version stayed at 3.4.2 and checking git status.
Assistant
Version stays 3.4.2, build passes. I won't commit — let me know if you'd like me to.
Root cause:
ApiConnector::maintain_connection()ran everyloop()iteration and called the blockingconnect_wifi()(up to 3s wait, more on Core2) whenever WiFi was down — e.g. wrong/missing credentials with a device ID configured. That starvedM5.update(), so touch polling stalled and the screensaver wake tap was never sampled. This is the exact bug PR #90 fixed, which got merged then reverted (both today, before my session) — I re-applied it after confirming with you.Fix:
WiFiWrapper::connect_wifi()now takeswait_for_result(defaulttrue, unchanged for existing UI-triggered callers). The background path inmaintain_connection()passesfalse— it kicks off the reconnect attempt and returns immediately instead of blockingloop().Files touched: api_connector.cpp, wifi_connection.h, wifi_connection.cpp, .
- User
That fixes core2 and core3?
Assistant
Yes, both. Both build clean.
The fix is board-agnostic —
wait_for_resultgating lives in the sharedWiFiWrapper::connect_wifi()/maintain_connection()path, not behind any#ifdef CORE2/#ifdef CORES3. So:- Core2: was worse (extra
esp_wifi_stop()/start()+delay()s stacked on top of the 3s wait → up to ~3.8s freeze), causing menu buttons to appear unresponsive. Now fixed. - CoreS3: same 3s blocking
wait_for_connection()call, just without Core2's extra delays — still enough to make the loop miss a touch sample during screensaver wake. Now fixed the same way.
Both targets build successfully.
- Core2: was worse (extra
- User
Please commit/push/PR and merge.
Assistant
Both pushed. Now creating the GitHub PR against
development.Assistant
PR created: https://github.com/Safecast/bGeigieZen/pull/92. Merging now.
Assistant
Merged into
developmenton GitHub, and the local branch was fast-forwarded. Now syncing localdevelopmentand Codeberg.Assistant
gh pr merge --delete-branchalready deleted the local branch (that's why I was auto-switched todevelopment) and the GitHub remote branch, but the origin ref and Codeberg copy of the feature branch are stale leftovers. Cleaning those up.Assistant
Done. Summary:
- Merged PR #92 into
developmenton GitHub (fast-forward merge), feature branch deleted on GitHub. - Pushed the same
developmenthistory to Codeberg, deleted the feature branch there too. - Local
developmentis now at6ea17d7a, in sync with both remotes, working tree clean. - Firmware version stays at 3.4.2 as requested.
- Merged PR #92 into