【 XBATU . COM 】    【 MOZICHINA . COM 】    【 2858999 . COM 】


 

解决tp-link usb无线网卡在ubuntu14.04下无法使用的一种方法

webmaster@李松涛 提交于 周一, 01/18/2016 - 22:24

家里的台式机采用的是Realtek RTL8188CUS USB无线网卡(可以用lsusb命令查看该信息), 最近把Ubuntu 12.04升级到14.04版本,发现14.04系统自带的无线网卡驱动简直把我搞崩溃,稳定性很差,动不动就掉线,每次都得重新down/up一下才正常。

当然最好的解决办法是利用Realtek官方提供的无线网卡驱动,很遗憾,发现官方的网卡驱动支持的内核版本为Linux Kernel 2.6.18~3.9,而笔者使用的Ubuntu内核版本3.13.0-37-generic(用uname -a可查看该信息), 显然3.13.0的内核版本目前还不支持,或许修改驱动会是解决办法,不是不可以,就是费时,在github找到如下的解决办法:

Using the kernel driver, you won't be able to connect unless your 20ft within range of the router.If you want your usb wireless device to work (rtl8192cu) properly, you may want to install the proprietary driver with the following commands:
sudo apt-get install git build-essential linux-headers-generic dkms
git clone https://github.com/dz0ny/rt8192cu.git --depth 1
cd rt8192cu
sudo make dkms
And use the following to load the driver
sudo modprobe 8192cu
Notice this module uses "8192cu" instead of "rtl8192cu" to load. Finally,update your /etc/modules folder accordingly with this command:
echo '8192cu' | sudo tee -a /etc/modules
With this driver you get full 300Mb/s instead of 150 and there is full encryption suport as well. Not only that but the range is at least 10 times better than the kernel driver and no more dropped signal.
首先,获取源代码:
git clone https://github.com/dz0ny/rt8192cu.git --depth 1

然后,利用源码进行如下操作:
cd codesource/rt8192cu/
make modules
sudo make install
剩下的问题就是能让模块开机自动加载了, 利用make install 或者采用手动创建目录/lib/modules/3.13.0-37-generic/kernel/drivers/net/wireless/rtlwifi/8192cu/,然后把编译生成的8192cu.ko拷贝到该目录下,并执行如下操作:
sudo depmod -a 3.13.0-37-generic

重启系统,一切OK!网卡超级稳定!


【 XBATU . COM 】    【 MOZICHINA . COM 】    【 2858999 . COM 】