1a6085186SLina Ceballos<!-- 23c7c37b5SJiao XianjunAuthor: Xianjun jiao 33c7c37b5SJiao XianjunSPDX-FileCopyrightText: 2019 UGent 4a6085186SLina CeballosSPDX-License-Identifier: AGPL-3.0-or-later 5a6085186SLina Ceballos--> 6a6085186SLina Ceballos 7a6085186SLina Ceballos 89c1c62f1SXianjun Jiao- 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. 99c1c62f1SXianjun Jiao- 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: 109c1c62f1SXianjun Jiao ``` 119c1c62f1SXianjun Jiao ssh [email protected] 129c1c62f1SXianjun Jiao (password: openwifi) 139c1c62f1SXianjun Jiao service network-manager stop 149c1c62f1SXianjun Jiao cd openwifi 159c1c62f1SXianjun Jiao ./wgd.sh 169c1c62f1SXianjun Jiao (Wait for the script completed) 179c1c62f1SXianjun Jiao ifconfig sdr0 up 189c1c62f1SXianjun Jiao ./sdr-ad-hoc-up.sh sdr0 44 192.168.13.1 199c1c62f1SXianjun Jiao (Above command setup ad-hoc network at channel 44 with static IP assigned to sdr0 NIC) 209c1c62f1SXianjun Jiao iwconfig sdr0 219c1c62f1SXianjun Jiao ``` 22*b1dd94e3Sluz paz- You should see output like: 239c1c62f1SXianjun Jiao ``` 249c1c62f1SXianjun Jiao sdr0 IEEE 802.11 ESSID:"sdr-ad-hoc" 259c1c62f1SXianjun Jiao Mode:Ad-Hoc Frequency:5.22 GHz Cell: 92:CA:14:27:1E:B0 269c1c62f1SXianjun Jiao Tx-Power=20 dBm 279c1c62f1SXianjun Jiao Retry short limit:7 RTS thr:off Fragment thr:off 289c1c62f1SXianjun Jiao Encryption key:off 299c1c62f1SXianjun Jiao Power Management:off 309c1c62f1SXianjun Jiao ``` 319c1c62f1SXianjun Jiao If you see "Cell: Not-Associated", please wait and run "iwconfig sdr0" again until a randomly generated Cell ID appears. 329c1c62f1SXianjun Jiao 339c1c62f1SXianjun Jiao- 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: 349c1c62f1SXianjun Jiao ``` 359c1c62f1SXianjun Jiao ssh [email protected] 369c1c62f1SXianjun Jiao (password: openwifi) 379c1c62f1SXianjun Jiao service network-manager stop 389c1c62f1SXianjun Jiao cd openwifi 399c1c62f1SXianjun Jiao ./wgd.sh 409c1c62f1SXianjun Jiao ifconfig sdr0 up 419c1c62f1SXianjun Jiao ./sdr-ad-hoc-up.sh sdr0 44 192.168.13.1 429c1c62f1SXianjun Jiao iwconfig sdr0 439c1c62f1SXianjun Jiao ``` 44*b1dd94e3Sluz paz- You should see output like: 459c1c62f1SXianjun Jiao ``` 469c1c62f1SXianjun Jiao sdr0 IEEE 802.11 ESSID:"sdr-ad-hoc" 479c1c62f1SXianjun Jiao Mode:Ad-Hoc Frequency:5.22 GHz Cell: 92:CA:14:27:1E:B0 489c1c62f1SXianjun Jiao Tx-Power=20 dBm 499c1c62f1SXianjun Jiao Retry short limit:7 RTS thr:off Fragment thr:off 509c1c62f1SXianjun Jiao Encryption key:off 519c1c62f1SXianjun Jiao Power Management:off 529c1c62f1SXianjun Jiao ``` 539c1c62f1SXianjun Jiao 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. 549c1c62f1SXianjun Jiao 559c1c62f1SXianjun Jiao Now the communication link should be already setup between the two ad-hoc nodes, and you can ping each other. 56