kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'bugfix/repeated_ftm_failures_issue' into 'master'
Fix FTM failures after repeated operations Closes IDFGH-6015 See merge request espressif/esp-idf!15689pull/8001/head
commit
7878255f17
|
@ -1 +1 @@
|
||||||
Subproject commit 553481ca27e74f2b266098fb2edcde9faf173b82
|
Subproject commit 735645d9744955ca87f076d9ef8cf3f3356ae405
|
|
@ -317,7 +317,7 @@ static bool wifi_cmd_ap_set(const char* ssid, const char* pass)
|
||||||
if (pass) {
|
if (pass) {
|
||||||
if (strlen(pass) != 0 && strlen(pass) < 8) {
|
if (strlen(pass) != 0 && strlen(pass) < 8) {
|
||||||
s_reconnect = true;
|
s_reconnect = true;
|
||||||
ESP_LOGE(TAG_AP, "password less than 8");
|
ESP_LOGE(TAG_AP, "password cannot be less than 8 characters long");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
strlcpy((char*) g_ap_config.ap.password, pass, MAX_PASSPHRASE_LEN);
|
strlcpy((char*) g_ap_config.ap.password, pass, MAX_PASSPHRASE_LEN);
|
||||||
|
@ -341,8 +341,11 @@ static int wifi_cmd_ap(int argc, char** argv)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
wifi_cmd_ap_set(ap_args.ssid->sval[0], ap_args.password->sval[0]);
|
if (true == wifi_cmd_ap_set(ap_args.ssid->sval[0], ap_args.password->sval[0]))
|
||||||
ESP_LOGI(TAG_AP, "Starting SoftAP with FTM Responder support, SSID - %s, Password - %s", ap_args.ssid->sval[0], ap_args.password->sval[0]);
|
ESP_LOGI(TAG_AP, "Starting SoftAP with FTM Responder support, SSID - %s, Password - %s", ap_args.ssid->sval[0], ap_args.password->sval[0]);
|
||||||
|
else
|
||||||
|
ESP_LOGE(TAG_AP, "Failed to start SoftAP!");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -476,7 +479,7 @@ static int wifi_cmd_ftm(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
bits = xEventGroupWaitBits(ftm_event_group, FTM_REPORT_BIT | FTM_FAILURE_BIT,
|
bits = xEventGroupWaitBits(ftm_event_group, FTM_REPORT_BIT | FTM_FAILURE_BIT,
|
||||||
pdFALSE, pdFALSE, portMAX_DELAY);
|
pdTRUE, pdFALSE, portMAX_DELAY);
|
||||||
/* Processing data from FTM session */
|
/* Processing data from FTM session */
|
||||||
if (bits & FTM_REPORT_BIT) {
|
if (bits & FTM_REPORT_BIT) {
|
||||||
ftm_process_report();
|
ftm_process_report();
|
||||||
|
@ -485,7 +488,6 @@ static int wifi_cmd_ftm(int argc, char **argv)
|
||||||
g_ftm_report_num_entries = 0;
|
g_ftm_report_num_entries = 0;
|
||||||
ESP_LOGI(TAG_STA, "Estimated RTT - %d nSec, Estimated Distance - %d.%02d meters",
|
ESP_LOGI(TAG_STA, "Estimated RTT - %d nSec, Estimated Distance - %d.%02d meters",
|
||||||
g_rtt_est, g_dist_est / 100, g_dist_est % 100);
|
g_rtt_est, g_dist_est / 100, g_dist_est % 100);
|
||||||
xEventGroupClearBits(ftm_event_group, FTM_REPORT_BIT);
|
|
||||||
} else {
|
} else {
|
||||||
/* Failure case */
|
/* Failure case */
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue