File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
ports/esp32s2/common-hal/wifi Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -142,10 +142,10 @@ wifi_radio_error_t common_hal_wifi_radio_connect(wifi_radio_obj_t *self, uint8_t
142
142
} else {
143
143
config -> sta .bssid_set = 0 ;
144
144
}
145
- // if channel and bssid both not set , do a full scan instead of fast scan
146
- // this will ensure that the best AP is chosen automatically
147
- if ((self -> sta .bssid_set == 0 ) && (self -> sta .channel == NULL )) {
148
- config .scan_method = WIFI_ALL_CHANNEL_SCAN ;
145
+ // If channel is 0 (default/unset) and BSSID is not given , do a full scan instead of fast scan
146
+ // This will ensure that the best AP in range is chosen automatically
147
+ if ((config -> sta .bssid_set == 0 ) && (config -> sta .channel == 0 )) {
148
+ config -> sta .scan_method = WIFI_ALL_CHANNEL_SCAN ;
149
149
}
150
150
esp_wifi_set_config (ESP_IF_WIFI_STA , config );
151
151
self -> starting_retries = 5 ;
You can’t perform that action at this time.
0 commit comments