| 13 | {{{#!comment |
| 14 | |
| 15 | 1) Replaced the following: |
| 16 | |
| 17 | ------------------ |
| 18 | if (((len(n_ap_l) == 1) and (len(n_sta_l) == 1))): |
| 19 | # Extract the two nodes from the lists for easier referencing below |
| 20 | n_ap = n_ap_l[0] |
| 21 | n_sta = n_sta_l[0] |
| 22 | ------------------ |
| 23 | |
| 24 | with |
| 25 | |
| 26 | ------------------ |
| 27 | if len(n_ap_l) == 1 and len(n_sta_l) == 1: |
| 28 | # Setup the two nodes |
| 29 | n_ap = n_ap_l[0] |
| 30 | n_sta = n_sta_l[0] |
| 31 | |
| 32 | # Configure the AP to reject authentication requests from wireless clients |
| 33 | # - Uncomment this line to block any wireless associations during the experiment |
| 34 | # node1.set_authentication_address_filter(allow='NONE') |
| 35 | |
| 36 | # Configure AP BSS |
| 37 | n_ap.configure_bss(ssid=AP_SSID, channel=CHANNEL, beacon_interval=100) |
| 38 | |
| 39 | # Establish the association between nodes |
| 40 | # - This will change the STA to the appropriate channel |
| 41 | n_ap.add_association(n_sta) |
| 42 | ------------------ |
| 43 | |
| 44 | |
| 45 | |
| 46 | 2) Replaced the following: |
| 47 | |
| 48 | ------------------ |
| 49 | # Put each node in a known, good state |
| 50 | for node in nodes: |
| 51 | node.reset_all() |
| 52 | |
| 53 | # Set all nodes to be on the same channel |
| 54 | node.set_channel(CHANNEL) |
| 55 | |
| 56 | # Remove any current association information |
| 57 | node.disassociate_all() |
| 58 | |
| 59 | # Get some additional information about the experiment |
| 60 | channel = node.get_channel() |
| 61 | |
| 62 | |
| 63 | |
| 64 | print("\n{0}:".format(node.name)) |
| 65 | print(" Channel = {0}".format(wlan_exp_util.channel_to_str(channel))) |
| 66 | ------------------ |
| 67 | |
| 68 | with |
| 69 | |
| 70 | ------------------ |
| 71 | # Put each node in a known, good state |
| 72 | for node in nodes: |
| 73 | node.reset(log=True, txrx_counts=True, ltg=True, queue_data=True) |
| 74 | ------------------ |
| 75 | |
| 76 | set_channel() and get_channel() no longer exist |
| 77 | |
| 78 | 3) Removed the following: |
| 79 | |
| 80 | ------------------ |
| 81 | # Set the network SSID |
| 82 | ssid = n_ap.set_ssid(AP_SSID) |
| 83 | print("AP SSID: '{0}'\n".format(ssid)) |
| 84 | ------------------ |
| 85 | |
| 86 | 4) Replaced the following: |
| 87 | |
| 88 | ------------------ |
| 89 | for idx_r,rate_num in enumerate(rates): |
| 90 | rates_mbps[idx_r] = wlan_exp_util.wlan_rates[rate_num]['rate'] |
| 91 | ------------------ |
| 92 | |
| 93 | with |
| 94 | |
| 95 | ------------------ |
| 96 | phy_mode = wlan_exp_util.phy_modes['HTMF'] |
| 97 | for idx_r,rate_num in enumerate(rates): |
| 98 | rate_info = wlan_exp_util.get_rate_info(rate_num, phy_mode) |
| 99 | rates_mbps[idx_r] = rate_info['phy_rate'] |
| 100 | ------------------ |
| 101 | |
| 102 | 5) Replaced the following: |
| 103 | |
| 104 | ------------------ |
| 105 | n_ap.ap_configure(support_power_savings=False) #Disable DTIM bcast blanking |
| 106 | ------------------ |
| 107 | |
| 108 | with |
| 109 | |
| 110 | ------------------ |
| 111 | n_ap.enable_DTIM_multicast_buffering(False) #Disable DTIM bcast blanking |
| 112 | ------------------ |
| 113 | |
| 114 | 6) Replaced the following: |
| 115 | |
| 116 | ------------------ |
| 117 | rate = wlan_exp_util.wlan_rates[rate_num] |
| 118 | |
| 119 | n_ap.set_tx_rate_unicast(rate, curr_assoc=True, new_assoc=True) |
| 120 | n_sta.set_tx_rate_unicast(rate, curr_assoc=True, new_assoc=True) |
| 121 | n_ap.set_tx_rate_multicast_data(rate) |
| 122 | n_sta.set_tx_rate_multicast_data(rate) |
| 123 | ------------------ |
| 124 | |
| 125 | with |
| 126 | |
| 127 | ------------------ |
| 128 | n_ap.set_tx_rate_unicast(rate_num, phy_mode, curr_assoc=True, new_assoc=True) |
| 129 | n_ap.set_tx_rate_multicast_data(rate_num, phy_mode) |
| 130 | n_sta.set_tx_rate_unicast(rate_num, phy_mode, curr_assoc=True, new_assoc=True) |
| 131 | n_sta.set_tx_rate_multicast_data(rate_num, phy_mode) |
| 132 | ------------------ |
| 133 | |
| 134 | 7) Replaced the following: |
| 135 | |
| 136 | ------------------ |
| 137 | sta_time_span = float(sta_rx_stats_end['timestamp'] - sta_rx_stats_start['timestamp']) |
| 138 | ------------------ |
| 139 | |
| 140 | with |
| 141 | |
| 142 | ------------------ |
| 143 | sta_time_span = float(sta_rx_stats_end['retrieval_timestamp'] - sta_rx_stats_start['retrieval_timestamp']) |
| 144 | ------------------ |
| 145 | |
| 146 | 8) Replaced the following: |
| 147 | |
| 148 | ------------------ |
| 149 | # Generate indexes with just Tx and Rx events |
| 150 | entries_filt = ['NODE_INFO', 'RX_OFDM', 'TX', 'TX_LOW'] |
| 151 | entries_merge = {'RX_OFDM': ['RX_OFDM', 'RX_OFDM_LTG'], |
| 152 | 'TX' : ['TX', 'TX_LTG'], |
| 153 | 'TX_LOW' : ['TX_LOW', 'TX_LOW_LTG']} |
| 154 | |
| 155 | log_index_txrx_sta = log_util.filter_log_index(raw_log_index_sta, include_only=entries_filt, merge=entries_merge) |
| 156 | |
| 157 | # Generate numpy arrays |
| 158 | log_np_sta = log_util.log_data_to_np_arrays(log_data_sta, log_index_txrx_sta) |
| 159 | |
| 160 | rx_sta = log_np_sta['RX_OFDM'] |
| 161 | |
| 162 | rx_sta_idx = (rx_sta['addr2'] == n_ap.wlan_mac_address) & ((rx_sta['flags'] & 0x1) == 0) & (rx_sta['fcs_result'] == 0) & ( (rx_sta['pkt_type'] == 2) | (rx_sta['pkt_type'] == 3) ) |
| 163 | rx_sta_from_ap = rx_sta[rx_sta_idx] |
| 164 | ------------------ |
| 165 | |
| 166 | with |
| 167 | |
| 168 | ------------------ |
| 169 | entries_filt = ['NODE_INFO', 'RX_OFDM', 'TX_HIGH', 'TX_LOW'] |
| 170 | entries_merge = {'RX_OFDM': ['RX_OFDM', 'RX_OFDM_LTG'], |
| 171 | 'TX_HIGH': ['TX_HIGH', 'TX_HIGH_LTG'], |
| 172 | 'TX_LOW' : ['TX_LOW', 'TX_LOW_LTG']} |
| 173 | |
| 174 | log_index_txrx_sta = log_util.filter_log_index(raw_log_index_sta, include_only=entries_filt, merge=entries_merge) |
| 175 | |
| 176 | # Generate numpy arrays |
| 177 | log_np_sta = log_util.log_data_to_np_arrays(log_data_sta, log_index_txrx_sta) |
| 178 | |
| 179 | rx_sta = log_np_sta['RX_OFDM'] |
| 180 | |
| 181 | rx_sta_idx = ((rx_sta['addr2'] == n_ap.wlan_mac_address) & |
| 182 | (((rx_sta['flags'] & RX_CONSTS.flags.DUPLICATE) == 0) & |
| 183 | ((rx_sta['flags'] & RX_CONSTS.flags.FCS_GOOD) != 0) & |
| 184 | ((rx_sta['pkt_type'] == RX_CONSTS.pkt_type.DATA) | |
| 185 | (rx_sta['pkt_type'] == RX_CONSTS.pkt_type.QOSDATA) | |
| 186 | (rx_sta['pkt_type'] == RX_CONSTS.pkt_type.NULLDATA)))) |
| 187 | |
| 188 | rx_sta_from_ap = rx_sta[rx_sta_idx] |
| 189 | ------------------ |
| 190 | }}} |