File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
ports/esp32s2/common-hal/wifi Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,13 @@ void common_hal_wifi_init(void) {
100
100
wifi_radio_obj_t * self = & common_hal_wifi_radio_obj ;
101
101
self -> netif = esp_netif_create_default_wifi_sta ();
102
102
103
+ // Even though we just called esp_netif_create_default_wifi_sta,
104
+ // station mode isn't actually ready for use 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
+
103
110
self -> event_group_handle = xEventGroupCreateStatic (& self -> event_group );
104
111
ESP_ERROR_CHECK (esp_event_handler_instance_register (WIFI_EVENT ,
105
112
ESP_EVENT_ANY_ID ,
You can’t perform that action at this time.
0 commit comments