Merge pull request #3698 from BennyE/disablesoftap
esp32s2: Set station mode early to avoid SoftAP on startup
This commit is contained in:
commit
f4fd236605
|
@ -72,6 +72,8 @@ void common_hal_wifi_radio_set_enabled(wifi_radio_obj_t *self, bool enabled) {
|
|||
return;
|
||||
}
|
||||
if (!self->started && enabled) {
|
||||
// esp_wifi_start() would default to soft-AP, thus setting it to station
|
||||
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA));
|
||||
ESP_ERROR_CHECK(esp_wifi_start());
|
||||
self->started = true;
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue