实验室有一块TL-WN322G+ USB无线网卡,于是就想着能不能在Ubuntu12.04下面安装驱动,捣鼓了两天终于成功了。
从晚上开始奋战,首先去TPLINK的官网找到了这块无线网卡的驱动,无奈TPLINK只给了windows的驱动,真的想吐槽一下国内的厂商出的设备对
linux的支持实在是,不过本人可没这么容易妥协,于是直接谷歌TL-WN332G+
LINUX,果然出来一堆资料,不过大部分的资料都是2008年之前的,参考了几个网页,主要的思路就是:TL-WN322G+无线网卡使用的是
ZD1211b的芯片组,所以我需要去下载ZD1211b芯片组的驱动程序,废了不少力气终于找到了ZD1211b的驱动程序(同样是08年更新的),然
后解压缩,make,刚敲下去就报错,各种头文件找不到,然后谷歌了一下,说是编译模块驱动需要内核源码,然后又去找内核源码,内核源码下好了以后设置好
头文件路径,还是各种头文件找不到,仔细一看,貌似这回是3.2内核源码里面也没有那些头文件,后来再google相关的词条,原来这块USB网卡的芯片
组只支持2.4以及2.6的内核,对于我ubuntu12.04的3.2内核,我只能说欲哭无泪。
早上到了实验室使用ndiswrapper安装还是不成功,本想着放弃吧,突然想起来实验室还有另一块USB无线网卡,找过来插上去之后居然能够直接识
别,而且Network
Manager里面居然已经能够直接配置无线网络,可是为什么第一快网卡就不行,想着想着本人就是不死心,于是继续google,鉴于昨天的经
验,google的时候我更加具体地搜索了USB设备号,设备号是从终端中使用lsusb获得的:
<p> <span class="pln">thinki@G31T</span><span class="pun">-</span><span class="pln">M2</span><span class="pun">:~</span><span class="pln">$ ls<a href="https://www.whatled.com/post-tag/usb" title="查看更多关于usb的文章" target="_blank">usb</a></span> <span class="typ">Bus</span><span class="pln"> </span><span class="lit">001</span><span class="pln"> </span><span class="typ">Device</span><span class="pln"> </span><span class="lit">001</span><span class="pun">:</span><span class="pln"> ID </span><span class="lit">1d6b</span><span class="pun">:</span><span class="lit">0002</span><span class="pln"> </span><span class="typ"><a href="https://www.whatled.com/post-tag/Linux" title="查看更多关于Linux的文章" target="_blank">Linux</a></span><span class="pln"> </span><span class="typ">Foundation</span><span class="pln"> </span><span class="lit">2.0</span><span class="pln"> root hub</span> <span class="typ">Bus</span><span class="pln"> </span><span class="lit">002</span><span class="pln"> </span><span class="typ">Device</span><span class="pln"> </span><span class="lit">001</span><span class="pun">:</span><span class="pln"> ID </span><span class="lit">1d6b</span><span class="pun">:</span><span class="lit">0001</span><span class="pln"> </span><span class="typ"><a href="https://www.whatled.com/post-tag/Linux" title="查看更多关于Linux的文章" target="_blank">Linux</a></span><span class="pln"> </span><span class="typ">Found<a href="https://www.whatled.com/post-tag/ati" title="查看更多关于ati的文章" target="_blank">ati</a>on</span><span class="pln"> </span><span class="lit">1.1</span><span class="pln"> <a href="https://www.whatled.com/post-tag/root" title="查看更多关于root的文章" target="_blank">root</a> hub</span> <span class="typ">Bus</span><span class="pln"> </span><span class="lit">003</span><span class="pln"> </span><span class="typ">Device</span><span class="pln"> </span><span class="lit">001</span><span class="pun">:</span><span class="pln"> ID </span><span class="lit">1d6b</span><span class="pun">:</span><span class="lit">0001</span><span class="pln"> </span><span class="typ"><span class="kl_auto_internal_links_tag"><a href="http://www.whatled.com/tag/Linux" title="查看标签为 Linux 的文章" target="_blank">Linux</a></span></span><span class="pln"> </span><span class="typ">Foundation</span><span class="pln"> </span><span class="lit">1.1</span><span class="pln"> root hub</span> <span class="typ">Bus</span><span class="pln"> </span><span class="lit">004</span><span class="pln"> </span><span class="typ">Device</span><span class="pln"> </span><span class="lit">001</span><span class="pun">:</span><span class="pln"> ID </span><span class="lit">1d6b</span><span class="pun">:</span><span class="lit">0001</span><span class="pln"> </span><span class="typ"><a href="https://www.whatled.com/post-tag/Linux" title="查看更多关于Linux的文章" target="_blank">Linux</a></span><span class="pln"> </span><span class="typ">Found<a href="https://www.whatled.com/post-tag/ati" title="查看更多关于ati的文章" target="_blank">ati</a>on</span><span class="pln"> </span><span class="lit">1.1</span><span class="pln"> <a href="https://www.whatled.com/post-tag/root" title="查看更多关于root的文章" target="_blank">root</a> hub</span> <span class="typ">Bus</span><span class="pln"> </span><span class="lit">005</span><span class="pln"> </span><span class="typ">Device</span><span class="pln"> </span><span class="lit">001</span><span class="pun">:</span><span class="pln"> ID </span><span class="lit">1d6b</span><span class="pun">:</span><span class="lit">0001</span><span class="pln"> </span><span class="typ"><a href="https://www.whatled.com/post-tag/Linux" title="查看更多关于Linux的文章" target="_blank">Linux</a></span><span class="pln"> </span><span class="typ">Foundation</span><span class="pln"> </span><span class="lit">1.1</span><span class="pln"> <a href="https://www.whatled.com/post-tag/root" title="查看更多关于root的文章" target="_blank">root</a> hub</span> <span><b><u><span class="typ">Bus</span><span class="pln"> </span><span class="lit">001</span><span class="pln"> </span><span class="typ">Device</span><span class="pln"> </span><span class="lit">004</span><span class="pun">:</span><span class="pln"> ID f201</span><span class="pun">:</span><span class="lit">5370</span></u></b></span><span class="pln"> </span> <span class="typ">Bus</span><span class="pln"> </span><span class="lit">002</span><span class="pln"> </span><span class="typ">Device</span><span class="pln"> </span><span class="lit">002</span><span class="pun">:</span><span class="pln"> ID </span><span class="lit">0e8f</span><span class="pun">:</span><span class="lit">0022</span><span class="pln"> </span><span class="typ">GreenAsia</span><span class="pln"> </span><span class="typ">Inc</span><span class="pun">.</span><span class="pln"> </span> <span class="typ">Bus</span><span class="pln"> </span><span class="lit">003</span><span class="pln"> </span><span class="typ">Device</span><span class="pln"> </span><span class="lit">002</span><span class="pun">:</span><span class="pln"> ID </span><span class="lit">046d</span><span class="pun">:</span><span class="pln">c018 </span><span class="typ">Logitech</span><span class="pun">,</span><span class="pln"> </span><span class="typ">Inc</span><span class="pun">.</span><span class="pln"> </span><span class="typ">Optical</span><span class="pln"> </span><span class="typ">Wheel</span><span class="pln"> </span><span class="typ">Mouse</span> </p>
这回被我搜索到一个博客,博
主居然也和我遇到了相似的问题,看完一遍之后真的无力吐槽了,原来这块网卡的USB ID
f201:5370对应是新版的芯片组,使用的是RanLink的RT5370芯片(即TL-WN322G+
V3)。现在问题很清楚了,我只要去找RanLink的RT5370的Linux驱动就OK了,现在看来TPLINK这类公司也都是买国外的芯片回来包装
一下,离自己生产IC差远了。不过之前那位博主的博客我只能参考一半,由于他用的是3.4的内核,而我的3.2内核对于RanLink无线网卡的驱动支持
还没到位,所以我决定自己编译模块驱动,这样对于驱动安装流程也有一个大体的了解,找到RanLink官网的驱动链接:http://www.mediatek.com/_en/07_downloads/01_windows.php?sn=501
# Support Wpa_SupplicantHAS_WPA_SUPPLICANT=y# Support Native WpaSupplicant for Network MagangerHAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y
#ifdef RT5370{USB_DEVICE(0x148F,0x5370)}, /* Ralink 5370 */{USB_DEVICE(0x148F,0x5372)}, /* Ralink 5370 */{USB_DEVICE(0x13D3,0x3365)}, /* Azurewave */{USB_DEVICE(0x13D3,0x3329)}, /* Azurewave */{USB_DEVICE(0x2001,0x3C15)}, /* Alpha */{USB_DEVICE(0x2001,0x3C19)}, /* Alpha */{USB_DEVICE(0x2001,0x3C1C)}, /* DLink */{USB_DEVICE(0x2001,0x3C1D)}, /* DLink */{USB_DEVICE(0x043E,0x7A12)}, /* Arcadyan */{USB_DEVICE(0x043E,0x7A22)}, /* LG innotek */{USB_DEVICE(0xF201,0x5370)}, /* TP-LINK TL-WN322G+ v3 */#endif // RT5370 //注意:这一步很关键,网上好多教程都没有解决问题,就是因为这一步,这就是USB无线网卡识别的关键部分
- 接下来进行编译和安装
不过在编译之前需要当前Ubuntu发行版的Linux内核源码以及编译工具,安装如下开发包即可:<p> <span class="pln">sudo apt</span><span class="pun">-</span><span class="kwd">get</span><span class="pln"> install build</span><span class="pun">-</span><span class="pln">essential linux</span><span class="pun">-</span><span class="pln">source</span> </p>接下来即可开始编译:
<div> <span class="pln">sudo make</span> </div> <div> <span class="pln">sudo make install</span> </div>
<p> <span class="pln">sudo modprobe rt5370sta</span> </p>
<div> <span class="pln">sudo </span><span class="pun">-</span><span class="pln">i</span> </div> <div> <span class="pln">echo rt5370sta </span><span class="pun"></span><span class="pln"> </span><span class="str">/etc/</span><span class="pln">modules</span> </div>
重启系统后在面板上就能看到无线网卡识别出来了,并且能够通过Network Manager配置无线网络