open-sdr / openwifi

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

AP is ENABLED but not shown on other device scanning list using ADRV9361Z7035 even taking very close to Tx antennas why? #103

Closed waseem-arshad94 closed 2 years ago

waseem-arshad94 commented 2 years ago
  1. Could you send email to xianjun.jiao@ugent.be to introduce your self?

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

  3. What is your own modification?

  4. Versions: OS, Vivado, openwifi/openwifi-hw repo branch and commit revision

  5. Board/hardware type

  6. WiFi channel number

  7. Steps to reproduce the issue, and the related error message, screenshot, etc

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

  9. Describe your debug efforts by: https://github.com/open-sdr/openwifi/blob/master/doc/README.md#Debug-methods

  10. Any other thing we need to know for helping you better?

JiaoXianjun commented 2 years ago

You need to answer above questions as many as possible and as detailed as possible, then we can help you. Without any information, it is very difficult for us to access.

waseem-arshad94 commented 2 years ago
  1. Yes I will send you the Introduction e-mail.
  2. I used your image directly.
  3. I will modify the design later when I will run it on my board.
  4. Ubantu 18.04, Vivado 2019.1,2019_R1-2020_02_04.img.xz.
  5. ADRV9361-Z7035 + ADRV1CRR-FMC I am using.
  6. WIFI channel I am using is Tx1Rx1.
  7. Device SSID "openwifi" is not showing in the scanning of other device or laptop.
  8. I did not understand this one.
  9. I read carefully and apply your method in README file multiple time but id did not get SSID.
  10. You need to help me about this I want to just receive the wifi bitstream not be transmit side. Please help me how I can receive the wifi signal on my board. After receiving the bitstream I will extract the MAC information from received bitstream. Thanks in advance for helping me.
waseem-arshad94 commented 2 years ago
  1. Yes I will send you the Introduction e-mail.
  2. I used your image directly.
  3. I will modify the design later when I will run it on my board.
  4. Ubantu 18.04, Vivado 2019.1,2019_R1-2020_02_04.img.xz.
  5. ADRV9361-Z7035 + ADRV1CRR-FMC I am using.
  6. WIFI channel I am using is Tx1Rx1.
  7. Device SSID "openwifi" is not showing in the scanning of other device or laptop.
  8. I did not understand this one.
  9. I read carefully and apply your method in README file multiple time but id did not get SSID.
  10. You need to help me about this I want to just receive the wifi bitstream not be transmit side. Please help me how I can receive the wifi signal on my board. After receiving the bitstream I will extract the MAC information from received bitstream. Thanks in advance for helping me.
JiaoXianjun commented 2 years ago

The default openwifi AP uses a channel in 5GHz. Does your device, which scans, support 5GHz channel?

waseem-arshad94 commented 2 years ago

Hi Sir; Thanks for your reply! Yes my device support the 5 GHz. I follow all steps as it is in Quick Start and other documents you mentioned in GitHub. Can you please tell me how board will receive WIFI signals. I want to read the bitstream of WIFI using ADRV9361Z7035. Thanks in advance

JiaoXianjun commented 2 years ago

You want the openwifi board to transmit signal (like wifi beacon SSID), and use your device to receive it. Right?

Can you check this: https://github.com/open-sdr/openwifi/blob/master/doc/app_notes/ap-client-two-sdr.md

And tell me result of:

cat /proc/interrupts
(Execute the "cat ..." command for several times)
(You should see the number of "sdr,tx_itrpt1" grows, because it sends the "openwifi" beacon periodically)
waseem-arshad94 commented 2 years ago

Dear Sir, Sorry for late reply! I tested accordingly you mention above. First thing I make bootable card again. But Now my AP is not Enabled Why? Error is can't find device "sdr0" in my terminal. Sir I want to receive the wifi bitstream and extract the MAC information from received signal. Basically I just need to implement the WIFI Rx side to receive only not to be transmit any signal. My SDR board should sense the signal only on Rx side. I will extract the MAC around my SDR and store these MAC addresses in QFile to process further. I think now you will be able to understand my point of view. Your guidance will be very helpful for me. Thanks in Advance!

waseem-arshad94 commented 2 years ago

Dear Sir; I tested according your above suggestions :results of this: cat /proc/interrupts (Execute the "cat ..." command for several times) (You should see the number of "sdr,tx_itrpt1" grows, because it sends the "openwifi" beacon periodically)

waseem-arshad94 commented 2 years ago

Dear sir; -I resolved the AP-ENABLED and "sdr0" interface issues which are mentioned above my post.

JiaoXianjun commented 2 years ago

Would you please paste all the commands/steps you run at the client side? Only having these info, we can help.

waseem-arshad94 commented 2 years ago

Dear Sir; I run following commands at client side: ssh root@192.168.10.122 (password: openwifi) service network-manager stop cd openwifi ./wgd.sh (Wait for the script completed) ifconfig sdr0 up iwlist sdr0 scan (The "openwifi" AP should be listed in the scanning results) wpa_supplicant -i sdr0 -c wpa-openwifi.conf ("iwconfig sdr0 essid openwifi" could also work. Less info compared to wpa_supplicant)

waseem-arshad94 commented 2 years ago

Dear Sir; This command not working there: wpa_supplicant -i sdr0 -c wpa-openwifi.conf

waseem-arshad94 commented 2 years ago

Dear Sir;

  1. On client side I create the this fille again in openwifi folder wpa-openwifi.conf and: Run:root@analog:~/openwifi# wpa_supplicant -i sdr0 -c wpa-openwifi.conf but found to be with error "command can't found"

2."ifconfig sdr0 up" its work and up sdr0

  1. "iwlist sdr0 scan" produce : No Scan results
JiaoXianjun commented 2 years ago

Can you describe your setup? Like which board act as which role? And you run what kind of command on which board?

waseem-arshad94 commented 2 years ago

Yes Sir;

  1. I connected AP-Board with One PC having Ubantu 18.04 via Ethernet cable.Set the static PC IP:192.168.10.1
  2. Two antennas are connected with this AP-Board on TX1A and RX1A.
  1. First I run: ssh root@192.168.10.122 (password: openwifi)
  2. secondly I run: cd openwifi ./fosdem.sh This enabled the my AP in terminal. After enabling AP I follow below step 3.
  3. At last I run: cat /proc/interrupts many times and saw in terminal: sdr,tx_itrpt1" grows
  1. I connected Client-Board with other PC having windows via Ethernet cable. Set the static PC IP:192.168.10.1
  2. Two antennas are connected with this AP-Board on TX1A and RX1A.
  1. First I run in cmd: ssh root@192.168.10.122 (password: openwifi)
  2. secondly I run:service network-manager stop
  3. 3rd I run: cd openwifi ./wgd.sh , And wait until completed
  4. 4th I run: ifconfig sdr0 up
  5. 5th I run: iwlist sdr0 scan , It produce: No Scan Results in cmd.
  6. 6th I run:root@analog:~/openwifi# wpa_supplicant -i sdr0 -c wpa-openwifi.conf but found to be with error "command can't found"
JiaoXianjun commented 2 years ago

I think your image is not ours. By default wpa_supplicant is there in the image, and you should not have "command not found". Can you describe all your modifications to the image/driver/fpga?

waseem-arshad94 commented 2 years ago

Sir I am using default image no modifications has been done by me. I just open the openwifi folder copy the my board .bit and .dtb file to main BOOT directory and copy the uImag from zynq common to BOOT directory. After that Insert the SD Card in my board that's all. Then I made setup and run the commands as I described above.

JiaoXianjun commented 2 years ago

README: Copy files in openwifi/board_name to the base directory of BOOT partition. Copy openwifi/zynqmp-common/Image (zcu102 board) or openwifi/zynq-common/uImage (other boards) to the base directory of BOOT partition

The uImage should be from openwifi/zynq-common/, done forget openwifi

waseem-arshad94 commented 2 years ago

Dear Sir; In my AP board side working perfectly and sdr,tx_itrpt ,xilinx-dma-controller grows periodically. But when in Client side my activated network connection failed again and again after running the commands at Client side. Sir tell me why its happening?. Now I am using Ubantu 18.04 at client side.

JiaoXianjun commented 2 years ago

Dear Sir; In my AP board side working perfectly and sdr,tx_itrpt ,xilinx-dma-controller grows periodically. But when in Client side my activated network connection failed again and again after running the commands at Client side. Sir tell me why its happening?. Now I am using Ubantu 18.04 at client side.

Can you response my previous suggestion?

waseem-arshad94 commented 2 years ago

README: Copy files in openwifi/board_name to the base directory of BOOT partition. Copy openwifi/zynqmp-common/Image (zcu102 board) or openwifi/zynq-common/uImage (other boards) to the base directory of BOOT partition

The uImage should be from openwifi/zynq-common/, done forget openwifi

Dear Sir I adopted the all steps as you described again. After that I am facing this problem which I mentioned.

waseem-arshad94 commented 2 years ago

Dear Sir; I am using this image from supported sdr platforms which is compatible with my sdr setup. I am using FMC board.

adrv9361z7035 | ADRV9361-Z7035 + ADRV1CRR-BOB/FMC | Done | 32bit img | Need

waseem-arshad94 commented 2 years ago

Dear Sir; Kindly check my logs files which I am running on AP and Client side as well as. AP-Side Logs: Please find attached file. logs.txt

Client-Side Logs Please find attached file. Client_device.txt

waseem-arshad94 commented 2 years ago

Dear Sir; Thanks for your kind help! Now my both sdr are in working condition. Now I have few questions in my mind kindly clear my points.

  1. In scan list only my device is scan with (SSID="openwifi", freq=5220Mhz) not other wifi routers in my building.
  2. How we can shift my sdr frequency from 5 GHz to 2.4 GHz?
  3. How my sdr will scan all wifi present in building?
waseem-arshad94 commented 2 years ago

Dear Sir; I have few analysis about openwifi. It scan one channel at a time. Can we scan multiple channel with sdr0?

Important Note In normal wifi hacking in linux operating system we use airmon utility to setup in monitor mode like: airpdump-ng for wifi scanning. Can we use this utility for wifi scanning at sdr0 in monitor mode.

Thanks in advance!

JiaoXianjun commented 2 years ago

Dear Sir; Thanks for your kind help! Now my both sdr are in working condition. Now I have few questions in my mind kindly clear my points.

  1. In scan list only my device is scan with (SSID="openwifi", freq=5220Mhz) not other wifi routers in my building.
  2. How we can shift my sdr frequency from 5 GHz to 2.4 GHz?
  3. How my sdr will scan all wifi present in building?

To scan all bands/frequencies, you need connect dual-band (2.4/5GHz) antennas to your SDR tx and rx.

JiaoXianjun commented 2 years ago

Dear Sir; I have few analysis about openwifi. It scan one channel at a time. Can we scan multiple channel with sdr0?

Important Note In normal wifi hacking in linux operating system we use airmon utility to setup in monitor mode like: airpdump-ng for wifi scanning. Can we use this utility for wifi scanning at sdr0 in monitor mode.

Thanks in advance!

iwlist does scan wifi channel one-by-one. openwifi does support monitor mode, and it behaves like other COTS WiFi card. So you can use any existing Linux tools (install them or apt install) on top of openwifi card.

We also have monitor and packet injection introduction in the app notes: https://github.com/open-sdr/openwifi/blob/master/doc/app_notes/README.md (802.11 packet injection and fuzzing)

waseem-arshad94 commented 2 years ago

Dear sir; I need to open the design in VIVADO How it can be done easily? Thanks in advance!

waseem-arshad94 commented 2 years ago

Dear sir; I want to build the HDL Projects in VIVADO for customization the logic of openwifi. How I can run the block design of openwifi in VIVADO and which version I needed to build it.

JiaoXianjun commented 2 years ago

https://github.com/open-sdr/openwifi-hw

waseem-arshad94 commented 2 years ago

Dear Sir; During Building I found ERROR Building adrv9361z7035_ccbob_lvds project [/home/ijaz/openwifi_hw/openwifi-hw/adi-hdl/projects/adrv9361z7035/ccbob_lvds/adrv9361z7035_ccbob_lvds_vivado.log] ... FAILED For details see /home/ijaz/openwifi_hw/openwifi-hw/adi-hdl/projects/adrv9361z7035/ccbob_lvds/adrv9361z7035_ccbob_lvds_vivado.log

I Opened this adrv9361z7035/ccbob_lvds/adrv9361z7035_ccbob_lvds_vivado.log and found at the end of file: ERROR: [Common 17-345] A valid license was not found for feature 'Synthesis' and/or device 'xc7z035i'. Please run the Vivado License Manager for assistance in determining which features and devices are licensed for your system. Resolution: Check the status of your licenses in the Vivado License Manager. For debug help search Xilinx Support for "Licensing FAQ". If you are using a license server, verify that the license server is u$ INFO: [Common 17-206] Exiting Vivado at Fri Nov 5 12:21:25 2021... [Fri Nov 5 12:21:26 2021] synth_1 finished wait_on_run: Time (s): cpu = 00:00:08 ; elapsed = 00:00:08 . Memory (MB): peak = 2095.457 ; gain = 0.000 ; free physical = 24954 ; free virtual = 30019 ERROR: [Common 17-69] Command failed: Run 'synth_1' failed. Unable to open INFO: [Common 17-206] Exiting Vivado at Fri Nov 5 12:21:26 2021...

JiaoXianjun commented 2 years ago

As the error said, you need valid vivado license. Vivado is only free for small fpga, such as zedboard, zc702, antsdr, adrv9364z7020. Your 7035 fpga needs vivado license.

waseem-arshad94 commented 2 years ago

@JiaoXianjun Hi, How I can get it easily?

JiaoXianjun commented 2 years ago

You need to buy the license from Xilinx or via your company/university.

waseem-arshad94 commented 2 years ago

Dear Sir; I am using the licensed version of vivado 2018.3. Why I am getting the this error. My license is valid up to 2023. We purchased it from Xilinx.

JiaoXianjun commented 2 years ago

If that is the case, I would suggest you ask Xilinx.

waseem-arshad94 commented 2 years ago

Dear sir; I have few questions more about openwifi:

  1. How we can access the IOs of board in the openwifi?
  2. Can we run the Qt based GUI for openwifi if yes then how we can?
  3. You said previously we can scan all bands 2.4/5.8 GHz using dual band antenna. Is default image is capable of scanning all bands after just putting the antenna or any other scripts or instruction needed to tell the board to scan all bands at time?
  4. Is any test example to check openwifi in monitor mode?
JiaoXianjun commented 2 years ago

Hello,

  1. Sorry openwifi only uses the ad9361 on the board (outside FPGA). We never use other IOs of the board. So we don't know.
  2. Sorry again, we never try and don't know.
  3. If you run "iwlist sdr0 scan" on board, it will scan all bands.
  4. If you search "openwifi monitor mode" on google, you will find: https://github.com/open-sdr/openwifi/blob/master/doc/app_notes/inject_80211.md . On that app note, you can see
    ./monitor_ch.sh sdr0 11

    to set the openwifi in monitor mode. Then you can use tcpdump to capture all packets in monitor mode.

waseem-arshad94 commented 2 years ago

Dear Sir; I opened the design in Vivado 2018.3 successfully. After that I have a question in my mind:

  1. wifi stack implementation is in PL or PS because I didn't see any modulation or demodulation in FPGA design?.
  2. How your FPGA design communicate with PS?
  3. Is this fpga design default of ADI reference design or any other modification you done in this FPGA design?
  4. I didn't see any .c files in my project files.
JiaoXianjun commented 2 years ago

Hi,

Maybe it would be good for you to read (word by word): https://github.com/open-sdr/openwifi/blob/master/README.md https://github.com/open-sdr/openwifi-hw/blob/master/README.md https://www.orca-project.eu/wp-content/uploads/sites/4/2020/03/openwifi-vtc-antwerp-PID1249076.pdf https://users.ugent.be/~xjiao/Cedric_Den_Haese_masterproef.pdf https://arxiv.org/abs/2109.03032 https://ieeexplore.ieee.org/document/9573364

And watch videos: https://youtu.be/Mq48cGthk7M https://media.libreplanet.org/u/libreplanet/m/openwifi-project-the-dawn-of-the-free-libre-wifi-chip/

All your questions can be answered I believe by reading/watching above materials.

I will close this issue, because the topic has been changed to learning. Basically you can't master everything in 1 day. Be patient and put effort/time, I believe you will have answers of all your questions.

After all the above reading/watching, if you still have questions, you can open an new issue.

Thanks.