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

RX observations in monitor mode #190

Open 0m9 opened 2 years ago

0m9 commented 2 years ago
  1. Could you send email to xianjun.jiao@ugent.be to introduce your self? Done

Issue description: Although, AP mode works great.
I observe a lot of bad-fcs messages in tcpdump when openwifi is in monitor mode. All the 6Mbps packets are marked as bad-fcs when I use channel 44. When I switch to channel 6, packets with 6Mbps are marked ok but at the same time some packets with any other rates apart from 6Mbps are marked as bad-fcs.

  1. Our image is used directly or you build your own image?

    • I used your image: openwifi-1.3.0-wilsele-32bit.img.xz
  2. What is your own modification?

    • NA
  3. Versions: OS, Vivado, openwifi/openwifi-hw repo branch and commit revision

    • NA
  4. Board/hardware type

    • adrv9361z7035
  5. WiFi channel number

    • 44 and 6.
  6. Steps to reproduce the issue, and the related error message, screenshot, etc

  7. Describe your debug efforts by Linux native tools, such as tcpdump and "cat /proc/interrupts"

    • tcpdump and proc/interrupts attached above.
  8. Describe your debug efforts by: https://github.com/open-sdr/openwifi/blob/master/doc/README.md#Debug-methods

    • I enable all rx debugs and observe same fcs0 messages in dmesg. I also observe lots of WARNING messages with loop_count 2 and 0. Are they because the traffic load is high?
  9. Any other thing we need to know for helping you better?

A related issue is that I am not able to capture packets from my laptop on the openwifi device.

Are these observations due to ADRV9361-Z7035 having low gain in 5GHz range?

JiaoXianjun commented 2 years ago

Hello,

Thanks for the report. Your content is well aligned with our template!

  1. Indeed ADRV9361-Z7035 has some 5GHz issue, but as far as I know it is mainly about super low Tx power. For Rx we haven't test it seriously. But, it always helps if you have other type of board to do cross check.
  2. Could you try 1.3.1 image? (But I suppose more or less the same) That image support dynamic FPGA/Driver loading, which will ease you to load our future updates.
  3. "loop_count 2 and 0. Are they because the traffic load is high?", indeed. But it should not be a big issue.
  4. We are optimizing PHY Rx recently, and will have new release soon. This could help with the issue.
  5. One possible tuning about the current PHY to solve your issue: you can set a worse Rx sensitivity to let the Rx only work on strong Rx signals: https://github.com/open-sdr/openwifi/blob/master/doc/app_notes/frequent_trick.md#receiver-sensitivity-control
  6. You can also play with the Rx gain: https://github.com/open-sdr/openwifi/blob/master/doc/app_notes/frequent_trick.md#rx-gain-config (Normally it is controlled by AGC, but sometimes a manually tuned gain could outperform the AGC in some circumstances)
  7. Regarding trying to capture the injected packet from your laptop, please make sure your laptop send 20MHz, single antenna (no MIMO/beamforming/etc), 802.11a/g/n packet. Openwifi now can not recognize the format with wider bandwidth or more antennas. You can double confirm this by another COTS device based sniffer.
  8. A better antenna sometimes also helps. Make sure you have antenna that supports 5GHz or 2.4/5GHz dual band.
  9. Adjust the distance (closer or further) could also help, because the AD9361 AGC dynamic range is limited.