Set up an individual TWT agreement (NegotiationType=0) or change TWT parameters of the existing TWT agreement - TWT Wake Interval = TWT Wake Interval Mantissa * (2 ^ TWT Wake Interval Exponent), unit: us - e.g. TWT Wake Interval Mantissa = 512, TWT Wake Interval Exponent = 12, then TWT Wake Interval is 2097.152 ms Nominal Minimum Wake Duration = 255, then TWT Wake Duration is 65.28 ms @attention Support at most 8 TWT agreements, otherwise ESP_ERR_WIFI_TWT_FULL will be returned. Support sleep time up to (1 << 35) us.
- ESP_OK: succeed - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong - ESP_ERR_WIFI_NOT_CONNECT: The station is in disconnect status - ESP_ERR_WIFI_TWT_FULL: no available flow id - ESP_ERR_INVALID_ARG: invalid argument
Examples
esp_wifi_sta_itwt_setup() is referenced by 1 libraries and example projects: