mirror of
https://github.com/open-sdr/openwifi.git
synced 2024-12-19 21:58:13 +00:00
Update docs for ADI kuiper (our notter release)
This commit is contained in:
parent
5a69caf8d7
commit
7eea29887a
66
README.md
66
README.md
@ -43,25 +43,24 @@ Openwifi code has dual licenses. [AGPLv3](https://github.com/open-sdr/openwifi/b
|
||||
|
||||
**Performance (best case: aggregation/AMPDU on):**
|
||||
- iperf: TCP 40~50Mbps; UDP 50Mbps
|
||||
- EVM -38dB; MCS0 sensitivity -87dBm; MCS7 -72dBm. (FMCOMMS2 2.4GHz; cable and OTA test)
|
||||
- EVM -38dB; MCS0 sensitivity -92dBm; MCS7 -73dBm. (FMCOMMS2 2.4GHz; cable and OTA test)
|
||||
|
||||
**Supported SDR platforms:** (Check [Porting guide](#Porting-guide) for your new board if it isn't in the list)
|
||||
|
||||
board_name|board combination|status|SD card img|Vivado license
|
||||
-------|-------|----|----|-----
|
||||
zc706_fmcs2|[Xilinx ZC706 board](https://www.xilinx.com/products/boards-and-kits/ek-z7-zc706-g.html) + [FMCOMMS2/3/4](https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/eval-ad-fmcomms2.html)|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.3.1-wilsele-1-32bit.img.xz)|Need
|
||||
zed_fmcs2|[Xilinx zed board](https://www.xilinx.com/products/boards-and-kits/1-8dyf-11.html) + [FMCOMMS2/3/4](https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/eval-ad-fmcomms2.html)|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.3.1-wilsele-1-32bit.img.xz)|**NO** need
|
||||
adrv9364z7020|[ADRV9364-Z7020 + ADRV1CRR-BOB](https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/adrv9364-z7020.html)|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.3.1-wilsele-1-32bit.img.xz)|**NO** need
|
||||
adrv9361z7035|[ADRV9361-Z7035 + ADRV1CRR-BOB/FMC](https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/ADRV9361-Z7035.html)|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.3.1-wilsele-1-32bit.img.xz)|Need
|
||||
zc702_fmcs2|[Xilinx ZC702 board](https://www.xilinx.com/products/boards-and-kits/ek-z7-zc702-g.html) + [FMCOMMS2/3/4](https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/eval-ad-fmcomms2.html)|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.3.1-wilsele-1-32bit.img.xz)|**NO** need
|
||||
antsdr|[MicroPhase](https://github.com/MicroPhase/) enhanced ADALM-PLUTO [Notes](kernel_boot/boards/antsdr/notes.md)|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.3.1-wilsele-1-32bit.img.xz)|**NO** need
|
||||
antsdr_e200|[MicroPhase](https://github.com/MicroPhase/) enhanced ADALM-PLUTO [Notes](kernel_boot/boards/antsdr_e200/README.md)|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.3.1-wilsele-1-32bit.img.xz)|**NO** need
|
||||
sdrpi|[HexSDR](https://github.com/HexSDR/) Powerful SDR in Raspberry Pi size [Notes](kernel_boot/boards/sdrpi/notes.md)|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.3.1-wilsele-1-32bit.img.xz)|**NO** need
|
||||
zcu102_fmcs2|[Xilinx ZCU102 board](https://www.xilinx.com/products/boards-and-kits/ek-u1-zcu102-g.html) + [FMCOMMS2/3/4](https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/eval-ad-fmcomms2.html)|Done|[64bit img](https://users.ugent.be/~xjiao/openwifi-1.3.1-wilsele-64bit.img.xz)|Need
|
||||
neptunesdr|Low cost Zynq 7020 + AD9361 board|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.3.1-wilsele-1-32bit.img.xz)|**NO** need
|
||||
zcu102_9371|[Xilinx ZCU102 board](https://www.xilinx.com/products/boards-and-kits/ek-u1-zcu102-g.html) + [ADRV9371](https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/eval-adrv9371.html)|Future|Future|Need
|
||||
board_name|Description|Vivado license
|
||||
----------|-----------|--------------
|
||||
zc706_fmcs2|[Xilinx ZC706 board](https://www.xilinx.com/products/boards-and-kits/ek-z7-zc706-g.html) + [FMCOMMS2/3/4](https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/eval-ad-fmcomms2.html)|Need
|
||||
zed_fmcs2|[Xilinx zed board](https://www.xilinx.com/products/boards-and-kits/1-8dyf-11.html) + [FMCOMMS2/3/4](https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/eval-ad-fmcomms2.html)|**NO** need
|
||||
adrv9364z7020|[ADRV9364-Z7020 + ADRV1CRR-BOB](https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/adrv9364-z7020.html)|**NO** need
|
||||
adrv9361z7035|[ADRV9361-Z7035 + ADRV1CRR-BOB/FMC](https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/ADRV9361-Z7035.html)|Need
|
||||
zc702_fmcs2|[Xilinx ZC702 board](https://www.xilinx.com/products/boards-and-kits/ek-z7-zc702-g.html) + [FMCOMMS2/3/4](https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/eval-ad-fmcomms2.html)|**NO** need
|
||||
antsdr|[MicroPhase](https://github.com/MicroPhase/) enhanced ADALM-PLUTO [Notes](kernel_boot/boards/antsdr/notes.md)|**NO** need
|
||||
antsdr_e200|[MicroPhase](https://github.com/MicroPhase/) enhanced ADALM-PLUTO (smaller/cheaper) [Notes](kernel_boot/boards/antsdr_e200/README.md)|**NO** need
|
||||
sdrpi|[HexSDR](https://github.com/HexSDR/) SDR in Raspberry Pi size [Notes](kernel_boot/boards/sdrpi/notes.md)|**NO** need
|
||||
zcu102_fmcs2|[Xilinx ZCU102 board](https://www.xilinx.com/products/boards-and-kits/ek-u1-zcu102-g.html) + [FMCOMMS2/3/4](https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/eval-ad-fmcomms2.html)|Need
|
||||
neptunesdr|Low cost Zynq 7020 + AD9361 board|**NO** need
|
||||
|
||||
- board_name is used to identify FPGA design in openwifi-hw/boards/
|
||||
- board_name is used to identify FPGA design in openwifi-hw/boards/ and FPGA image in openwifi-hw-img/boards
|
||||
- Don't have any boards? Or you like JTAG boot instead of SD card? Check our test bed [w-iLab.t](https://doc.ilabt.imec.be/ilabt/wilab/tutorials/openwifi.html) tutorial.
|
||||
|
||||
[[Quick start](#Quick-start)]
|
||||
@ -78,16 +77,22 @@ zcu102_9371|[Xilinx ZCU102 board](https://www.xilinx.com/products/boards-and-kit
|
||||
[[Application notes](doc/app_notes/README.md)]
|
||||
|
||||
## Quick start
|
||||
- Restore openwifi board specific img file (from the table) into a SD card. To do this, program "Disks" in Ubuntu can be used (Install: "sudo apt install gnome-disk-utility"). After restoring, the SD card should have two partitions: BOOT and rootfs. You need to config the **correct files in the BOOT partition** according to the **board you have** by operation on your computer:
|
||||
- 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
|
||||
- Connect two antennas to RXA/TXA ports. Config the board to SD card boot mode (check the board manual). Insert the SD card to the board. Power on.
|
||||
- Download [openwifi img](https://drive.google.com/file/d/1fb8eJGJAntOciCiGFVLfQs7m7ucRtSWD/view?usp=share_link) and burn it into a 16GB SD card. After this operation, the SD card should have two partitions: BOOT and rootfs. To flash the SD card, SD card tool software (such as Startup Disk Creator in Ubuntu) or dd command can be used:
|
||||
```
|
||||
sudo dd bs=512 count=31116288 if=openwifi-xyz.img of=/dev/your_sdcard_dev
|
||||
(To have correct count value, better to check the .img file actual situation by "fdisk -l img_filename")
|
||||
```
|
||||
- Config the **correct files in the BOOT partition** according to the **board you have** by operation on your computer:
|
||||
- Copy files in **BOOT/openwifi/board_name** to the base directory of BOOT partition.
|
||||
- Delete the **rootfs/root/kernel_modules** directory (if exist).
|
||||
- Insert the SD card to the board. Configure the board in SD booting mode. Connect antennas. Power on.
|
||||
- Login to the board from your PC (PC Ethernet should have IP 192.168.10.1) with password **openwifi**.
|
||||
```
|
||||
ssh root@192.168.10.122
|
||||
```
|
||||
- Then, run openwifi AP and the on board webserver
|
||||
```
|
||||
./openwifi/setup_once.sh (Only need to run once for new board)
|
||||
cd openwifi
|
||||
./wgd.sh
|
||||
./fosdem.sh
|
||||
@ -97,7 +102,7 @@ zcu102_9371|[Xilinx ZCU102 board](https://www.xilinx.com/products/boards-and-kit
|
||||
**NOTE** adrv9361z7035 has ultra low TX power in 5GHz. Move **CLOSER** when you use that board in 5GHz!!!
|
||||
- After you see the "openwifi" SSID on your device (Phone/Laptop/etc), connect it. Browser to 192.168.13.1 on your device, you should see the webpage hosted by the webserver on board.
|
||||
- Note 1: If your device doesn't support 5GHz (ch44), please change the **hostapd-openwifi.conf** on board and re-run fosdem.sh.
|
||||
- Note 2: After ~2 hours, the Viterbi decoder will halt (Xilinx Evaluation License). Just power cycle the board if it happens. (If output of "./sdrctl dev sdr0 get reg rx 20" is always the same, it means the decoder halts)
|
||||
- Note 2: After ~2 hours, the Viterbi decoder will halt (Xilinx Evaluation License). Just reload FPGA ([method](doc/app_notes/drv_fpga_dynamic_loading.md)) or simply power cycle the board if it happens. (If output of "./sdrctl dev sdr0 get reg rx 20" is always the same, it means the decoder halts)
|
||||
- To give the Wi-Fi client internet access, configure routing/NAT **on the PC**:
|
||||
```
|
||||
sudo sysctl -w net.ipv4.ip_forward=1
|
||||
@ -129,7 +134,7 @@ The board actually is an Linux/Ubuntu computer which is running **hostapd** to o
|
||||
|
||||
## Update FPGA
|
||||
|
||||
(Check [Driver and FPGA dynamic reloading app note](./doc/app_notes/drv_fpga_dynamic_loading.md) for more convenient way of updating FPGA and driver files)
|
||||
(Check [Driver and FPGA dynamic reloading app note](./doc/app_notes/drv_fpga_dynamic_loading.md) for more convenient way of updating FPGA and driver files without rebooting/power-cycle)
|
||||
|
||||
Since the pre-built SD card image might not have the latest bug-fixes/updates, it is recommended to always copy the latest files in the [user_space](./user_space) directory on to the board. Then update the fpga bitstream and driver (see next section) on to the board.
|
||||
|
||||
@ -139,13 +144,13 @@ Since the pre-built SD card image might not have the latest bug-fixes/updates, i
|
||||
```
|
||||
export XILINX_DIR=your_Xilinx_install_directory
|
||||
(Example: export XILINX_DIR=/opt/Xilinx. The Xilinx directory should include sth like: Downloads, Vitis, etc.)
|
||||
export OPENWIFI_HW_DIR=your_openwifi-hw_directory
|
||||
(The directory where you store the open-sdr/openwifi-hw repo via git clone)
|
||||
export OPENWIFI_HW_IMG_DIR=your_openwifi-hw-img_directory
|
||||
(The directory where you get the open-sdr/openwifi-hw-img repo via git clone)
|
||||
export BOARD_NAME=your_board_name
|
||||
```
|
||||
- Pick the FPGA bitstream from openwifi-hw, and generate BOOT.BIN and transfer it on board via ssh channel:
|
||||
- Pick the FPGA bitstream from openwifi-hw-img, and generate BOOT.BIN and transfer it on board via ssh channel:
|
||||
```
|
||||
cd openwifi/user_space; ./boot_bin_gen.sh $XILINX_DIR $BOARD_NAME $OPENWIFI_HW_DIR/boards/$BOARD_NAME/sdk/system_top.xsa
|
||||
cd openwifi/user_space; ./boot_bin_gen.sh $XILINX_DIR $BOARD_NAME $OPENWIFI_HW_IMG_DIR/boards/$BOARD_NAME/sdk/system_top.xsa
|
||||
cd openwifi/kernel_boot/boards/$BOARD_NAME/output_boot_bin; scp ./BOOT.BIN root@192.168.10.122:
|
||||
```
|
||||
- On board: Put the BOOT.BIN into the BOOT partition.
|
||||
@ -159,11 +164,11 @@ Since the pre-built SD card image might not have the latest bug-fixes/updates, i
|
||||
```
|
||||
**Power cycle** the board to load new FPGA bitstream.
|
||||
|
||||
To load FPGA dynamically without rebooting/power-cycle, check [Driver and FPGA dynamic reloading app note](./doc/app_notes/drv_fpga_dynamic_loading.md).
|
||||
To avoid above manual operation, after BOOT.BIN is generated you can run **transfer_kernel_image_module_to_board.sh** from openwifi/user_space directory and then run **populate_kernel_image_module_reboot.sh** on board to have new FPGA and kernel image (check **prepare_kernel.sh** in the next section) taken effect.
|
||||
|
||||
## Update Driver
|
||||
|
||||
(Check [Driver and FPGA dynamic reloading app note](./doc/app_notes/drv_fpga_dynamic_loading.md) for more convenient way of updating FPGA and driver files)
|
||||
(Check [Driver and FPGA dynamic reloading app note](./doc/app_notes/drv_fpga_dynamic_loading.md) for more convenient way of updating FPGA and driver files without rebooting/power-cycle)
|
||||
|
||||
Since the pre-built SD card image might not have the latest bug-fixes/updates, it is recommended to always copy the latest files in the [user_space](./user_space) directory on to the board. Then update the fpga bitstream (see previous section) and driver on to the board.
|
||||
|
||||
@ -187,8 +192,7 @@ Since the pre-built SD card image might not have the latest bug-fixes/updates, i
|
||||
Now you can use **wgd.sh** on board to load the new openwifi driver. **wgd.sh** also tries to reload FPGA img if system_top.bit.bin presents in the same directory.
|
||||
Find more information in [Driver and FPGA dynamic reloading app note](./doc/app_notes/drv_fpga_dynamic_loading.md).
|
||||
|
||||
**Note**: If you have symbol or version error while loadng the driver, it could be because the kernel in the SD card image is too old. In this case, you need put the linux
|
||||
kernel image generated by prepare_kernel.sh (check [[Update Driver](#Update-Driver)]) to the BOOT partition of SD card. The kernel image file name: adi-linux/arch/arm/boot/uImage (32bit); adi-linux-64/arch/arm64/boot/Image (64bit).
|
||||
**Note**: If you have symbol or version error while loadng the driver, it could be because the kernel in the SD card image is too old. In this case, you need put the linux kernel image generated by prepare_kernel.sh (check [[Update Driver](#Update-Driver)]) to the BOOT partition of SD card. The kernel image file name: adi-linux/arch/arm/boot/uImage (32bit); adi-linux-64/arch/arm64/boot/Image (64bit).
|
||||
|
||||
## Update sdrctl
|
||||
- Copy the sdrctl source files to the board via ssh channel
|
||||
@ -197,11 +201,11 @@ Since the pre-built SD card image might not have the latest bug-fixes/updates, i
|
||||
```
|
||||
- Compile the sdrctl **on board**:
|
||||
```
|
||||
cd ~/openwifi/sdrctl_src/ && make && cp sdrctl ../ && cd ..
|
||||
cd ~/openwifi/sdrctl_src/ && make clean && make && cp sdrctl ../ && cd ..
|
||||
```
|
||||
## Easy Access and etc
|
||||
|
||||
- Check [Driver and FPGA dynamic reloading app note](./doc/app_notes/drv_fpga_dynamic_loading.md) for more convenient way of updating FPGA and driver files.
|
||||
- Check [Driver and FPGA dynamic reloading app note](./doc/app_notes/drv_fpga_dynamic_loading.md) for more convenient way of updating FPGA and driver files without rebooting/power-cycle.
|
||||
- FPGA and driver on board update scripts
|
||||
- Setup [ftp server](https://ubuntu.com/server/docs/service-ftp) on PC, allow anonymous and change ftp root directory to the openwifi directory.
|
||||
- On board:
|
||||
|
@ -13,7 +13,7 @@ Application notes collect many small topics about using openwifi in different sc
|
||||
- [WiFi CSI radar via self CSI capturing](radar-self-csi.md)
|
||||
- [Capture IQ sample, AGC gain, RSSI with many types of trigger condition](iq.md)
|
||||
- [Capture dual antenna TX/RX IQ for multi-purpose (capture collision)](iq_2ant.md)
|
||||
- [WiFi packet and IQ sample self loopback test (over-the-air and FPGA internal)](packet-iq-self-loopback-test.md)
|
||||
- [WiFi packet, CSI and IQ sample self loopback test (over-the-air and FPGA internal)](packet-iq-self-loopback-test.md)
|
||||
- [IEEE 802.11n (Wi-Fi 4)](ieee80211n.md)
|
||||
- [802.11 packet injection and fuzzing](inject_80211.md)
|
||||
- [CSI fuzzer](csi_fuzzer.md)
|
||||
|
@ -20,7 +20,7 @@ present in the directory. If wgd.sh can not find the FPGA image, it will skip re
|
||||
- Generate the reloadable FPGA file **system_top.bit.bin**. In the Linux host computer:
|
||||
```
|
||||
cd openwifi/user_space
|
||||
./drv_and_fpga_package_gen.sh $OPENWIFI_HW_DIR $XILINX_DIR $BOARD_NAME
|
||||
./drv_and_fpga_package_gen.sh $OPENWIFI_HW_IMG_DIR $XILINX_DIR $BOARD_NAME
|
||||
```
|
||||
Then **system_top.bit.bin** will be generated in openwifi/user_space.
|
||||
|
||||
|
BIN
doc/app_notes/openwifi-csi-fpga-loopback.jpg
Normal file
BIN
doc/app_notes/openwifi-csi-fpga-loopback.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 292 KiB |
@ -5,13 +5,13 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
-->
|
||||
|
||||
One super power of the openwifi platform is "**Full Duplex**" which means that openwifi baseband can receive its own TX signal.
|
||||
This makes the IQ sample and WiFi packet self loopback test possible. Reading the normal IQ sample capture [app note](iq.md) will help if you have issue or
|
||||
want to understand openwifi side channel (for IQ and CSI) deeper.
|
||||
This makes the IQ sample, WiFi packet and CSI self loopback test possible. Reading the normal [IQ sample capture app note](iq.md) and [CSI radar app note](radar-self-csi.md) will help if you have issue or want to understand openwifi side channel (for IQ and CSI) deeper.
|
||||
![](./openwifi-loopback-principle.jpg)
|
||||
|
||||
[[IQ self loopback quick start](#IQ-self-loopback-quick-start)]
|
||||
[[Check the packet loopback on board](#Check-the-packet-loopback-on-board)]
|
||||
[[Self loopback config](#Self-loopback-config)]
|
||||
[[IQ self loopback config](#IQ-self-loopback-config)]
|
||||
[[CSI FPGA self loopback quick start](#CSI-FPGA-self-loopback-quick-start)]
|
||||
|
||||
## IQ self loopback quick start
|
||||
(Please replace the IQ length **8187** by **4095** if you use low end FPGA board: zedboard/adrv9464z7020/antsdr/zc702/sdrpi)
|
||||
@ -112,7 +112,7 @@ to do further offline analysis, or feed the IQ sample to the openwifi receiver s
|
||||
```
|
||||
You should see the printk message of packet Tx and Rx from the openwifi driver (sdr.c).
|
||||
|
||||
## Self loopback config
|
||||
## IQ self loopback config
|
||||
|
||||
- By default, the loopback is via the air (from Tx antenna to Rx antenna). FPGA inernal loopback option is offered to have IQ sample and packet without
|
||||
any interference. To have FPGA internal loopback, replace the "./side_ch_ctl wh5h0" during setup (the very 1st ssh session) by:
|
||||
@ -128,3 +128,34 @@ to do further offline analysis, or feed the IQ sample to the openwifi receiver s
|
||||
|
||||
- To understand deeper of all above commands/settings, please refer to [Capture IQ sample, AGC gain, RSSI with many types of trigger condition](iq.md) and
|
||||
[Capture dual antenna TX/RX IQ for multi-purpose (capture collision)](iq_2ant.md)
|
||||
|
||||
## CSI FPGA self loopback quick start
|
||||
|
||||
This section will show how to connect the WiFi OFDM transmitter to the receiver directly inside FPGA, and show the ideal CSI/constellation/frequency-offset. (For CSI over the air loopback, please refer to [CSI radar app note](radar-self-csi.md))
|
||||
|
||||
Command sequence on board:
|
||||
```
|
||||
cd openwifi
|
||||
./wgd.sh
|
||||
./monitor_ch.sh sdr0 6
|
||||
insmod side_ch.ko
|
||||
./side_ch_ctl g
|
||||
```
|
||||
Open another ssh session on board, then:
|
||||
```
|
||||
cd openwifi
|
||||
./sdrctl dev sdr0 set reg rx_intf 3 256
|
||||
(Above command let the FPGA Tx IQ come to receiver directly. Set 256 back to 0 to let receiver back connect to AD9361 RF frontend)
|
||||
./sdrctl dev sdr0 set reg rx 5 0
|
||||
(Disable the receiver FFT window shift. By default it is 1 -- good for multipath, overfitting for direct loopback)
|
||||
./inject_80211/inject_80211 -m n -r 7 -n 99999 -s 1400 -d 1000000 sdr0
|
||||
(Transmit 802.11n MCS7 1400Byte packet every second)
|
||||
```
|
||||
|
||||
Command on computer:
|
||||
```
|
||||
cd openwifi/user_space/side_ch_ctl_src
|
||||
python3 side_info_display.py
|
||||
```
|
||||
Now you should see the following screenshot that shows the CSI/constellation/frequency-offset over this in-FPGA ideal channel.
|
||||
![](./openwifi-csi-fpga-loopback.jpg)
|
||||
|
@ -11,14 +11,15 @@
|
||||
|
||||
## Use openwifi prebuilt img
|
||||
|
||||
Download openwifi pre-built img, such as openwifi-xyz.img.xz, and extract it to .img file.
|
||||
Download openwifi pre-built img, such as openwifi-xyz.img.xz (in [Quick start](../../README.md#quick-start)), and extract it to .img file.
|
||||
|
||||
Use dd command to flash the SD card. (Other software seems having issue!)
|
||||
Use dd command to flash the SD card. (Or other software like Startup Disk Creator in Ubuntu)
|
||||
```
|
||||
sudo dd bs=512 count=31116288 if=openwifi-xyz.img of=/dev/your_sdcard_dev
|
||||
```
|
||||
To have correct count value, better to check the .img file actual situation by "fdisk -l img_filename".
|
||||
|
||||
(To have correct count value, better to check the .img file actual situation by "fdisk -l img_filename".
|
||||
Then start from the 2nd step of the [Quick start](../../README.md#quick-start) in README.
|
||||
|
||||
## Build SD card from scratch
|
||||
|
||||
@ -26,7 +27,7 @@ Download image_2022-08-04-ADI-Kuiper-full.zip from https://wiki.analog.com/resou
|
||||
|
||||
Extract it to .img file.
|
||||
|
||||
Use dd command to flash the SD card. (Other software seems having issue!)
|
||||
Use dd command to flash the SD card. (Or other software like Startup Disk Creator in Ubuntu)
|
||||
```
|
||||
sudo dd bs=512 count=24018944 if=2022-08-04-ADI-Kuiper-full.img of=/dev/your_sdcard_dev
|
||||
```
|
||||
@ -67,21 +68,21 @@ DefaultTimeoutStopSec=2s
|
||||
|
||||
Put the openwifi/kernel_boot/10-network-device.rules into rootfs/etc/udev/rules.d/
|
||||
|
||||
Build and put the following 3 files to the BOOT partition of the SD card:
|
||||
- Linux kernel image file (check how to generate it by prepare_kernel.sh in [Update Driver](../../README.md#Update-Driver)):
|
||||
- adi-linux-64/arch/arm64/boot/Image (64bit)
|
||||
- adi-linux/arch/arm/boot/uImage (32bit)
|
||||
- devicetree file:
|
||||
- openwifi/kernel_boot/boards/zcu102_fmcs2/system.dtb (64bit)
|
||||
- openwifi/kernel_boot/boards/$BOARD_NAME/devicetree.dtb (32bit)
|
||||
- BOOT.BIN (check how to generate it by boot_bin_gen.sh in [Update FPGA](../../README.md#Update-FPGA)):
|
||||
- openwifi/kernel_boot/boards/$BOARD_NAME/output_boot_bin/BOOT.BIN
|
||||
Run **update_sdcard.sh** from openwifi/user_space directory to further prepare the SD card. The last argument $SDCARD_DIR of the script is the directory (mounting point) on your computer that has BOOT and rootfs directories/partitions.
|
||||
|
||||
Build openwifi driver according to [Update Driver](../../README.md#Update-Driver)). No need to copy them onboard at this moment.
|
||||
The script will build and put following things into the SD card:
|
||||
- Linux kernel image file ([Update Driver](../../README.md#Update-Driver)):
|
||||
- adi-linux-64/arch/arm64/boot/Image (64bit)
|
||||
- adi-linux/arch/arm/boot/uImage (32bit)
|
||||
- devicetree file:
|
||||
- openwifi/kernel_boot/boards/zcu102_fmcs2/system.dtb (64bit)
|
||||
- openwifi/kernel_boot/boards/$BOARD_NAME/devicetree.dtb (32bit)
|
||||
- BOOT.BIN ([Update FPGA](../../README.md#Update-FPGA)):
|
||||
- openwifi/kernel_boot/boards/$BOARD_NAME/output_boot_bin/BOOT.BIN
|
||||
- openwifi driver ([Update Driver](../../README.md#Update-Driver)).
|
||||
- openwifi/user_space files and openwifi/webserver files
|
||||
|
||||
Create /root/openwifi directory in the rootfs partition of the SD card, and put all files in openwifi/user_space to that directory.
|
||||
|
||||
Power on the board with the SD card, connect the board to your host PC (static IP 192.168.10.1) via ethernet, and ssh to the board with password "analog"
|
||||
After **update_sdcard.sh** finishes, please do the 2nd step "Config the correct files ..." in [Quick start](../../README.md#quick-start). Then power on the board with the SD card, connect the board to your host PC (static IP 192.168.10.1) via ethernet, and ssh to the board with password **"analog"**
|
||||
```
|
||||
ssh root@192.168.10.122
|
||||
```
|
||||
@ -93,25 +94,6 @@ Enlarge the onboard SD disk space, and reboot (https://github.com/analogdevicesi
|
||||
raspi-config --expand-rootfs
|
||||
reboot now
|
||||
```
|
||||
|
||||
(You should already build Linux kernel and openwifi driver in previous steps!)
|
||||
|
||||
Transfer the kernel modules .ko and openwifi driver .ko onto the board:
|
||||
```
|
||||
cd openwifi/user_space
|
||||
./transfer_driver_userspace_to_board.sh
|
||||
./transfer_kernel_image_module_to_board.sh $LINUX_KERNEL_SRC $BOARD_NAME
|
||||
($LINUX_KERNEL_SRC is the directory openwifi/adi-linux-64 or adi-linux)
|
||||
```
|
||||
|
||||
In the ssh session onboard:
|
||||
```
|
||||
cd /root
|
||||
sync
|
||||
tar -zxvf openwifi.tar.gz
|
||||
./populate_kernel_image_module_reboot.sh
|
||||
reboot now
|
||||
```
|
||||
Setup routing/NAT **on the PC** for your board -- this internet connection is **important** for post installation/config.
|
||||
```
|
||||
sudo sysctl -w net.ipv4.ip_forward=1
|
||||
@ -128,32 +110,15 @@ route add default gw 192.168.10.1
|
||||
ping IP_YOU_KNOW_ON_YOUR_NETWORK
|
||||
```
|
||||
If there is issue with the connectivity (ping can not reach the target), it needs to be solved before going to the next step.
|
||||
|
||||
|
||||
Do misc configurations/installations in the ssh session onboard:
|
||||
```
|
||||
cd /root/openwifi
|
||||
route add default gw 192.168.10.1 || true
|
||||
ping google.com
|
||||
sudo apt update
|
||||
chmod +x *.sh
|
||||
|
||||
# build sdrctl and inject_80211
|
||||
sudo apt-get -y install libnl-3-dev
|
||||
sudo apt-get -y install libnl-genl-3-dev
|
||||
cd sdrctl_src
|
||||
make
|
||||
cp sdrctl ../
|
||||
cd ../side_ch_ctl_src/
|
||||
gcc -o side_ch_ctl side_ch_ctl.c
|
||||
cp side_ch_ctl ../
|
||||
cd ..
|
||||
cd ./inject_80211/
|
||||
make
|
||||
cd ..
|
||||
chmod +x /root/openwifi/*.sh
|
||||
|
||||
# install and setup dhcp server
|
||||
sudo apt-get -y install isc-dhcp-server
|
||||
cp dhcpd.conf /etc/dhcp/dhcpd.conf
|
||||
cp /root/openwifi/dhcpd.conf /etc/dhcp/dhcpd.conf
|
||||
|
||||
# install hostapd and other useful tools
|
||||
sudo apt-get -y install hostapd
|
||||
@ -164,33 +129,32 @@ sudo apt-get -y install iperf3
|
||||
sudo apt-get -y install libpcap-dev
|
||||
sudo apt-get -y install bridge-utils
|
||||
|
||||
# add video file into the onbard web server
|
||||
wget -P webserver/ https://users.ugent.be/~xjiao/openwifi-low-aac.mp4
|
||||
# build on board tools
|
||||
sudo apt-get -y install libnl-3-dev
|
||||
sudo apt-get -y install libnl-genl-3-dev
|
||||
cd /root/openwifi/sdrctl_src
|
||||
make clean
|
||||
make
|
||||
cp sdrctl ../
|
||||
cd /root/openwifi/side_ch_ctl_src/
|
||||
gcc -o side_ch_ctl side_ch_ctl.c
|
||||
cp side_ch_ctl ../
|
||||
cd /root/openwifi/inject_80211/
|
||||
make clean
|
||||
make
|
||||
cd ..
|
||||
```
|
||||
|
||||
Run openwifi in the ssh session onboard:
|
||||
```
|
||||
/root/openwifi/setup_once.sh (Only need to run once for new board)
|
||||
cd /root/openwifi
|
||||
./wgd.sh
|
||||
ifconfig sdr0 up
|
||||
iwlist sdr0 scan
|
||||
./fosdem.sh
|
||||
```
|
||||
|
||||
## Use existing SD card on new board
|
||||
|
||||
You don't need to do it from scratch on a blank SD card. Instead, you can start from existing SD card (for example zcu102), and use it for a new board (for example zedboard).
|
||||
|
||||
1. Do this section (see above) "Build and put the following 3 files to the BOOT partition of the SD card" for the new board by replacing the file on the existing SD card.
|
||||
|
||||
2. Build openwifi driver according to [Update Driver](../../README.md#Update-Driver)). No need to copy them onboard at this moment.
|
||||
|
||||
3. Use the existing SD card to boot the new board.
|
||||
|
||||
4. Do this section (see above) "Transfer the kernel modules .ko and openwifi driver .ko onto the board". Do not forget the operations onboard after the file transfer:
|
||||
```
|
||||
cd /root
|
||||
sync
|
||||
tar -zxvf openwifi.tar.gz
|
||||
./populate_kernel_image_module_reboot.sh
|
||||
reboot now
|
||||
```
|
||||
Just operate the existing/working SD card of the old board on your computer starting from the 2nd step of the [Quick start](../../README.md#quick-start) in README. Then start using the SD card on the new board.
|
||||
|
Loading…
Reference in New Issue
Block a user