Configuring TWT on Linux
Features > Target Wake Time (TWT)
General Configuration
The following guidance is provided for setting the TWT parameters.
TWT Wake Interval (us) - The current default is 30 seconds. The minimum value is recommended to be longer than the beacon interval (default beacon interval is 100ms) at a minimum, and probably a multiple of beacon intervals.
Minimum Wake Duration (us) - can be configured between 1 and 65280us, with the default being the maximum value. Values below 32640 have shown unreliable behaviour in field testing.
Setup command - note that only request and response are currently supported, though demand is also defined in the 802.11 standard.
This guidance doesn’t account for any duty cycle related restrictions that apply in some regions.
Linux
Configuration of TWT is achieved with the inclusion of the following config in a STA’s wpa_supplicant.conf file:
# cat /morse/configs/wpa_supplicant_s1g.conf
ctrl_interface=/var/run/wpa_supplicant_s1g
...
vendor_keep_alive_offload=1 # LMAC is responsible for transmitting null
# ipv4 keep-alive frames
...
network={
ssid="MorseMicro"
psk="12345678"
...
twt={
wake_interval=300000000 # Service Period interval (us)
min_wake_duration=65280 # Minimum wake duration (us)
setup_command=0 # TWT setup command; 0:Request,
# 1:Suggest, 2:Demand. Only 0 & 1
# is supported (they behave in
# the same way)
}
}
Upon association, the STA will request a periodic TWT SP to be every 5 minutes (approximately - rounding will occur), with each SP lasting 65ms. The AP will either accept or reject this request.
Other than the aforementioned configuration the user must ensure that the following modparams to the driver are set as follows on both the AP and STA:
enable_twt=1 (default)
and on the STA:
enable_ps=2 (default)
enable_dynamic_ps_offload=1 (default)
enable_mac80211_connection_monitor=0 (default)