How To: Configure Wireless with Ralink (rt2500) Level One WNC-0301 in Fedora Core 6

Well … Yesterday I switched from Fedora Core 4 to Fedora Core 6. The main problem was the wireless lan. As I was using ndiswrapper for wlan in FC4, I tried compiling it for FC6. But FC6 doesn’t have build packages so it didn’t work out. Then I installed the kernel-devel packages from here. Now the build packages were not a problem. I installed ndiswrapper from here. Now while installing ndiswrapper it gave an error that your kernel is using 4k stack, while for windows driver you need to have a kernel with 16k stack. I googled and searched the 16k stack version for my kernel but didnt get one. I used to download 16k stack kernel from here. But 16k stack kernel is not yet out for FC6. So its almost impossible for me to get ndiswrapper to work if I dont want to mess up with the patched and all.

Then I thought of using the native drivers for rt2500 (Level One wnc-0301). I downloaded the drivers from here.
The step by step installation is here ….

Step 0

Install the kernel-devel package from the above specified site.

[root@localhost ~]# rpm -ivh kernel-devel-yourkernel.rpm

Step 1

Untar the drivers.

[root@localhost ~]# tar -xvzf rt2500-1.1.0-b4.tar.gz

Step 2

Change the directory to Module

[root@localhost ~]# cd rt2500-1.1.0-b4/Module/

Step 3

compile the modules

[root@localhost ~]# make

If this gives error like this

1
2
3
4
5
6
7
8
9
make[1]: Entering directory '/usr/src/kernels/2.6.18-1.2798.fc6-xen-i686'
CC [M]  /home2/Softwares/Drivers/rt2500-1.1.0-b4/Module/rtmp_main.o
In file included from /home2/Softwares/Drivers/rt2500-1.1.0-b4/Module/rtmp_main.c:50:
/home2/Softwares/Drivers/rt2500-1.1.0-b4/Module/rt_config.h:58:40: error: linux/config.h: No such file or directory
make[2]: *** [/home2/Softwares/Drivers/rt2500-1.1.0-b4/Module/rtmp_main.o] Error 1
make[1]: *** [_module_/home2/Softwares/Drivers/rt2500-1.1.0-b4/Module] Error 2
make[1]: Leaving directory '/usr/src/kernels/2.6.18-1.2798.fc6-xen-i686'
rt2500.ko failed to build!
make: *** [module] Error 1

Then open the file rt_config.h and comment the line #include<linux/config.h> and again compile by issuing make.
If you get a different error try to debug if you know c-programming a bit.
Step 4. [Do as root]
Install the module

[root@localhost ~]# make install-fedora

Step 5 [Do as root]

Configure the wlan card.

[root@localhost ~]# neat

Now select a new connection and wireless and the the Ralink driver. Thats it. Activate the wlan0.

Hope this help a bit.
More suggestions are welcome.

Edit : If you are looking for wireless configuration in Fedora 7, here is a reference.

 

Hack: Mange Fluctuating Wireless

I am trying this small script with a so called gui 😉 . This helps managing my wireless in the extreme conditions. Just a shell script. Run the script as root otherwise it’ll not work.

Get the script here or copy the code below.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
#
#	Author - Kulbir Saini, IIIT Hyderabad.
#	Home - http://saini.co.in/
#	KWirelessManger - Just for fun.(It works ... its not just fun).
#
 
#Give the popup life.
POPUP_LIFE="10"
#kdialog --passivepopup "Welcome to 'KWirelessManager'"  ${POPUP_LIFE} &
#Give your device name for proceeding further. It may be one of wlan0, ra0, eth0, ipw2200 etc...
WLAN_DEVICE="wlan0"
#Give your WLAN host to be connected.
WLAN_HOST="IIIT WLAN"
CONNECTED=0
while [[ 1 ]];
do
	iwlist ${WLAN_DEVICE} scanning 2> /dev/null > /tmp/iwlist.aps
	grep -e "Cell" /tmp/iwlist.aps | tr " " "\t" | cut -f15 > /tmp/iwlist.apadd
	ACCESS_POINTS_IN_RANGE=`wc -l /tmp/iwlist.apadd`
	for ACCESS_POINT_ADDRESS in `cat /tmp/iwlist.apadd`
	do
		iwconfig ${WLAN_DEVICE} ap ${ACCESS_POINT_ADDRESS}
		#kdialog --passivepopup "Connceting to Access Point ${ACCESS_POINT_ADDRESS} ..." ${POPUP_LIFE} &
		echo "Connceting to Access Point ${ACCESS_POINT_ADDRESS} ..."
		WLAN_STATUS=`service network restart | tail -1 | grep "FAILED"`
		if [[ ${WLAN_STATUS} == "" ]];
		then
			#kdialog --passivepopup "You are connected to ${WLAN_HOST}." ${POPUP_LIFE} &
			echo "You are connected to ${WLAN_HOST}."
			CONNECTED=1
			break
		else
			#kdialog --passivepopup "Failed to connect to the Access Point ${ACCESS_POINT_ADDRESS} :(" ${POPUP_LIFE} &
			echo "Failed to connect to the Access Point ${ACCESS_POINT_ADDRESS} :("
			CONNECTED=0
		fi
	done
	if [[ ${CONNECTED} == 1 ]];
	then
		sleep 180;
	fi
done

Please suggest any optimization and do tell if u like it.

 

How To: Configure Wireless with Ralink (RT2500) Level One WNC 0301 in Fedora Core 4

Yesterday after a lot of trials with Fedora Core 5 to activate my wireless LAN card, I switched to Fedora Core 4, which looked much more stable than FC5. Actually with FC5, I mainly faced problems with gui , my mouse which is Microsoft USB mouse and my wlan card which is level one Ralink RT2500. In FC5, I tried both with ndiswrapper and madwifi but nothing worked out for me. Also my mouse was not working well. I can click things but the pointer was not visible like microsoft gave me a invisible mouse or this microsoft mouse don’t want to work with Linux. After installing FC4, I felt very comfortable with guis and my mouse. They worked fine. But now there were two problems. One is that FC4 was not able to detect my soundcard and the wlan was not working again. Anyway soundcard is not a big problem, as it worked in FC5, I’ll make it work with some up-gradation or things like that. But the major problem is wlan. And here goes the methods which I tried to activate my wlan card.

Method 1. With rpms

I downloaded these rpms

1
2
3
madwifi-0.9.4.12-16.rhfc4.at.i386.rpm
madwifi-kmdl-2.6.11-1.1369_FC4-0.9.4.12-16.rhfc4.at.i686.rpm
madwifi-hal-kmdl-2.6.16-1.2111_FC4smp-0.9.6.0-20.rhfc4.at.i686.rpm

from the site atrpms and tried installing them but they failed the dependency /boot/vmlinuz-2.6.16-1.2111_FC4 , then i tried to find this rpm everywhere on google , rpmfind etc …. but I could not find it. Then I installed it with –nodeps option and configured according to the data given here .
But in vain.

Method 2. With ndiswrapper using Microsoft Windows XP drivers

I downloaded the ndiswrapper-1.16 from sourceforge.
I untarred it and used these commands.

1
2
3
make uninstall
make
make install

Please don’t forget to the read the INSTALL and README files in the ndiswrapper-1.* directory. Then I inserted my LAN card driver cd for XP and copied the drivers directory which contains .inf and .sys files to my root directory. Then I used the commands .

1
2
3
4
5
ndiswrapper -i Rt2500.INF
ndiswrapper -l
modprobe ndiswrapper
iwconfig "wlan0" key open "wep 128 bit hex key" ESSID "IIIT WLAN"
dhclient wlan0

I ran all this command and I am very happy to say that wireless LAN did not work. 🙂 Then I ran this command

touch /etc/sysconfig/network-scripts/ifcfg-wlan0

and then edited this file. I entered all the data suggested here except that second line I wrote

DEVICE=wlan0

OK. Then i ran

neat

and edited the properties of wlan device by double clicking it and gave the 26 letters wlan key there and activated the device and it worked 😀