wifi: scan 5GHz channels on dual-band radios - #11308
Open
mikeysklar wants to merge 1 commit into
Open
Conversation
Dual-band radios come up 2.4GHz only, and the scan API rejected any channel above 14, so 5GHz networks were unreachable. Gated on SOC_WIFI_SUPPORT_5G, so single-band builds are unchanged.
mikeysklar
force-pushed
the
esp32c5-wifi-5ghz
branch
from
September 4, 2026 18:10
983ad10 to
2bfc75e
Compare
mikeysklar
marked this pull request as ready for review
September 4, 2026 19:36
mikeysklar
marked this pull request as draft
September 4, 2026 19:42
Member
|
As I understand it scanning is a passive activity, so there's no harm in scanning channels 12, 13, or even 14. I'm in the US, and I actually do see traffic on channels 12 and 13. It would be useful to see if there is something running that (presumably) shouldn't be. |
Member
|
Looks like ESP-IDF handles active vs passive scanning for us. From here:
|
mikeysklar
marked this pull request as ready for review
September 5, 2026 02:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #11297. Base is
esp32c5-board, so only the top commit is new here.What
Lets
wifi.radio.start_scanning_networks()reach 5 GHz on dual-band radios.Why
Three things blocked it:
scan_patternstopped at channel 14SOC_WIFI_SUPPORT_5Gstop_channeldefaulted to 11DFS channels are left out. They need radar detection before transmitting.
Open question
Raising the default from 11 to 165 also changes 2.4 GHz boards, which now
scan channels 12, 13 and 14. 11 is the FCC-legal maximum, so that may have
been deliberate. Happy to make the default band-dependent instead.
Hardware tested
ESP32-C5-DevKitC-1-N8R8,
10.3.0-22-ge514194c68-dirty, host Ubuntu 24.04.That is the stack tip, so it also carries #11309, which does not touch scanning.
scan()scan(start_channel=1, stop_channel=165)scan(start_channel=1, stop_channel=11)scan(start_channel=36, stop_channel=165)scan(stop_channel=166)ValueError: stop_channel must be 1-165The 36-165 row is the skip fix: it starts above the 2.4 GHz part of the pattern,
and the scan completes instead of ending at the first rejected channel.
Not tested: a 2.4 GHz only board. The
scan_patternchange is gated onSOC_WIFI_SUPPORT_5G, but thestop_channeldefault of 165 applies everywhere.AI assistance
Claude wrote the scan-skip loop and the docstring. I found both defects on
hardware, ran the scans, and verified the channel lists myself.