Soft Token Passing Protocol


If you can't beat them, augment them: Improving Local WiFi with Only Above-driver Changes

Ahmed Saeed, Mostafa Ammar, Ellen Zegura, and Khaled Harras

Georgia Institute of Technology, and Carnegie Mellon University

IEEE ICNP 2018

The Soft Token Passing Protocol (STPP) is an example of protocols that can improve the performance of WiFi without requiring edits to the WiFi protocol itself. The key idea is to allow the soft protocol to set some non-strict schedule and let the WiFi mechanisms handle failure to stick to the schedule. We implement STPP with the goal of lowering latency of WiFi. Using STPP requires a simple kernel patch and a simple network daemon.

             

FAQ


What motivated the work?

WiFi Medium Access Control (MAC) has been more or less the same for the past 20 years, and not for lack of trying. The main reason for that is the ubiquity of WiFi which makes any updates that require hardware or even firmware updates very hard to implement. Furthermore, application or kernel level edits of WiFi usually require excessive utilization of CPU and/or battery. STPP enhances WiFi with a simple kernel patch without extra CPU or battery requirements.


How does STPP reduce latency of WiFi communication?

STPP reduces latency by reducing contention for medium access and giving lower latency nodes more access to the medium. To achieve this, a Time Division Multiple Access (TDMA) schedule is created where shares are divided based on whether a node is low latency or not. In TDMA schedules, each node is allocated a time slot to operate on and the main goal of the protocol is to make sure that slots do not overlap. This requires coordination.


Rather than strictly enforcing the schedule, STPP allows nodes to overshoot or undershoot their shares to reduce the overhead of coordination. When two slots overlap, STPP relies on WiFi MAC protocol to handle contention where STPP mechanisms forces the slots back into a coordinated state.


How does STPP impact legacy WiFi nodes (and vice versa)?

STPP is backward compatible and does not impact the performance of nodes on the same network that don't implement STPP. Moreover, STPP benefits are incremental, as the number of nodes implementing increases the benefits (in terms of reducing latency) improves.


When does STPP has most impact on performance?

STPP has most impact on performance when there is clear difference in priority between different communicating nodes. In that case, the highest priority node (i.e., the node that should observe the smallest latency) can have latency reduction by up to 40%. When all nodes have the same priority, STPP can degrade but it can still be beneficial by reducing average network latency by at least 17%.


Does STPP hurt network performance?

STPP reduces latency at the expense of small reduction in throughput. In particular, we found that STPP can throughput by up to 5%. However, this is a standard trade off between the two metrics. With recent technologies (e.g., Augmented Reality and screen mirroring), available throughput is sufficient. However, latency can be a major problem for better user experience.


What are STPP limitations?

STPP has the following limitations:

  • STPP assigns priorities per node while ideally it should operate per application. This can be achieved by allocating slots per application.

  • STPP does not provide significant benefits when a limited number of nodes in the network are implementing it.

Getting Started

STPP implementation has three components

  • Kernel patch implemented in linux 4.10 which performs queue resume/pause based on allocated time slots along with queue probing to determine demand.

  • A modified hostapd 2.6 to pass the parameters of STPP to kernel.

  • A Click-based daemon to process and pass the token.

Implementation of all three components can be found on the github repo (https://github.com/WL4-WIFI)

Tutorial

  1. In linux directory, compile required kernel modules
    sudo make SUBDIRS=net/mac80211/
  2. In the same directory, uninstall loaded modules and load newly compiled modules
    sudo modprobe -r ath9k ath9k_htc ath9k_common ath9k_hw ath mac80211 cfg80211
    sudo insmod net/wireless/cfg80211.ko
    sudo insmod net/mac80211/mac80211.ko
    sudo insmod drivers/net/wireless/ath/ath.ko
    sudo insmod drivers/net/wireless/ath/ath9k/ath9k_hw.ko
    sudo insmod drivers/net/wireless/ath/ath9k/ath9k_common.ko
    sudo insmod drivers/net/wireless/ath/ath9k/ath9k_htc.ko
    sudo insmod drivers/net/wireless/ath/ath9k/ath9k.ko
  3. Navigate to hostap/wpa_supplicant then compile and run wpa_supplicant with a configuration file written following the following this template.
    make
    sudo ./wpa_supplicant -Dnl80211 -iwlan4 -c wpa_supplicant.conf
  4. Download Click Modular Router and copy all *.cc and *.hh files to click/elements/local/ and run click with the conf.click.
  5. Start wpa_cli to control the schedule. Note that only direct links are scheduled. Hence, setup direct links using
    tdls_discover MAC_ADDRESS_OF_PEER
    tdls_setup MAC_ADDRESS_OF_PEER
    This step has to be repeated to make sure that all nodes that are intended to be scheduled are paired. This step has to be executed at only one of the pair.
    Allocate quota and setup sleep time
    wl4_change_quota MAC_ADDRESS_OF_PEER QUOTA_IN_BITS (e.g., 60000)

Contact

For questions/comments please email ahmed dot saeed at gatech dot edu