Typical problem analysis-wifi throughput test and analysis method

https://blog.csdn.net/tankai19880619/article/details/91966964

 

iperf -c ipaddress_server -t 60 -i 1 -w 2M

iperf -s  -i 1 -w 2M

-w window For TCP mode, this setting is the TCP window size. For UDP mode, this setting is the size of the buffer for receiving UDP data packets, limiting the maximum value of data packets that can be accepted

-u udp -b Bandwidth used in UDP mode, such as -b 100M

-p  port

Uplink (PC as Server, mobile phone as Client)

 

 

1. Mobile phone throughput test method

Preparation tools: install Magic Iperf software on the mobile phone side; install iperf.exe on the PC side

1. Uplink throughput test method

The mobile phone is the client side, and the PC is the server side

2. Downlink throughput test method

Mobile phone as the server side, PC as the client side

For TCP, you only need to remove the -u parameter: -i means echoing every few seconds, -t means test time, -w means buffer size

Note that the UDP test method is shown in the figure below:

2. Factors affecting wifi throughput

  First of all, the throughput belongs to the limit test, that is, the maximum network capacity of the mobile phone under the limit state. Therefore, it is best to choose a close-range shielded room environment test to eliminate interference.

1. Software factors

Background scan

Bluetooth coexistence

EDCA competition, RTS, CTS frame, etc.

Screen power saving mode

2. Hardware

Transmitter: transmit power, spurious, etc.

Receiving side: receiving sensitivity, poor multi-antenna reception, inter-board interference, etc.

3. Environmental factors

Co-channel interference

Adjacent channel interference

Low-rate equipment NAV

4. Other system performance

CPU scheduling

Butler control

Application sensitivity

Three, analysis method

Direct cause: The direct cause at the wifi level is that the rate cannot be negotiated up, or the rate cannot be negotiated quickly after the rate is dropped due to packet loss and retransmission.

To analyze the root cause, it is necessary to start with the analysis based on the direct cause.

Software firmware, hardware radio frequency, and antenna may cause the rate to fail to be negotiated, the rate will drop quickly, and the rate will not be negotiated for a long time after the rate is dropped.

1. First confirm the TCP port flow

  Open wireshark directly and filter the tcp data stream from tcpdump or air interface log.

This step is relatively easy, because the general throughput test is a limit test, and other applications will not hang in the background.

Using magic iperf, the general server port is fixed 5001, so it is easy to find the corresponding tcp long connection.

2. Wireshark filters air interface tcp data flow

  Use wireshark filter rules:

tcp.port eq 5001 && ip.dst eq [] can filter out related streams

3.Wireshark's IO statistics wifi rate change

  Take wlan_radio.data_rate on the y-axis to view the change in the physical layer rate of the tcp stream.

Fourth, the two aspects of transmitting and receiving analysis

1. Send, filter wlan.sa eq []

Wireshark's IO statistics wifi retransmission packets-because retransmission is the direct cause of the speed drop

   Take wlan.fc.retry on the y-axis to view the change in the physical layer rate of the tcp stream.

IO transmit power of wireshark

  y-axis takes wlan_radio.signal_dbm

2. Receiving part

View the rssi of each chain in the driver log

wlan: [931:D:HDD] hdd_wlan_fill_per_chain_rssi_stats: 4316: RSSI for chain 0, vdev_id 0 is -54

wlan: [931:D:HDD] hdd_wlan_fill_per_chain_rssi_stats: 4316: RSSI for chain 1, vdev_id 0 is -68

Check the packet error in the fw log

R0: FWMSG: [14a30036bc5] ANI_DBGID_POLL phyId 0 listen_time 61-61 ofdmPhyErrCnt 10 cckPhyErrCnt 3 ofdmPhyErrRate 163 cckPhyErrRate 49 level 2 

4. Comprehensive analysis based on the results

1. If there are too many retransmissions, it is usually a radio frequency or antenna problem

  Need to check TRP indicators, if there is no problem. Consider antenna impedance or interference between RF boards.

2. If there are not many retransmissions, then consider the firmware issue on the software side

3. If there are many packet errors in reception, it is usually a radio frequency or antenna problem.

  Check the TSI indicator, if there is no problem. Considering the large difference in signal strength between multiple antennas such as chain1, you can view the relevant rssi in the driver log.

4. If the received packet error rate is the same, consider the firmware issue on the software side

 

 

 

--------

https://www.sohu.com/a/249405828_100256948

1. What is Wi-Fi throughput

a) In  layman's terms, Wi-Fi throughput is Wi-Fi equipment (AP/STA)

The actual maximum rate supported on the uplink and downlink is a kind of limit test, and it is closer to the actual use scenario of users. It is especially important today when products are becoming more and more wireless and wired network port designs are gradually fading out. The Wi-Fi throughput mentioned in this article are all Wi-Fi throughput tests at the application layer, which are suitable for high data transmission application scenarios.

b)  Wi-Fi throughput is a relatively general concept. In the actual test, it needs to be divided into modes and channels.

Such as IEEE 802.11n HT40 mcs7 ch1, IEEE 802.11ac HT80 mcs9 ch36 and so on.

Note: MCS is Modulation and coding scheme. Different numbers represent different modulation and coding schemes, and different modulation schemes correspond to different rates. You can check the 802.11n/ac protocol for details.

c)  According to different verification purposes (application scenarios) of Wi-Fi throughput, there are multiple methods

1. For example, when verifying the Wi-Fi throughput inflection point, different attenuation values ​​need to be set through the attenuator;

2. For example, several typical scenarios for verifying the coexistence performance of wireless systems:

1) To verify the coexistence performance of the product using Wi-Fi+Bluetooth combo chip (verify the product Wi-Fi and Bluetooth time slot allocation and channel avoidance mechanism, the principle is the same as 4G and Wi-Fi coexistence), the Bluetooth function of the product needs to be switched on and tested;

2) When testing the throughput of a single Wi-Fi device, plus a Bluetooth device, it can also be subdivided into two states: Bluetooth only connection and data transmission;

3) The Wi-Fi device and Wi-Fi device coexistence scenario is the addition of other Wi-Fi devices during the test. The device can work on the same channel/adjacent channel currently being tested, and can also be subdivided into only connection and data transmission. Kind of state

3. For example, verify the influence of Wi-Fi driver, which is more obvious at close range;

4. For example, to verify antenna performance, different directions, angles and distances need to be distinguished.

5. For example, verify the influence of temperature on throughput. Various permutations and combinations of the above types can also be performed as required.

d) How to judge whether Wi-Fi throughput is good or not

If you want to keep improving, compare the data of the same specifications and models in a clean and stable environment as the benchmark.

Generally speaking, the measured value at close range and zero attenuation needs to reach more than half of the theoretical value of the RF chip. For example, the theoretical rate is 150Mbps, and the maximum test value needs to be above 75Mbps; the measured value under close distance with attenuation is the same as the power and sensitivity of Wi-Fi OTA It is related to the performance of the antenna, and its performance should be judged by comparing the data under the same test state.

In addition, when designing and selecting the product, it is necessary to consider the application scenarios of the product's own data transmission requirements and the maximum theoretical rate of the communication interface used in the product design. Do not blindly pursue a Wi-Fi solution with a high specification rate, resulting in waste of design costs, such as 802.11ac The maximum theoretical rate of HT80 1T/R can reach 433.3Mbps, but the product uses SDIO V2.0 communication interface, which is actually unable to reach half of the theoretical value.

2. Hardware influence factors

The impact of hardware on throughput can be distinguished from chip selection, layout design, RF index debugging, and mold structure, which can only be briefly summarized here.

a) Chip selection---choose the chip suitable for the product application

The parameters related to throughput include PHY layer data rate, support interface, typical conducted Tx power, typical EVM, etc. In addition, the ability of the chip to resist packet loss needs to be measured. The theoretical rate of the physical layer and the type of communication interface supported will directly determine the throughput of the product designed with this chip, the power determines the transmission distance, and the EVM determines the signal modulation quality.

b) Layout design  (not detailed here)

The focus here is mainly on using SI9000 (or other tools) to select the reference layer, the length of the microstrip line 50ohm, the bend and impedance control of the trace, the isolation of multiple Wi-Fi signals, the processing of the Wi-Fi part of the power supply, and interference The layout of the device, thermal design, shielding design, etc. will affect the Wi-Fi radio frequency index.

c) Conducted RF index adjustment

1. Transmitting power, the power can be adjusted in design according to the actual application of the product, and the power is directly related to the distance of the transmission.

2. Here also need to focus on EV

It measures the degree of deviation of the ideal constellation position of the modulation mode corresponding to the demodulated signal. Excessive EVM will cause symbol errors, and the data cannot be confirmed to be received, which deteriorates to an error rate and causes packet loss.

3. Sensitivity

The measurement of the anti-packet ability of the device is mainly related to the chip capability and the layout layout. It can also be processed to optimize the performance through shielding measures. It should be noted that the verification method of conduction can only partially reflect the anti-interference ability of the product. The sensitivity test of Wi-Fi OTA is only More comprehensive verification.

d) Design of mold structure

The main focus is on whether the space reserved for antenna design, the assembly of the antenna, and the appearance of the overall structure will affect the wireless signal transmission.

e) Hand-soldered test board

If the chip or module and the Ipex terminal of the test board are soldered by hand, it will also affect the throughput performance.

f) Welding of antenna

If a soldered antenna is used, the exposure of the coaxial core wire soldered to the PCBA antenna feed point will also affect the throughput; if it is a metal patch or plug-in antenna, how much tin is applied to it and the flatness of the antenna mounting It will also have an impact on throughput.

3. Software influence factors

Hardware engineers usually pay more attention to the Wi-Fi spurious test and Wi-Fi conduction indicators in EMC. They don’t know exactly what changes the software engineer has made. Sometimes, if the software engineer did not carefully check the code, he would not be clear about the difference. The software version is different, because the middle will also involve whether the original chip manufacturer has optimized at the bottom. Combining actual experience, Ban Mei suggests that attention should be paid to the following aspects:

a) Whether the equipment has been upgraded correctly during the test. Sometimes if the software package is incomplete or damaged, only part of the mode and rate can be supported after the upgrade

b) Whether the driver version is correct. It is recommended to verify the throughput for every driver update.

c) If the driver is correct and the OS is upgraded, is there a patch to optimize performance?

4. The influence factors of the antenna

This is mainly for the verification of the throughput of the whole machine after the RF performance of the PCBA board meets the standard and the mold is determined.

Antenna is a passive component, which mainly affects OTA power and sensitivity, coverage and distance, while OTA is an important means of analyzing and solving throughput problems. Usually we mainly measure the antenna according to the following parameters (the following parameters do not consider laboratory errors, actual The antenna design performance will also affect the throughput performance):

a) VSWR: a measure of the degree of reflection of the input signal at the antenna feed point. A good value does not mean that the antenna performance is good, but a bad value means that the energy input from the PCBA end to the antenna feed point is reflected more. Compared with the antenna with a good standing wave, the power that can be used for radiation has been reduced.

b) Efficiency: The ratio of the power radiated by the antenna to the power input to the antenna feed point. The performance of this indicator will directly affect the Wi-Fi OTA power (TRP) and sensitivity (TIS) performance.

c) Gain: when the same input power is input, the ratio of the power of a certain position in the spatial direction to the ideal point source antenna is here, and the passive data of OTA is usually the maximum gain value of a single frequency (channel) on the spherical surface, Mainly related to the transmission distance.

d) TRP/TIS: These two comprehensive indicators are obtained by integrating the entire radiation sphere of free space (which can be understood as an OTA laboratory environment) and then taking the average value, which can be intuitive (PCBA hardware + mold + antenna OTA performance) Reflect the Wi-Fi performance of the product.

When the TRP/TIS test differs greatly from the expected one, you need to pay attention to whether Wi-Fi enters low power consumption mode. For battery-powered products, you need to check whether the battery is sufficient during the test. In addition, TRP needs to pay attention to ACK and non-ACK modes. And TIS has always been the focus and difficulty in OTA. After all, conduction can only reflect part of the interference situation. In addition, software factors will also have an impact on TIS.

TRP/TIS can be used as an important means for Wi-Fi throughput analysis.

e) Directional pattern: used to qualitatively evaluate the product's radiation coverage in space. The test data is usually distinguished by frequency (channel). Each frequency has three surfaces H, E1, and E2, thereby characterizing the entire spherical surface of the antenna. Signal coverage. When Wi-Fi products are actually used at a relatively long distance (the directional pattern cannot be characterized when the distance is short), the wireless signal coverage of the product is actually verified by testing the throughput at multiple angles.

f) Isolation: Isolation measures the isolation of Wi-Fi multi-channel antennas and the mutual coupling between antennas. Good isolation can reduce mutual coupling between antennas and have a better directivity pattern, so that the whole machine has a better Good wireless signal coverage.

5. Test related influence factors

Pay attention to the following details when testing

a) Choice of test environment (this is the pain point of throughput testing)

1. Shielded darkroom

The analysis and verification in the research and development stage is recommended to be carried out in a shielded dark room to shield the influence of various wireless signals, especially the channel congestion caused by the influence of Wi-Fi co-frequency and adjacent frequency signals and the reduction of the theoretical rate in the current environment; attenuator simulation can be added Actual distance (without considering the effects of multipath and signal fading), but this "distance simulation" is based on the premise that the antenna gain of the auxiliary test Wi-Fi device (AP/STA) is "XXdBi". What is its practical significance , It needs to be considered by the experimenter. There is no problem with the test data on the same site as the database for product performance analysis.

2. The actual environment

Wi-Fi throughput verification in the actual network or underground parking lot I personally think that it can only be used as a field auxiliary verification after the laboratory verification is completed. The known 4G, Bluetooth, Wi-Fi signal and even some wireless signal multiplier interference, And buildings, people walking, vehicles moving, etc. have a greater impact.

b) Router selection

The mode and rate supported by the tested router are higher than the tested device. For example, the device is 802.11n-HT40 2T/R, and the maximum theoretical rate is 300Mbps. It is best not to choose a router that can only support up to 300Mbps. At least choose 802.11n-HT40 3T/R 450Mbps router.

c) Choice of test APK

Common ones are Ix chariot and Iperf. When using Ixchariot, the script recommends selecting high performance throughput. When using Iperf, it is recommended to set the time to 60s to minimize test contingency.

d) Aid to test the impact of computer OS

Windows 7 and Windows 10 will have a greater impact on the results.

e) Router settings

It is necessary to set the mode, bandwidth and channel of the switch router during the test, so it is necessary to know the specifications of the tested device in advance

f) The relative position and distance between the device under test and the router

Test every 15° or 30°, and the test distance is selected according to the application characteristics of your product.

g) Placement of the equipment under test

Simulate the normal use of users, as high as possible, at the same level as the router; you can also set the limit position test by yourself.

summary

The factors that can affect the WiFi throughput test have just been introduced. If they help you so little in actual use, the class girl will be very happy.

Because throughput testing is too time-consuming and laborious, and the environmental impact is greater, it is recommended to use automated testing in a shielded environment to save time, and data consistency is also good.

There is something I want to discuss about the WiFi throughput test, you can leave a message at any time, the class girl will reply as soon as I see

 

WIFI Throughput test debugging method
1) Check whether the customer's WLAN NV matches the schematic design,
2) Please confirm whether the 2.4GHz Throughput is poor or the 5GHz Throughput is poor
3) Please confirm whether the 40MHz BW in the ini file has been turned on, The default ini file 40MHz should be closed.
gChannelBondingMode24GHz=1
gChannelBondingMode5GHz=1
Note: 1 is enable, which means that the 40MHz bandwidth is turned on. If the Ini file cannot search for this item, you need to add the
path to the ini file: /data/misc/wifi/WCNSS_qcom_cfg.ini

Iperf: Throughput 测试 commands:
Please refer to the document
80-Y8113-11_E MU-MIMO Overview and Test Setup Guide
文档: 80-N2340-23_B_Debug_WLAN_Tput_Issues
80-N0365-1

 

  

Guess you like

Origin blog.csdn.net/kv110/article/details/109321865