A Debian WiFi solution (USB WiFi, Windows driver)

Hope this article will help people with problems accessing Internet using WiFi under Linux, especially Debian and its derivates, eg. Ubuntu series.

Hardware:
An old  laptop with USB 1.0 port
A cheap USB WiFi card comes with ONLY Windows XP driver

Software:
Debian system
mounted full DVD ISO images

Yes. That's all we have. To make it work, I have tried to install Debian etch (currently testing) on the old laptop. I will expect people with some knowledge using debian system so I will skip this part.

Debian is such a great system that if you download all 4 DVD ISO images all software are included. The latest ISO images are built for code name etch. The first thing after installation of a base system is to edit /etc/fstab to mount all ISO images. Details are skipped.

My card isn't supported by Linux kernel. Neither do I have a Linux driver for this card. We need ndiswrapper tool to use our windows driver which can be found as <name>.inf under the new devices' driver directory come with the install CD-ROM. Before we install it, we need kernel headers. Now we use aptitude tool to get kernel headers. Details at:

http://www.linuxquestions.org/linux/answers/Networking/ndiswrapper_on_Debian_Sarge_without_having_to_compile_anything

Check the following to install windows driver and register ndiswrapper as kernel module. (see http://www.linuxfocus.org/ChineseGB/December2004/article361.shtml)

ndiswrapper -i /路径/xxxx.inf
第一次可能会提示找不到路径/etc/ndiswrapper
没关系,实际上已经安装成功
输入
ndiswrapper -l
会输出当前已经安装过的驱动
Installed ndis drivers:
w70n51 present

w70n51是你安装的inf文件

"present"则说明,当前有网卡和这个驱动匹配,正在使用该驱动!!!!!!!

既然可以用,就加载吧
modprobe ndiswrapper

可以输入dmesg来确定一下
如果看到类似下面的信息,则说明成功了
wlan0: ndiswrapper ethernet device xx:xx:xx:xx:xx:xx


如果没有提示"present",则使用
ndiswrapper -e w70n51
卸载该驱动,重新安装一次,或者换换其它驱动,总会成功的^^Y

配置方法和IPW的一样,用iwconfig enc WEP密码 就行了
ndsiwrapper有个选项可以帮你设置为自动加载

ndsiwrapper -m
这样就不用修改什么东西了

Then, what we all have to do is to check the WiFi type you are connecting to. If the WiFi access point is using WEP you can simply use Gnome's own configuration tool. However, due to security reasons it's not recommended for office use. So, I have to install a tool called wpa_supplicant to meet my office's security settings. Here's the wpa_supplicant.conf file for my office use.

/etc/wpa_supplicant.conf:

ctrl_interface=/var/run/wpa_supplicant
ap_scan=1

network={
ssid="<network ssid>"
scan_ssid=1
key_mgmt=WPA-EAP
group=TKIP
eap=PEAP TTLS TLS
identity="<username>"
password="<password>"
}

in /etc/network/interfaces, add/change these:

iface wlan0 inet dhcp
wireless-essid <ssid>
pre-up wpa_supplicant -Bw -Dwext -iwlan0 -c /etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant

Now, we have a system with fully functioning WiFi. To bring it up, just run ifup wlan0 and turn it off by ifdown wlan0.

Conclusion

It's a tedious task configuring WiFi under Linux, especially with usb WiFi card. We are still waiting for good desktop solution but the technology advancement doesn't stop to wait for Linux desktop team. For example, most Linux distos can discover sound card without problems now (with most recent kernel) but it's a boring task 10 years ago. But when the hardware works, it's the best. My lappy's WiFi signal at office breaks under XP every 3 to 5 min but it's working smoothly under Debian.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值