
Previously, I recommended excellent open source projects on GitHub, such asWhat are some excellent VHDL/Verilog/FPGA projects on GitHub? OpenWIFI, as a leader in the communication field, is naturally a project that many people will learn from. This article shares how to build a low-cost OpenWIFI using ZYNQ (ZYNQ010 or higher chip) + AD936X.
openwifi: A full-stack IEEE802.11/Wi-Fi design compatible with Linux mac80211 based on SDR (Software Defined Radio).
The hardware used is as follows:
1. ZYNQ7020 + AD9364, Analog Devices AD9364- BBCZ integrated 1×1 RF Agile Transceiver™ + Xilinx Zynq XC7Z020-1CLG400I AP SoC (for digital processing)
2. Introduction to 7020:https://china.xilinx.com/support/documentation/boards_and_kits/zc702_zvik/ug850-zc702-eval-bd.pdf
3. AD9364: See the Chinese manual for details.
Some ZYNQ + AD936x solutions are basically variations of the ADI official AD-FMCOMMS [2,3,4,5] –EBZ (see Note 2 for differences), and all design materials can be directly utilized from the official projects. At the same time, the official has also provided u-boot, kernel, and file systems for some commonly used development boards and open-source hardware. During use, you only need to prepare an SD/FT card and a card reader;
|
|
Simultaneous Send/Receive
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Highly Integrated Module System
|
|
|
|
|
|
|
Highly Integrated Module System
|
|
|
|
|
|
|
Best RF Performance in Narrow Range
|
|
|
|
|
|
|
Software Testing and Waveform Development
|
|
|
|
|
1 (2400-2500 MHz) 1 (70-6000 MHz)
|
1 (2400-2500 MHz) 1 (70-6000 MHz)
|
|
|
|
|
4 (2400-2500 MHz) 4 (70-6000 MHz)
|
4 (2400-2500 MHz) 4 (70-6000 MHz)
|
MIMO Testing Platform, Can Synchronize in RF Domain
|
|
The official supported boards are shown below:
|
|
|
Xilinx ZC706 dev board + FMCOMMS2/3/4
|
|
Xilinx zed board + FMCOMMS2/3/4
|
|
ADRV9364-Z7020 + ADRV1CRR-BOB
|
|
ADRV9361-Z7035 + ADRV1CRR-BOB/FMC
|
|
Xilinx ZC702 dev board + FMCOMMS2/3/4
|
|
Xilinx ZCU102 dev board + FMCOMMS2/3/4
|
|
Xilinx ZCU102 dev board + ADRV9371
|
1. Download the SD card image
The image contains U-boot, kernel, and file system.
https://users.ugent.be/~xjiao/openwifi-1.2.0-leuven-2-32bit.img.xz
The downloaded file is a .xz file
On Windows, you need to decompress it first, and the extracted file is the .img file we need.
Next, prepare an SD/TF card with more than 8GB of memory, connected to the computer through a card reader.
Prepare an SD card burning software; I prefer using Win32DiskImager. Open the software, select the downloaded img file, and set it as follows:
Step 1: Select the downloaded img file;
Step 2: Select the corresponding drive letter for the SD/TF card; be sure to check carefully to avoid damaging other cards;
Step 3: Click WRITE to write the file to the card;
Step 4: Wait for completion.
2. Copy files to the corresponding location
After writing, the card only shows the boot partition on Windows. First, check what files are in the partition:
The u-boot and device tree for each board provided by ADI are in the corresponding folders:
The SD card also includes the kernel + u-boot environment variables
Where uImage (kernel) is located in the folder shown in the image below, and it also needs to be copied to the root directory of the SD card, as shown in the above image.
The file system needs to be viewed in a Linux system (WINDOWS does not support it), as follows:
Finally, in the boot partition mentioned above, copy the u-boot and device tree to the root partition of the SD card, and copy the files that match your hardware platform to the root directory of the SD card.
Open the path shown in the image below:
Copy the internal files to the root directory of the SD card:
Replace the original files as needed, then you can modify the environment variable text (default is not necessary). Connect the platform’s serial port + power on to see the complete system print information, with the serial port settings as follows:
So far, the process of building the platform using AD936X + ZYNQ with the official image has been completed, and you can enjoy it now.
To summarize: 1. Download the image file; 2. Copy the corresponding u-boot, device tree, and kernel (uImage) from the OpenWIFI folder to the root directory of the SD card (BOOT).
Hardware: SDR hardware platform
Development platform: Windows
Accessory: WIFI antenna*2
Note: The antenna interface should match the socket interface of your SDR platform, and the most common ones are SMA interfaces. Other interfaces need to find a way to connect the antenna to the RX and TX interfaces of the SDR.
After OpenWIFI starts, there is a fixed IP that needs to connect the platform to the WLAN interface of the router. If the IP segment of OpenWIFI is not in the same frequency segment as the router, you need to modify the IP of OpenWIFI or the fixed IP of the router. I modified the router IP directly for convenience, as shown below:
In the interface shown above, enter the command shown in the image below:
~/openwifi/fosdem-11ag.sh
OpenWIFI has started, and now connect to OpenWIFI’s wifi with your phone;
Open the webpage 192.168.13.1 in your phone’s browser, and you will see the author’s homepage. For detailed videos, see the link below.
The current settings cannot access the internet yet; you need to bridge OpenWIFI and the WLAN of the router, mainly using three commands:
sudo sysctl -w net.ipv4.ip_forward=1sudo iptables -t nat -A POSTROUTING -o NICY -j MASQUERADEsudo ip route add 192.168.13.0/24 via 192.168.10.122 dev ethX
The red-marked positions need to be changed; I won’t explain the specific meanings (mainly involving routing table issues). You will understand the IPs used in the image above by checking the board’s IP.
The modified command is as follows:
sudo sysctl -w net.ipv4.ip_forward=1sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADEsudo ip route add 192.168.13.0/24 via 192.168.10.122 dev eth0
Modify the configuration in the serial port.
At this point, you can connect to OpenWIFI’s wifi with your phone and access the internet, as shown below:
The signal reception part is weak because the antenna is not plugged in.
– END –
For more content about 5G, satellite communication, FPGA, digital IC, communication algorithms, etc., please follow the WeChat public account [FPGA Algorithm Engineer].