Merge pull request #37 from open-sdr/master

prepare the side channel (CSI) release
This commit is contained in:
Jiao Xianjun 2020-10-08 10:23:47 +02:00 committed by GitHub
commit 7da3f8ba0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 119 additions and 13 deletions

View File

@ -3,7 +3,9 @@
**openwifi:** Linux mac80211 compatible full-stack IEEE802.11/Wi-Fi design based on SDR (Software Defined Radio).
This repository includes Linux driver and software. [openwifi-hw](https://github.com/open-sdr/openwifi-hw) repository has the FPGA design. [[Project document](https://github.com/open-sdr/openwifi/tree/master/doc)]
This repository includes Linux driver and software. [openwifi-hw](https://github.com/open-sdr/openwifi-hw) repository has the FPGA design.
[[Project document](doc)], [[Quick start](#Quick-start)], [[Application notes](doc/app_notes)]
[[Videos](#Videos)] [[Papers](#Papers)] [openwifi [maillist](https://lists.ugent.be/wws/subscribe/openwifi)] [[Cite openwifi project](#Cite-openwifi-project)]
@ -33,12 +35,12 @@ Openwifi code has dual licenses. AGPLv3 is the opensource license. For non-opens
board_name|board combination|status|SD card img
-------|-------|----|----
zc706_fmcs2|Xilinx ZC706 dev board + FMCOMMS2/3/4|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-3-32bit.img.xz)
zed_fmcs2|Xilinx zed board + FMCOMMS2/3/4|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-3-32bit.img.xz)
adrv9364z7020|ADRV9364-Z7020 + ADRV1CRR-BOB|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-3-32bit.img.xz)
adrv9361z7035|ADRV9361-Z7035 + ADRV1CRR-BOB/FMC|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-3-32bit.img.xz)
zc702_fmcs2|Xilinx ZC702 dev board + FMCOMMS2/3/4|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-3-32bit.img.xz)
zcu102_fmcs2|Xilinx ZCU102 dev board + FMCOMMS2/3/4|Done|[64bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-3-64bit.img.xz)
zc706_fmcs2|Xilinx ZC706 dev board + FMCOMMS2/3/4|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-4-32bit.img.xz)
zed_fmcs2|Xilinx zed board + FMCOMMS2/3/4|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-4-32bit.img.xz)
adrv9364z7020|ADRV9364-Z7020 + ADRV1CRR-BOB|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-4-32bit.img.xz)
adrv9361z7035|ADRV9361-Z7035 + ADRV1CRR-BOB/FMC|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-4-32bit.img.xz)
zc702_fmcs2|Xilinx ZC702 dev board + FMCOMMS2/3/4|Done|[32bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-4-32bit.img.xz)
zcu102_fmcs2|Xilinx ZCU102 dev board + FMCOMMS2/3/4|Done|[64bit img](https://users.ugent.be/~xjiao/openwifi-1.1.0-taiyuan-4-64bit.img.xz)
zcu102_9371|Xilinx ZCU102 dev board + ADRV9371|Future|None
- board_name is used to identify FPGA design in openwifi-hw/boards/
@ -55,6 +57,9 @@ zcu102_9371|Xilinx ZCU102 dev board + ADRV9371|Future|None
[[Special note for 11b](#Special-note-for-11b)]
[[Porting guide](#Porting-guide)]
[[Project document](doc)]
[[Application notes](doc/app_notes)]
## Quick start
- Burn openwifi board specific img file (from the table) into a SD card ("Open With Disk Image Writer". Or "dd" command after unzip). The SD card has 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 partiton.
@ -174,7 +179,7 @@ Since the pre-built SD card image might not have the latest bug-fixes/updates, i
- Input password "openwifi"
## Build openwifi Linux img from scratch
- Download [2019_R1-2020_02_04.img.xz](http://swdownloads.analog.com/cse/2019_R1-2020_02_04.img.xz) from [Analog Devices Wiki](https://wiki.analog.com/resources/tools-software/linux-software/zynq_images). Burn it to a SD card.
- Download [2019_R1-2020_02_04.img.xz](https://swdownloads.analog.com/cse/2019_R1-2020_02_04.img.xz) from [Analog Devices Wiki](https://wiki.analog.com/resources/tools-software/linux-software/zynq_images). Burn it to a SD card.
- Insert the SD card to your Linux PC. Find out the mount point (that has two sub directories BOOT and rootfs), and setup environment variables (use absolute path):
```
export SDCARD_DIR=sdcard_mount_point
@ -221,7 +226,7 @@ $OPENWIFI_DIR/user_space/build_wpa_supplicant_wo11b.sh $OPENWIFI_DIR
```
## Porting guide
This section explains the porting work by showing the differences between openwifi and Analog Devices reference design. openwifi is based on f61d9707 (2019 r1) of [HDL Reference Designs](https://github.com/analogdevicesinc/hdl).
This section explains the porting work by showing the differences between openwifi and Analog Devices reference design. openwifi is based on 4fea7c5 (2019 r1) of [HDL Reference Designs](https://github.com/analogdevicesinc/hdl).
- Open the fmcomms2 + zc706 reference design at hdl/projects/fmcomms2/zc706 (Please read Analog Devices help)
- Open the openwifi design zc706_fmcs2 at openwifi-hw/boards/zc706_fmcs2 (Please read openwifi-hw repository)
- "Open Block Design", you will see the differences between openwifi and the reference design. Both in "diagram" and in "Address Editor".
@ -239,7 +244,8 @@ Low latency for gaming and introduction [[youtube](https://youtu.be/Notn9X482LI)
## Papers
[openwifi: a free and open-source IEEE802.11 SDR implementation on SoC](https://biblio.ugent.be/publication/8663043/file/8663044.pdf)
- [openwifi: a free and open-source IEEE802.11 SDR implementation on SoC](https://biblio.ugent.be/publication/8663043/file/8663044.pdf)
- [csi murder](https://ans.unibs.it/projects/csi-murder/)
Openwifi was born in [ORCA project](https://www.orca-project.eu/) (EU's Horizon2020 programme under agreement number 732174).

View File

@ -10,6 +10,7 @@ Above figure shows software and hardware/FPGA modules that compose the openwifi
- [Regulation and channel config](#Regulation-and-channel-config)
- [Analog and digital frequency design](#Analog-and-digital-frequency-design)
- [Debug methods](#Debug-methods)
- [Application notes](app_notes)
## Driver and software overall principle
@ -89,7 +90,7 @@ module_name: **drv_xpu**
reg_idx|meaning|comment
-------|-------|----
x|x|to be defined
7|git revision when build the driver|example: return value 0071bc74 means git revision is 071bc74 (the 1st 0 must be removed!)
module_name: **rf**
@ -140,6 +141,7 @@ reg_idx|meaning|comment
31|openwifi MAC address high 32bit|check XPU_REG_MAC_ADDR_write in sdr.c to see how we set MAC address to FPGA when NIC start
58|TSF runtime value low 32bit|read only
59|TSF runtime value high 32bit|read only
63|git revision when build the FPGA|example: return value 065272ac means git revision is 65272ac (the 1st 0 must be removed!)
## Rx packet flow and filtering config

5
doc/app_notes/README.md Normal file
View File

@ -0,0 +1,5 @@
Application notes collect many small topics about using openwifi in different scenarios/modes.
- [Use openwifi on the w-iLab.t testbed remotely](https://doc.ilabt.imec.be/ilabt/wilab/tutorials/openwifi.html)
- [Communication between two SDR boards under AP and client mode](ap-client-two-sdr.md)
- [Communication between two SDR boards under ad-hoc mode](ad-hoc-two-sdr.md)

View File

@ -0,0 +1,48 @@
- Power on two SDR boards. Call one board "adhoc1" and the other "adhoc2". On each board, the TX and RX antenna should vertical/orthogonal to each other as much as possible to gain a good TX/RX isolation.
- Connect a computer to the adhoc1 via Ethernet cable. The computer should have static IP 192.168.10.1. Open a terminal on the computer, and then in the terminal:
```
ssh root@192.168.10.122
(password: openwifi)
service network-manager stop
cd openwifi
./wgd.sh
(Wait for the script completed)
ifconfig sdr0 up
./sdr-ad-hoc-up.sh sdr0 44 192.168.13.1
(Above command setup ad-hoc network at channel 44 with static IP assigned to sdr0 NIC)
iwconfig sdr0
```
- You shold see output like:
```
sdr0 IEEE 802.11 ESSID:"sdr-ad-hoc"
Mode:Ad-Hoc Frequency:5.22 GHz Cell: 92:CA:14:27:1E:B0
Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
```
If you see "Cell: Not-Associated", please wait and run "iwconfig sdr0" again until a randomly generated Cell ID appears.
- Connect another computer to the adhoc2 via Ethernet cable. The computer should have static IP 192.168.10.1. Open a terminal on the computer, and then in the terminal:
```
ssh root@192.168.10.122
(password: openwifi)
service network-manager stop
cd openwifi
./wgd.sh
ifconfig sdr0 up
./sdr-ad-hoc-up.sh sdr0 44 192.168.13.1
iwconfig sdr0
```
- You shold see output like:
```
sdr0 IEEE 802.11 ESSID:"sdr-ad-hoc"
Mode:Ad-Hoc Frequency:5.22 GHz Cell: 92:CA:14:27:1E:B0
Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
```
The "Cell: 92:CA:14:27:1E:B0" should be the same as adhoc1, because the later joined node should discover the Cell ID of the existing network and join/get it automatically. If not, please adjust the antenna/distance and re-run the commands.
Now the communication link should be already setup between the two ad-hoc nodes, and you can ping each other.

View File

@ -0,0 +1,45 @@
- Power on two SDR boards. Call one board "AP board" and the other "client board". On each board, the TX and RX antenna should vertical/orthogonal to each other as much as possible to gain a good TX/RX isolation.
- Connect a computer to the AP board via Ethernet cable. The computer should have static IP 192.168.10.1. Open a terminal on the computer, and then in the terminal:
```
ssh root@192.168.10.122
(password: openwifi)
cd openwifi
./fosdem.sh
(It will create a WiFi AP by hostapd program with config file: hostapd-openwifi.conf)
(Wait for the script completed)
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)
```
- Connect another computer to the client board via Ethernet cable. The computer should have static IP 192.168.10.1. Open a terminal on the computer, and then in the terminal:
```
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)
iwconfig sdr0 essid openwifi
```
- Now the client is trying to associate with the AP. The AP board terminal should print like:
```
...
sdr0: AP-STA-CONNECTED 66:55:44:33:22:58
sdr0: STA 66:55:44:33:22:58 RADIUS: starting accounting session 1FF1C1B4-00000001
```
If not, please adjust antenna/distance and re-run the commands on the client side.
- After association is done, in the terminal of client:
```
dhclient sdr0
(Wait for it completed)
ifconfig sdr0
(Now you should see the IP address like 192.168.13.x allocated by AP)
./set_csma_normal.sh
ping 192.168.13.1
(Ping the AP)
```
Now the communication link should be already setup between the AP and the client.

@ -1 +1 @@
Subproject commit b242a17a987374a0b997b9cdb54001891191474c
Subproject commit 98601d9cf69ffaaef3601d6eefdd6ab252c7e563

View File

@ -111,7 +111,7 @@ sudo cp $OPENWIFI_DIR/kernel_boot/boards/$BOARD_NAME/output_boot_bin/BOOT.BIN $S
if [ "$BOARD_NAME" == "zcu102_fmcs2" ] || [ "$BOARD_NAME" == "zcu102_9371" ]; then
sudo cp $OPENWIFI_DIR/$LINUX_KERNEL_SRC_DIR_NAME64/arch/arm64/boot/Image $SDCARD_DIR/BOOT/
else
suod cp $OPENWIFI_DIR/$LINUX_KERNEL_SRC_DIR_NAME32/arch/arm/boot/uImage $SDCARD_DIR/BOOT/
sudo cp $OPENWIFI_DIR/$LINUX_KERNEL_SRC_DIR_NAME32/arch/arm/boot/uImage $SDCARD_DIR/BOOT/
fi
sudo mkdir $SDCARD_DIR/rootfs/root/openwifi