Changes between Version 3 and Version 4 of 802.11/wlan_exp/bss


Ignore:
Timestamp:
Apr 8, 2016, 3:55:36 PM (8 years ago)
Author:
welsh
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • 802.11/wlan_exp/bss

    v3 v4  
    1616|| latest_beacon_rx_time || Value of System Time in microseconds of last beacon Rx ||
    1717|| latest_beacon_rx_power || Last observed Rx Power (dBm) ||
    18 || flags || BSS flags ||
    1918|| capabilities || Supported capabilities of the BSS ||
    2019|| beacon_interval || Beacon interval - In time units of 1024 us ||
     
    3130  * [http://warpproject.org/docs/mango-wlan-exp-dev/node.html#wlan_exp.node.WlanExpNode.get_network_list get_network_list()]
    3231
    33     This method will return a list of BSS information about all the networks that the node has seen.  This list can include the node's current BSS if the node is a member of a BSS.  This list could be empty.
     32    This method will return a list of BSS information about all the networks that the node has seen.  This list can include the node's current BSS.  This list could be empty.
    3433
    3534  * '''{{{configure_bss()}}}''' for [http://warpproject.org/docs/mango-wlan-exp-dev/node_ap.html#wlan_exp.node_ap.WlanExpNodeAp.configure_bss AP], for [http://warpproject.org/docs/mango-wlan-exp-dev/node_sta.html#wlan_exp.node_sta.WlanExpNodeSta.configure_bss STA], for [http://warpproject.org/docs/mango-wlan-exp-dev/node_ibss.html#wlan_exp.node_ibss.WlanExpNodeIBSS.configure_bss IBSS]
     
    4948A node's current BSS can be populated by default in C, by active scanning, or by wlan_exp.  The DIP switch on the WARP v3 node can be used to control the default BSS at boot (see [http://warpproject.org/trac/wiki/802.11/Usage/UserIO user I/O documentation] for each MAC project).
    5049
     50It is possible to leave a BSS by nullifying the node's BSS state (e.g. {{{node.configure_bss(None)}}} or {{{node.reset(bss=True)}}}; see below for more information on the differences between these commands).  For STA and IBSS, nullifying the node's BSS state does not affect the network itself (i.e. the network does not go away just because the STA or IBSS node leaves the network).  However, for APs, nullifying the BSS state, means that the network no longer exists.  Therefore, for the AP the BSS will be removed from the network list, but will not be removed for the STA or IBSS.
     51
    5152'''Arguments:'''
    5253
    5354 * {{{bssid}}}: depends on node type; {{{None}}} means to remove all BSS state; {{{False}}} means no change
    54   * '''AP''': must be node's wireless MAC address
     55  * '''AP''': must be node's wireless MAC address; A value of {{{False}}} will default to the node's wireless MAC address.
    5556  * '''STA''': must be BSSID of BSS with which to associate
    5657  * '''IBSS''': must be valid locally-administered BSSID (use [http://warpproject.org/docs/mango-wlan-exp-dev/wlan_exp_util.html#wlan_exp.util.create_locally_administered_bssid create_locally_administered_bssid()] utility to create locally-administered BSSIDs from MAC addresses)
     
    6061 * {{{ht_capable}}}: Does the node advertise HT processing capabilities; {{{None}}} means no change
    6162
     63'''Default Values:'''
     64
     65  * Default BSS at boot (if configured by user I/O):
     66    * The default BSS uses values defined at the top of each high-level MAC project (i.e. AP, STA, or IBSS):
     67      * {{{static char default_AP_SSID[]}}}
     68      * {{{#define WLAN_DEFAULT_BEACON_INTERVAL_TU}}}
     69      * {{{#define WLAN_DEFAULT_CHANNEL}}}
     70      * {{{#define WLAN_DEFAULT_USE_HT}}}
     71        * This parameter will affect both the BSS capabilities as well as the PHY mode of the default unicast TX parameters at boot.
     72
     73   * When configuring BSS from Null to non-Null state:
     74     * {{{ht_capable}}} is not required for any high-level MAC project.  If it is not provided as an argument, then it will take on the default value specified by {{{#define WLAN_DEFAULT_USE_HT}}} (note: this will not affect the unicast TX parameters).
     75     * {{{beacon_interval}}} is not required for the STA MAC project.  If it is not provided as an argument, then it will get a default value.  If the network has not been seen, the default value will be {{{65535}}}.  If the network has been seen, then the default value will be the whatever value was taken from the beacon.
     76
     77
    6278=== Changes to code from 802.11 Reference Design v1.4 ===
    6379
    64   * '''Replaces:'''
     80  * '''{{{configure_bss()}}} Replaces:'''
    6581    * {{{node.set_channel()}}}: New method [http://warpproject.org/docs/mango-wlan-exp-dev/node.html#wlan_exp.node.WlanExpNode.set_radio_channel set_radio_channel()] only affects hardware, not BSS
    6682    * {{{node_ap.get/set_ssid()}}}: Use {{{get_bss_info()}}} as getter
     
    7288  * '''Affected:'''
    7389    * {{{node.reset()}}} has new arguments:
    74       * {{{bss=bool}}}: nullifies the node's BSS state but does not remove any entries from the BSS information list; wipes station_info list
    75         * {{{n.reset(bss=True)}}}, unlike {{{n.configure_bss(bssid=None)}}}, shall produce the following OTA transmission:
     90      * {{{bss=bool}}}: nullifies the node's BSS state and wipes station_info list
     91        * {{{node.reset(bss=True)}}}, unlike {{{node.configure_bss(bssid=None)}}}, shall produce the following OTA transmission:
    7692          * For AP, a deauthentication frame to each associated station
    7793          * For STA, a disassociation frame to its AP
     
    99115}}}
    100116
     117'''Observations:'''
     118  * For {{{n_ap.configure_bss( ... )}}}, since {{{bssid}}} was not specified and because this was an AP, the {{{bssid}}} defaulted to the {{{wlan_mac_address}}} of the node (i.e. {{{n_ap.wlan_mac_address}}}).
     119  * For {{{n_ap.configure_bss( ... )}}}, since {{{ht_capable}}} was specified, it was set to the provided value.  However, if {{{ht_capable}}} had not been specified, then it would have been set to a default value based on {{{#define WLAN_DEFAULT_USE_HT}}} in wlan_mac_ap.c.  If {{{WLAN_DEFAULT_USE_HT}}} was {{{0}}}, the default value would have been {{{False}}}.  If {{{WLAN_DEFAULT_USE_HT}}} was {{{1}}}, the default value would have been {{{True}}}.
     120  * The {{{n_ap.add_association(n_sta)}}} command will make sure that the STA adopts all the BSS information from the AP.
     121
     122
    101123=== Example:  Changing Channel ===
    102124
     
    153175}}}
    154176
    155 === Example:  Reset ===
    156 
    157 {{{#!python
    158 >>> n_ap.configure_bss(ssid='My Network', beacon_interval=100, channel=6, ht_capable=True)
     177'''Observations:'''
     178  * When setting up the IBSS network for all IBSS nodes, since {{{ht_capable}}} was not specified as part of the {{{n.configure_bss(bssid=bssid, ...)}}}, {{{ht_capable}}} for the BSS was set to a default value based on the value of {{{WLAN_DEFAULT_USE_HT}}} on each node.  If the value of {{{WLAN_DEFAULT_USE_HT}}} was different on any of the nodes, then the {{{ht_capable}}} value of the BSS will be determined by whatever beacon appears first on the network.  For example, if the first beacon has {{{ht_capable}}} set to {{{False}}}, then the entire network will adopt that value regardless of the default value set by {{{configure_bss()}}}. 
     179
     180
     181=== Example:  Reset AP ===
     182
     183{{{#!python
     184# Set up AP
     185#   - Assume no other networks have been heard; no default boot network
     186#
     187>>> n_ap.configure_bss(ssid='My Network', beacon_interval=100, channel=6)
     188>>> n_ap.get_network_list()
     189[{'bssid': AP_WLAN_MAC_ADDR, 'ssid': 'My Network', 'beacon_interval': 100, 'channel': 6, ...}]
     190
     191# Reset AP
     192#     - BSS state will be nullified
     193#     - BSS will be removed from network list, since it no longer exists
     194#
     195>>> n_ap.reset(bss=True)
     196>>> n_ap.get_bss_info()
     197None
     198
     199>>> n_ap.get_network_list()
     200[]
     201}}}
     202
     203
     204=== Example:  Reset STA ===
     205
     206{{{#!python
     207
     208# Set up AP with two STA
     209#     - Assume no other networks have been heard; no default boot network
     210#
     211>>> n_ap.configure_bss(ssid='My Network', beacon_interval=100, channel=6)
    159212>>> n_ap.add_association(n_sta1)
    160213>>> n_ap.add_association(n_sta2)
    161214
    162 # Clear STA1 station info and BSS
    163 #     - Will send OTA disassociate packet to AP
     215# Look at current network state:
     216#    - STA 1 BSS information
     217#    - STA 1 Network List
     218#    - AP station info list
     219#
    164220>>> n_sta1.get_bss_info()
    165 {'bssid': AP_WLAN_MAC_ADDR, 'ssid': 'My Network', 'beacon_interval': 100, 'channel': 6, 'ht_capable': True, ...}
    166 
     221{'bssid': AP_WLAN_MAC_ADDR, 'ssid': 'My Network', 'beacon_interval': 100, 'channel': 6, ...}
     222
     223>>> n_sta1.get_network_list()
     224[{'bssid': AP_WLAN_MAC_ADDR, 'ssid': 'My Network', 'beacon_interval': 100, 'channel': 6, ...}]
     225
     226>>> n_ap.get_station_info()
     227[{'mac_addr': STA1_MAC_ADDR, 'AID': 1, ...},
     228 {'mac_addr': STA2_MAC_ADDR, 'AID': 2, ...}]
     229
     230# Reset BSS for STA1
     231#     - BSS state will be nullified
     232#     - Network list will not be modified
     233#     - Will send OTA disassociate packet to AP so STA1 is no longer in station info list
     234#
    167235>>> n_sta1.reset(bss=True)
    168236>>> n_sta1.get_bss_info()
    169237None
     238
     239>>> n_sta1.get_network_list()
     240[{'bssid': AP_WLAN_MAC_ADDR, 'ssid': 'My Network', 'beacon_interval': 100, 'channel': 6, ...}]
    170241
    171242>>> n_ap.get_station_info()
     
    187258               
    188259# Restore BSS
    189 if (my_bss['flags'] & my_bss.get_consts().flags.HT_CAPABLE):
     260if (my_bss['capabilities'] & my_bss.get_consts().capabilities.HT_CAPABLE):
    190261    ht_capable = True
    191262else: