Changes between Version 3 and Version 4 of 802.11/wlan_exp/bss
- Timestamp:
- Apr 8, 2016, 3:55:36 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
802.11/wlan_exp/bss
v3 v4 16 16 || latest_beacon_rx_time || Value of System Time in microseconds of last beacon Rx || 17 17 || latest_beacon_rx_power || Last observed Rx Power (dBm) || 18 || flags || BSS flags ||19 18 || capabilities || Supported capabilities of the BSS || 20 19 || beacon_interval || Beacon interval - In time units of 1024 us || … … 31 30 * [http://warpproject.org/docs/mango-wlan-exp-dev/node.html#wlan_exp.node.WlanExpNode.get_network_list get_network_list()] 32 31 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. 34 33 35 34 * '''{{{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] … … 49 48 A 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). 50 49 50 It 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 51 52 '''Arguments:''' 52 53 53 54 * {{{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. 55 56 * '''STA''': must be BSSID of BSS with which to associate 56 57 * '''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) … … 60 61 * {{{ht_capable}}}: Does the node advertise HT processing capabilities; {{{None}}} means no change 61 62 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 62 78 === Changes to code from 802.11 Reference Design v1.4 === 63 79 64 * ''' Replaces:'''80 * '''{{{configure_bss()}}} Replaces:''' 65 81 * {{{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 66 82 * {{{node_ap.get/set_ssid()}}}: Use {{{get_bss_info()}}} as getter … … 72 88 * '''Affected:''' 73 89 * {{{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 list75 * {{{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: 76 92 * For AP, a deauthentication frame to each associated station 77 93 * For STA, a disassociation frame to its AP … … 99 115 }}} 100 116 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 101 123 === Example: Changing Channel === 102 124 … … 153 175 }}} 154 176 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() 197 None 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) 159 212 >>> n_ap.add_association(n_sta1) 160 213 >>> n_ap.add_association(n_sta2) 161 214 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 # 164 220 >>> 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 # 167 235 >>> n_sta1.reset(bss=True) 168 236 >>> n_sta1.get_bss_info() 169 237 None 238 239 >>> n_sta1.get_network_list() 240 [{'bssid': AP_WLAN_MAC_ADDR, 'ssid': 'My Network', 'beacon_interval': 100, 'channel': 6, ...}] 170 241 171 242 >>> n_ap.get_station_info() … … 187 258 188 259 # Restore BSS 189 if (my_bss[' flags'] & my_bss.get_consts().flags.HT_CAPABLE):260 if (my_bss['capabilities'] & my_bss.get_consts().capabilities.HT_CAPABLE): 190 261 ht_capable = True 191 262 else: