回首頁
修改
Mail
FTP

中




2007年12月22日 星期六

[EPC]安裝ATHEROS-AR5006EG無線網路卡於Ubuntu 7.04上

首先~這個方式幾乎都適用於Aheros網路晶片上面
先來介紹一下幾種Atheros chipset安裝於Linux上的方式
1.官方的Madwifi方式
像atheros 所提供的madwifi中有hal(只有binary)
Atheros並沒有release driver的source code出來...而且他們都是kernel module
不過是否GPL規範~就要大家來定奪了~
以之前華碩EPC的案例各位可以參考一下
Asus 補齊 Eee PC 的原始碼來符合 GPL 規範
2.延用xp驅動程式的ndiswrapper (以下我們要介紹此方式安裝)成功率較高
ndiswrapper的產生並不意外~原因某些硬體供應商只提供 Windows 系統驅動
程式卻拒絕提供 Linux 驅動程式ndiswrapper 可以在 Linux 系統上載入
NDIS (windows network driver API) 驅動程式
原理:將 Win32 版的 Binary 驅動程式模擬成一個 Linux 的驅動模組
3.延用xp驅動程式的Linuxant
Linuxant 的 DriverLoader 是一套相容包裝軟體(compatibility-wrapper)。
透過 DriverLoader,便可在 Linux x86 系統上,使用硬體廠商提供的標準
Windows NDIS驅動程式。許多用戶不耐等待廠商釋出原生 Linux 驅動程式,轉而安裝
DriverLoader,以便於 Linux 環境下

實際過程:
EPC一台
在安裝好Ubuntu 7.04時,所屬Atheros 無線網卡因為核心沒內建驅動程式所以
在透過lspci |grep -i ethernet時,並無法抓到正確的Chipset型號
此時請更新此套件update-pciids

sudo update-pciids

此時在lspci 看一下 發現已經可以秀出
Ethernet controller: Atheros Communications, Inc. AR5006EG 802.11 b/g ...
成功看到之後在來就是要安裝驅動程式
筆這這邊用第2種方式:
apt-cache search ndiswrapper 找最新版
apt-get install ndiswrapper-utils-1.9
ndiswrapper-common 相依會自動安裝此套件
ndiswrapper -i net5211 載入xp驅動(請先將相關檔案置同一目錄)
ndiswrapper -l 查看有無載入
net5211 : driver installed 表示成功載入
device(168c:001c)present(alternate driver:ath_pci)
ndiswrapper -m 建立 wlan0 到 ndiswrapper 的 alias(也可以建eth%)
sudo modprobe ndiswrapper (載入MOD)
echo ndiswrapper > > /etc/modules 加入開機自動載入此模組 ok
記住要重新開機~才會生效 雖然iwconfig 有抓到wlan0這個介面了
iwlist wlan0 scanning 在重開機已經能夠偵測到週邊的AP了~

有很多應用程式只能偵測到 eth%d 的裝置,
 對於 wlan%d 的支援度並不是很好,如:pppoeconf 等等。
 如果您希望在載入 ndiswrapper 時所使用的裝置名稱是 eth%d 的話,
 可以替而用以下指令來載入 ndiswrapper:
# echo 'ndiswrapper if_name=eth%d' >> /etc/modules
參考資料~使用 NdisWrapper 來載入無線網路卡

接下來~介紹第1種方式
筆者有嘗試安裝但是無法成功會出現
wifi%d unable to attach hardware: 'Hardware revision not supported' (HAL status 13)
此訊息中文解釋是:wifi%d: 無法附有硬體: ' 硬體修正沒支持' (HAL 狀態13)
這個問題目前還沒找到解決的方式~可能要等待Madwifi.org釋出新版吧!
安裝步驟~
1.手動下載madwifi
wget downloads.sourceforge.net/madwifi/madwifi-0.9.3.3.tar.gz
2.解壓縮
tar -jzxf madwifi-0.9.3.3.tar.gz
3.進入解壓縮出來的目錄madwifi-0.9.3.3並安裝
cd madwifi-0.9.3.3
make
make install
modprobe ath_pci
reboot
正常來說這樣就完成了~

查看方式

lshw -C network 觀看網路裝置詳細資料
dmesg |grep wifi
wifi%d unable to attach hardware: 'Hardware revision not supported' (HAL status 13)
dmesg |grep ath
ath_hal: module license 'Proprietary'taints kernel
ath_hal:0.9.18.0 (AR5210,(AR5211,AR5212,RF5111,RF5112,RF2413,RF56413)
ath_pci:0.9.4.5 (0.9.3.3)


第三種方式其實跟第2種方式差不多~但是我也沒成功
1.先至linuxant官網下載DriverLoader
wget www.linuxant.com/driverloader/wlan/full/archive/dldrinstall.run
2.安裝~會自動連到linuxant 下載所需deb套件
sh dldrinstall.run
1.Generic package : driverloader_2.39_i386.deb.zip **Recommended **
2.pre-compiled package : driverloader_2.39_k2.6.20_16_generic_ubuntu_i386.deb.zip
which one do you want to install ([1]2/help/none)? 1
please point your browser to :
http://127.0.0.1:18020/
以上畫面有精減一些~選1是安裝套件
也可點這邊下載安裝

3.接著請到x windows下用firefox在網址上打http://127.0.0.1:18020/
接這會請您輸入root密碼輸入完
進入之後可以選擇您的xp驅動 選完按ok~就可以~





2 回應:

Unknown 提到... 提到...

您好!我依据您的方法,来到以下階段:[root@localhost madwifi-0.9.4]# modprobe ath_pci
回應是:
FATAL: Error inserting ath_pci (/lib/modules/2.6.23.1-42.fc8/net/ath_pci.ko): No such device
怎麼回事呢?请指出我的错误,谢谢!

Unknown 提到... 提到...

您好!我依据您的方法,来到以下階段:[root@localhost madwifi-0.9.4]# modprobe ath_pci
回應是:
FATAL: Error inserting ath_pci (/lib/modules/2.6.23.1-42.fc8/net/ath_pci.ko): No such device
怎麼回事呢?请指出我的错误,谢谢!