日韩黑丝制服一区视频播放|日韩欧美人妻丝袜视频在线观看|九九影院一级蜜桃|亚洲中文在线导航|青草草视频在线观看|婷婷五月色伊人网站|日本一区二区在线|国产AV一二三四区毛片|正在播放久草视频|亚洲色图精品一区

分享

ubuntu下騰達W541U V2.0 無線網(wǎng)卡驅(qū)動的使用

 郝醫(yī)好藥(郝銘成) 2012-06-10

該文章內(nèi)容來自網(wǎng)絡(luò),非本人原創(chuàng)

 

2009-11-03 23:58

7月中旬買了塊騰達的Tenda W541U V2.0的無線網(wǎng)卡,當(dāng)時沒想到要在linux下用,回來后才發(fā)現(xiàn)驅(qū)動問題比較麻煩,官方不提供linux下的驅(qū)動,網(wǎng)上的解決方案沒有試成功的,很是郁悶。

給Tenda的技術(shù)支持寫過信,給到了一個驅(qū)動,但沒有說具體編譯的細節(jié),自己試著編譯出一個.o文件,lsmod后還是檢測不到無線網(wǎng)卡。再寫信就無回音了??赡苓@個問題很好解決,但自己確實搞不定。

前兩天到ubuntu論壇網(wǎng)站上去看,發(fā)現(xiàn)老外的一篇貼子,說是解決了這個問題,按照相應(yīng)步驟試了一下,果然編譯了可以使用的驅(qū)動,現(xiàn)將步驟和應(yīng)注意事項總結(jié)如下,還希望能幫助和我一樣用Tenda W541U V2.0(這個型號我現(xiàn)在是倒背如流了)無線網(wǎng)卡的人!

標(biāo)題是:Tenda W541U V2.0 Wireless USB Adapter / Ralink RT2070

具體的流程大家可以參考貼子上的步驟進行,我只是簡單的總結(jié)一下流程與要需注意的地方:

一、需求:

1 硬件:

無線網(wǎng)卡型號:

Tenda W541U V2.0 Wireless USB Adapter ( Ralink RT2070L Chipset)

在命令終端里輸入:lsusb

關(guān)于無線網(wǎng)卡的內(nèi)容應(yīng)該是類似于以下:

Bus 001 Device 003: ID 148f:2070 Ralink Technology, Corp.

其中ID 后面必須是148f:2070 ,如果不是,不能保證后面是否成功。|

2 驅(qū)動下載:

Driver:

3 操作系統(tǒng):ubuntu 9.04

二、步驟:

注意: 以下操作凡是因權(quán)限問題而未執(zhí)行的,請在前面加上sudo再次嘗試!

1. 下載RT3070USB driver(上面的網(wǎng)址)

2. 解壓:

#sudo tar jxvf 2009_0525_RT3070_Linux_STA_v2.1.1.0.bz2

3 在 os/linux下的usb_main_dev.c 里的#ifdef RT3070下面增加以下語句:

{USB_DEVICE(0x148F,0x2070)}, /* Ralink 2070L */

4 編譯模塊:

回到剛開始的目錄,即解決完進入的第一層目錄:

cd ../..

make

5 如果編譯成功,則安裝:|

make install

如果編譯不成功,且你的LINUX 內(nèi)核版本高于等于2.6.31 的情況,請到步驟11查看并處理!

6 COPY .DAT文件到 /etc/Wireless,copy .bin 到 /lib/firmware

#mkdir -p /etc/Wireless/RT2870STA

#cp RT2870STA.dat /etc/Wireless/RT2870STA/

#apt-get install tofrodos

#dos2unix /etc/Wireless/RT2870STA/RT2870STA.dat

#chmod +x /etc/Wireless/RT2870STA/RT2870STA.dat

#cp common/rt2870.bin /lib/firmware/

注意:要安裝dos2unix來去掉一些windows下文件轉(zhuǎn)過來時的多余的字符。

7 啟動模塊:

#modprobe rt3070sta

8 測試模塊(以下192.168.0.33的IP地址自己定 ):

#ifconfig ra0 inet 192.168.0.33 up

#iwconfig ra0

這時,如果輸入:ifconfig,應(yīng)該可以看到ra0設(shè)備

9 配置網(wǎng)卡:

因為我用的不是ubuntu默認(rèn)的網(wǎng)絡(luò)管理工具,而是WICD工具,只需要 無線網(wǎng)絡(luò) 處填入 ra0后其它的按相應(yīng)網(wǎng)絡(luò)設(shè)定配置后 即可配置完畢。

有兩點要注意的:

a) 至于有用到WPA方式加密的情況,參考貼里有提到需要修改編譯時的配置文件 os/linux/config.mk:

HAS_WPA_SUPPLICANT=y

HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y

b) 如果使用WICD工具的話,將WPA Suppliant Driver選為wext。

10 刷新后,無線網(wǎng)絡(luò)應(yīng)該能被檢測到,終于可以告別有線的日子了。happy一個!

11 對于LINUX 內(nèi)核版本高于等于2.6.31 的情況,編譯時會出現(xiàn)一個編譯錯誤,參考貼中提供了patch。

下面這段我就不翻了,大家基本上都能看明白的。

UPDATE: Linux Kernel >= 2.6.31 / Ubuntu Karmic Koala 9.10 compile patch!

Ok, after speaking with another person and installing Ubuntu 9.10 on my other box I noticed this driver will not compile on my brand new 2.6.31-14-generic kernel.

The error I received (and probably many people do when attempting to compile most ralink drivers under 2.6.31 because this kernel replaced the old net_device structure with a new one called net_device_ops) was:

Code:
CC [M]  /root/2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux/../../os/linux/rt_linux.o
/root/2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux/../../os/linux/rt_linux.c: In function ‘RtmpOSNetDevAttach’:
/root/2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux/../../os/linux/rt_linux.c:1510: error: ‘struct net_device’ has no member named ‘open’
/root/2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux/../../os/linux/rt_linux.c:1511: error: ‘struct net_device’ has no member named ‘stop’
/root/2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux/../../os/linux/rt_linux.c:1512: error: ‘struct net_device’ has no member named ‘hard_start_xmit’
/root/2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux/../../os/linux/rt_linux.c:1513: error: ‘struct net_device’ has no member named ‘do_ioctl’
/root/2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux/../../os/linux/rt_linux.c:1519: error: ‘struct net_device’ has no member named ‘get_stats’
/root/2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux/../../os/linux/rt_linux.c:1553: error: ‘struct net_device’ has no member named ‘validate_addr’
make[2]: *** [/root/2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux/../../os/linux/rt_linux.o] Error 1
make[1]: *** [_module_/root/2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.31-14-generic'
make: *** [LINUX] Error 2
 
After some deep searching I found this rt3070-2.6.31-compile.patch (a part of rt3070-kmod Fedora 11 package) on lists.rpmfusion.org/pipermail/rpmfusion-commits/2009-August/006214.html. Once you apply it, it will compile just fine.

I have attached it to this post, just:
Code:
$gunzip rt3070-2.6.31-compile.patch.gz

$patch -p0 < rt3070-2.6.31-compile.patch

patching file 2009_0525_RT3070_Linux_STA_v2.1.1.0/include/rtmp_os.h
patching file 2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux/rt_linux.c
patching file 2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux/rt_main_dev.c

$cd 2009_0525_RT3070_Linux_STA_v2.1.1.0/

$make
 
Also make sure that rt2800usb, rt2x00usb and rt2x00lib are blacklisted as they now recognize this device (under Ubuntu 9.10) but the device will not function properly (no scan results).
 
Code:
$sudo pico /etc/modprobe.d/blacklist.conf

add the following lines:
blacklist rt2x00usb
blacklist rt2x00lib
blacklist rt2800usb
close and save.

$sudo rmmod rt2x00usb (just in case)
$sudo rmmod rt2x00lib (just in case)
$sudo rmmod rt2800usb (just in case)
 

12 我只是將W541U用來當(dāng)Station模式來用,AP模式還沒用過,具體設(shè)置不知如何操作。

祝各位好運!

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多