FTM support for ESP32-C3 and connectionless mode

1. Support for FTM to work without any connection
1. Support for ESP32-C3 chip
3. Fix error case handling if FTM fails
4. Fix asynchronization, re-transmission related issues
This commit is contained in:
Nachiket Kukade
2021-01-26 12:49:18 +05:30
parent a71976ab54
commit 8de3b31d2d
9 changed files with 151 additions and 120 deletions

View File

@@ -1156,16 +1156,18 @@ esp_err_t esp_wifi_statis_dump(uint32_t modules);
esp_err_t esp_wifi_set_rssi_threshold(int32_t rssi);
/**
* @brief Start FTM Initiator session
* If successful, event WIFI_EVENT_FTM_REPORT is generated with the result of the FTM procedure
* @brief Start an FTM Initiator session by sending FTM request
* If successful, event WIFI_EVENT_FTM_REPORT is generated with the result of the FTM procedure
*
* @param cfg FTM Initiator configurations
* @attention Use this API only in Station mode
*
* @param cfg FTM Initiator session configuration
*
* @return
* - ESP_OK: succeed
* - others: failed
*/
esp_err_t esp_wifi_ftm_start_initiator(wifi_ftm_initiator_cfg_t *cfg);
esp_err_t esp_wifi_ftm_initiate_session(wifi_ftm_initiator_cfg_t *cfg);
#ifdef __cplusplus
}

View File

@@ -522,6 +522,8 @@ typedef struct {
*
*/
typedef struct {
uint8_t resp_mac[6]; /**< MAC address of the FTM Responder */
uint8_t channel; /**< Primary channel of the FTM Responder */
uint8_t frm_count; /**< No. of FTM frames requested in terms of 4 or 8 bursts (allowed values - 0(No pref), 16, 24, 32, 64) */
uint16_t burst_period; /**< Requested time period between consecutive FTM bursts in 100's of milliseconds (0 - No pref) */
} wifi_ftm_initiator_cfg_t;