Version 4 (modified by murphpo, 7 years ago) (diff)


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 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

# wlan_exp v1.4
# wlan_exp v1.5
n_ap.configure_bss(ssid='WARP-AP', channel=6)

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
# wlan_exp v1.4
rate = wlan_exp_util.wlan_rates[x]
n.set_tx_rate_unicast(rate, curr_assoc=True, new_assoc=True)
# 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 wlan_exp antenna modes docs for details.

wlan_exp v1.4

wlan_exp v1.5

# 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]
# Select RF B for all Tx and Rx

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)