open-sdr / openwifi

open-source IEEE 802.11 WiFi baseband FPGA (chip) design: driver, software
GNU Affero General Public License v3.0
3.83k stars 647 forks source link

There is a problem with the packet loss rate of openwifi, up to 20%! #234

Closed NTUGY closed 1 year ago

NTUGY commented 1 year ago

Dear Dr. Jiao, I am a student from Chongqing University of Posts and Telecommunications. Recently, our team has encountered some problems in the process of developing based on openwifi. The image version we use is the latest 1.3.1. The platform we use is antsdr from microphase. I will list the problems encountered in the testing process in turn. I hope to get your answers .Thank you so much.

The command we use: a) Start the development board as AP

cd openwifi

./wgh.sh ./fosdem.sh

b) Start the development board as STA cd openwifi ./wgh.sh wpa_supplicant -i sdr0 -c wpa-openwifi.conf & dhclient sdr0

c) Testing packet loss rate with iperf Server (AP) ./iperf3 -s -p 6100 -i 1 -u

Cli (STA) ./iperf3 -c 192.168.13.1 -p 6100 -i 1 -u -t 100

The problems we encounter

1.Short communication distance Without PA and using the antenna provided by antsdr, the communication distance between the two openwifi demo boards is very close, and AP and STA will be disconnected at a distance of about 40cm

2.High packet loss rate Two openwifi demo boards are used to as AP and STA respectively. They are connected with each other by antenna.The packet loss rate is measured between the two demo boards with iperf3. We found that the packet loss rate is as high as 20%. At first, we thought that the poor communication quality of the antenna caused the high packet loss rate. Then we try wired connection, we use coaxial cable to connect the TX of AP with the RX of STA, and connect the RX of AP with the TX of STA(AP:TX→STA:RX AP:RX→STA:TX ) . In this case, STA has a high probability of failing to scan the wifi signal from AP, even if it occasionally scans the wifi signal from the AP, STA cannot successfully authenticate with the AP. This phenomenon is puzzling. Can you explain this phenomenon? We then tested several situations,

A) Connect the TX of AP and STA only with coaxial cable or antenna (AP:TX←→STA:TX), The RX of AP and STA are not connected Puzzlingly, AP and STA can connect successfully. We use iperf3 to test the packet loss rate of two antsdr boards. Packet loss rate is also about 20%.

B) Connect the RX of AP and STA only with coaxial cable or antenna (AP:RX←→STA:RX), The TX of AP and STA are not connected Puzzlingly, AP and STA can also connect successfully. We use iperf3 to test the packet loss rate of two antsdr boards. Packet loss rate is also about 20%.

  1. Today's latest test I use the openwifi demo board as the AP and the mobile phone as the STA. When using the iperf3 to test the packet loss rate of AP and STA, I was surprised to find that when the mobile phone was placed next to the antsdr, the packet loss rate was almost zero. When the distance between the mobile phone and the AP is 3m, the average packet loss rate is 2%. However, if Antsdr is used as AP and STA respectively, the packet loss rate is very high and the communication distance is very short . So I wonder if openwifi has bug when it is used as STA. In order to confirm my mind, I use the mobile phone as the AP, set the name of the mobile phone hotspot to openwifi, set the password to NONE, and set the frequency to 5Ghz. I use antsdr board as STA. STA cannot scan wifi signal most of the time. In multiple tests,STA can sometimes connect to the AP, but it will disconnect immediately after the connection is successful. However, if antsdr is used as the AP, the STA can be successfully connected.

We suspect that there may be problems when openwifi is used as STA. And the packet loss rate between AP anf STA is too high to be used normally. Maybe the AP and STA are not completely connected successfully. But we don't know where to start troubleshooting. Can you help us solve the problem?

GuYang