Set station mode early to avoid SoftAP on startup

This commit is contained in:
BennyE 2020-11-16 00:31:06 +01:00
parent f2e911ad91
commit d4ab00f734

View File

@ -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;