{{{#!comment [[Include(wiki:802.11/beta-note)]] }}} [[TracNav(802.11/TOC)]] = 802.11 Reference Design: Porting to wlan_exp v1.5 = The 802.11 Reference Design v1.5 release included many improvements to the wlan_exp Python package. These improvements required numerous API changes. The [../examples example wlan_exp scripts] have been updated with the new v1.5 API. In order to assist with porting custom scrtips, the sections below highlight some of the changes from v1.4 to v1.5. Setup AP+STA network {{{#!td {{{#!python # wlan_exp v1.4 n_ap.disassociate_all() n_ap.set_ssid('WARP-AP') n_ap.add_association(n_sta) n_ap.set_channel(6) n_sta.set_channel(6) }}} }}} {{{#!td {{{#!python # wlan_exp v1.5 n_ap.configure_bss(ssid='WARP-AP', channel=6) n_ap.add_association(n_sta) }}} }}} === Configuring Tx Rates === Two key changes for the {{{set_tx_rate}}} methods: * Require {{{mcs}}} argument for MCS index, instead of using entry from a dictionary of rates * Require {{{phy_mode}}} argument to select between 11a ({{{'NONHT'}}}) and 11n ({{{'HTMF'}}}) rates {{{#!td {{{#!python # wlan_exp v1.4 rate = wlan_exp_util.wlan_rates[x] n.set_tx_rate_unicast(rate, curr_assoc=True, new_assoc=True) n_ap.set_tx_rate_multicast_data(rate) }}} }}} {{{#!td {{{#!python # wlan_exp v1.5 n.set_tx_rate_unicast(mcs=x, phy_mode='NONHT', curr_assoc=True, new_assoc=True) n_ap.set_tx_rate_multicast_data(mcs=x, phy_mode='NONHT') }}} }}} === Configuring Antenna Modes === Methods for setting Tx and Rx antenna modes now accept simple string argument values, replacing the dictionaries of antenna modes. The new {{{set_tx_ant_mode}}} helper method sets the Tx antenna mode for all classes of traffic and all partners. Different Tx antenna modes can still be set per traffic class / per partner device - refer to the [//docs/mango-wlan-exp/node.html#antenna-modes wlan_exp antenna modes docs] for details. {{{#!th '''wlan_exp v1.4''' }}} {{{#!th '''wlan_exp v1.5''' }}} |------------------- {{{#!td {{{#!python # Select RF B for all Tx m_tx = wlan_exp_util.wlan_tx_ant_mode[1] n.set_tx_ant_mode_unicast(m, curr_assoc=True, new_assoc=True) n.set_tx_ant_mode_multicast_data(m, curr_assoc=True, new_assoc=True) n.set_tx_ant_mode_multicast_mgmt(m, curr_assoc=True, new_assoc=True) # Select RF B for all Rx m_rx = wlan_exp_util.wlan_rx_ant_mode[1] n.set_rx_ant_mode(m_rx) }}} }}} {{{#!td {{{#!python # Select RF B for all Tx and Rx n.set_tx_ant_mode('RF_B') n.set_rx_ant_mode('RF_B') }}} }}} Other new APIs * AP support for STA power savings: deprecated {{{n_ap.ap_configure(support_power_savings=bool)}}}, use {{{n_ap.enable_DTIM_multicast_buffering(bool)}}} * STA/IBSS updating MAC time from beacon receptions: * Deprecated {{{n_sta.configure_sta(?)}}}, use {{{n_sta.enable_beacon_mac_time_update(bool)}}} * Deprecated {{{n_ibss.configure_ibss(?)}}}, use {{{n_ibss.enable_beacon_mac_time_update(bool)}}}