[问题解决]ubuntu10.4for x86 desktop 版本安装使用腾达w311u usb无线网卡问题

包含网卡/无线网的网络问题和ADSL/校园网/宽带拨号支持及代理/共享等网络使用问题
回复
seanumen
帖子: 59
注册时间: 2008-05-07 18:52

[问题解决]ubuntu10.4for x86 desktop 版本安装使用腾达w311u usb无线网卡问题

#1

帖子 seanumen » 2010-07-31 20:02

dear all fans
我的问题如下:
办公室台式机用的是腾达w311u的usb无线网卡,系统能够识别,并且能够检测到无线信号,不过,不知道为什么就是联络不上网络。总是提示输入密码,密码的模式只有wep,没有wsk。。。。 之类的。
现在不知道该怎么办,因为办公室没有布局网线,所以一般我们的电脑都安装的说无线网卡。这样一来,很麻烦的呀。
请各位高手支招。
ps,我在baidu上也搜索了一下,好似有同学安装成功的。也看到有同学提出这个是rd307x的芯片。
上次由 seanumen 在 2010-08-07 12:57,总共编辑 1 次。
seanumen
帖子: 59
注册时间: 2008-05-07 18:52

Re: ubuntu10.4for x86 desktop 版本安装使用腾达w311u usb无线网卡问题

#2

帖子 seanumen » 2010-08-02 17:53

今天情况跟进:
今天手动设置了一下ip地址,ip地址如下:192.168.0.1 255.255.255.0 192.168.0.1
dns默认的输入为192.168.0.1,202.96.134.33
提示链接成功,ping 192.168.0.1 和ping 局域网内的其他电脑是通的,使用google浏览器,突然能够链接上去,但是很快浏览别的网站又不可以了。郁闷。郁闷。
seanumen
帖子: 59
注册时间: 2008-05-07 18:52

Re: ubuntu10.4for x86 desktop 版本安装使用腾达w311u usb无线网卡问题

#3

帖子 seanumen » 2010-08-02 20:11

补充:手动设置ip为192.168.0.1xx 255.255.255.0 192.168.0.1
dns默认的输入为192.168.0.1,202.96.134.33
提示链接成功,ping 192.168.0.1 和ping 局域网内的其他电脑是不通
这个无线网卡我实在郁闷了。连接信息如下:
ip:192.168.0.1xx
广播:192.168.0.255
子网:255.255.255.0
路由:192.168.0.1
dns:192.168.0.1
202.96.134.33
网卡是rt2800usb
通知连接上,就是不能上网。求高手指点。应该如何!折腾好多天了。
musclor
帖子: 13
注册时间: 2010-07-31 21:18

Re: ubuntu10.4for x86 desktop 版本安装使用腾达w311u usb无线网卡问题

#4

帖子 musclor » 2010-08-03 0:03

兄弟和我遇到的情况差不多啊,不过你好在 还有windows的驱动可以用,建议装个ndis就可以完美解决了
seanumen
帖子: 59
注册时间: 2008-05-07 18:52

Re: ubuntu10.4for x86 desktop 版本安装使用腾达w311u usb无线网卡问题

#5

帖子 seanumen » 2010-08-03 14:47

恩,不过,问题是,我现在没有有线网络使用。我看看想象办法了。感谢提醒呀。
seanumen
帖子: 59
注册时间: 2008-05-07 18:52

Re: ubuntu10.4for x86 desktop 版本安装使用腾达w311u usb无线网卡问题

#6

帖子 seanumen » 2010-08-04 1:01

终于下午的时候想办法连接上有线了,根据楼上上,的提示,安装的nd....就是利用windows无线驱动上网的。安装完成后,发现,一定要找到windows xp 的info文档,我另外一个系统使用的说win7系统,也不知道这个info去哪里找!如果找到了又如何呢!?
seanumen
帖子: 59
注册时间: 2008-05-07 18:52

Re: ubuntu10.4for x86 desktop 版本安装使用腾达w311u usb无线网卡问题

#7

帖子 seanumen » 2010-08-04 13:32

哎,郁闷,无线网卡能找到信号,但是怎么都连接不上。
seanumen
帖子: 59
注册时间: 2008-05-07 18:52

Re: ubuntu10.4for x86 desktop 版本安装使用腾达w311u usb无线网卡问题

#8

帖子 seanumen » 2010-08-06 23:44

ndi...也解决不了这个问题呀,抓狂呀,难道就没有人可以解决这个问题吗!!!
seanumen
帖子: 59
注册时间: 2008-05-07 18:52

Re: [问题解决]ubuntu10.4for x86 desktop 版本安装使用腾达w311u usb无线网卡问题

#9

帖子 seanumen » 2010-08-07 13:01

问题最终解决。
解决的方法:
按照这样的方式完成,所有的文件按照他的下载和操作,其实我是一个菜鸟。误打误撞解决了这个问题。
Tenda W541U V2.0 Wireless USB Adapter / Ralink RT2070 How To
Hi,

After some time of searching, switching between sadness and happiness and pulling my hair out I finally got my Tenda W541U V2.0 a.k.a. Tenda 54M Mini, a.k.a. Ralink RT2070L working.

I wrote this tutorial because I googled and I found nothing, nobody seems to know how to do it or is not willing to share his method. I even emailed Tenda support and they said their hardware is not working on Linux but it seems it actually does.

Note: There are many CHEAP usb adapters that are based on this Ralink chipset, the best way to see if yours is using it is to do a lsusb, and check for 148f:2070 at ID.

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

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

Driver:
RT3070USB(RT307x) http://www.sendspace.com/file/xfk1tg

Host:
Linux mercury 2.6.28-15-generic #52-Ubuntu SMP Wed Sep 9 10:49:34 UTC 2009 i686 GNU/Linux

Ubuntu 9.04 \n \l

Tutorial:

1. Download the RT3070USB driver from Ralink. (link is listed above).
2. Unpack it.

Code:
$sudo su
#tar jxvf 2009_0525_RT3070_Linux_STA_v2.1.1.0.bz2
3. Navigate to os/linux and add the following line to usb_main_dev.c

Code:
#cd 2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux
#pico usb_main_dev.c
...
add:
{USB_DEVICE(0x148F,0x2070)}, /* Ralink 2070L */
under #ifdef RT3070
...
4. Compile the module.

Code:
#cd ../..;make
5. Install the module.

Code:
#make install
6. Copy the .DAT file to /etc/Wireless. (the install script should do it but just in case). Also copy the rt2870.bin file to /lib/firmware. (just in case).

Code:
#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/
7. Start the module.

Code:
#modprobe rt3070sta
8. Test to see if it works.

Code:
#ifconfig ra0 inet 192.168.0.33 up

#iwconfig ra0
9. Configure the card.

For step 9, you can find numerous tutorials, the configuration is exactly the same as for the rt2870 chipset.

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)
Good luck.

Update 2: If when you are trying to load the module you receive the following (on Karmic):

Code:
$sudo modprobe rt3070sta
$dmesg
815108.907620] rt3070sta: module is from the staging directory, the quality is unknown, you have been warned.
And your device is NOT detected, copy the rt3070sta.ko file in the staging directory like this:

Code:
$cd os/linux
$sudo cp ./rtk3070sta.ko /lib/modules/`uname -r`/kernel/drivers/staging/rt3070/
$sudo rmmod rt3070sta
$sudo modprobe rt3070sta
Update 3:
For some reason the common/rtusb_io.c file contains a very annoying line that will fill your dmesg with empty lines cointaining only #. In order to fix this "bug":

Code:
$nano common/rtusb_io.c
replace:
DBGPRINT(RT_DEBUG_OFF, ("#\n"));
with:
//DBGPRINT(RT_DEBUG_OFF, ("#\n"));
$sudo make clean && make && make install
Also I noticed Ralink "updated" the driver "directory" as the driver itself still wont compile on 2.6.30 >= kernels, and from a first impression it is the exact same driver. A quick fix would be to do the following, after you download the and extract driver archive:

Code:
$mv 2009_1106_RT3070_Linux_STA_V2.1.1.0 2009_0525_RT3070_Linux_STA_v2.1.1.0
That is because the rt3070-2.6.31-compile patch is designed to search for that directory in particular.

Security Update:
For those using this driver with wpasupplicant you should know about this bug which could affect your system:

http://bugzilla.kernel.org/show_bug.cgi?id=14591

A quick fix for it is to:

Code:
$cd os/linux
$nano sta_ioctl.c
replace
struct iw_mlme *pMlme = (struct iw_mlme *)wrqu->data.pointer;
with
struct iw_mlme *pMlme;
and
struct iw_pmksa *pPmksa = (struct iw_pmksa *)wrqu->data.pointer;
with
struct iw_pmksa *pPmksa;
$sudo make clean && make && make install
The only disadvantage is that the driver will lack SIOCSIWPMKSA and SIOCSIWMLME functions. However I managed to connect to the AP (WPA,WEP) just fine w/out these two.

Update: Ralink kept changing the driver version, so I added a link to 2009_0525_RT3070_Linux_STA_v2.1.1.0.bz2. Also I tried to compile the driver with the patch applied on 2.6.32-22-generic-pae (Lucid) and it worked.
Attached Files
rt3070-2.6.31-compile.patch.gz (1.5 KB, 757 views)
Last edited by lesnoland; June 7th, 2010 at 03:43 PM..

全部e文,我的环境是ubuntu10.4 ,不过在安装的过程有几个命令需要链接网络安装。这点还请各位同学注意,在安装的过程中最好有有线的网络进行。否则我看很难。
mchenry
帖子: 30
注册时间: 2007-11-22 11:06

Re: [问题解决]ubuntu10.4for x86 desktop 版本安装使用腾达w311u usb无线网卡问题

#10

帖子 mchenry » 2010-12-22 12:13

seanumen 写了:问题最终解决。
解决的方法:
按照这样的方式完成,所有的文件按照他的下载和操作,其实我是一个菜鸟。误打误撞解决了这个问题。
Tenda W541U V2.0 Wireless USB Adapter / Ralink RT2070 How To
Hi,

After some time of searching, switching between sadness and happiness and pulling my hair out I finally got my Tenda W541U V2.0 a.k.a. Tenda 54M Mini, a.k.a. Ralink RT2070L working.

I wrote this tutorial because I googled and I found nothing, nobody seems to know how to do it or is not willing to share his method. I even emailed Tenda support and they said their hardware is not working on Linux but it seems it actually does.

Note: There are many CHEAP usb adapters that are based on this Ralink chipset, the best way to see if yours is using it is to do a lsusb, and check for 148f:2070 at ID.

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

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

Driver:
RT3070USB(RT307x) http://www.sendspace.com/file/xfk1tg

Host:
Linux mercury 2.6.28-15-generic #52-Ubuntu SMP Wed Sep 9 10:49:34 UTC 2009 i686 GNU/Linux

Ubuntu 9.04 \n \l

Tutorial:

1. Download the RT3070USB driver from Ralink. (link is listed above).
2. Unpack it.

Code:
$sudo su
#tar jxvf 2009_0525_RT3070_Linux_STA_v2.1.1.0.bz2
3. Navigate to os/linux and add the following line to usb_main_dev.c

Code:
#cd 2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux
#pico usb_main_dev.c
...
add:
{USB_DEVICE(0x148F,0x2070)}, /* Ralink 2070L */
under #ifdef RT3070
...
4. Compile the module.

Code:
#cd ../..;make
5. Install the module.

Code:
#make install
6. Copy the .DAT file to /etc/Wireless. (the install script should do it but just in case). Also copy the rt2870.bin file to /lib/firmware. (just in case).

Code:
#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/
7. Start the module.

Code:
#modprobe rt3070sta
8. Test to see if it works.

Code:
#ifconfig ra0 inet 192.168.0.33 up

#iwconfig ra0
9. Configure the card.

For step 9, you can find numerous tutorials, the configuration is exactly the same as for the rt2870 chipset.

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)
Good luck.

Update 2: If when you are trying to load the module you receive the following (on Karmic):

Code:
$sudo modprobe rt3070sta
$dmesg
815108.907620] rt3070sta: module is from the staging directory, the quality is unknown, you have been warned.
And your device is NOT detected, copy the rt3070sta.ko file in the staging directory like this:

Code:
$cd os/linux
$sudo cp ./rtk3070sta.ko /lib/modules/`uname -r`/kernel/drivers/staging/rt3070/
$sudo rmmod rt3070sta
$sudo modprobe rt3070sta
Update 3:
For some reason the common/rtusb_io.c file contains a very annoying line that will fill your dmesg with empty lines cointaining only #. In order to fix this "bug":

Code:
$nano common/rtusb_io.c
replace:
DBGPRINT(RT_DEBUG_OFF, ("#\n"));
with:
//DBGPRINT(RT_DEBUG_OFF, ("#\n"));
$sudo make clean && make && make install
Also I noticed Ralink "updated" the driver "directory" as the driver itself still wont compile on 2.6.30 >= kernels, and from a first impression it is the exact same driver. A quick fix would be to do the following, after you download the and extract driver archive:

Code:
$mv 2009_1106_RT3070_Linux_STA_V2.1.1.0 2009_0525_RT3070_Linux_STA_v2.1.1.0
That is because the rt3070-2.6.31-compile patch is designed to search for that directory in particular.

Security Update:
For those using this driver with wpasupplicant you should know about this bug which could affect your system:

http://bugzilla.kernel.org/show_bug.cgi?id=14591

A quick fix for it is to:

Code:
$cd os/linux
$nano sta_ioctl.c
replace
struct iw_mlme *pMlme = (struct iw_mlme *)wrqu->data.pointer;
with
struct iw_mlme *pMlme;
and
struct iw_pmksa *pPmksa = (struct iw_pmksa *)wrqu->data.pointer;
with
struct iw_pmksa *pPmksa;
$sudo make clean && make && make install
The only disadvantage is that the driver will lack SIOCSIWPMKSA and SIOCSIWMLME functions. However I managed to connect to the AP (WPA,WEP) just fine w/out these two.

Update: Ralink kept changing the driver version, so I added a link to 2009_0525_RT3070_Linux_STA_v2.1.1.0.bz2. Also I tried to compile the driver with the patch applied on 2.6.32-22-generic-pae (Lucid) and it worked.
Attached Files
rt3070-2.6.31-compile.patch.gz (1.5 KB, 757 views)
Last edited by lesnoland; June 7th, 2010 at 03:43 PM..

全部e文,我的环境是ubuntu10.4 ,不过在安装的过程有几个命令需要链接网络安装。这点还请各位同学注意,在安装的过程中最好有有线的网络进行。否则我看很难。
我也是ubuntu10.4,不过内核是2.6.32,在patch总是出错,有什么办法吗?
回复