linux下使用無線網卡的命令行方法(wifi,iwconfig)

(1)首先關閉開發板的有線網卡安全

[root@FriendlyARM /]# ifconfig eth0 down網絡

(2)加載USB WiFi無線網卡spa

[root@FriendlyARM /]# ifconfig wlan0 uporm

(3)掃描可用的無線網絡路由

[root@FriendlyARM /]# iwlist scanning | grep ESSID開發

lo        Interface doesn't support scanning.it

eth0      Interface doesn't support scanning.ast

wmaster0  Interface doesn't support scanning.grep

                    ESSID:"FRIENDLY-ARM"密碼

                    ESSID:"NETGEAR"

                    ESSID:"TP-LINK"

(4)選擇要鏈接的無線網絡

[root@FriendlyARM /]# iwconfig wlan0 essid "FRIENDLY-ARM"

(5)輸入該網絡的安全密碼

[root@FriendlyARM /]# iwconfig wlan0 key s:12345

(6)鏈接到指定的AP(無線路由)

[root@FriendlyARM /]# iwconfig wlan0 ap auto

(7)設置無線網卡的IP地址

[root@FriendlyARM /]# ifconfig wlan0 192.168.1.120

(8)使用 ping 命令檢測無線網連通情況

[root@FriendlyARM /]# ping 192.168.1.1

PING 192.168.1.1 (192.168.1.1): 56 data bytes

64 bytes from 192.168.1.1: seq=0 ttl=64 time=42.804 ms

64 bytes from 192.168.1.1: seq=1 ttl=64 time=5.020 ms

相關文章
相關標籤/搜索