This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
products:sbc:vim4:applications:wifi-sta-ap-mode [2022/07/13 05:40] nick |
products:sbc:vim4:applications:wifi-sta-ap-mode [2023/02/17 11:05] hyphop [Go Online!] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | |||
====== VIM4 Wi-Fi STA/AP Mode ====== | ====== VIM4 Wi-Fi STA/AP Mode ====== | ||
+ | ===== Introduction ===== | ||
+ | |||
+ | This documentation will introduce how to setup the Wi-Fi working on STA+AP mode at the same time. | ||
+ | |||
+ | ==== Configuration Instructions ==== | ||
+ | |||
+ | Configure '' | ||
+ | |||
+ | |||
+ | === Setup Wlan1 as a Hotspot === | ||
+ | |||
+ | Setup '' | ||
+ | |||
+ | == 2.4 GHz Frequency == | ||
+ | |||
+ | For example, the following commands will create AP configuration named '' | ||
+ | |||
+ | |||
+ | ```shell | ||
+ | sudo nmcli con add type wifi ifname wlan1 mode ap con-name Hostspot ssid khadas_ap_2.4G | ||
+ | sudo nmcli con modify Hostspot 802-11-wireless.band bg | ||
+ | sudo nmcli con modify Hostspot 802-11-wireless.channel 1 | ||
+ | sudo nmcli con modify Hostspot 802-11-wireless-security.key-mgmt wpa-psk | ||
+ | sudo nmcli con modify Hostspot 802-11-wireless-security.proto rsn | ||
+ | sudo nmcli con modify Hostspot 802-11-wireless-security.group ccmp | ||
+ | sudo nmcli con modify Hostspot 802-11-wireless-security.pairwise ccmp | ||
+ | sudo nmcli con modify Hostspot 802-11-wireless-security.psk 12345678 | ||
+ | sudo nmcli con modify Hostspot ipv4.method shared | ||
+ | sudo nmcli con up Hostspot | ||
+ | ``` | ||
+ | |||
+ | == 5 GHz Frequency == | ||
+ | |||
+ | For example, the following commands will create AP configuration named '' | ||
+ | |||
+ | ```shell | ||
+ | sudo nmcli con add type wifi ifname wlan1 mode ap con-name Hostspot ssid khadas_ap_5G | ||
+ | sudo nmcli con modify Hostspot 802-11-wireless.band a | ||
+ | sudo nmcli con modify Hostspot 802-11-wireless.channel 149 | ||
+ | sudo nmcli con modify Hostspot 802-11-wireless-security.key-mgmt wpa-psk | ||
+ | sudo nmcli con modify Hostspot 802-11-wireless-security.proto rsn | ||
+ | sudo nmcli con modify Hostspot 802-11-wireless-security.group ccmp | ||
+ | sudo nmcli con modify Hostspot 802-11-wireless-security.pairwise ccmp | ||
+ | sudo nmcli con modify Hostspot 802-11-wireless-security.psk 12345678 | ||
+ | sudo nmcli con modify Hostspot ipv4.method shared | ||
+ | sudo nmcli con up Hostspot | ||
+ | ``` | ||
+ | |||
+ | Use '' | ||
+ | |||
+ | ```shell | ||
+ | $ ifconfig | ||
+ | wlan0: flags=4163< | ||
+ | inet 192.168.31.219 | ||
+ | inet6 fda2: | ||
+ | inet6 fe80:: | ||
+ | inet6 fda2: | ||
+ | ether 10: | ||
+ | RX packets 4271 bytes 3725737 (3.7 MB) | ||
+ | RX errors 0 dropped 13 overruns 0 frame 0 | ||
+ | TX packets 1663 bytes 321613 (321.6 KB) | ||
+ | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | ||
+ | |||
+ | wlan1: flags=4163< | ||
+ | inet 10.42.0.1 | ||
+ | inet6 fe80:: | ||
+ | ether 12: | ||
+ | RX packets 1569 bytes 299041 (299.0 KB) | ||
+ | RX errors 0 dropped 0 overruns 0 frame 0 | ||
+ | TX packets 3241 bytes 3693502 (3.6 MB) | ||
+ | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | ||
+ | ``` | ||
+ | |||
+ | ===== Go Online! ===== | ||
+ | |||
+ | |||
+ | Verify that '' | ||
+ | <WRAP info > | ||
+ | You need to connect Wi-Fi first. | ||
+ | </ | ||
+ | ```shell | ||
+ | khadas@Khadas: | ||
+ | PING td-balancer-dc11-60-161.wixdns.net (185.230.60.161) from 192.168.124.80 wlan0: 56(84) bytes of data. | ||
+ | 64 bytes from 185.230.60.161 (185.230.60.161): | ||
+ | 64 bytes from 185.230.60.161 (185.230.60.161): | ||
+ | 64 bytes from 185.230.60.161 (185.230.60.161): | ||
+ | ... | ||
+ | ``` | ||
- | {{page> | + | Verify that '' |
+ | * Name: 2.4G/'' | ||
+ | * Password:'' | ||