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


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

[root@FriendlyARM /]# ifconfig eth0 down

(2)加載USB WiFi無線網卡

[root@FriendlyARM /]# ifconfig wlan0 up

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

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

lo        Interface doesn't support scanning.

eth0      Interface doesn't support scanning.

wmaster0  Interface doesn't support scanning.

                    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

轉載自:http://blog.csdn.net/goodlixueyong/article/details/6461871


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM