Changes between Version 2 and Version 3 of 802.11/wlan_exp/app_notes/tutorial_hop_mac/slow_hopping


Ignore:
Timestamp:
Jul 31, 2015, 10:38:57 AM (9 years ago)
Author:
chunter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • 802.11/wlan_exp/app_notes/tutorial_hop_mac/slow_hopping

    v2 v3  
    55= Slow Hopping Approach =
    66
    7 Among many other enhancements, the [https://en.wikipedia.org/wiki/IEEE_802.11h-2003 2003 802.11h] amendment added the "Channel Switch Announcement" as an optional tagged parameter in management frames (e.g. beacons). Section 8.4.2.21 of 802.11-2012 describes the element. It contains a "New Channel Number" field that describes, as you might expect, the new channel that associated stations should tune to. Additionally, it contains a "Channel Switch Count" which tells STAs when they should tune to the new channel. A value of {{{0}}} informs them that they should tune immediately while any value {{{N}}} for {{{N > 0}}} informs them they should tune immediately before the beacon {{{N}}}th [https://en.wikipedia.org/wiki/Beacon_frame Target Beacon Transmission Time (TBTT)]. Since beacons are multicast and have no error recovery, a large value of {{{N}}} increases the reliability of client stations tuning to the new channel since they only need to overhear one of the {{{N}}} beacons to properly schedule the retuning event.
     7Among many other enhancements, the [https://en.wikipedia.org/wiki/IEEE_802.11h-2003 2003 802.11h] amendment added the "Channel Switch Announcement" as an optional tagged parameter in management frames (e.g. beacons). Section 8.4.2.21 of 802.11-2012 describes the element. It contains a "New Channel Number" field that describes, as you might expect, the new channel that associated stations should tune to. Additionally, it contains a "Channel Switch Count" which tells STAs when they should tune to the new channel. A value of {{{0}}} informs them that they should tune immediately while any value {{{N}}} for {{{N > 0}}} informs them they should tune immediately before the beacon {{{N}}}th [https://en.wikipedia.org/wiki/Beacon_frame Target Beacon Transmission Time (TBTT)]. Since beacons are multicast and have no error recovery, a large value of {{{N}}} increases the reliability of client stations tuning to the new channel since they only need to overhear one of the {{{N}}} beacons to properly schedule the retuning event. Of course, the counterpoint to a large value of {{{N}}} is that the speed with which the network hops frequencies can be quite slow. For this reason, we call this technique for frequency hopping the "Slow Hopping Approach."
    88
    99== Changes to the 802.11 Reference Design ==
     10
     11To implement the behavior of the Channel Switch Announcement, we only need to make changes to the AP and STA high-level designs. Since this behavior is standard in modern Wi-Fi devices, however, we will not bother altering our STA design to be compatible with the changes to the AP. Instead, we'll test our new frequency hopping AP by connecting associating a commercial Wi-Fi device. Modifying the STA to also honor the Channel Switch Announcement is a good exercise for the reader.
     12
     13=== Access Point (AP) ===
     14Changes should be made to {{{wlan_mac_ap.c}}} in the project SDK workspace zip.
     15
     16----
     17
     18First, we should add a global variable to the top of the AP code to determine whether or not the AP should be hopping. We will tie this variable to a push button interrupt on the board so we can enable or disable frequency hopping at runtime. At the very top of the AP code, add the following code snippet:
     19
     20{{{
     21#!c
     22
     23// 0 - No hop
     24// 1 - Slow hop
     25u8 HOP_MODE;
     26#define HOP_INTERVAL_NUM_TBTT 100
     27
     28}}}
     29
     30The {{{HOP_INTERVAL_NUM_TBTT}}} definition will determine how many beacon intervals pass before the AP hops to a new frequency. Next, we need to set the {{{HOP_MODE}}} variable in {{{main()}}}. We will default to no frequency hopping. Before the main {{{while(1){}}}} loop, add the following line:
     31
     32{{{
     33#!c
     34
     35HOP_MODE = 0;
     36
     37}}}
     38
     39Finally, we will use the existing {{{up_button()}}} callback to toggle frequency hopping on and off whenever we press the top button in the User I/O section of the WARP v3 hardware. Replace the existing {{{up_button()}}} function with the following:
     40
     41{{{
     42#!c
     43
     44void up_button(){
     45        HOP_MODE = (HOP_MODE+1)%2;
     46        return;
     47}
     48
     49}}}
     50
     51----
     52
     53
    1054
    1155== Characterization ==