# The Ubuntu Forum Community > Ubuntu Official Flavours Support > Networking & Wireless > [ubuntu] HOWTO: Ralink rt2870 (Native) Kernel 2.6.24

## pandapanda

Hi all,

As many people have pointed out the Ralink rt2870 driver will not compile OTB Hardy Heron. I have some simple patch instructions that will allow you to compile the driver ( available from http://www.ralinktech.com.tw/data/dr....2.1.0.tar.bz2 ) and regain your wifi.

PRE:

- Alter the makefile(s) according to your needs, just as the README_STA states.

STEP 1:

- navigate to /include/rt2870.h and and a NULL terminator to RT2870_USB_DEVICES.



```
#define RT2870_USB_DEVICES	\
{	\
	{USB_DEVICE(0x148F,0x2770)}, /* Ralink */		\
	{USB_DEVICE(0x148F,0x2870)}, /* Ralink */		\
	{USB_DEVICE(0x0B05,0x1731)}, /* Asus */			\
	{USB_DEVICE(0x0B05,0x1732)}, /* Asus */			\
	{USB_DEVICE(0x0B05,0x1742)}, /* Asus */			\
	{USB_DEVICE(0x0DF6,0x0017)}, /* Sitecom */		\
	{USB_DEVICE(0x0DF6,0x002B)}, /* Sitecom */		\
	{USB_DEVICE(0x0DF6,0x002C)}, /* Sitecom */		\
	{USB_DEVICE(0x0DF6,0x002D)}, /* Sitecom */		\
	{USB_DEVICE(0x14B2,0x3C06)}, /* Conceptronic */		\
	{USB_DEVICE(0x14B2,0x3C28)}, /* Conceptronic */		\
	{USB_DEVICE(0x2019,0xED06)}, /* Planex Communications, Inc. */		\
	{USB_DEVICE(0x07D1,0x3C09)}, /* D-Link */		\
	{USB_DEVICE(0x14B2,0x3C07)}, /* AL */			\
	{USB_DEVICE(0x050D,0x8053)}, /* Belkin */		\
	{USB_DEVICE(0x14B2,0x3C23)}, /* Airlink */		\
	{USB_DEVICE(0x14B2,0x3C27)}, /* Airlink */		\
	{USB_DEVICE(0x07AA,0x002F)}, /* Corega */		\
	{USB_DEVICE(0x07AA,0x003C)}, /* Corega */		\
	{USB_DEVICE(0x07AA,0x003F)}, /* Corega */		\
	{USB_DEVICE(0x1044,0x800B)}, /* Gigabyte */		\
	{USB_DEVICE(0x15A9,0x0006)}, /* Sparklan */		\
	{USB_DEVICE(0x083A,0xB522)}, /* SMC */			\
	{USB_DEVICE(0x083A,0xA618)}, /* SMC */			\
	{USB_DEVICE(0x083A,0x7522)}, /* Arcadyan */		\
	{USB_DEVICE(0x0CDE,0x0022)}, /* ZCOM */			\
	{USB_DEVICE(0x0586,0x3416)}, /* Zyxel */		\
	{USB_DEVICE(0x0CDE,0x0025)}, /* Zyxel */		\
	{USB_DEVICE(0x1740,0x9701)}, /* EnGenius */		\
	{USB_DEVICE(0x1740,0x9702)}, /* EnGenius */		\
	{USB_DEVICE(0x0471,0x200f)}, /* Philips */		\
	{USB_DEVICE(0x14B2,0x3C25)}, /* Draytek */		\
	{USB_DEVICE(0x13D3,0x3247)}, /* AzureWave */	\
	{USB_DEVICE(0x083A,0x6618)}, /* Accton */		\
	{USB_DEVICE(0x15c5,0x0008)}, /* Amit */			\
	{USB_DEVICE(0x0E66,0x0001)}, /* Hawking */		\
	{USB_DEVICE(0x0E66,0x0003)}, /* Hawking */		\
	{USB_DEVICE(0x129B,0x1828)}, /* Siemens */		\
	{NULL}	\
}
```

STEP 2:

- navigate to /os/linux/rt_main_dev.c and replace static NDIS_STATUS rt_ieee80211_if_setup(struct net_device *dev, PRTMP_ADAPTER pAd) function with



```
static NDIS_STATUS rt_ieee80211_if_setup(struct net_device *dev, PRTMP_ADAPTER pAd)
{
	NDIS_STATUS Status;
	INT     i=0;
	CHAR    slot_name[IFNAMSIZ];
	struct net_device   *device;


	//ether_setup(dev);
	dev->hard_start_xmit = rt28xx_send_packets;
//	dev->set_multicast_list = ieee80211_set_multicast_list;
//	dev->change_mtu = ieee80211_change_mtu;
#ifdef CONFIG_STA_SUPPORT
#if WIRELESS_EXT >= 12
	dev->wireless_handlers = &rt28xx_iw_handler_def;
#if WIRELESS_EXT < 21
    dev->get_wireless_stats = rt28xx_get_wireless_stats;
#else
	dev->get_stats = rt28xx_get_wireless_stats;
#endif
#endif //WIRELESS_EXT >= 12
#endif // CONFIG_STA_SUPPORT //
	dev->open = rt28xx_open;
	dev->stop = rt28xx_close;
//	dev->uninit = ieee80211_if_reinit;
//	dev->destructor = ieee80211_if_free;
	dev->priv_flags = INT_MAIN;
	dev->do_ioctl = rt28xx_ioctl;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
	dev->validate_addr = NULL;
#endif


	// find available device name
	for (i = 0; i < 8; i++)
	{
#ifdef MULTIPLE_CARD_SUPPORT
		if (pAd->MC_RowID >= 0)
			sprintf(slot_name, "ra%02d-%d", pAd->MC_RowID, i);
		else
#endif // MULTIPLE_CARD_SUPPORT //
		sprintf(slot_name, "ra%d", i);
	    
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
		device = dev_get_by_name(dev->nd_net, slot_name);
#else
		device = dev_get_by_name(slot_name);
#endif
		if (device != NULL) dev_put(device);
#else
		for (device = dev_base; device != NULL; device = device->next)
		{
			if (strncmp(device->name, slot_name, 4) == 0)
				break;
		}
#endif
		if(device == NULL)  
			break;
	}
	
	if(i == 8)
	{
		DBGPRINT(RT_DEBUG_ERROR, ("No available slot name\n"));
		Status = NDIS_STATUS_FAILURE;
	} 
	else 
	{
#ifdef MULTIPLE_CARD_SUPPORT
		if (pAd->MC_RowID >= 0)
	        sprintf(dev->name, "ra%02d-%d", pAd->MC_RowID, i);
		else
#endif // MULTIPLE_CARD_SUPPORT //
		sprintf(dev->name, "ra%d", i);
		DBGPRINT(RT_DEBUG_INFO, ("Assign the net device name as %s\n", dev->name));
		Status = NDIS_STATUS_SUCCESS;
	}

	return Status;
	
}
```

STEP 3:

- navigate to /usr/src/linux-headers-2.6.24-16/include/linux/module.h and add #define SET_MODULE_OWNER(dev) do { } while (0) just above #endif /* _LINUX_MODULE_H */

STEP 4:

- navigate back to the drivers root
-make || make install
-cp RT2870STA.dat  /etc/Wireless/RT2870STA/RT2870STA.dat

STEP 5:

- navigate to /os/linux
- $/sbin/insmod rt2870sta.ko
- $/sbin/ifconfig ra0 inet YOUR_IP up

I recommend removing/commenting the addition to module.h after installing the driver.

Enjoy. I have only tested this connecting without no encryption so I have no idea if encryption will work. If anyone feels like taking the time to create a script or patch then please do so  :Smile:  Hope it works for you all.

pandapanda

----------


## negora

You're my hero LOL. This issue has made me get desperated. I've been using ndiswrapper and the Vista 64 driver this afternoon, until Ralink answered me (I know they sent a patch to some people who asked), but the result has been a disaster: Some times wpa_supplicant worked... Others, the more, this wasn't able to get associated to my AP. I guess that ndiswrapper doesn't handle this Vista 64 driver very well.

I'm just going to try your solution, using WPA-CCMP and publish my results.

----------


## pandapanda

You will have to restart network to get it associated with network manager. I did this via GUI by right clicking the network manager -> enable networking and once more network manager -> enable network. I believe ifconfig ra0 up will also do the trick - just copied $/sbin/ifconfig ra0 inet YOUR_IP up from the readme  :Razz:

----------


## negora

You've done my day!!!  :Very Happy:  I've followed your steps and it worked perfectly! At the beginning I did a stupid mistake, as I was so impatient and happy, that at the Step 3, I simply copied and pasted all the text, with your instruction "just above #endif /* _LINUX_MODULE_H */" included, ha ha ha. But checking the code carefully I realized about it. Ouch!  :Capital Razz: 

Well, I've a Dlink DWA-140 wireless adaptor and a Dlink DSL-2740B router, configured both to work using WPA2-PSK, and it works flawless, like it did on Ubuntu v. 7.10.

Many many many thanks pandapanda. I really appreciate your help, since this issue was driving me crazy and these people from Ralink, according to some opinions on the Internet, maybe took many days to answer.

Now, every time I see a piece of bamboo, I'll remind that you helped me, he he he. Nah, seriously, many thanks for this great guide  :Wink:  .

----------


## negora

Ops, by the way, maybe I give a second opportunity to the Network Manager, because I HATE this. Maybe it's because I only have used this for WiFi connections, but it never worked properly for me :/ . Everytime I've tested Ubuntu/Kubuntu have ended using Kwlan or none, configuring "/etc/networks" by hand  :Wink:  .

----------


## matthew.kent

Thank you for these instructions! I've moved these changes into an easy to apply patch and attached it here. 

Be sure to backup any existing /etc/Wireless/RT2870STA as the make install (stupidly) rm -rf's it. 

Here's the simplified instructions:


```
wget http://www.ralinktech.com.tw/data/drivers/2007_1220_RT2870_Linux_STA_v1.2.1.0.tar.bz2
tar jxf 2007_1220_RT2870_Linux_STA_v1.2.1.0.tar.bz2
gzip -d rt2870-v1.2.1.0_2.6.24.patch.gz
patch -p0 < rt2870-v1.2.1.0_2.6.24.patch
cd 2007_1220_RT2870_Linux_STA_v1.2.1.0
make && sudo make install
```

Slight addendum: attaching a modified version of the previous patch which disables the insane amount of debug being printed to the kernel ring buffer.

All working great with my Asus WL-160N.

----------


## pandapanda

Thank you for taking the time to put the instructions into a patch.  It appears that you have chosen to define the deprecated SET_MODULE_OWNER locally in the driver's source which is probably safest for inexperienced users, however, experienced users may wish to compile multiple drivers that made use of the macro and in this case it would be more efficient to add to <linux/module.h>. I believe that many other wireless drivers that are no longer compiling with 2.6.24 (due to similar cause) can be made to work using the same principle of this patch.

----------


## El-Doble-O

I executed the last line: "make && sudo make install" and this is what I got

_make -C tools
make[1]: Entering directory `/home/myloginname/2007_1220_RT2870_Linux_STA_v1.2.1.0/tools'
gcc -g bin2h.c -o bin2h
bin2h.c:28:19: error: stdio.h: No such file or directory
bin2h.c:29:20: error: string.h: No such file or directory
bin2h.c:30:20: error: stdlib.h: No such file or directory
bin2h.c: In function ‘main’:
bin2h.c:34: error: ‘FILE’ undeclared (first use in this function)
bin2h.c:34: error: (Each undeclared identifier is reported only once
bin2h.c:34: error: for each function it appears in.)
bin2h.c:34: error: ‘infile’ undeclared (first use in this function)
bin2h.c:34: error: ‘outfile’ undeclared (first use in this function)
bin2h.c:42: warning: incompatible implicit declaration of built-in function ‘memset’
bin2h.c:49: warning: incompatible implicit declaration of built-in function ‘printf’
bin2h.c:54: warning: incompatible implicit declaration of built-in function ‘printf’
bin2h.c:57: warning: incompatible implicit declaration of built-in function ‘strcat’
bin2h.c:69: error: expected expression before ‘)’ token
bin2h.c:71: warning: incompatible implicit declaration of built-in function ‘printf’
bin2h.c:76: error: expected expression before ‘)’ token
bin2h.c:78: warning: incompatible implicit declaration of built-in function ‘printf’
bin2h.c:146: warning: incompatible implicit declaration of built-in function ‘sprintf’
bin2h.c:155: warning: incompatible implicit declaration of built-in function ‘exit’
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/myloginname/2007_1220_RT2870_Linux_STA_v1.2.1.0/tools'
make: *** [build_tools] Error 2_

----------


## CMasami

El-Doble-O,

You have to install header and library files to build any C/C++ programs.
The simplest way is:
$ sudo apt-get install build-essential

----------


## Jackie999

I'm extremely wet behind the ears here..only having used linux for a few days.  I'll try and lay out my question so it makes sense.
I followed the above steps (learnt a lot along the way) and *think* I'm almost there....BUT...my Belkin F5D8053 wireless adapter still shows as ndiswrapper - here is my lshw -C network output:


```
 *-network
       description: Wireless interface
       physical id: 1
       logical name: wlan0
       serial: 00:1c:df:31:66:5b
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=ndiswrapper+rt2870 driverversion=1.52+Arcadyan Technology Corpora ip=192.168.0.101 multicast=yes wireless=IEEE 802.11g
```

My etc/network/interfaces shows 


```
auto lo
iface lo inet loopback
```

So my question..how do I know I followed instructions and it worked..and how do I make it load and the ndiswrapper not load?
Thanks very much..these forums and support staff are invaluable  :Smile:

----------


## arrrghhh

I just installed 9.10 beta, and I have a card that uses the RT2870 chipset...and I can't get it to work at all.  I am able to get it to list networks now, but it'll never connect - and it certainly doesn't list all available networks, my laptop using a 2200bg card shows many more networks.  Sometimes even the AP right next to me doesn't show up, but some very weak neighbor's network shows.  I've tried turning off WPA2 on my router, and it doesn't make a difference...

So I'm assuming it's the kernel that's being used... I don't know how to fix it tho.  Does this fix apply to the 2.6.31 kernel as well, or has the method for patching to make this driver work changed?  Blacklisting the rt2800 driver was what I think made the card at least show some networks in network-manager, but wicd does the same thing - only shows a few networks, sometimes not even mine, and won't connect to anything.

I appreciate any assistance/experience people have with the new version of Ubuntu!  I was really hoping 9.10 would work with this card w/o any fuss... c'est la vie.

----------


## nickmcg

> I just installed 9.10 beta, and I have a card that uses the RT2870 chipset...and I can't get it to work at all.  I am able to get it to list networks now, but it'll never connect - and it certainly doesn't list all available networks, my laptop using a 2200bg card shows many more networks.  Sometimes even the AP right next to me doesn't show up, but some very weak neighbor's network shows.  I've tried turning off WPA2 on my router, and it doesn't make a difference...
> 
> So I'm assuming it's the kernel that's being used... I don't know how to fix it tho.  Does this fix apply to the 2.6.31 kernel as well, or has the method for patching to make this driver work changed?  Blacklisting the rt2800 driver was what I think made the card at least show some networks in network-manager, but wicd does the same thing - only shows a few networks, sometimes not even mine, and won't connect to anything.
> 
> I appreciate any assistance/experience people have with the new version of Ubuntu!  I was really hoping 9.10 would work with this card w/o any fuss... c'est la vie.


The only work-round I've found is to add the line 

```
blacklist rt2800usb
```

 in the file /etc/modprobe.d/blacklist.conf

HTH

Nick

----------


## OliW

> The only work-round I've found is to add the line 
> 
> ```
> blacklist rt2800usb
> ```
> 
>  in the file /etc/modprobe.d/blacklist.conf


Just bought two of these (should really do the research first, eh?!) and I'm on karmic.

Do I just need to blacklist or do I need to do other things (ie, the rest of the thread) too?


Edit: I've no idea why this worked, but I just ran 

```
sudo rmmod rt2800usb
```

 and replugged the dongle and it works. That's magic! No idea which driver it's using now...

----------


## freek_zero

Had my WUSB600N working fine until I got the kernel update to 2.6.28-16 a few days ago. Upon booting the new kernel I rebuilt the rt2870usb driver from Ralink as I have to every time... but this time, it doesn't work. Symptoms are same I've read in this thread and others before: scans fine, see the network(s), connects to the network, but doesn't get an IPv4 address. Rebooting to the -15 kernel works fine.

Anyone been able to get this to work with 2.6.28-16?

----------


## nickmcg

> Just bought two of these (should really do the research first, eh?!) and I'm on karmic.
> 
> Do I just need to blacklist or do I need to do other things (ie, the rest of the thread) too?
> 
> 
> Edit: I've no idea why this worked, but I just ran 
> 
> ```
> sudo rmmod rt2800usb
> ...


All you need to do is blacklist - that just prevents rt2800usb loading, rmmod simply unloads the module if it's loaded.

----------


## cufflinks

> The only work-round I've found is to add the line 
> 
> ```
> blacklist rt2800usb
> ```
> 
>  in the file /etc/modprobe.d/blacklist.conf
> 
> HTH
> ...


Thank you Oh-So-Kindly... I was going nuts trying to figure out why my wireless card which worked with 9.04 isn't working anymore.  I'm actually not sure why that even worked, seeing as that should be the driver that works with my card.  I had even downloaded the driver from RaLink only to find it won't compile with 2.6.3 kernels!  I almost considered going back to 9.04... or maybe the bridged connection I've setup on the laptop to try and get the wireless on this desktop back up isn't so bad  :Capital Razz: 

Anyways... hopefully others with the same problem will find your post more quickly.

----------


## freek_zero

Just upgraded to 9.10 (kernel 2.6.31-15) and the issue persists, except now I can't simply select an older kernel to get it to work. Had to apply a .31-specific patch to get the driver to build. Blacklisting rt2800usb just gets me back to where i was in 28-16, which is a solid connection but no IPv4 address (ifconfig showed an IPv6 address until I disabled IPv6). dhclient reports no dhcp offers received.

----------


## GepettoBR

In Karmic I no longer have to compile the driver. All it takes is blacklisting rt2800usb and running "modprobe rt2870sta" once. After that , my device was automatically recognized at every boot. Which is great, since I can no longer compile the driver provided by Ralink due to a mess of gcc errors.

----------


## freek_zero

Compiling ralink driver requires a patch for the 2.6.31 kernel. It compiled fine for me after that (but still didn't work).

When you say it is recognized at every boot... what _exactly_ do you mean by that? You mean you boot, login, and networkmanager connects? Or do you mean as soon as you boot (before you log in) it already connects? The latter is how I've had it set up till now (doesn't use networkmanager).

And you using WPA? WPA2? open?

----------


## freek_zero

Several hours later, the only way I can get this to work is using the version of rt2870sta provided with 9.10 (which I believe is v1.4 from RaLink). Doesn't provide 5GHz access however.

----------


## GepettoBR

> Compiling ralink driver requires a patch for the 2.6.31 kernel. It compiled fine for me after that (but still didn't work).
> 
> When you say it is recognized at every boot... what _exactly_ do you mean by that? You mean you boot, login, and networkmanager connects? Or do you mean as soon as you boot (before you log in) it already connects? The latter is how I've had it set up till now (doesn't use networkmanager).
> 
> And you using WPA? WPA2? open?


I mean the first option. I'm using WPA2 encryption.

----------


## jh55chn

Freeze, try this one, maybe it helps.

  	 	 	 	 	 	  Wireless usb : Asus USB-N11
 Chip : Ralink rt2870
 Dual OS : Vista + karmic (via Wubi)  


To make your wireless dectectable. 

Important : Don't plug the usb before going thru the steps.


 Step 0 : At terminal, aaa@ubuntu:~$ sudo gedit /etc/modprobe.d/blacklist.conf
 	 Add blacklist rt2800usb without quote at the end of the file, then save it.


 Step 1 : Download the latest rt2870 driver ( 2009_0820_RT2870_Linux_STA_V2.2.0.0.tar.bz2 )  from Ralink.


 Step 2 : Untar the file and save to your home folder, and name it (my folder is rt2870).


 Step 3 : Don't plug your wireless usb at this moment, at terminal aaa@ubuntu:~$ type lsusb.


 Step 4 : Now plug in your wireless usb to the computer, type lsusb again, you will find your wireless usb ID (8 digits). Write it down, and unplug the usb.


 Step 5 : At aaa@ubuntu:~/rt2870/os/linux$, sudo gedit usb_main_dev.c, check your usb device is included, if not, add your wireless usb ID. Save the file.  It is quite interesting for my asus usb ID, I have to add two lines.
	{USB_DEVICE(0x0B05,0x1761)}, /* Asus */
	{USB_DEVICE(0x1761,0x0B05)}, /* Asus */



Step 6 : At same terminal , sudo gedit config.mk, and change two settings.
# Support Wpa_Supplicant  
	HAS_WPA_SUPPLICANT=n → y  


	# Support Native WpaSupplicant for Network Maganger  
	HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n → y


 Step 7 : At aaa@ubuntu:~/rt2870$, sudo gedit Makefile, check the folllowing at the top of the file:
RT28xx_MODE = STA
	TARGET = LINUX
	CHIPSET = 2870


 	If ok, close the file. If not, change the setting as above.


 Step 8: rt2870 2.2.00 version do not support kernel 2.6.31-14-generic, so you have to do a patch.
 Googling RT2870-2.6.31.patch, download it to rt2870 folder, then do the patch.  If you get a message of unable to patch, then download  and install Patch_2.5.9-5_amd64.deb.  You will then able to patch RT2870-2.6.31.patch
 	At aaa@ubuntu:~/rt2870$ patch -p1 < rt2870-2.6.31.patch


 Step 9 : At aaa@ubuntu:~/rt2870$, do the compilation.
 	sudo make uninstall
 	sudo make clean
 	sudo make
 	sudo make install


 Step 10 : At aaa@ubuntu~$ sudo gedit /etc/rc.local, add following two lines prior to exit0.
 	 ifconfig ra0 up
 	pkill NetworkManager


 	save it, then at same terminal, sudo gedit /etc/modules, add rt2870sta, then save the file.


 Step 11 : Now turn off your PC, plug in the usb, and restart.


 Step 12 : Now configure networkmanager, use wep instead of wpa-psk or wpa2-psk.  Your wireless will be detected ,and be able to connect to the internet.  


 p.s. I just upgrade to kernel 2.6.31-15-generic, and only to do step 9. the wireless still works. ( don't forget to unplug the usb before doing the compilation)

----------


## SpiderTex

I'm stumped...
modprobe rt2870stq

when checking log:
rtusb init -->
usbcore: registered new interface driver rt2870

ifconfig however doesn't show ra0 ..  just the usual suspects eth0 l0 and wlan0

already tried without my pci wlan card...  nothing..

I do have a new WUSR600n   any gotchas there?

many thx

----------


## SpiderTex

> Freeze, try this one, maybe it helps.
> 
>                                  Wireless usb : Asus USB-N11
>  Chip : Ralink rt2870
>  Dual OS : Vista + karmic (via Wubi)  
> 
> 
> To make your wireless dectectable. 
> 
> ...


followed step by step...

my wusb600n is still not visible.

Note: I did had to add 1737:0079 to the usb_main_dev.c file

apparently the "old" wusb600n had a different identifier

* checking dmesg | grep rt2 shows
rt2870sta: module is from the staging directory.....
usbcore: registered new interface driver rt2870

----------


## freek_zero

SpiderTex, you have WUSB600n v2, which doesn't seem to be supported at all (so far). There is a discussion going on here: WUSB600n v2

----------


## SpiderTex

> SpiderTex, you have WUSB600n v2, which doesn't seem to be supported at all (so far). There is a discussion going on here: WUSB600n v2


many thx Freek, will follow there.

----------


## astroorion

Hello I am still having some trouble with my wireless on startup it doesn't see the network the only way I can get it to see it is by unplugging the usb and going to the terminal typing sudo rmmod rt2800usb 
I need to know how to blacklist it to get the card to recognize the network on startup can someone help me.
thank You

----------


## astroorion

Never mind I figured it out  :Wink:

----------


## kleeman

Thanks jh55chn. Worked for me on two machines (64bit and 32bit) with wpa2 encryption. The blacklist of rt2800usb caused it to partially work in that certain APs were not visible. The recompile of the module with the patch meant I now can see and connect to all APs.
My usb connector is a D-link DWA-140

Ubuntu works for me.  :Popcorn:  :Very Happy:  :Very Happy:

----------


## crich

Reading all the great help on this topic.  :Very Happy: 

I just got a Engenius 9703 USB adapter. Very small and very cheap ($20). 

I blacklisted the rt2800usb driver and can now see my (and other networks) but I cannot attach. I see periodic (every few seconds) logs about scanning channel 1 (doesn't seem to use any other channel). I also saw a RT2870STA.dat file error message.

I'd like to try the steps to compile the RT driver, but I can't find the tar file at any of the sites (ralink or serialmonkey). Google didn't turn up any alternatives either.

Can someone send it or tell me where I can find it?


I am on the 2.6.31-16-generic kernel.

Thanks.

----------


## crich

> Reading all the great help on this topic. 
> 
> I just got a Engenius 9703 USB adapter. Very small and very cheap ($20). 
> 
> I blacklisted the rt2800usb driver and can now see my (and other networks) but I cannot attach. I see periodic (every few seconds) logs about scanning channel 1 (doesn't seem to use any other channel). I also saw a RT2870STA.dat file error message.
> 
> I'd like to try the steps to compile the RT driver, but I can't find the tar file at any of the sites (ralink or serialmonkey). Google didn't turn up any alternatives either.
> 
> Can someone send it or tell me where I can find it?
> ...




OK. I found a RT2870USB version 2.2.0 (http://www.ralinktech.com/license_us...F1TUM1MFlYST1D) and RT2870WebUI version 2.3.0 of the driver (http://www.ralinktech.com/license_us...lNRFE9Qw%3D%3D)

Version 2.3.0 builds and installs fine - but now the device doesn
't seem to even scan. Here are the logs:

Dec 13 14:30:28 firefly kernel: [   24.609400] rt2870sta: module is from the staging directory, the quality is unknown, you have been warned.
Dec 13 14:30:28 firefly kernel: [   24.629871] rtusb init --->
Dec 13 14:30:28 firefly kernel: [   24.629957] usbcore: registered new interface driver rt2870

Those are the only logs for the device or interface - network manager doesn't seem to even see the device - even after a reboot.

Version 2.2.0 wont compile. Looks like I need to apply the patch mentioned in a previous post. 

My question is: should I be using the 2.3.0 version anyway for the 2.6.31 kernel and trying to figure out why it's not working?

Thanks.
Chris.

----------


## aextance

I don't know whether anyone is still following this thread, but what the hell, here goes. 

crich - I'm not sure you really *need* the Ralink drivers anymore. I used to follow the instructions on this thread and use either no, or WEP encryption. I then tried to upgrade to WPA2 encryption, and the old Ralink drivers that I used didn't support it. However, using the approach at the link below has worked with WPA2, off and on, and I suspect it will be useful for unencrypted or WEP also.

http://art.ubuntuforums.org/showthread.php?t=1342593

Why don't you give it a go? Peepingtom is clearly very responsive.

I'm really curious to hear whether GepettoBR can tell us how he got his WPA working so smooth. There is a bug in the network manager which is being worked on to help with this for the RT2870 and other chipsets, but I would welcome any tips for improving WPA2 encryption with the RT2870 in the meantime.

----------


## GepettoBR

> I'm really curious to hear whether GepettoBR can tell us how he got his WPA working so smooth. There is a bug in the network manager which is being worked on to help with this for the RT2870 and other chipsets, but I would welcome any tips for improving WPA2 encryption with the RT2870 in the meantime.


In Karmic, I just blacklisted the rt2800usb module and then manually loaded the rt2870sta module already supplied with the default kernel. After manually loading it once, it was automatically loaded whenever I plugged in my device or turned on th PC with it already plugged in. My home network uses WPA2 encryption, and it connected without a hitch.

----------


## aextance

Oh - with the "modprobe rt2870sta"? I thought there might be more to it than that. 

Still mine does generally connect eventually. I wonder why it doesn't run as smoothly?

----------


## GepettoBR

> Oh - with the "modprobe rt2870sta"? I thought there might be more to it than that. 
> 
> Still mine does generally connect eventually. I wonder why it doesn't run as smoothly?


Yes, just that. I don't know why you'd have trouble connecting.

----------


## aextance

Just out of interest, what do you get when you run lshw -C network in a terminal, Gepetto? I don't think my device is loading a driver, there's nothing saying "driver=" next to the configuration entry when I run this.

----------


## GepettoBR

> Just out of interest, what do you get when you run lshw -C network in a terminal, Gepetto? I don't think my device is loading a driver, there's nothing saying "driver=" next to the configuration entry when I run this.


Here's the relevant section of the output: 

```
 *-network:0
       description: Wireless interface
       physical id: 1
       logical name: ra0
       serial: 00:1c:f0:9d:ac:5f
       capabilities: ethernet physical wireless
       configuration: broadcast=yes ip=192.168.0.101 multicast=yes wireless=RT2870 Wireless
```

----------


## info@tacowitte.nl

> Oh - with the "modprobe rt2870sta"? I thought there might be more to it than that. 
> 
> Still mine does generally connect eventually. I wonder why it doesn't run as smoothly?


I just installed 10.04 on a computer that uses this wireless network adapter. It didn't connect either. Blacklisting rt2800usb solved the problem. Now it connects without any problem.

It would be nice if the rt2800usb module would somehow be blacklisted in the next release so it works out of the box.

----------

