PCZONE 討論區

PCZONE 討論區 (https://www.pczone.com.tw/vbb3/)
-   -- FreeBSD & Linux 討 論 版 (https://www.pczone.com.tw/vbb3/forum/41/)
-   -   【教學】在Linux下安裝USB無線網路卡(802.11g) (https://www.pczone.com.tw/vbb3/thread/41/118008/)

Antony Chen 2005-11-09 02:20 PM

【教學】在Linux下安裝USB無線網路卡(802.11g)
 
必備套件:
Linux with Kernel version 2.4 or higher
USB 無線網路卡
網路卡driver for WinXP(建議用最新的)
ndiswrapper 1.1 or higher(exclude 1.4)

我的配備:
Mandriva Linux 2005 LE (10.2)
D-Link DWL-G122 USB Ver:A2
ndiswrapper 1.4 and 1.5

請先確定kernel已安裝!!! check Kernel版本用uname -a

1) 用root登入
2) 打開console, 執行[quote]lsusb[/quote], 確定USB網路卡已接上(lsusb是列出您現在以安插的USB devices的指令)

3) 下載ndiswrapper, 然後解壓縮用[quote]tar zxvf ndiswrapper-version.tar.gz[/quote]

4) 到剛解開的ndiswrapper目錄 (如/etc/ndiswrapper-1.5) 下執行[quote]make[/quote], 跑完後再執行[quote]make install[/quote]

5) 到網路卡driver for WinXP的目錄下, 找到以下三個副檔名的檔[quote] *.cat, *.inf, *.sys[/quote],
像我的檔案是prisma02.cat, prisma02.sys, prisma02.inf. 找到後執行[quote]ndiswrapper -i xxx.inf[/quote]
以我的例子的話是執行[quote]ndiswrapper -i prisma02.inf[/quote]

6) 接著執行[quote]ndiswrapper -l[/quote]來確定driver已安裝. 如果已安裝成功會出現

[quote]Installed ndis drivers:
prisma02 driver present, hardware present[/quote]

7) driver既然已經裝好了, 現在要把它active. 用[quote]modprobe ndiswrapper[/quote]指令啟動網路卡
(這裡就是為什麼不要用ndiswrapper 1.4版的原因. 1.4版在這裡就會當機, 害我浪費兩星期的時間換USB卡,
換無線網路卡, 重灌Linux n次, 結果到最後是ndiswrapper的問題!! 所以ndiswrapper官網已經把1.4版拿掉了)
active成功的話應該可以看到網路卡上的燈會閃了.

8) 接著要讓網路卡找AP. 打[quote]iwlist wlan0 scan[/quote]來尋找您的AP (wlan0是您的網卡編號)

9) 找到後執行[quote]iwconfig wlan0 essid "Your ESSID" (ESSID要用" "包起來)[/quote]
10) 接著是選連線種類, 一般是用Managed. 所以執行[quote]iwconfig wlan0 mode Managed[/quote]
(Managed跟infrastructure是一樣的, 我不知道為什麼在linux下叫Managed)

11) 現在要設定WEP. 我的router是用WEP 128 bit, open system. 所以我要執行的指令是[quote]iwconfig wlan enc open xxxxxxxxxxxxxxxxxxxxxxxxxx (xxx是我的26 hex digits)[/quote], WPA的話我沒試過, 不過可以執行man iwconfig來找

12) 現在應該可以上網了, 如果成功的話可以執行[quote]ndiswrapper -m[/quote]這樣就可以開機就啟動網路卡了

13) 要移除網路卡driver的話要執行[quote]ndiswrapper -e xxx (我的例子的話就執行ndiswrapper -e prisma02)[/quote]
接著執行5)就可以安裝新driver.

以上是我安裝USB無線網路卡under linux的一些心得, 希望對一些新手有用

[url=http://sourceforge.net/projects/ndiswrapper/]下載ndiswrapper[/url]
[url=http://ndiswrapper.sourceforge.net/mediawiki/index.php/Installation]參考資料[/url]


所有時間均為 +8。現在的時間是 12:16 AM



 XML   RSS 2.0   RSS 
本站使用 vBulletin 合法版權程式
站務信箱 : [email protected]

本論壇所有文章僅代表留言者個人意見,並不代表本站之立場,討論區以「即時留言」方式運作,故無法完全監察所有即時留言,若您發現文章可能有異議,請 email :[email protected] 處理。