Ubuntu 10.04, Wireless chipsets, and WPA Security

本文详细介绍了如何解决Ralink RT2860无线网卡在Ubuntu 10.04系统下使用WPA安全连接的问题。通过修改源代码并重新编译驱动程序,可以确保无线适配器正常工作,并在重启后仍能自动连接到安全路由器。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Ubuntu 10.04, Wireless chipsets, and WPA Security

1004header[1]
Ubuntu’s latest release, 10.04, was officially posted this week. Overall, it is a very impressive effort and a milestone for the Open Source community. I have installed it on a new cheap desktop I recently built and it runs fantastically with fast boot times and nice desktop eye candy.

The one thing that spoils this effort is the continued hassles in getting wireless wifi cards working. I have a half dozen usb wifi sticks lying around and only one just works our of the box. I guess it wouldn’t be Linux if one didn’t have to at least compile a driver or two every now and then?

Anyway, I recently purchased the Asus PCE-N13 IEEE 802.11b/g/n PCI Express Wireless Adapter.

33-320-048-TS[1]
I bought the card on sale for $19.99 and on the basis that someone left comments that it worked in Ubuntu 10.04. Not sure what this fellow’s definition of working is but it doesn’t just work at least when you use WPA security. So, determined not to let this get the better of me, I embarked on a flurry of google searches.

This card uses the Ralink RT2860 chipset which is used in many products. The problem from what I’ve been able to determine is that the WPA source code definitions are wrong by default. It’s not clear why this is so but that seems to be the case. The fix and ultimate configuration is fairly straight forward if one can find clear and accurate instructions. There’s the rub.

I finally stumbled upon some good instructions but maddeningly they contained key errors that will surely frustrate the uninitiated. So, in the interest of helping those that follow, I offer my amended instructions that I have tested and believe to be accurate. With this guide you should be able to get a Ralink RT2860 based product running and connected to a secure router running WPA security and will do so after reboots.

The following steps were performed on a unmodified default Ubuntu 10.04 final code install.

Step 1
Download latest RT2860 driver source code from Ralink here. You need to enter a name and an email and press accept to download.

Step 2
Open and extract the downloaded file to a temporary directory in your Home directory.

Step 3
Using an editor such as the default Gedit, open the driver source code file ./os/linux/config.mk. Use the find command to locate HAS_WPA_SUPPLICANT and make sure it is set to yes. It should look like this when finished:

HAS_WPA_SUPPLICANT=y
and do the same for:
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y

Close and save this file.

Step 4
Using an editor such as the default Gedit, open the file ./common/cmm_wpa.c. Use the find command to locate MIX_CIPHER_NOTUSE. Replace this entire line (keep on one line)with this code:

WPA_MIX_PAIR_CIPHER FlexibleCipher = WPA_TKIPAES_WPA2_TKIPAES;

Step 5
Perform these commands in a Terminal session one at a time. You can cut and paste. Using sudo puts you into Admin mode so you will be prompted for you Admin (probably) your default password.

sudo make
sudo make install
sudo ifconfig wlan0 down
sudo rmmod rt2860sta

Step 6
Rename the old rt2860sta.ko driver file to rt2860sta.ko.dist using a command such as:

sudo mv /lib/modules/2.6.*/kernel/drivers/staging/rt2860/rt2860sta.ko rt2860sta.ko.dist

Note you need to replace the asterisk with the actual directory name of your kernel. Consult your file system directory structure for this.

This is to prevent the old driver from being used. You could just delete the file as well I suppose.

Step 7
sudo depmod -a
sudo modprobe rt2860sta

After you issue the previous command you should see the Desktop top panel Wireless icon come to life as it tries to connect. You will be prompted for a WPA password. Give it a little while and it should connect.

Not sure this command is necessary but you can use if the Wireless isn’t started automatically.

sudo ifconfig wlan0 up

Step 8
Okay at this point you have made a lot of progress and should be happily surfing at up to 802.11n speeds. Take a break and marvel at your skills and the wonder of the Internet!

Step 9
But, and this is a biggie, what happens if you ever reboot? Unfortunately, you are back at square one without the RT2860 driver being loaded after a reboot. To remedy this situation, read on.

Step 10
Copy the newly compiled driver from your temporary build directory in ./os/linux using a command like:
sudo cp rt2860sta.ko /lib/modules/2.6.*/kernel/drivers/staging/rt2860/
Again replace the asterisk with the correct directory name.

Step 11
Update your modules boot file with the following command:
gksudo gedit /etc/modules
Add the command rt2860sta on a line at the end of the file.
Close and save the file.

Step 12

Reboot and check to see that you are now automatically connecting to your wireless network!

I hope this tutorial may be helpful for some people
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值