You are not logged in.
Hi,
What I am doing now is to calculate the transmission time for one packet at a given data rate.
1. I want to know the length of the RTS/CTS in 802.11n. I cannot find these values from the Internet.
2. How can I send just 1 LTG packet? I can only send LTG packets during a period of time.
In my guess, I can get the value of retry times from the script log_process_summarize.py in Experiments Framework. But this retry value is for many packets.
Thank you,
Tim
Offline
1. I want to know the length of the RTS/CTS in 802.11n. I cannot find these values from the Internet.
The MAC payloads are:
RTS is 20 bytes: (FRAME_CTRL[2] DURATION_ID[2] RA[6] TA[6] FCS[4])
CTS is 14 bytes: (FRAME_CTRL[2] DURATION_ID[2] RA[6] FCS[4])
These are defined in IEEE 802.11-2012 sections 8.3.1.2 and 8.3.1.3.
2. How can I send just 1 LTG packet? I can only send LTG packets during a period of time.
The default LTG types do not implement a "number of packets" mode. However you can achieve this using the period and duration parameters. Set the LTG period to some large value (like 5 seconds) and the duration to something shorter (like 1 second). This should result in the LTG enqueuing a single packet, then terminating when it reaches the duration limit.
Offline
Hi
1. If I want to disable the CTS/RTS, I'm not sure where should I put this code 'node.set_dcf_rts_thresh(2000) #Disable RTS/CTS'.
2. ACK is 14 bytes, when I use HT PPDU. For the data rate in [6.5, 13, 19.5, 26, 39, 52, 58.5, 65], will the response rate for ACK be [6.5, 6.5, 13, 13, 19.5, 26, 26, 26]? I did not realize the rule in the standard file.
3. How can I know whether the packet being sent at one rate is unsuccessful? I want to record the successive 4 failures of one data rate when sending packets.
Thank you!
Tim
Offline
1. If I want to disable the CTS/RTS, I'm not sure where should I put this code 'node.set_dcf_rts_thresh(2000) #Disable RTS/CTS'.
That is a Python call where 'node' is a wlan_exp node object representing a WARP v3 node running the 802.11 design. Refer to the wlan_exp docs for more.
Alternatively you can change the RTS threshold in C code (gl_dot11RTSThreshold variable in wlan_mac_dcf.c)
2. ACK is 14 bytes, when I use HT PPDU. For the data rate in [6.5, 13, 19.5, 26, 39, 52, 58.5, 65], will the response rate for ACK be [6.5, 6.5, 13, 13, 19.5, 26, 26, 26]? I did not realize the rule in the standard file.
Control packets (RTS/CTS/ACK) are usually transmitted as NONHT waveforms, even when the corresponding DATA packet will be HT.
The rules for rate selection for control response packets (i.e. CTS, ACK) are given in 802.11-2012 9.7.6.5. As a general guideline control responses are:
-NONHT waveforms
-One of 6, 12, or 24Mbps; selected rate is fastest rate which is less than the rate of the received packet
We implement this rule in wlan_mac_low_mcs_to_ctrl_resp_mcs().
3. How can I know whether the packet being sent at one rate is unsuccessful? I want to record the successive 4 failures of one data rate when sending packets.
Transmission failure is inferred when no ACK is received, referred to as a Timeout in the spec/code.
Offline
Thank you!
I cannot find the script Python_Reference/examples/log/log_process_details.py. but log_process_summarize.py.
In log_process_summarize.py, the average time to send a packet for each rate function does not exist, which is what I need. I tried some ways to add some codes but not successful. Below results are from me and warp net.
Offline
The links above do not work - you'll have to find a better way to share your observations. And please provide more detail on what, exactly, you're trying to measure.
Offline
In 802.11 Reference Design: Experiment Framework Examples ---Tx/Rx Log Analysis, I did not find the script for calculating the average time to send a packet for each rate.
# Example 1: Gather some Tx information from the log # - Since there are only loops, this example can deal with TX_HIGH / TX_LOW # being an empty list and does not need a try / except. # # Initialize variables TX_CONSTS = log_util.get_entry_constants('TX_LOW') log_tx_low = log_np['TX_LOW'] total_retrans = 0 # Print header print("\nExample 1: Tx Information per Rate:") print("{0:^35} {1:^32}".format("Rate", "# Tx Pkts")) print("{0:^30} {1:>15} {2:>15}".format("", "CPU Low", "Re-trans")) # For each PHY mode, process the MCS index counts for phy_mode in wlan_exp_util.phy_modes.keys(): # Calculate the average time to send a packet for each rate for mcs in range(0, 8): # Create an index into the tx_Low array based on the following criteria: # - the PHY mode matches phy_mode in the above loop # - the MCS matches the mcs in the above loop tx_low_idx = ((log_tx_low['phy_mode'] == TX_CONSTS.phy_mode[phy_mode]) & (log_tx_low['mcs'] == mcs)) # Extract arrays for each PHY mode tx_low_entries = log_tx_low[tx_low_idx] # Calculate retransmissions # Any packet whose "attempt_number" is larger than 1 is a retransmission retrans = np.sum(tx_low_entries['attempt_number']>1) total_retrans += retrans # Print info try: rate_info = wlan_exp_util.get_rate_info(mcs, phy_mode) rate_str = wlan_exp_util.rate_info_to_str(rate_info) print("{0:30} {1:15} {2:15}".format( rate_str, len(tx_low_entries), retrans)) except: # Do nothing with unsupported PHY modes pass print("\nTotal Retransmissions: {0:d}".format(total_retrans))
Then I add some code to this script to calculate the average time to send a packet for each rate.
# Example 1: Gather some Tx information from the log # - Since there are only loops, this example can deal with TX_HIGH / TX_LOW # being an empty list and does not need a try / except. # # Initialize variables TX_CONSTS = log_util.get_entry_constants('TX_LOW') log_tx_low = log_np['TX_LOW'] log_tx_high = log_np['TX_HIGH'] total_retrans = 0 # Print header print("\nExample 1: Tx Information per Rate:") print("{0:^35} {1:^32} {2:^50}".format("Rate", "# Tx Pkts", "Avg Tx time(us)")) print("{0:^30} {1:>15} {2:>15} {3:>15} {4:>15}".format("", "CPU Low", "Re-trans", "CPU High", "CPU high")) # For each PHY mode, process the MCS index counts for phy_mode in wlan_exp_util.phy_modes.keys(): # Calculate the average time to send a packet for each rate for mcs in range(0, 8): # Create an index into the tx_Low array based on the following criteria: # - the PHY mode matches phy_mode in the above loop # - the MCS matches the mcs in the above loop tx_low_idx = ((log_tx_low['phy_mode'] == TX_CONSTS.phy_mode[phy_mode]) & (log_tx_low['mcs'] == mcs)) if ((log_tx_low['phy_mode'] == TX_CONSTS.phy_mode[phy_mode]) & (log_tx_low['mcs'] == mcs)).any(): tx_actual = len(log_tx_high) # - CPU High packets number tx_time = np.average(log_tx_high['time_to_accept'][0] + log_tx_high['time_to_done'][0]) #transmission time else: tx_actual = 0 tx_time = 0 # Extract arrays for each PHY mode tx_low_entries = log_tx_low[tx_low_idx] # Calculate retransmissions # Any packet whose "attempt_number" is larger than 1 is a retransmission retrans = np.sum(tx_low_entries['attempt_number']>1) total_retrans += retrans #total_time += tx_time # Print info try: rate_info = wlan_exp_util.get_rate_info(mcs, phy_mode) rate_str = wlan_exp_util.rate_info_to_str(rate_info) print("{0:30} {1:15} {2:15} {3:15} {4:15}".format( rate_str, len(tx_low_entries), retrans, tx_actual, tx_time) ) except: # Do nothing with unsupported PHY modes pass print("\nTotal Retransmissions: {0:d}".format(total_retrans))
Here is my result:
It is not totally successful. What I need is like yours image:
One more question is that:
In this example, only mcs=3 and HTMF is used, why there are two more NONHT transmission? I guess thoes two NONHT transmissions are ACK response for the other node.
Last edited by TIM (2018-Aug-10 08:02:37)
Offline
You need to spend more time debugging your code. Consider the code you added:
if ((log_tx_low['phy_mode'] == TX_CONSTS.phy_mode[phy_mode]) & (log_tx_low['mcs'] == mcs)).any(): tx_actual = len(log_tx_high) # - CPU High packets number tx_time = np.average(log_tx_high['time_to_accept'][0] + log_tx_high['time_to_done'][0]) #transmission time
The 'log_tx_high' variable is not changing inside the for loop; this code is computing the same tx_actual/tx_time values over and over again for all TX_HIGH entries independent of phy_mode/mcs.
Offline