Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2195109

Browse filesBrowse files
ingframinme-no-dev
authored andcommitted
Added the channel parameter to the scan fucntion in order to select which channel to scan. (espressif#3638)
The default value is 0 (= all channels) to preserve backward compatibility.
1 parent 8d938c8 commit 2195109
Copy full SHA for 2195109

File tree

Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed

‎libraries/WiFi/src/WiFiScan.cpp

Copy file name to clipboardExpand all lines: libraries/WiFi/src/WiFiScan.cpp
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void* WiFiScanClass::_scanResult = 0;
5454
* @param show_hidden show hidden networks
5555
* @return Number of discovered networks
5656
*/
57-
int16_t WiFiScanClass::scanNetworks(bool async, bool show_hidden, bool passive, uint32_t max_ms_per_chan)
57+
int16_t WiFiScanClass::scanNetworks(bool async, bool show_hidden, bool passive, uint32_t max_ms_per_chan, uint8_t channel)
5858
{
5959
if(WiFiGenericClass::getStatusBits() & WIFI_SCANNING_BIT) {
6060
return WIFI_SCAN_RUNNING;
@@ -70,7 +70,7 @@ int16_t WiFiScanClass::scanNetworks(bool async, bool show_hidden, bool passive,
7070
wifi_scan_config_t config;
7171
config.ssid = 0;
7272
config.bssid = 0;
73-
config.channel = 0;
73+
config.channel = channel;
7474
config.show_hidden = show_hidden;
7575
if(passive){
7676
config.scan_type = WIFI_SCAN_TYPE_PASSIVE;

‎libraries/WiFi/src/WiFiScan.h

Copy file name to clipboardExpand all lines: libraries/WiFi/src/WiFiScan.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class WiFiScanClass
3131

3232
public:
3333

34-
int16_t scanNetworks(bool async = false, bool show_hidden = false, bool passive = false, uint32_t max_ms_per_chan = 300);
34+
int16_t scanNetworks(bool async = false, bool show_hidden = false, bool passive = false, uint32_t max_ms_per_chan = 300, uint8_t channel = 0);
3535

3636
int16_t scanComplete();
3737
void scanDelete();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.