Skip to content

Commit

Permalink
fix dpp init error
Browse files Browse the repository at this point in the history
fix dpp init error, set wifi mode before call esp_supp_dpp_init
  • Loading branch information
sparkertim authored Dec 11, 2023
1 parent 692c1fc commit b41d709
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ void dpp_enrollee_init(void)
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
ESP_ERROR_CHECK(esp_wifi_init(&cfg));

ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA));
ESP_ERROR_CHECK(esp_supp_dpp_init(dpp_enrollee_event_cb));
ESP_ERROR_CHECK(dpp_enrollee_bootstrap());
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA));
ESP_ERROR_CHECK(esp_wifi_start());

/* Waiting until either the connection is established (WIFI_CONNECTED_BIT) or connection failed for the maximum
Expand Down

0 comments on commit b41d709

Please sign in to comment.