无线网卡 腾达w541u v2 ubuntu10.10下无法安装

包含网卡/无线网的网络问题和ADSL/校园网/宽带拨号支持及代理/共享等网络使用问题
whbcxh
帖子: 19
注册时间: 2008-10-29 11:13

无线网卡 腾达w541u v2 ubuntu10.10下无法安装

#1

帖子 whbcxh » 2010-10-27 12:18

求助,在9.04底下就无法安装,参考了网上很多的案例,也打了patch包,仍然下列错误,请高手指点迷津,否则要放弃ubuntu了,另没有有线网卡,所以安装中无法从网上获取资料
在ubuntu中选择安装winxp下驱动,报不匹配(不明白为什么,inf,sys都已提供)

系统:winxp+ubuntu10.10
网卡:腾达 w541u v2(winxp下正常)

报错如下:

代码: 全选

wuhaibocxh@wuhaibocxh-desktop:~/桌面/2009_0525_RT3070_Linux_STA_v2.1.1.0$ sudo make 
make -C tools 
make[1]: 正在进入目录 `/home/wuhaibocxh/桌面/2009_0525_RT3070_Linux_STA_v2.1.1.0/tools' 
gcc -g bin2h.c -o bin2h 
make[1]:正在离开目录 `/home/wuhaibocxh/桌面/2009_0525_RT3070_Linux_STA_v2.1.1.0/tools' 
/home/wuhaibocxh/桌面/2009_0525_RT3070_Linux_STA_v2.1.1.0/tools/bin2h 
cp -f os/linux/Makefile.6 /home/wuhaibocxh/桌面/2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux/Makefile 
make  -C  /lib/modules/2.6.35-22-generic/build SUBDIRS=/home/wuhaibocxh/桌面/2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux modules 
make[1]: 正在进入目录 `/usr/src/linux-headers-2.6.35-22-generic' 
  CC [M]  /home/wuhaibocxh/桌面/2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux/../../common/cmm_mac_usb.o 
/home/wuhaibocxh/桌面/2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux/../../common/cmm_mac_usb.c: In function ‘NICInitRecv’: 
/home/wuhaibocxh/桌面/2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux/../../common/cmm_mac_usb.c:83: error: implicit declaration of function ‘usb_buffer_alloc’ 
/home/wuhaibocxh/桌面/2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux/../../common/cmm_mac_usb.c:83: warning: assignment makes pointer from integer without a cast 
/home/wuhaibocxh/桌面/2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux/../../common/cmm_mac_usb.c:112: error: implicit declaration of function ‘usb_buffer_free’ 
make[2]: *** [/home/wuhaibocxh/桌面/2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux/../../common/cmm_mac_usb.o] 错误 1 
make[1]: *** [_module_/home/wuhaibocxh/桌面/2009_0525_RT3070_Linux_STA_v2.1.1.0/os/linux] 错误 2 
make[1]:正在离开目录 `/usr/src/linux-headers-2.6.35-22-generic' 
make: *** [LINUX] 错误 2 
leopardwei
帖子: 27
注册时间: 2010-10-03 14:31

Re: 无线网卡 腾达w541u v2 ubuntu10.10下无法安装

#2

帖子 leopardwei » 2010-10-27 16:01

2.6.35 内核后, usb_buffer_alloc 和 usb_buffer_free 被替换成 usb_alloc_coherent 和 usb_free_coherent。

修改 include/os/rt_linux.h 文件,把:
#define RTUSB_URB_ALLOC_BUFFER(pUsb_Dev, BufSize, pDma_addr) usb_buffer_alloc(pUsb_Dev, BufSize, GFP_ATOMIC, pDma_addr)
#define RTUSB_URB_FREE_BUFFER(pUsb_Dev, BufSize, pTransferBuf, Dma_addr) usb_buffer_free(pUsb_Dev, BufSize, pTransferBuf, Dma_addr)
替换成:
#define RTUSB_URB_ALLOC_BUFFER(pUsb_Dev, BufSize, pDma_addr) usb_alloc_coherent(pUsb_Dev, BufSize, GFP_ATOMIC, pDma_addr)
#define RTUSB_URB_FREE_BUFFER(pUsb_Dev, BufSize, pTransferBuf, Dma_addr) usb_free_coherent(pUsb_Dev, BufSize, pTransferBuf, Dma_addr)
whbcxh
帖子: 19
注册时间: 2008-10-29 11:13

Re: 无线网卡 腾达w541u v2 ubuntu10.10下无法安装

#3

帖子 whbcxh » 2010-10-27 20:40

多谢提示,今天下午查询error: implicit declaration of function ‘usb_buffer_alloc’ 时,还看到有人这样写的
sed -i 's/usb_buffer_alloc/usb_alloc_coherent/g' wacom_sys.c
sed -i 's/usb_buffer_free/usb_free_coherent/g' wacom_sys.c
继续试试,不能现在放弃,呵呵 :em03
whbcxh
帖子: 19
注册时间: 2008-10-29 11:13

Re: 无线网卡 腾达w541u v2 ubuntu10.10下无法安装

#4

帖子 whbcxh » 2010-10-27 21:26

回复2楼,试了你说的方法,但是在rt_linux.h文件中,不知为何找不到你所说的两句,不知是不是找错了地方
另,我找的方法(在3楼),是别人解决其它问题的,不知道我的应该如何来写 :em20
附上我的rt_linux.h,烦请看看吧
rt_linux.h
(28.99 KiB) 已下载 44 次
leopardwei
帖子: 27
注册时间: 2010-10-03 14:31

Re: 无线网卡 腾达w541u v2 ubuntu10.10下无法安装

#5

帖子 leopardwei » 2010-10-27 22:02

whbcxh 写了:回复2楼,试了你说的方法,但是在rt_linux.h文件中,不知为何找不到你所说的两句,不知是不是找错了地方
另,我找的方法(在3楼),是别人解决其它问题的,不知道我的应该如何来写 :em20
附上我的rt_linux.h,烦请看看吧
附件 rt_linux.h 已经无效
附件中是我用的驱动版本,还有相应的补丁。

目前我用着还好,ubuntu 10.10 环境下。
附件
DPO_RT3070_LinuxSTA_V2.3.0.4_20100604.compile_fix_2.6.35-1.patch.txt
(2.1 KiB) 已下载 146 次
DPO_RT3070_LinuxSTA_V2.3.0.4_20100604.tar.bz2
(637.01 KiB) 已下载 178 次
leopardwei
帖子: 27
注册时间: 2010-10-03 14:31

Re: 无线网卡 腾达w541u v2 ubuntu10.10下无法安装

#6

帖子 leopardwei » 2010-10-27 22:06

我也是笔记本自带的无线貌似坏掉后,随便买了个,4、50 块的 tenda w541u v2.0。也不知道驱动这么麻烦。

鼓捣了一两天,才搞定。祝你也成功, :em11
whbcxh
帖子: 19
注册时间: 2008-10-29 11:13

Re: 无线网卡 腾达w541u v2 ubuntu10.10下无法安装

#7

帖子 whbcxh » 2010-10-29 23:29

谢谢,星期天有时间,再来倒腾啦。希望成功,你的驱动比我的要新
whbcxh
帖子: 19
注册时间: 2008-10-29 11:13

Re: 无线网卡 腾达w541u v2 ubuntu10.10下无法安装

#8

帖子 whbcxh » 2010-10-30 23:06

请教一个问题,make install命令,要求拷贝RT3070STA.dat文件至/etc/Wireless/RT3070STA目录下,可是你的包中只有RT2870STA.dat文件,一样可以使用么?谢谢
whbcxh
帖子: 19
注册时间: 2008-10-29 11:13

Re: 无线网卡 腾达w541u v2 ubuntu10.10下无法安装

#9

帖子 whbcxh » 2010-10-30 23:45

安装完成后,

代码: 全选

wuhaibocxh@wuhaibocxh-desktop:~$ ifconfig 
eth0      Link encap:以太网  硬件地址 00:e0:4c:4d:17:36   
          UP BROADCAST MULTICAST  MTU:1500  跃点数:1 
          接收数据包:0 错误:0 丢弃:0 过载:0 帧数:0 
          发送数据包:0 错误:0 丢弃:0 过载:0 载波:0 
          碰撞:0 发送队列长度:1000  
          接收字节:0 (0.0 B)  发送字节:0 (0.0 B) 
          中断:20 基本地址:0xde00  
 
lo        Link encap:本地环回   
          inet 地址:127.0.0.1  掩码:255.0.0.0 
          inet6 地址: ::1/128 Scope:Host 
          UP LOOPBACK RUNNING  MTU:16436  跃点数:1 
          接收数据包:44 错误:0 丢弃:0 过载:0 帧数:0 
          发送数据包:44 错误:0 丢弃:0 过载:0 载波:0 
          碰撞:0 发送队列长度:0  
          接收字节:3408 (3.4 KB)  发送字节:3408 (3.4 KB) 
 
wuhaibocxh@wuhaibocxh-desktop:~$ iwconfig 
lo        no wireless extensions. 
 
eth0      no wireless extensions. 
 
ra0       Ralink STA  ESSID:""   
          Mode:Auto  Frequency=2.412 GHz  Access Point: Not-Associated    
          Bit Rate:1 Mb/s    
          RTS thr:off   Fragment thr:off 
          Link Quality=10/100  Signal level:0 dBm  Noise level:-87 dBm 
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0 
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
网络工具.png
网络工具.png
leopardwei
帖子: 27
注册时间: 2010-10-03 14:31

Re: 无线网卡 腾达w541u v2 ubuntu10.10下无法安装

#10

帖子 leopardwei » 2010-10-31 11:40

RT2870STA.dat 一样可以使用,改个名就可以了。

你已经驱动了无线网卡了,就是 ra0 这个设备。剩下就是配置无线网络了。

下面是我的:
Screenshot-设备 - 网络工具.png
whbcxh
帖子: 19
注册时间: 2008-10-29 11:13

Re: 无线网卡 腾达w541u v2 ubuntu10.10下无法安装

#11

帖子 whbcxh » 2010-10-31 20:51

显示网卡驱动已安装,
出现下面错误

代码: 全选

wuhaibocxh@wuhaibocxh-desktop:~/桌面/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/commo 
n$ ifconfig ra0 inet 192.168.100.101 up 
SIOCSIFADDR: 权限不够 
SIOCSIFFLAGS: 权限不够 
SIOCSIFFLAGS: 权限不够 
wuhaibocxh@wuhaibocxh-desktop:~/桌面/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/commo 
n$ sudo ifconfig ra0 inet 192.168.100.101 up 
SIOCSIFFLAGS: 不允许的操作 
SIOCSIFFLAGS: 不允许的操作 
真的菜鸟掉了 :em20
leopardwei
帖子: 27
注册时间: 2010-10-03 14:31

Re: 无线网卡 腾达w541u v2 ubuntu10.10下无法安装

#12

帖子 leopardwei » 2010-11-01 0:37

无线网卡驱动了,不一定意味着找到 AP,并连接上,就可以立马设置 IP 地址。

图形方式:
试着通过 nm-connection-editor 设置并连接 AP,然后不管是静态 IP 或者 DHCP。

命令方式:
1、iwconfig、iwlist 等,找 AP,设置连接方式、用户密码等。
2、ifconfig、dhclient 获取 IP (固定 IP 可能要手工设置 gateway、dns)
yuanhaoliang
帖子: 51
注册时间: 2009-03-18 13:42

Re: 无线网卡 腾达w541u v2 ubuntu10.10下无法安装

#13

帖子 yuanhaoliang » 2010-11-04 21:38

我没有安装成功,请问怎么装啊。郁闷。
leopardwei
帖子: 27
注册时间: 2010-10-03 14:31

Re: 无线网卡 腾达w541u v2 ubuntu10.10下无法安装

#14

帖子 leopardwei » 2010-11-04 21:46

yuanhaoliang 写了:我没有安装成功,请问怎么装啊。郁闷。
到哪一步了?导致没有成功的错误信息是什么?以便 step by step 的调试完成。
yuanhaoliang
帖子: 51
注册时间: 2009-03-18 13:42

Re: 无线网卡 腾达w541u v2 ubuntu10.10下无法安装

#15

帖子 yuanhaoliang » 2010-11-07 10:09

leopardwei 写了:
yuanhaoliang 写了:我没有安装成功,请问怎么装啊。郁闷。
到哪一步了?导致没有成功的错误信息是什么?以便 step by step 的调试完成。
首先感谢您的热心帮忙,出错步骤如下:

代码: 全选

yuanhaoliang@yuanhaoliang-Ubuntu:~/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/os/linux$ sudo /sbin/insmod rt3070sta.ko
insmod: error inserting 'rt3070sta.ko': -1 File exists 
make的过程加了sudo的话,就没有出错,不加的话,就会

代码: 全选

make[1]:正在离开目录 `/usr/src/linux-headers-2.6.32-25-generic-pae'
cp -f /home/yuanhaoliang/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/os/linux/rt3070sta.ko /tftpboot
cp: 无法删除"/tftpboot": 权限不够
make: *** [LINUX] 错误 1
然后到了

代码: 全选

$cp RT2870STA.dat  /etc/Wireless/RT2870STA/RT2870STA.dat
目录不存在,要自己建.

代码: 全选

    #[kernel 2.6]
    #    $/sbin/insmod rt2870sta.ko
    #    $/sbin/ifconfig ra0 inet YOUR_IP up
rt2870sta.ko文件不存在,我改为了rt3070sta.ko

ifconfig的结果是:

代码: 全选

wlan0     Link encap:以太网  硬件地址 00:b0:8c:32:75:0f  
          UP BROADCAST MULTICAST  MTU:1500  跃点数:1
          接收数据包:0 错误:0 丢弃:0 过载:0 帧数:0
          发送数据包:0 错误:0 丢弃:0 过载:0 载波:0
          碰撞:0 发送队列长度:1000 
          接收字节:0 (0.0 B)  发送字节:0 (0.0 B)
wlan0并没有变为ra0.

另外,那个patch我不知道怎么用...请问我哪一个步骤做错了?
回复