Copyright 2017. All rights reserved. Advantech Co. Ltd.
Page 30
Please note SSID and PASSWORD should be configured to what Access Point user need to
connect
.
root@FWA-T011:~# nmcli device wifi connect "teststa" password "qwertyqwerty"
Device 'wlan0' successfully activated with 'cdc31d9e-5c12-4560-a5bc-40eb0511a197'.
root@FWA-T011:~# nmcli c
NAME UUID TYPE DEVIC
Teststa cdc31d9e-5c12-4560-a5bc-40eb0511a197 wifi wlan0
……< only parts of the messages are shown >…..
root@FWA-T011:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.43.1 0.0.0.0 UG 0 0 0 wlan0
default 192.168.43.1 0.0.0.0 UG 600 0 0 wlan0
192.168.43.0 0.0.0.0 255.255.255.0 U 600 0 0 wlan0
Now, user can try to ping google.com.tw:
Please note to access internet by domain name, set DNS=8.8.8.8 (please change to your
local DNS server) in /etc/system/resolved.conf, and restart systemd-resolved service.
root@FWA-T011:~# ping google.com.tw
PING google.com.tw (74.125.204.94) 56(84) bytes of data.
64 bytes from ti-in-f94.1e100.net (74.125.204.94): icmp_seq=1 ttl=42 time=295 ms
64 bytes from ti-in-f94.1e100.net (74.125.204.94): icmp_seq=2 ttl=42 time=1012 ms
64 bytes from ti-in-f94.1e100.net (74.125.204.94): icmp_seq=3 ttl=42 time=217 ms
64 bytes from ti-in-f94.1e100.net (74.125.204.94): icmp_seq=4 ttl=42 time=144 ms
^C
--- google.com.tw ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 10500ms
rtt min/avg/max/mdev = 144.854/417.658/1012.639/347.613 ms, pipe 2
When use finished, user should be delete STA connection by this command:
root@FWA-T011:~# nmcli c delete "teststa"
Connection 'Teststa' (cdc31d9e-5c12-4560-a5bc-40eb0511a197) successfully deleted.
root@FWA-T011:~# nmcli c
NAME UUID TYPE DEVICE
……< only parts of the messages are shown >…..