1a6085186SLina Ceballos<!-- 2e27e6d4bSJiao XianjunAuthor: Xianjun jiao 3e27e6d4bSJiao XianjunSPDX-FileCopyrightText: 2019 UGent 4a6085186SLina CeballosSPDX-License-Identifier: AGPL-3.0-or-later 5a6085186SLina Ceballos--> 6a6085186SLina Ceballos 7b58ec5b6SJiao Xianjun**NOTE** the terminal session mentioned in the following text can also be setup via USB-UART instead of Ethernet. 8a4f70eb8SJiao Xianjun 98e232f26SJiao Xianjun**NOTE** adrv9361z7035 has ultra low TX power in 5GHz. Move **CLOSER** when you use that board in 5GHz!!! 10b58ec5b6SJiao Xianjun 111a95bb33SXianjun Jiao- 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. 121a95bb33SXianjun Jiao- 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: 131a95bb33SXianjun Jiao ``` 141a95bb33SXianjun Jiao ssh [email protected] 151a95bb33SXianjun Jiao (password: openwifi) 161a95bb33SXianjun Jiao cd openwifi 171a95bb33SXianjun Jiao ./fosdem.sh 181a95bb33SXianjun Jiao (It will create a WiFi AP by hostapd program with config file: hostapd-openwifi.conf) 191a95bb33SXianjun Jiao (Wait for the script completed) 201a95bb33SXianjun Jiao cat /proc/interrupts 211a95bb33SXianjun Jiao (Execute the "cat ..." command for several times) 221a95bb33SXianjun Jiao (You should see the number of "sdr,tx_itrpt1" grows, because it sends the "openwifi" beacon periodically) 231a95bb33SXianjun Jiao ``` 241a95bb33SXianjun Jiao- 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: 251a95bb33SXianjun Jiao ``` 261a95bb33SXianjun Jiao ssh [email protected] 271a95bb33SXianjun Jiao (password: openwifi) 281a95bb33SXianjun Jiao service network-manager stop 291a95bb33SXianjun Jiao cd openwifi 301a95bb33SXianjun Jiao ./wgd.sh 311a95bb33SXianjun Jiao (Wait for the script completed) 321a95bb33SXianjun Jiao ifconfig sdr0 up 331a95bb33SXianjun Jiao iwlist sdr0 scan 341a95bb33SXianjun Jiao (The "openwifi" AP should be listed in the scanning results) 35b58ec5b6SJiao Xianjun wpa_supplicant -i sdr0 -c wpa-openwifi.conf 369cc49242SJiao Xianjun ("iwconfig sdr0 essid openwifi" could also work. Less info compared to wpa_supplicant) 371a95bb33SXianjun Jiao ``` 38*6aaa1165SXianjun Jiao If wpa-openwifi.conf is not on board, please create it with [this content](../../user_space/wpa-openwifi.conf). 39b58ec5b6SJiao Xianjun- Now the client is trying to associate with the AP. You should see like: 40b58ec5b6SJiao Xianjun ``` 41b58ec5b6SJiao Xianjun root@analog:~/openwifi# wpa_supplicant -i sdr0 -c wpa-openwifi.conf 42b58ec5b6SJiao Xianjun Successfully initialized wpa_supplicant 43b58ec5b6SJiao Xianjun sdr0: CTRL-EVENT-SCAN-STARTED 44b58ec5b6SJiao Xianjun sdr0: SME: Trying to authenticate with 66:55:44:33:22:8c (SSID='openwifi' freq=5220 MHz) 45b58ec5b6SJiao Xianjun sdr0: Trying to associate with 66:55:44:33:22:8c (SSID='openwifi' freq=5220 MHz) 46b58ec5b6SJiao Xianjun sdr0: Associated with 66:55:44:33:22:8c 47b58ec5b6SJiao Xianjun sdr0: CTRL-EVENT-CONNECTED - Connection to 66:55:44:33:22:8c completed [id=0 id_str=] 48b58ec5b6SJiao Xianjun ``` 49b58ec5b6SJiao Xianjun The AP board terminal should print like: 501a95bb33SXianjun Jiao ``` 511a95bb33SXianjun Jiao ... 52b58ec5b6SJiao Xianjun sdr0: STA 66:55:44:33:22:4c IEEE 802.11: authenticated 53b58ec5b6SJiao Xianjun sdr0: STA 66:55:44:33:22:4c IEEE 802.11: associated (aid 1) 54b58ec5b6SJiao Xianjun sdr0: AP-STA-CONNECTED 66:55:44:33:22:4c 55b58ec5b6SJiao Xianjun sdr0: STA 66:55:44:33:22:4c RADIUS: starting accounting session 613E16DE-00000000 561a95bb33SXianjun Jiao ``` 571a95bb33SXianjun Jiao If not, please adjust antenna/distance and re-run the commands on the client side. 581a95bb33SXianjun Jiao 59b58ec5b6SJiao Xianjun- After association is done, in another terminal of client (**DO NOT** terminate wpa_supplicant in the original client terminal!): 601a95bb33SXianjun Jiao ``` 611a95bb33SXianjun Jiao dhclient sdr0 621a95bb33SXianjun Jiao (Wait for it completed) 631a95bb33SXianjun Jiao ifconfig sdr0 641a95bb33SXianjun Jiao (Now you should see the IP address like 192.168.13.x allocated by AP) 651a95bb33SXianjun Jiao ping 192.168.13.1 661a95bb33SXianjun Jiao (Ping the AP) 671a95bb33SXianjun Jiao ``` 681a95bb33SXianjun Jiao Now the communication link should be already setup between the AP and the client. 69