wiki:802.11/wlan_exp/app_notes/tutorial_token_mac

Version 13 (modified by chunter, 9 years ago) (diff)

--

Tutorial: Building a Completely Custom MAC

A major feature of the 802.11 Reference Design is its compliance to the 802.11 standard to enable interaction with commercial Wi-Fi devices. This is the design in its "reference" state -- a known quantity that is intended to be modified to suit the needs of research applications. In our other app notes, we made small modifications to the design and characterized how those design changes manifested using the WLAN Experiments Framework. Ultimately, however, those design changes were small and the design you ended up with was a mildly tweaked 802.11 implementation.

This application note is fundamentally different -- we will build a completely non-standard MAC from scratch and use the WLAN Experiments Framework to characterize our novel design. The intent of this application note is to act as a tutorial. It is a step-by-step example of how to build something that really does not even resemble the standard 802.11 MAC. In fact, the MAC we will build in this tutorial is really the philosophical opposite to the 802.11 Distributed Coordination Function (DCF). The DCF is the classic example of a random access MAC. In this tutorial, we will build a simple scheduled access MAC that we call "TokenMAC."

Overview of TokenMAC

The entire purpose of a MAC is to figure out a way that a shared wireless medium can be split up amount multiple competing devices. The standard 802.11 DCF employs randomness to achieve this goal and avoid deadlocks where multiple nodes continually collide when accessing the medium. In this tutorial, we will implement a completely different kind of MAC based on the token ring. This MAC does not use randomness to avoid collisions but rather explicitly allows only a single transmitter at a time by passing around a token that authorizes transmissions. This is a form a scheduled access MAC (as opposed to a random access MAC).

TokenMAC avoids contention not through randomness, but rather through explicit token passing from a managing Access Point (AP).

To create TokenMAC, we will need to alter pieces of the underlying reference design. This application note is organized into the following sections:

  • Alterations to CPU_HIGH -- In this section, we will describe and discuss the changes needed to the high-level MAC code to realize the design. Specifically, we will modify the AP codebase to allow it to determine which node in the network should have the token and for how long it should have it.
  • Alterations to CPU_LOW -- In this section, we will describe and sicuss the changes needed to the low-level MAC code to realize the design. Here, we will not start off with the DCF code since the vast majority of that DCF behavior is irrelevant to TokenMAC. Instead, we will use the very simple NoMAC project as a starting point. Unaltered, this project acts as a straight passthrough connection between the high-level MAC and the PHY.
  • Characterizing the Design -- Once the design is complete, we will use the WLAN Experiments Framework to characterize the design and analyze its strengths and its weaknesses.
  • Extensions -- Having established the design's weaknesses in the previous characterization section, we will propose and construct extensions to TokenMAC to strengthen its weaknesses. The intent of this section is to demonstrate how to "close the loop" between design, experimentation, and then re-design based on what was learned during the experimental phase.