Skip to content

Full WiFi scan (backport of upstream 5351)#339

Merged
softhack007 merged 1 commit intomdevfrom
wifiscan_fix
Feb 6, 2026
Merged

Full WiFi scan (backport of upstream 5351)#339
softhack007 merged 1 commit intomdevfrom
wifiscan_fix

Conversation

@softhack007
Copy link
Collaborator

@softhack007 softhack007 commented Feb 6, 2026

As found in wled#5345:
fixes an arduino-esp32 v2.0.x bug: don't use quick scan (and use the first matching channel) but do a full scan instead.

Summary by CodeRabbit

  • Bug Fixes
    • Improved WiFi scanning to automatically select the strongest available signal for more reliable wireless connections.

@coderabbitai
Copy link

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

A conditional WiFi scan method is added to the setup routine that forces all-channel scanning on supported platforms. When not building for ESP8266 and ESP_IDF_VERSION_MAJOR is 4 or higher, the code calls WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN) to ensure the device scans all available channels and selects the strongest signal during WiFi initialization.

Changes

Cohort / File(s) Summary
WiFi Scan Configuration
wled00/wled.cpp
Adds platform-specific WiFi scan configuration in setup via preprocessor guard, enabling all-channel scanning on supported ESP-IDF versions to optimize signal strength selection.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 All channels bright, we'll scan them through,
No weaker signals left to rue,
The strongest WiFi now we'll find,
A scanning quest, most perfectly designed! 📡✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: introducing a full WiFi scan feature as a backport from upstream WLED, which matches the code change adding WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN) to ensure comprehensive channel scanning.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch wifiscan_fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@softhack007 softhack007 merged commit 812c5ca into mdev Feb 6, 2026
69 checks passed
@softhack007 softhack007 deleted the wifiscan_fix branch February 6, 2026 14:03
@softhack007
Copy link
Collaborator Author

looks ok in my tests.

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.

1 participant