Target Wake Time (TWT) service period gradually increases

Hi,

I have a simple function that is triggered by the built in NET_EVENT_WIFI_TWT_SLEEP_STATE callback event that times the TWT wake and sleep intervals. I set these values to be 20000us and 3000000us respectively, but notice that TWT service periods gradually increases up to a point (in this case around 80ms) and then drops back down to the originally requested TWT service period. This inconsistency is not very ideal for my purposes, and I was wondering if there is a way to keep the service period consistent. Below is my function that times the wake and sleep intervals and my issue shown in screenshots.

Thanks.

static void handle_wifi_twt_sleep (struct net_mgmt_event_callback *cb){
	int64_t awakeTime;
	int64_t sleepTime;
	int *sleep_state = (int*) cb->info;
	if (*sleep_state == 1){
		LOG_INF("STA awake");
		sleepTime = k_uptime_delta(&sleepStartTime);
		LOG_INF("Sleep Time: %lli", sleepTime);
		awakeStartTime = k_uptime_get();
		gpio_pin_toggle_dt(&led);
	}
	else{
		LOG_INF("STA asleep");
		awakeTime = k_uptime_delta(&awakeStartTime);
		LOG_INF("Awake Time: %lli", awakeTime);
		sleepStartTime = k_uptime_get();
		gpio_pin_toggle_dt(&led);

	}
}

Parents
  • Hi, 

    Early wake-up and late sleep techniques are implemented to compensate for PPM. The first wake-up after TWT is configured, the wake duration will be the same as configured. For each consequent wake-up, the wake duration will increase. After 5 minutes the device will resynchronize with the AP, and the next wake duration will go back to what it was in the beginning, before it will start increasing again. This is repeated, with new resynchronization every 5 minutes.

    Regards,
    Amanda H.

Reply
  • Hi, 

    Early wake-up and late sleep techniques are implemented to compensate for PPM. The first wake-up after TWT is configured, the wake duration will be the same as configured. For each consequent wake-up, the wake duration will increase. After 5 minutes the device will resynchronize with the AP, and the next wake duration will go back to what it was in the beginning, before it will start increasing again. This is repeated, with new resynchronization every 5 minutes.

    Regards,
    Amanda H.

Children
Related