We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a67740 commit c58b0adCopy full SHA for c58b0ad
ports/esp32s2/common-hal/wifi/__init__.c
@@ -100,6 +100,13 @@ void common_hal_wifi_init(void) {
100
wifi_radio_obj_t* self = &common_hal_wifi_radio_obj;
101
self->netif = esp_netif_create_default_wifi_sta();
102
103
+ // Even though we just called esp_netif_create_default_wifi_sta,
104
+ // station mode isn't actually set until esp_wifi_set_mode()
105
+ // is called and the configuration is loaded via esp_wifi_set_config().
106
+ // Set both convienence flags to false so it's not forgotten.
107
+ self->sta_mode = 0;
108
+ self->ap_mode = 0;
109
+
110
self->event_group_handle = xEventGroupCreateStatic(&self->event_group);
111
ESP_ERROR_CHECK(esp_event_handler_instance_register(WIFI_EVENT,
112
ESP_EVENT_ANY_ID,
0 commit comments