diff options
| author | Scott Shawcroft <scott@adafruit.com> | 2020-11-16 14:51:57 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-16 14:51:57 -0800 |
| commit | f4fd236605781e961658054af4356d22fde5e5c9 (patch) | |
| tree | 65fd01b5018215dba3337abf76a2bf4cac53d89f | |
| parent | 516a85aafe4545bba478e3ce5ad1c9157a84a722 (diff) | |
| parent | d4ab00f734203d358299508c01378d97ddf9d40f (diff) | |
Merge pull request #3698 from BennyE/disablesoftap
esp32s2: Set station mode early to avoid SoftAP on startup
| -rw-r--r-- | ports/esp32s2/common-hal/wifi/Radio.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/esp32s2/common-hal/wifi/Radio.c b/ports/esp32s2/common-hal/wifi/Radio.c index 275bae31a..1945da207 100644 --- a/ports/esp32s2/common-hal/wifi/Radio.c +++ b/ports/esp32s2/common-hal/wifi/Radio.c @@ -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; |
