確認無線裝置連線狀態
# iw wlan0 link
Not connected.
掃描鄰近的wifi廣播訊號
# iw wlan0 scan
連線到WPA/WPA2加密的無線網路
# wpa_passphrase APPLE >> /tmp/wifi.conf
1234509876
# reading passphrase from stdin network={ ssid="APPLE" #psk="1234509876" psk=a36065d029db325508281a51a19f8fff1c389c11129a74b6c6d3a25200cae713 }
# wpa_supplicant -B -i wlan0 -c /tmp/wifi.conf
這時可以查詢連線狀態
# iw wlan0 link Connected to 36:a3:95:d7:a7:55 (on wlan0) SSID: APPLE freq: 2437 RX: 59639 bytes (440 packets) TX: 12188 bytes (76 packets) signal: -58 dBm tx bitrate: 65.0 MBit/s MCS 7 bss flags: short-preamble short-slot-time dtim period: 3 beacon int: 100
要求DHCP伺服器配發動態IP
# dhclient wlan0
沒有留言:
張貼留言