安裝好Linux系統(Ubilinux),之前都是插RJ-45網路線,現在讓我們來嘗試使用USB無線網卡吧。
我的網卡是這個:Edimax EW-7811Un 150Mbps Wireless 隱形USB無線網卡,其晶片是RTL8188CUS。
插入後,Linux應可自動辨識,並且自動載入驅動程式。
$ lsusb
Bus 001 Device 005: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
但是下達指令ifconfig的話,並未出現網路介面wlan0,需要自己設定網路組態。
安裝相關設定套件:
$ sudo apt-get install wpasupplicant wireless-tools
修改檔案/etc/network/interfaces,新增部分以紅色標示。
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
然後,新增∕修改/etc/wpa_supplicant/wpa_supplicant.conf,內容如下,請根據你自己的網路組態做修改:
ctrl_interface=/run/wpa_supplicant
update_config=1
network={
ssid="你的無線網路名稱"
psk="密碼"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}
然後下指令,關閉∕啟動無線網路介面,或者重新開機:
$ sudo ifdown wlan0
$ sudo ifup wlan0
接著,應該就沒問題了。
$ sudo ifconfig
wlan0 Link encap:Ethernet HWaddr 80:1f:02:e2:93:2f
inet addr:192.168.1.41 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::821f:2ff:fee2:932f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:621 errors:0 dropped:0 overruns:0 frame:0
TX packets:409 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:71162 (69.4 KiB) TX bytes:73832 (72.1 KiB)
耶!
2016/09/08
UP board:設定USB無線網卡
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment