mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 02:37:19 +02:00
Merge branch 'bugfix/fix_iperf_example_crash_issue_v3.3' into 'release/v3.3'
Bugfix/fix iperf example crash issue v3.3 (backport v3.3) See merge request espressif/esp-idf!12018
This commit is contained in:
@ -350,7 +350,7 @@ static void example_event_callback(esp_blufi_cb_event_t event, esp_blufi_cb_para
|
||||
.channel = 0,
|
||||
.show_hidden = false
|
||||
};
|
||||
ESP_ERROR_CHECK(esp_wifi_scan_start(&scanConf, true));
|
||||
esp_wifi_scan_start(&scanConf, true);
|
||||
break;
|
||||
}
|
||||
case ESP_BLUFI_EVENT_RECV_CUSTOM_DATA:
|
||||
|
@ -148,7 +148,7 @@ static bool wifi_cmd_sta_join(const char *ssid, const char *pass)
|
||||
esp_wifi_disconnect();
|
||||
//ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_STA) ); //by snake
|
||||
ESP_ERROR_CHECK( esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config) );
|
||||
ESP_ERROR_CHECK( esp_wifi_connect() );
|
||||
esp_wifi_connect();
|
||||
|
||||
xEventGroupWaitBits(wifi_event_group, CONNECTED_BIT, 0, 1, 5000 / portTICK_RATE_MS);
|
||||
|
||||
@ -175,7 +175,7 @@ static bool wifi_cmd_sta_scan(const char *ssid)
|
||||
scan_config.ssid = (uint8_t *) ssid;
|
||||
|
||||
ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_STA) );
|
||||
ESP_ERROR_CHECK( esp_wifi_scan_start(&scan_config, false) );
|
||||
esp_wifi_scan_start(&scan_config, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ void mesh_scan_done_handler(int num)
|
||||
esp_wifi_scan_stop();
|
||||
scan_config.show_hidden = 1;
|
||||
scan_config.scan_type = WIFI_SCAN_TYPE_PASSIVE;
|
||||
ESP_ERROR_CHECK(esp_wifi_scan_start(&scan_config, 0));
|
||||
esp_wifi_scan_start(&scan_config, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -173,7 +173,7 @@ void mesh_event_handler(mesh_event_t event)
|
||||
/* mesh softAP is hidden */
|
||||
scan_config.show_hidden = 1;
|
||||
scan_config.scan_type = WIFI_SCAN_TYPE_PASSIVE;
|
||||
ESP_ERROR_CHECK(esp_wifi_scan_start(&scan_config, 0));
|
||||
esp_wifi_scan_start(&scan_config, 0);
|
||||
break;
|
||||
case MESH_EVENT_STOPPED:
|
||||
ESP_LOGI(MESH_TAG, "<MESH_EVENT_STOPPED>");
|
||||
@ -229,7 +229,7 @@ void mesh_event_handler(mesh_event_t event)
|
||||
esp_wifi_scan_stop();
|
||||
scan_config.show_hidden = 1;
|
||||
scan_config.scan_type = WIFI_SCAN_TYPE_PASSIVE;
|
||||
ESP_ERROR_CHECK(esp_wifi_scan_start(&scan_config, 0));
|
||||
esp_wifi_scan_start(&scan_config, 0);
|
||||
}
|
||||
break;
|
||||
case MESH_EVENT_LAYER_CHANGE:
|
||||
|
@ -153,7 +153,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
|
||||
switch (event->event_id) {
|
||||
case SYSTEM_EVENT_STA_START:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_START");
|
||||
ESP_ERROR_CHECK(esp_wifi_connect());
|
||||
esp_wifi_connect();
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_GOT_IP:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_GOT_IP");
|
||||
@ -162,7 +162,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_DISCONNECTED:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_DISCONNECTED");
|
||||
ESP_ERROR_CHECK(esp_wifi_connect());
|
||||
esp_wifi_connect();
|
||||
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);
|
||||
break;
|
||||
default:
|
||||
|
@ -24,7 +24,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
|
||||
switch(event->event_id) {
|
||||
case SYSTEM_EVENT_STA_START:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_START");
|
||||
ESP_ERROR_CHECK(esp_wifi_connect());
|
||||
esp_wifi_connect();
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_GOT_IP:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_GOT_IP");
|
||||
@ -39,7 +39,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_DISCONNECTED:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_DISCONNECTED");
|
||||
ESP_ERROR_CHECK(esp_wifi_connect());
|
||||
esp_wifi_connect();
|
||||
|
||||
// Stop webserver tests
|
||||
if (*hd) {
|
||||
|
@ -37,7 +37,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
|
||||
switch(event->event_id) {
|
||||
case SYSTEM_EVENT_STA_START:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_START");
|
||||
ESP_ERROR_CHECK(esp_wifi_connect());
|
||||
esp_wifi_connect();
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_GOT_IP:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_GOT_IP");
|
||||
@ -46,7 +46,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_DISCONNECTED:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_DISCONNECTED");
|
||||
ESP_ERROR_CHECK(esp_wifi_connect());
|
||||
esp_wifi_connect();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -197,7 +197,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
|
||||
switch(event->event_id) {
|
||||
case SYSTEM_EVENT_STA_START:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_START");
|
||||
ESP_ERROR_CHECK(esp_wifi_connect());
|
||||
esp_wifi_connect();
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_GOT_IP:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_GOT_IP");
|
||||
@ -211,7 +211,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_DISCONNECTED:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_DISCONNECTED");
|
||||
ESP_ERROR_CHECK(esp_wifi_connect());
|
||||
esp_wifi_connect();
|
||||
|
||||
/* Stop the webserver */
|
||||
if (*server) {
|
||||
|
@ -255,7 +255,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
|
||||
switch(event->event_id) {
|
||||
case SYSTEM_EVENT_STA_START:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_START");
|
||||
ESP_ERROR_CHECK(esp_wifi_connect());
|
||||
esp_wifi_connect();
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_GOT_IP:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_GOT_IP");
|
||||
@ -269,7 +269,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_DISCONNECTED:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_DISCONNECTED");
|
||||
ESP_ERROR_CHECK(esp_wifi_connect());
|
||||
esp_wifi_connect();
|
||||
|
||||
/* Stop the web server */
|
||||
if (*server) {
|
||||
|
@ -95,7 +95,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
|
||||
switch(event->event_id) {
|
||||
case SYSTEM_EVENT_STA_START:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_START");
|
||||
ESP_ERROR_CHECK(esp_wifi_connect());
|
||||
esp_wifi_connect();
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_GOT_IP:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_GOT_IP");
|
||||
@ -109,7 +109,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_DISCONNECTED:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_DISCONNECTED");
|
||||
ESP_ERROR_CHECK(esp_wifi_connect());
|
||||
esp_wifi_connect();
|
||||
|
||||
/* Stop the web server */
|
||||
if (*server) {
|
||||
|
@ -70,7 +70,7 @@ static bool wifi_join(const char *ssid, const char *pass, int timeout_ms)
|
||||
|
||||
ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_STA) );
|
||||
ESP_ERROR_CHECK( esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config) );
|
||||
ESP_ERROR_CHECK( esp_wifi_connect() );
|
||||
esp_wifi_connect();
|
||||
|
||||
int bits = xEventGroupWaitBits(wifi_event_group, CONNECTED_BIT,
|
||||
pdFALSE, pdTRUE, timeout_ms / portTICK_PERIOD_MS);
|
||||
|
@ -73,7 +73,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
|
||||
switch (event->event_id) {
|
||||
case SYSTEM_EVENT_STA_START:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_START");
|
||||
ESP_ERROR_CHECK(esp_wifi_connect());
|
||||
esp_wifi_connect();
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_GOT_IP:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_GOT_IP");
|
||||
@ -82,7 +82,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_DISCONNECTED:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_DISCONNECTED");
|
||||
ESP_ERROR_CHECK(esp_wifi_connect());
|
||||
esp_wifi_connect();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -142,7 +142,7 @@ static bool wifi_cmd_sta_join(const char* ssid, const char* pass)
|
||||
reconnect = true;
|
||||
ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_STA) );
|
||||
ESP_ERROR_CHECK( esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config) );
|
||||
ESP_ERROR_CHECK( esp_wifi_connect() );
|
||||
esp_wifi_connect();
|
||||
|
||||
xEventGroupWaitBits(wifi_event_group, CONNECTED_BIT, 0, 1, 5000/portTICK_RATE_MS);
|
||||
|
||||
@ -169,7 +169,7 @@ static bool wifi_cmd_sta_scan(const char* ssid)
|
||||
scan_config.ssid = (uint8_t *) ssid;
|
||||
|
||||
ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_STA) );
|
||||
ESP_ERROR_CHECK( esp_wifi_scan_start(&scan_config, false) );
|
||||
esp_wifi_scan_start(&scan_config, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
|
||||
switch(event->event_id) {
|
||||
case SYSTEM_EVENT_STA_START:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_START");
|
||||
ESP_ERROR_CHECK(esp_wifi_connect());
|
||||
esp_wifi_connect();
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_GOT_IP:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_GOT_IP");
|
||||
@ -54,7 +54,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_DISCONNECTED:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_DISCONNECTED");
|
||||
ESP_ERROR_CHECK(esp_wifi_connect());
|
||||
esp_wifi_connect();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -147,7 +147,7 @@ static void init_wifi(void)
|
||||
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA));
|
||||
ESP_ERROR_CHECK(esp_wifi_start());
|
||||
|
||||
ESP_ERROR_CHECK(esp_wifi_scan_start(NULL, true));
|
||||
esp_wifi_scan_start(NULL, true);
|
||||
|
||||
while (1) {
|
||||
if (got_scan_done_event == true) {
|
||||
|
@ -84,7 +84,7 @@ static void sc_callback(smartconfig_status_t status, void *pdata)
|
||||
ESP_LOGI(TAG, "PASSWORD:%s", wifi_config->sta.password);
|
||||
ESP_ERROR_CHECK( esp_wifi_disconnect() );
|
||||
ESP_ERROR_CHECK( esp_wifi_set_config(ESP_IF_WIFI_STA, wifi_config) );
|
||||
ESP_ERROR_CHECK( esp_wifi_connect() );
|
||||
esp_wifi_connect();
|
||||
break;
|
||||
case SC_STATUS_LINK_OVER:
|
||||
ESP_LOGI(TAG, "SC_STATUS_LINK_OVER");
|
||||
|
@ -55,7 +55,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_DISCONNECTED:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_DISCONNECTED");
|
||||
ESP_ERROR_CHECK(esp_wifi_connect());
|
||||
esp_wifi_connect();
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_WPS_ER_SUCCESS:
|
||||
/*point: the function esp_wifi_wps_start() only get ssid & password
|
||||
@ -63,7 +63,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
|
||||
* */
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_WPS_ER_SUCCESS");
|
||||
ESP_ERROR_CHECK(esp_wifi_wps_disable());
|
||||
ESP_ERROR_CHECK(esp_wifi_connect());
|
||||
esp_wifi_connect();
|
||||
break;
|
||||
case SYSTEM_EVENT_STA_WPS_ER_FAILED:
|
||||
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_WPS_ER_FAILED");
|
||||
|
Reference in New Issue
Block a user