The Linux Community Forum

Support => Hardware Compatibility => Topic started by: Mark Greaves (PCNetSpec) on April 10, 2010, 01:44:57 pm

Title: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on April 10, 2010, 01:44:57 pm
BE AWARE
For kernels >= 2.6.35 make sure you read the the EDIT.

If you want to know which kernel you are using, open a terminal and enter:
Code: [Select]
uname -r
(if it's greater than, or equal to 2.6.35, be sure to follow the instructions in the EDIT.



In Ubuntu 9.10 (Karmic), Ubuntu 10.04 (Lucid), and Ubuntu 10.10 (Maverick) there is an issue with USB Wireless N adapters based on the Ralink RT2870 chip.
The issue seems to be that 2 (conflicting?) driver modules are loaded... rt2870sta and rt2800usb... resulting in no wireless access.

The solution is to blacklist the rt2800usb module if it is loaded.

To see if they are both loaded, enter this in a terminal:
Code: [Select]
sudo lsmod | grep rt28
if they are both loaded, blacklist the rt2800usb module by opening the /etc/modprobe.d/blacklist.conf file (as root)
Code: [Select]
sudo gedit /etc/modprobe.d/blacklist.conf

and add the line:

blacklist rt2800usb

then save the file and reboot.

If after rebooting you can now 'see' the network, but it will not accept a WPA key (WEP seems fine)... you need to recompile the driver with WPA support... the driver can be found here:

2010_0709_RT2870_Linux_STA_v2.4.0.1.tar.bz2 (http://eng.ralinktech.com.tw/license_us.php?n=2&p=0&t=U0wyRnpjMlYwY3k4eU1ERXdMekEzTHpBNUwyUnZkMjVzYjJGa05ETTVOalU0TXpVeU5pNWllakk5UFQweU1ERXdYekEzTURsZlVsUXlPRGN3WDB4cGJuVjRYMU5VUVY5Mk1pNDBMakF1TVM1MFlYST1D) (you can enter 'any' name and email)
or
Ralink Linux Driver Page (http://eng.ralinktech.com.tw/en/Products/support.php?sn=501)
(HINT - change the files extension to tar.gz before unpacking... for some reason it comes up as an invalid bz2 archive, but unpacks properly as a tar.gz)

Before compiling - you are going to need to install build-essential, and linux-headers-generic.
Code: [Select]
sudo apt-get update && sudo apt-get install build-essential linux-headers-generic

If you use WPA/WPA2 encryption, you will have to change the lines
HAS_WPA_SUPPLICANT=n
and
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n

in:
/os/linux/config.mk
(inside the unpacked driver)

to
HAS_WPA_SUPPLICANT=y
and
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y

Once you have changed these to =y and saved the config.mk file...

[EDIT]
Newer kernels >= 2.6.35 will fail to compile (make) the driver because the driver makes use of the functions usb_buffer_alloc() and usb_buffer_free() which were renamed in kernel 2.6.35 .. so if during the next (make && make install) step it fails with this error:

Quote
make[2]: *** [/home/mark/Desktop/RT2870/os/linux/../../common/cmm_mac_usb.o] Error 1
make[1]: *** [_module_/home/mark/Desktop/RT2870/os/linux] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.35-27-generic'
make: *** [LINUX] Error 2

or similar.

The fix is to cd to the driver source directory (eg. 2010_0709_RT2870_Linux_STA_v2.4.0.1), and run the following 3 commands which will clean the build directory and replace the old calls with the new ones:

Code: [Select]
make clean
find . -name \*.[ch] -exec grep usb_buffer_alloc "{}" ";" -exec sed -i 's/usb_buffer_alloc/usb_alloc_coherent/g' "{}" ";"
find . -name \*.[ch] -exec grep usb_buffer_free "{}" ";" -exec sed -i 's/usb_buffer_free/usb_free_coherent/g' "{}" ";"
(hitting enter after each line)

Or, I've uploaded a pre-modified version of the driver that WILL compile on kernels >= 2.6.35 here:
2010_0709_RT2870_Linux_STA_v2.4.0.1.tar.bz2 (http://bit.ly/eZHx0J)

Then carry on with the "sudo su" and "make && make install", as per the instructions below.
[END EDIT]

To compile and install, open a terminal and enter:
Code: [Select]
sudo su
make && make install
It is important here not to use "sudo" alone, but "sudo su" because with sudo for some reason the installation script fails to create the necessary files and folders.

Now, while still root modprobe the driver module:
Code: [Select]
modprobe rt2870sta

Give it a minute to create the ra0 device node, and network manager should now be able to display all visible wireless networks in your area, meanwhile you can stop being root.
Code: [Select]
exit

Make sure that ra0 is up and running as it's supposed to:
Code: [Select]
iwconfig

and check for a section similar to:
Quote
ra0 RT2870 Wireless ESSID:"" Nickname:"RT2870STA"
Mode:Managed Frequency=2.412 GHz Access Point:
Bit Rate=54 Mb/s
RTS thr:off Fragment thr:off
Link Quality=100/100 Signal level:-29 dBm Noise level:-71 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0


To make sure the module is loaded after a reboot, add it to the /etc/modules file:
Code: [Select]
sudo sh -c 'echo rt2870sta >> /etc/modules'

Your wireless card should now be working (it may require a reboot first)... Use network manager to set your WEP/WPA(2) key, and connect to your network.



Further info can be found at the following URLs:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/460323 (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/460323)

http://www.linuxquestions.org/questions/linux-hardware-18/d-link-dwa-140-802-11n-usb-with-ralink-rt2870-chispet-driver-probs-635827/ (http://www.linuxquestions.org/questions/linux-hardware-18/d-link-dwa-140-802-11n-usb-with-ralink-rt2870-chispet-driver-probs-635827/)

http://swiss.ubuntuforums.org/showthread.php?t=1382798 (http://swiss.ubuntuforums.org/showthread.php?t=1382798)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: ssid on May 05, 2011, 02:35:09 pm
Hi Mark

I have been looking for a solution to this problem for ages on and have tried allsorts with my patchy but growing knowledge of linux.  I am now running xubuntu 11.04 on an ancinet laptop.  The USB wifi unit is recognised in 11.04 without the need for blacklisting and I can see my network but canont login.  On  your modified driver for later kernals do I need to change thge WPA_Supplicant info or have you done that already? I am going to try this tonight.

I must say this is the clearest linux forum that I have come across.

Thanks

SSID

Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on May 05, 2011, 02:46:38 pm
I've NOW changed the WPA settings to Y in the pre-modified driver :)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: jbruce2112 on May 10, 2011, 03:53:13 am
Hi Mark,

Thank you very much for the tip on the compilation error, this certainly saved me quite a bit of trouble.

I'm up and running now (on Natty), but I notice that iwconfig is only reporting 54 Mb/s. As I have an "N" speed router & adapter (and is configured as such), shouldn't I be seeing speeds higher than this?

Thanks again...
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on May 10, 2011, 03:58:43 am
Are there any slower wireless devices connected to the router ?

AFAIK, a mixed mode b/g/n wireless router (or access point) will default to the slowest protocol depending on what devices are connected wirelessly.
(ie. an 802.11n router that supports b/g/n will scale back to 802.11b if a device with only 802.11b capabilities connects to it... slowing ALL other device connections)

You could try changing the (default) configuration:
WirelessMode=5
line in
/etc/Wireless/RT2870STA/RT2870STA.dat

Code: [Select]
sudo gedit /etc/Wireless/RT2870STA/RT2870STA.dat

to
WirelessMode=6
to force a Wireless "N" connection.
(be aware, if there are any slower devices connected to the router this mode may leave you unable to connect)

Some people say setting it to:
WirelessMode=7
or
WirelessMode=9
helps, in mixed mode... ie.dropping support for 802.11b and/or 802.11a

WirelessModes -

     0: legacy 802.11b/g mixed
     1: legacy 802.11b only
     2: legacy 802.11a only
     3: legacy 802.11a/b/g mixed
     4: legacy 802.11g only
     5: 802.11a/b/g/n mixed
     6: 802.11n only
     7: 802.11g/n mixed
     8: 802.11a/n mixed
     9: 802.11b/g/n mixed
   10: 802.11a/g/n mixed

Don't forget to save the RT2870STA.dat file, and restart the wireless (or reboot).

It's all in the README_STA file in the driver archive ;)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Noobuntu on May 14, 2011, 05:47:36 am
Hi,

I recently download Ubuntu 11.04 and created a dual-boot system.  This is my second experience with Linux in general in about 12 years, and so far, so good.  However, I'm trying to get it to connect to the internet and I can't seem to get it to.

I have an AE1000 USB Adapter, and following the step-by-step wizard included with ubuntu for configuring wireless settings got me as far as "Great! Now go to the device drivers page" which just brought me back to the same instruction page I was on.  But it did yield the fact that the chipset within my USB Adapter (which it was able to recognize as being plugged in, if not being able to load some sort of driver for initializing it) was an RT2870. 

I'm a Windows user; I'm used to the command prompts in MS-DOS and the Terminal system is somewhat familiar to me, but I still can't get it to do much of anything.  Is there anyway you could perhaps make it simpler for a complete Noob such as myself to follow your instructions?  I got as far as saving that reworked driver you made to my Linux partition, but I just can't get to it through terminal.  In windows you can change directories via "cd" much as linux does, but I must be getting some critical element of the syntax wrong, because no matter how I vary the spacing, or use "/" versus "\" or including multiple folder files to provide the exact file path name, it always returns a file not found message.  Which is somewhat frustrating.

As soon as I figure out more of the way commands are entered into terminal, I could perhaps piece together the rest of what I need from posts.  In fact, I'm about to google that now, so, if I don't have it *solved* by the time I get a reply, at least my need for simpler instructions won't be as---stringent.  Thank you in advance!
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on May 14, 2011, 02:10:26 pm
Can you confirm you can browse to the file using the nautilus file manager, and where it is ?

If you downoaded it with Firefox (with default settings) it is probably in the "Downloads" directory.

If you can't find it, download it again with these commands:

Code: [Select]
cd ~
wget -O 2010_0709_RT2870_Linux_STA_v2.4.0.1.tar.bz2 "http://bit.ly/eZHx0J"

You with then find the 2010_0709_RT2870_Linux_STA_v2.4.0.1.tar.bz2 file in your "Home" directory.

you can unpack it through the GUI, or with:
Code: [Select]
tar -jxvf 2010_0709_RT2870_Linux_STA_v2.4.0.1.tar.bz2

cd into the unpacked directory:
Code: [Select]
cd ~/2010_0709_RT2870_Linux_STA_v2.4.0.1

then carry on from the:
Code: [Select]
sudo su
make && make install

Extra info...

Just prior to posting this, I've updated the pre-modified driver to also include the WPA/WPA2 modification... so it would probably be a good idea to re-download it anyway.



BTW, the ~ in the above paths just means the current users "Home" directory... it saves you having to type /home/username

If you want to get to grips with the Linux command line, some of these free online books might help -
http://linuxforums.org.uk/ubuntu/ubuntu-andor-generic-linux-books-or-text-()/ (http://linuxforums.org.uk/ubuntu/ubuntu-andor-generic-linux-books-or-text-()/)

If you want to know more about a particular command, you can enter "man" in front  of it to see the commands man page (manual)... eg.
Code: [Select]
man tar
man make
man modprobe
etc.
To exit the man page, just hit the Q key.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Noobuntu on May 16, 2011, 07:49:29 am
I can confirm I can browse to the file using nautilus manager, and it was in the downloads folder.  What was really wrong was the fact I was not including the '~' symbol.  Thank you for the heads-up about that one.

I downloaded your revised driver, accessed it using Terminal and it seemed to throw a couple of memory warnings.  Went to install it again, and it said directories were already created, so I'm not sure if all went well upon download or not. 

However I seem to have run into a snag, in that the 'iwconfig' command still didn't return all of the information that you showed would've been available had all gone well.  It is probably pertinent to mention at this point that I did not follow the edits for blacklisting.  I will do that now, just to say I tried everything.  I was confused, as you mentioned specific versions, and the dimly hopeful feeling in my soul said, "Well, maybe they fixed it in 11.04."  My bad on that one.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on May 16, 2011, 12:57:03 pm
First, let's confirm your card IS an RT2870 based card... can you post the output from:

Code: [Select]
sudo lshw -C network

entered into a terminal.

I can confirm the driver builds and installs properly on 11.04, so I'm guessing something went wrong on your build... and I'm *guessing* (because of your "directories were already created" comment) that the command wasn't run as root... but we'll get to that once you post the output from the above command ;)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Noobuntu on May 17, 2011, 03:19:05 am
I ran that command and it kicked out:

Description: Ethernet Interface
     Product: Netlink BCM 57780 Gigabit Ethernet PCIe
     Vendor: Broadcom Corp
     Physical ID: 0
     Bus Info: . . . . . .  and it all goes on.  This, as you may have guessed is all information related to my onboard network adapter which I can visually confirm is not what connects me to the Internet.  Never has been, never will, and I forgot about it until now.
     I have had to use my windows OS to sign onto the internet and talk with you here, and I've been copy/pasting posts/directions inbetween.  The reason I didn't go much further is because, as I discovered, the disk I've been using was configured by windows as a pseudo-USB device that will let me read off it---but not write to it, at least with Ubuntu.  So I wrote down enough to convey the general impression that this is in fact not my usb device at all..  Since I didn't have another disk. 

     Ubuntu doesn't even seem to recognize that my USB adapter exists.  And I can confirm that I was in root when I ran that program, because it prompts me to enter a password in when I access any sudo commands and will not run until I do.

     Do you know of any off-the-shelf internet adapters that do work with Linux right out of the box? 
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on May 17, 2011, 04:17:48 am
Quote
This, as you may have guessed is all information related to my onboard network adapter which I can visually confirm is not what connects me to the Internet.  Never has been, never will, and I forgot about it until now. I have had to use my windows OS to sign onto the internet

Erm... If you don't have an active internet connection in Ubuntu, this command will have failed:

Code: [Select]
sudo apt-get update && sudo apt-get install build-essential linux-headers-generic

It needs an active internet connection to download/install those files... which would explain why the "make && make install" command  also failed.

So connect with a cable, and try again.



If that doesn't work...

Can you unplug your USB wireless adapter... wait 5 seconds... plug it back in, then run:

Code: [Select]
dmesg | tail -n 15

and post the output.

and the FULL output from:

Code: [Select]
sudo lshw -C network

and

Code: [Select]
lsusb

If you can't mount and write to the windows disk/partition... use a cabled connection to your router, or copy the output to a USB stick.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Noobuntu on May 17, 2011, 05:04:52 am
Okay, I entered 'sudo apt-get update && sudo apt-get install build-essential linux-headers-generic' and here's what linux kicked:
logan@logan-Studio-XPS-8000:~$ sudo apt-get update && sudo apt-get install build-essential linux-headers-generic
[sudo] password for logan:
Ign http://extras.ubuntu.com (http://extras.ubuntu.com) natty InRelease
Ign http://security.ubuntu.com (http://security.ubuntu.com) natty-security InRelease
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty InRelease
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty-updates InRelease             
Hit http://extras.ubuntu.com (http://extras.ubuntu.com) natty Release.gpg                       
Hit http://security.ubuntu.com (http://security.ubuntu.com) natty-security Release.gpg
Hit http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty Release.gpg
Hit http://extras.ubuntu.com (http://extras.ubuntu.com) natty Release     
Hit http://security.ubuntu.com (http://security.ubuntu.com) natty-security Release                 
Hit http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty-updates Release.gpg           
Hit http://extras.ubuntu.com (http://extras.ubuntu.com) natty/main Sources
Hit http://security.ubuntu.com (http://security.ubuntu.com) natty-security/main Sources
Hit http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty Release
Hit http://extras.ubuntu.com (http://extras.ubuntu.com) natty/main amd64 Packages                         
Ign http://extras.ubuntu.com (http://extras.ubuntu.com) natty/main TranslationIndex             
Hit http://security.ubuntu.com (http://security.ubuntu.com) natty-security/restricted Sources     
Hit http://security.ubuntu.com (http://security.ubuntu.com) natty-security/universe Sources       
Hit http://security.ubuntu.com (http://security.ubuntu.com) natty-security/multiverse Sources     
Hit http://security.ubuntu.com (http://security.ubuntu.com) natty-security/main amd64 Packages   
Hit http://security.ubuntu.com (http://security.ubuntu.com) natty-security/restricted amd64 Packages
Hit http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty-updates Release               
Hit http://security.ubuntu.com (http://security.ubuntu.com) natty-security/universe amd64 Packages
Hit http://security.ubuntu.com (http://security.ubuntu.com) natty-security/multiverse amd64 Packages
Ign http://security.ubuntu.com (http://security.ubuntu.com) natty-security/main TranslationIndex 
Ign http://security.ubuntu.com (http://security.ubuntu.com) natty-security/multiverse TranslationIndex
Ign http://security.ubuntu.com (http://security.ubuntu.com) natty-security/restricted TranslationIndex
Hit http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty/main Sources                 
Hit http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty/restricted Sources           
Hit http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty/universe Sources             
Hit http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty/multiverse Sources           
Hit http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty/main amd64 Packages           
Ign http://security.ubuntu.com (http://security.ubuntu.com) natty-security/universe TranslationIndex
Hit http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty/restricted amd64 Packages     
Hit http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty/universe amd64 Packages
Hit http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty/multiverse amd64 Packages
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty/main TranslationIndex
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty/multiverse TranslationIndex   
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty/restricted TranslationIndex   
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty/universe TranslationIndex     
Hit http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty-updates/main Sources         
Hit http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty-updates/restricted Sources   
Hit http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty-updates/universe Sources     
Hit http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty-updates/multiverse Sources   
Hit http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty-updates/main amd64 Packages   
Hit http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty-updates/restricted amd64 Packages
Hit http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty-updates/universe amd64 Packages
Hit http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty-updates/multiverse amd64 Packages
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty-updates/main TranslationIndex
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty-updates/multiverse TranslationIndex
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty-updates/restricted TranslationIndex
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty-updates/universe TranslationIndex
Ign http://extras.ubuntu.com (http://extras.ubuntu.com) natty/main Translation-en_US           
Ign http://extras.ubuntu.com (http://extras.ubuntu.com) natty/main Translation-en               
Ign http://security.ubuntu.com (http://security.ubuntu.com) natty-security/main Translation-en_US
Ign http://security.ubuntu.com (http://security.ubuntu.com) natty-security/main Translation-en
Ign http://security.ubuntu.com (http://security.ubuntu.com) natty-security/multiverse Translation-en_US
Ign http://security.ubuntu.com (http://security.ubuntu.com) natty-security/multiverse Translation-en
Ign http://security.ubuntu.com (http://security.ubuntu.com) natty-security/restricted Translation-en_US
Ign http://security.ubuntu.com (http://security.ubuntu.com) natty-security/restricted Translation-en
Ign http://security.ubuntu.com (http://security.ubuntu.com) natty-security/universe Translation-en_US
Ign http://security.ubuntu.com (http://security.ubuntu.com) natty-security/universe Translation-en
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty/main Translation-en_US
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty/main Translation-en
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty/multiverse Translation-en_US
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty/multiverse Translation-en
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty/restricted Translation-en_US
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty/restricted Translation-en
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty/universe Translation-en_US
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty/universe Translation-en
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty-updates/main Translation-en_US
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty-updates/main Translation-en
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty-updates/multiverse Translation-en_US
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty-updates/multiverse Translation-en
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty-updates/restricted Translation-en_US
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty-updates/restricted Translation-en
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty-updates/universe Translation-en_US
Ign http://us.archive.ubuntu.com (http://us.archive.ubuntu.com) natty-updates/universe Translation-en
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version.
linux-headers-generic is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 84 not upgraded.

Here is the output after reinserting my wireless adapter and entering in 'dmesg | tail -n 15' :
logan@logan-Studio-XPS-8000:~$ dmesg | tail -n 15
[   13.276620] tg3 0000:05:00.0: eth0: Link is up at 100 Mbps, full duplex
[   13.276623] tg3 0000:05:00.0: eth0: Flow control is off for TX and off for RX
[   13.277151] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   13.820860] EXT4-fs (sda5): re-mounted. Opts: errors=remount-ro,commit=0
[   23.649522] eth0: no IPv6 routers present
[   46.751357] CE: hpet5 increased min_delta_ns to 7500 nsec
[   46.751365] CE: hpet5 increased min_delta_ns to 11250 nsec
[   46.751368] hrtimer: interrupt took 2788 ns
[   51.270000] CE: hpet2 increased min_delta_ns to 7500 nsec
[   51.270065] CE: hpet2 increased min_delta_ns to 11250 nsec
[   68.197523] CE: hpet3 increased min_delta_ns to 7500 nsec
[   68.197533] CE: hpet3 increased min_delta_ns to 11250 nsec
[   99.129742] CE: hpet4 increased min_delta_ns to 7500 nsec
[   99.129773] CE: hpet4 increased min_delta_ns to 11250 nsec
[  643.711646] usb 2-1.4: new high speed USB device using ehci_hcd and address 6

Here is the full output of 'sudo lshw -C network' :

logan@logan-Studio-XPS-8000:~$ sudo lshw -C network
  *-network               
       description: Ethernet interface
       product: NetLink BCM57780 Gigabit Ethernet PCIe
       vendor: Broadcom Corporation
       physical id: 0
       bus info: pci@0000:05:00.0
       logical name: eth0
       version: 01
       serial: 00:25:64:e5:04:60
       size: 100Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.116 duplex=full firmware=sb v2.05 ip=192.168.2.2 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
       resources: irq:48 memory:fbff0000-fbffffff

[EDIT] : Here's 'lusb' results:

root@logan-Studio-XPS-8000:/home/logan/2010_0709_RT2870_Linux_STA_v2.4.0.1# lsusb
Bus 002 Device 006: ID 13b1:002f Linksys AE1000 v1 802.11n [Ralink RT2870]
Bus 002 Device 005: ID 0461:4d65 Primax Electronics, Ltd
Bus 002 Device 004: ID 0b38:0003 Gear Head
Bus 002 Device 003: ID 18e3:9106 Fitipower Integrated Technology Inc
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@logan-Studio-XPS-8000:/home/logan/2010_0709_RT2870_Linux_STA_v2.4.0.1#


Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on May 17, 2011, 05:14:01 am
[  643.711646] usb 2-1.4: new high speed USB device using ehci_hcd and address 6

This tells us that it is detecting a USB device is being attached, but the system isn't recognising it as a wireless adapter.

you missed the:

Code: [Select]
lsusb

command... hopefully this will give us the vendor and device ID string, so we can find out what the adapter is.

There may also be an issue with your sources.list as you shouldn't be getting those Ign lines

Is this a fresh install of natty, or an upgrade ?
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Noobuntu on May 17, 2011, 05:22:27 am
This is a fresh install.  I'm utterly new to Linux of any sort; the last thing I tried was Redhat 6.0.  :-[

[EDIT] This is also the first time I've ever physically connected to ethernet.  The last hardline I ever had connected to my computer was indeed a regular phone line.  Once we upgraded to something faster, I automatically switched to wireless. . . It goes a whole lot quicker than wireless does.  Think I might just get about 30 feet or so of line and call it good, lol.  Seeing as how the adapter that came with the computer works and all. . . .
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on May 17, 2011, 05:31:02 am
Heh  ;D bit restrictive if it's a laptop though... you'll trip everyone else up.

Can you post the output from:

Code: [Select]
lsusb

with the adapter plugged in.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Noobuntu on May 17, 2011, 05:36:27 am
Sorry, I edited my original post that had all the command results, it's at the bottom.

root@logan-Studio-XPS-8000:/home/logan/2010_0709_RT2870_Linux_STA_v2.4.0.1# lsusb
Bus 002 Device 006: ID 13b1:002f Linksys AE1000 v1 802.11n [Ralink RT2870]
Bus 002 Device 005: ID 0461:4d65 Primax Electronics, Ltd
Bus 002 Device 004: ID 0b38:0003 Gear Head
Bus 002 Device 003: ID 18e3:9106 Fitipower Integrated Technology Inc
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


Naw, it's a desktop.  Only laptop I got is a netbook, hehe.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Noobuntu on May 17, 2011, 05:40:02 am
Sorry, I've been trying to just repost it, but for some reason it's not letting me.  But it's at the end of that post that has all the commands in it, as an edit when I realized I mistyped the 'lusb' command.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Noobuntu on May 17, 2011, 05:41:38 am
HAH!  And then they all went through at once. . .  :-[
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on May 17, 2011, 06:07:43 am
OK, I've added your cards ID string to the driver, so you're going to have to download it again...

First delete everything (files and folders) in your home folder that has RT2870 in it's name.

Now download the new driver:
http://dl.dropbox.com/u/11876059/Noobuntu.tar.bz2 (http://dl.dropbox.com/u/11876059/Noobuntu.tar.bz2)

and put it in your home folder.

unpack it with:
Code: [Select]
cd ~
then:
Code: [Select]
tar -xjvf Noobuntu.tar.bz2
change to root:
Code: [Select]
sudo su
cd into the unpacked directory:
Code: [Select]
cd /home/username/2010_0709_RT2870_Linux_STA_v2.4.0.1
(be sure to change the username to YOUR username in the above command)
now build the driver:
Code: [Select]
make
now install it with:
Code: [Select]
make install

Then see what:
Code: [Select]
modprobe rt2870sta
then:
Code: [Select]
exit
then:
Code: [Select]
iwconfig
gives you.



If it works, but doesn't survive a reboot... run this:
Code: [Select]
sudo sh -c 'echo rt2870sta >> /etc/modules'
and reboot again.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Noobuntu on May 17, 2011, 06:19:56 am
Okey dokey, here's what happened when I 'make' -ed it:

(click to show/hide)


Here's what happened when I 'make install' -ed it:

(click to show/hide)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Noobuntu on May 17, 2011, 06:21:38 am
and here's what 'iwconfig' pulled:

logan@logan-Studio-XPS-8000:~$ iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

logan@logan-Studio-XPS-8000:~$
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on May 17, 2011, 06:26:31 am
It got installed, so try rebooting, then post the output from:

Code: [Select]
lsmod
and
Code: [Select]
iwconfig
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Noobuntu on May 17, 2011, 06:30:23 am
Here is 'lsmod' after reboot:

logan@logan-Studio-XPS-8000:~$ lsmod
Module                  Size  Used by
parport_pc             36959  0
ppdev                  17113  0
vesafb                 13761  1
binfmt_misc            17565  1
snd_hda_codec_hdmi     28103  1
snd_hda_codec_realtek   336693  1
joydev                 17606  0
snd_hda_intel          33211  2
psmouse                73535  0
snd_hda_codec         103804  3 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_intel
usbhid                 46956  0
snd_hwdep              13604  1 snd_hda_codec
hid                    91020  1 usbhid
snd_pcm                96625  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
dcdbas                 14438  0
snd_seq_midi           13324  0
snd_rawmidi            30486  1 snd_seq_midi
snd_seq_midi_event     14899  1 snd_seq_midi
snd_seq                61621  2 snd_seq_midi,snd_seq_midi_event
snd_timer              29602  2 snd_pcm,snd_seq
snd_seq_device         14462  3 snd_seq_midi,snd_rawmidi,snd_seq
serio_raw              13166  0
fglrx                2739144  126
snd                    67382  14 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore              12680  1 snd
snd_page_alloc         18529  2 snd_hda_intel,snd_pcm
rt2870sta             450556  0
crc_ccitt              12667  1 rt2870sta
lp                     17825  0
parport                46458  3 parport_pc,ppdev,lp
usb_storage            53538  0
uas                    17996  0
tg3                   141750  0
firewire_ohci          40370  0
firewire_core          62646  1 firewire_ohci
crc_itu_t              12707  1 firewire_core

And here is 'iwconfig' after reboot:

logan@logan-Studio-XPS-8000:~$ iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

logan@logan-Studio-XPS-8000:~$
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on May 17, 2011, 06:38:32 am
I think I've found the problem... even though your card identifies itself as an RT2870, it needs the RT3572 driver...

did you enter this command ?
sudo sh -c 'echo rt2870sta >> /etc/modules'

if so, run this:
Code: [Select]
sudo gedit /etc/modules

find the line that reads
rt2870sta
and remove it... then SAVE the file and exit.

I'm going to go get the correct driver and modify it... back in a bit with instructions.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Noobuntu on May 17, 2011, 06:44:51 am
I did enter the 'sudo sh -c 'echo rt2870sta >> /etc/modules'' command, but then I rebooted.  Then I entered the 'sudo gedit /etc/modules' command and a window opened up with 5 lines that read 'rt2870sta' but the terminal yielded and interesting error:

logan@logan-Studio-XPS-8000:~$ cd /home/logan/2010_0709_RT2870_Linux_STA_v2.4.0.1
logan@logan-Studio-XPS-8000:~/2010_0709_RT2870_Linux_STA_v2.4.0.1$ sudo gedit /etc/modules
[sudo] password for logan:

(gedit:1738): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.PPI0VV': No such file or directory

(gedit:1738): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on May 17, 2011, 07:00:20 am
ignore those errors... just remove the line when gedit opens
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on May 17, 2011, 07:06:52 am
Download THIS file and put it in your home folder:
http://dl.dropbox.com/u/11876059/2011_0427_RT3572_Linux_STA_v2.5.0.0.tar.bz2 (http://dl.dropbox.com/u/11876059/2011_0427_RT3572_Linux_STA_v2.5.0.0.tar.bz2)

unpack it with:
Code: [Select]
cd ~
then:
Code: [Select]
tar -xjvf 2011_0427_RT3572_Linux_STA_v2.5.0.0.tar.bz2
change to root:
Code: [Select]
sudo su
cd into the unpacked directory:
Code: [Select]
cd /home/username/2011_0427_RT3572_Linux_STA_v2.5.0.0
(be sure to change the username to YOUR username in the above command)
now build the driver:
Code: [Select]
make
now install it with:
Code: [Select]
make install

Then see what:
Code: [Select]
modprobe rt3572sta
then:
Code: [Select]
exit
then:
Code: [Select]
iwconfig
gives you.



If and ONLY if it works, but doesn't survive a reboot... run this:
Code: [Select]
sudo sh -c 'echo rt3572sta >> /etc/modules'
and reboot again.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Noobuntu on May 17, 2011, 07:29:50 am
okay, this is what happened when I used the 'make' command:

(click to show/hide)
This is what happened when I used the 'make install' command:

(click to show/hide)
This is what happened when I did the 'mod

root@logan-Studio-XPS-8000:/home/logan/2011_0427_RT3572_Linux_STA_v2.5.0.0# modprobe rt3572sta
FATAL: Error inserting rt3572sta (/lib/modules/2.6.38-8-generic/kernel/drivers/net/wireless/rt3572sta.ko): Device or resource busy

And this is what happened when I did the

logan@logan-Studio-XPS-8000:~/2011_0427_RT3572_Linux_STA_v2.5.0.0$ iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.
  Restarting it now.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on May 17, 2011, 07:41:30 am
OK, that one may have been my fault... I put your cards ID string in the wrong place....

One more time...
download this... and put it in your home folder:
http://dl.dropbox.com/u/11876059/RT3572_Linux_STA_v2.5.0.0.tar.bz2 (http://dl.dropbox.com/u/11876059/RT3572_Linux_STA_v2.5.0.0.tar.bz2)

unpack it with:
Code: [Select]
cd ~
then:
Code: [Select]
tar -xjvf RT3572_Linux_STA_v2.5.0.0.tar.bz2
change to root:
Code: [Select]
sudo su
cd into the unpacked directory:
Code: [Select]
cd /home/username/RT3572_Linux_STA_v2.5.0.0
(be sure to change the username to YOUR username in the above command)
now build the driver:
Code: [Select]
make
now install it with:
Code: [Select]
make install

Then see what:
Code: [Select]
modprobe rt3572sta
then:
Code: [Select]
exit
then:
Code: [Select]
iwconfig
gives you.



If and ONLY if it works, but doesn't survive a reboot... run this:
Code: [Select]
sudo sh -c 'echo rt3572sta >> /etc/modules'
and reboot again.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Noobuntu on May 17, 2011, 07:46:11 am
Mr. Greaves,

i *am* talking to you via a wireless internet connection.  It didn't survive the reboot, so I ran that command, rebooted again, whereupon a strange and miraculous thing occurred; it started giving me wireless options in the network manager, and after a quick reboot of my ethernet box sitting atop the router, and a quick unplug of the wireless adapter, and a tense, emotionally-charged wait as it finished detecting my network, it gave me access to the World Wide Web.  I am probably gonna sit here and give you several more "applause" clicks over the course of the next couple of days to accurately reflect the number of times you came back to this page and did not give up until it was done.  I truly and sincerely appreciate it, thank you.

Logan

PS --- I think I have passed the point of no return with Linux startup times and am thoroughly enthralled with the operating system now.  I will probably continue to use this operating system for years to come.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on May 17, 2011, 07:53:28 am
:) Glad to be of service, and you're welcome.

Have fun with your shiny new Linux install, and gimme a shout if you need help in the future.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Noobuntu on May 17, 2011, 07:55:41 am
Oh yes, I discovered many, many useful apps for circuit board design, and some neat first-person shooter games, and that was just what I could find in-between posts.  And I will indeed come back here if I need help in the future.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Y0a0bon on May 31, 2011, 04:50:20 pm
Hey! First of all, thank you for your works, Mark! You do a great job!
You described in this post exactly the problem i have so thank you :)
Your pre-modified version works fine, no errors anymore whan compilating but my Wireless adaptaters isn't detected..? With the 10.04, it worked with the rt2870sta v2.2 but in 10.10 it does'nt work!:( I have a Belkin HWNU 300.
May you help me? Thank you!
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on May 31, 2011, 05:05:28 pm
[EDIT] For future readers - This posting is WRONG, see here:
http://linuxforums.org.uk/hardware-compatibility/ralink-rt2870-based-usb-wireless-n-adapters-(ubuntu)/msg52771/#msg52771 (http://linuxforums.org.uk/hardware-compatibility/ralink-rt2870-based-usb-wireless-n-adapters-(ubuntu)/msg52771/#msg52771)

The RTL8192SU drivers *only* apply to the HWNUm-300... The HWNU-300 *does* use the RT2870STA driver.

There is a pre-modified version (with the HWNU-300 ID string added) linked to further down the page. (in post #39)
[END EDIT]

You are using the wrong drivers... the Belkin HWNU 300 and HWNUm-300 appear to use the RTL8192SU chipset.

The RTL8192SU drivers can be downloaded here:
http://www.realtek.com.tw/Downloads/downloadsView.aspx?Langid=1&PNid=21&PFid=48&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true (http://www.realtek.com.tw/Downloads/downloadsView.aspx?Langid=1&PNid=21&PFid=48&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true)

Make sure you get the right ones... about half way down the page.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Y0a0bon on May 31, 2011, 05:07:01 pm
Oh O.o Thank you, wondering why it worked with the RT2870TSTA driver.. I will use this, thank you

EDIT: I've read about that in some forums and it appeared that only the HWNUm-300 worked with the RTL8192SU driver but you're probably right... But now my wireless adaptater works with your pre-modified driver! I just wrote in ./common/rt_dev_id.c  "{USB_DEVICE(0x06f8:0xe030)}, /*HWNU-300/*" to make my wireless adpatater recognized.
Thank you for your driver, if i have a problem i will try the RTL8182SU driver :)
Thank you!
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on May 31, 2011, 05:10:18 pm
Don't thank me YET... I'm only going by what I've spotted online :)

Is this a USB device ?

Can you send the output from:
Code: [Select]
sudo lshw -C network

and

Code: [Select]
lsusb

If it's NOT a USB device, can you also send the output from:
Code: [Select]
lspci -nn
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Y0a0bon on May 31, 2011, 05:26:59 pm
Yes it's a USB adaptater :)
Code: [Select]
sebastien@sebastien-pc1:~$ sudo lshw -C network 
[sudo] password for sebastien:
  *-network               
       description: Ethernet interface
       product: RTL-8139/8139C/8139C+
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: f
       bus info: pci@0000:02:0f.0
       logical name: eth0
       version: 10
       serial: 00:0e:a6:39:81:f4
       size: 10MB/s
       capacity: 100MB/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=8139too driverversion=0.9.28 duplex=half latency=64 link=no maxlatency=64 mingnt=32 multicast=yes port=MII speed=10MB/s
       resources: irq:19 ioport:b400(size=256) memory:feaef400-feaef4ff
  *-network
       description: Wireless interface
       physical id: 1
       logical name: ra0
       serial: 00:08:d3:44:aa:4f
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=RALINK WLAN driverversion=2.4.0.0 ip=192.168.1.5 multicast=yes wireless=Ralink STA
sebastien@sebastien-pc1:~$ lsusb
Bus 005 Device 003: ID 058f:9360 Alcor Micro Corp. 8-in-1 Media Card Reader
Bus 005 Device 002: ID 03f0:040c Hewlett-Packard
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 058f:9254 Alcor Micro Corp. Hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 04f2:0111 Chicony Electronics Co., Ltd KU-9908 Keyboard
Bus 002 Device 002: ID 046d:c040 Logitech, Inc. Corded Tilt-Wheel Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 008: ID 054c:0243 Sony Corp. MicroVault Flash Drive
Bus 001 Device 005: ID 06f8:e030 Guillemot Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I thanked you because it works ;)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on May 31, 2011, 05:33:45 pm
OK, it looks like RT2870STA ARE the correct drivers... give me a bit to add the vendor:device ID strings to the driver, and I'll send you a link.

FORGET the RTL8192SU drivers... they are the WRONG ones.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Y0a0bon on May 31, 2011, 05:41:19 pm
No look at the post #34


EDIT: I've read about that in some forums and it appeared that only the HWNUm-300 worked with the RTL8192SU driver but you're probably right... But now my wireless adaptater works with your pre-modified driver! I just wrote in ./common/rt_dev_id.c  "{USB_DEVICE(0x06f8:0xe030)}, /*HWNU-300/*" to make my wireless adpatater recognized.
Thank you for your driver, if i have a problem i will try the RTL8182SU driver :)
Thank you!

I already do that and it works, thank you for your help tought!;)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on May 31, 2011, 05:51:16 pm
So it's working now ?

Well I've uploaded a driver with a modified rtusb_dev_id.c for your HWNU-300 here:
http://dl.dropbox.com/u/11876059/Y0a0bon_RT2870_Linux_STA_v2.4.0.1.tar.bz2 (http://dl.dropbox.com/u/11876059/Y0a0bon_RT2870_Linux_STA_v2.4.0.1.tar.bz2)
just in case.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Y0a0bon on May 31, 2011, 06:01:48 pm
Thank you :) Yes it's working, i did the same thing as you.
Can I quote you in the contributors of the wiki: http://doc.ubuntu-fr.org/| (http://doc.ubuntu-fr.org/|) (the french community ubuntu documentation)?
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on May 31, 2011, 06:03:00 pm
Feel free :)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Y0a0bon on June 01, 2011, 05:15:49 pm
Great!:) And does your method work on 11.04?
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on June 01, 2011, 05:39:18 pm
The driver will compile/install in 11.04 (after modification), but I'm not sure if the blacklisting of rt2800usb is still necessary.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Y0a0bon on June 01, 2011, 06:10:03 pm
Ok, i will try with and without blacklisting rt2870usb, thank you :)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on June 01, 2011, 06:18:27 pm
Can you let me know if the blacklisting is still required in Natty ?
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 02, 2011, 08:11:23 pm
Hi,
I'm new here. First of all I would like to say you should really change that banner...
Not only this site should be seen by any one using Linux in the UK but it should be seen by anyone in at least Europe.
You're the first site with a recipe that make my wireless USB dongle to display at least some form of life with Ubuntu Maverick.

However it displays not enough of life. If I install the driver like I'm told in this thread. It indeed starts blinking but after that there's trouble.
When typing in a command the server freezes always (except for ls, lsub, lspci and this type of commands). Even typing mc in order to start Midnight Commander results in a freeze.

Fortunately my old 2.6.31 Karmic kernel is still working...

I assume you probably also know an answer for my problem so I'll give you as much details as possible.

System: Ubuntu 10.10
Kernel: 2.6.38-9
Wireless: USB dongle Logilink WL-0049a. According to some fora it requires the RT 3070 driver but on the 2.6.31 kernel it takes RT2870.

I'll attach a dmesg output of one failed run.

Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 02, 2011, 08:54:12 pm
The site is "primarily" aimed at UK users, but everyone is welcome as long as they don't spam :)

With the card plugged in, can you post the output from:
Code: [Select]
lsusb
and
Code: [Select]
sudo lshw -C network
and
Code: [Select]
iwconfig

If the lsusb reports the Device ID as ID 148f:3070 Ralink Technology, Corp .. Then you DO need the RT3070 driver... you can download a pre-modified version here:
http://dl.dropbox.com/u/11876059/2011_0107_RT3070_RT3370_Linux_STA_v2.5.0.1_DPO.tar.bz2 (http://dl.dropbox.com/u/11876059/2011_0107_RT3070_RT3370_Linux_STA_v2.5.0.1_DPO.tar.bz2)
(pre-modified = WPA(2) enabled) the above driver should compile properly in 2.6.38, as long as you have the headers and build-essential installed

If you need help compiling and installing, just ask :)

BTW, Have you installed a later kernel ? .. I wasn't aware Maverick was on 2.6.38, I thought it was on 2.6.35.... Natty is on 2.6.38

also, make sure rt2870sta is NOT blacklisted.

But you *may* have to blacklist rt2800usb
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 02, 2011, 10:24:14 pm
Sure,  I saw the org.uk extension so I guessed that the site was aimed at UK users. But it works for Dutchmen too  ;)
Thanks for replying this soon.

lsusb indeed reports the stick to be a 148f:3070 so apparently it needs the RT 3070 driver but then I don't know why it seems to use the RT 2870 driver in the Karmic kernel according to the lsmod command.
So knowing this, being in possession of a RT 3070 based dongle, I guess my issue is a little bit inappropriate in this thread. But since I started it here it is probably best to leave it here.
In the meantime I've downloaded the driver you've provided. I hope I can test it tomorrow and I will report the results back to you.

You say RT2870 should not be blacklisted. Since I've now installed your version of that driver will it also work if I leave it that way or do I need to revert to the "original" driver?

Concerning the 2.6.38 kernel: Since it's there I apparently have installed it though I can't recall why I did so and when I did that. I'm trying to get that dongle working ever since Lucid so I've tried suggestions from several sites. Recently I've tried an experimental 2.6.39 kernel either but again with no results.

At this moment I can't provide you with the results of sudo lshw -C network and iwconfig because both commands currently result in a system freeze. I can do it in the old Karmic kernel but I guess that doesn't make much sense.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: jamesrl on July 02, 2011, 10:48:36 pm
Hi, I have also recently brought a  RT2870USB adapter but am having difficulty installing under ubuntu 11.4. I have tried making the driver based on the contents of the supplied cd, but am getting the following output:

(click to show/hide)


After completing your instructions, I had no success. I assumed this was related to the warnings in the output. I tried the alternative download you provided and received a slightly different set of warnings:

(click to show/hide)

Are these warnings going to stop the driver from working in there own right, or am I missing something else. As requested on previous posts here are some additional details
root@user-machine:/home/user/Downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1# lsusb
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 145f:013a Trust
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 004: ID 148f:5370 Ralink Technology, Corp.
Bus 002 Device 003: ID 090c:1000 Feiya Technology Corp. Flash Drive
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 03f0:4117 Hewlett-Packard LaserJet 1018
Bus 001 Device 002: ID 04a9:2224 Canon, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
----------------------------------------------------------------------------
sudo lshw -C network


root@user-machine:/home/user/Downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1# sudo lshw -C network
  *-network               
       description: Ethernet interface
       product: RTL8111/8168B PCI Express Gigabit Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: eth1
       version: 02
       serial: ....................
       size: 100Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full ip=000.000.0.00 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
       resources: irq:41 ioport:de00(size=256) memory:fdaff000-fdafffff memory:fdae0000-fdaeffff memory:fda00000-fda0ffff


--------------------------------------------------------------------------
root@user-machine :/home/user/Downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1# iwconfig
lo        no wireless extensions.

eth1      no wireless extensions.

-----------------------------------------------------------------------------
root@user-machine:/home/user/Downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1# dmesg | tail -n 15
[10140.613551] usb 1-4: usbfs: interface 0 claimed by usblp while 'usb' sets config #1
[10170.233955] usblp0: removed
[12723.263619] usb 2-5: USB disconnect, address 2
[12732.236057] usb 2-5: new high speed USB device using ehci_hcd and address 4
[12732.417230] rt5370sta: Unknown symbol usb_alloc_urb (err 0)
[12732.417517] rt5370sta: Unknown symbol usb_free_urb (err 0)
[12732.417988] rt5370sta: Unknown symbol usb_alloc_coherent (err 0)
[12732.418608] rt5370sta: Unknown symbol usb_register_driver (err 0)
[12732.419302] rt5370sta: Unknown symbol usb_put_dev (err 0)
[12732.419551] rt5370sta: Unknown symbol usb_get_dev (err 0)
[12732.419985] rt5370sta: Unknown symbol usb_submit_urb (err 0)
[12732.420653] rt5370sta: Unknown symbol usb_free_coherent (err 0)
[12732.421282] rt5370sta: Unknown symbol usb_control_msg (err 0)
[12732.422034] rt5370sta: Unknown symbol usb_deregister (err 0)
[12732.423008] rt5370sta: Unknown symbol usb_kill_urb (err 0)

What I did notice also when running lsmod  rt2870sta appears twice, I wasnt sure if this was correct.

root@user-machine:/home/user/Downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1# sudo lsmod | grep rt28
rt2870sta             410104  0
crc_ccitt              12595  1 rt2870sta
root@user-machine:/home/user/Downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1#
-----------------------------------------------------------------------


Any help would be much appreciated.

Thanks
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 02, 2011, 10:49:27 pm
@ q7icmfm1x0h609c6xiok

No you don't have to revert to the original rt2870sta... and I don't *suppose* it will hurt to blacklist rt2870sta if it get loaded automatically at boot and interferes with the rt3070sta driver... but I doubt if it will.

You *may* have to modprobe rt3070sta, and add it to /etc/modules if it doesn't survive a reboot.

Earlier drivers rolled rt3070 based cards into the rt2870sta or rt2800usb drivers... there were no specific rt3070sta drivers at the time... so an 'early' rt2870 driver would *probably* work with your card if you could get it to compile.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 02, 2011, 11:01:42 pm
@ jamesrl

You too are using the wrong driver... you need this one:
http://dl.dropbox.com/u/11876059/2011_0407_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.2_DPO.tar.bz2 (http://dl.dropbox.com/u/11876059/2011_0407_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.2_DPO.tar.bz2)

You'll have to modify the commands accordingly, and modprobe rt5370sta

and if necessary add rt5370sta to /etc/modules

The warnings should be nothing to worry about.

and
crc_ccitt              12595  1 rt2870sta
just means crc_ccitt depends on the rt2870 module being loaded

this error in the drivers you first tried:
Quote
WARNING: modpost: missing MODULE_LICENSE() in /home/user/2011_0225_RT5370_RT5372_Linux_STA_V2.5.0.1_DPO/os/linux/rt5370sta.o
see include/linux/module.h for more information

was probably caused by a missing:
MODULE_LICENSE("GPL");
line in usb_main_dev.c ... which leads to the "Unknown symbol" errors you were getting in dmesg... it *should* be fixed in the driver I linked to.

I can't test that it's been fixed though, so you'll have to install the driver and tell me if you're still getting those errors in dmesg, or you get this error when modprobe(ing) rt5370sta:

FATAL: Error inserting rt5370sta (/lib/modules/<your kernel version>/kernel/drivers/net/wireless/rt5370sta.ko): Unknown symbol in module, or unknown parameter (see dmesg)

let me know and I'll add the line and upload the driver for you.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 03, 2011, 05:38:03 pm

If the lsusb reports the Device ID as ID 148f:3070 Ralink Technology, Corp .. Then you DO need the RT3070 driver... you can download a pre-modified version here:
http://dl.dropbox.com/u/11876059/2011_0107_RT3070_RT3370_Linux_STA_v2.5.0.1_DPO.tar.bz2 ([url]http://http://dl.dropbox.com/u/11876059/2011_0107_RT3070_RT3370_Linux_STA_v2.5.0.1_DPO.tar.bz2[/url])
(pre-modified = WPA(2) enabled) the above driver should compile properly in 2.6.38, as long as you have the headers and build-essential installed

also, make sure rt2870sta is NOT blacklisted.

But you *may* have to blacklist rt2800usb


Well, I've tested this and unfortunately it doesn't work out.
- The driver you've provided shows the license warning, but I don't think that 's a problem.
- Make install overwrites the contents of /etc/Wireless/RT2870STA/RT2870STA.dat, while I thought it should operate on /etc/Wireless/RT3070STA/
- According to dmesg (attached) the driver from the staging folder is loaded, but I think that's not the one generated by this package. So I need a more sophisticated method to make the computer ignore that staging folder without deleting it, because I need it as long I can't get the wireless stick to work in a different kernel than 2.6.31.
- Modprobe rt2870sta causes things not to work
- Modprobe rt3070sta results in a message that it couldn't find the module (or driver; I can't remember exactly).

Once again I forgot to perform: sudo lshw -C network and this time I did iwconfig, but that doesn't detect any wireless network.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: jamesrl on July 03, 2011, 09:55:03 pm
Thanks for your quick response.

I have downloaded the driver you supplied, but when I modprobe I received either the following messages

after install
FATAL: Error inserting rt5370sta (/lib/modules/2.6.38-8-generic/kernel/drivers/net/wireless/rt5370sta.ko): Device or resource busy

after restarting pc
 FATAL: Error inserting rt5370sta (/lib/modules/2.6.38-8-generic/kernel/drivers/net/wireless/rt5370sta.ko): Operation not permitted

I have had a scan through of the output from make and cant see any of the problems you mentioned.

The following is the output received with new driver. Thanks again for all your help.

(click to show/hide)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 03, 2011, 09:58:53 pm
@ q7icmfm1x0h609c6xiok

OK try this... install the latest drivers:
http://dl.dropbox.com/u/11876059/2011_0407_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.2_DPO.tar.bz2 (http://dl.dropbox.com/u/11876059/2011_0407_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.2_DPO.tar.bz2)
(get them from the above link, not the ralink page)

make and install them

and make sure NONE of the following are blacklisted

rt2x00lib
rt2800usb
rt2x00usb

BTW, AFAIK, 2.6.38 and 2.6.39 don't contain rt3070sta.ko they use rt2870sta.ko for rt3070 based cards .. so if it IS on your system, it might be a good idea to blacklist rt3070.sta, and modprobe rt2780sta
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 03, 2011, 10:13:43 pm
@ jamesrl

Is Wireless working ?

If not download the drivers again:
http://dl.dropbox.com/u/11876059/2011_0407_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.2_DPO.tar.bz2 (http://dl.dropbox.com/u/11876059/2011_0407_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.2_DPO.tar.bz2)

make && make install again... but MAKE SURE you run make with root privileges

Code: [Select]
sudo su
make && make install

then reboot.

If you wireless doesn't work,, can you send the output from

Code: [Select]
lsusb
and
Code: [Select]
sudo lshw -C network
and
Code: [Select]
iwconfig
and
Code: [Select]
nm-tool
and
Code: [Select]
lsmod
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 03, 2011, 10:22:34 pm
@Mark Greaves:
To whom are you talking now (meaning the 09:58:53 pm post) ? To me (q7icmfm1x0h609c6xiok) or to jamesrl?
Our issues look more or less similar and the drivers you've supplied are more or less identical judging by the filename?
(All right I've noted the edit that post is directed to me...)

B.T.W.: Because of your remark about kernel 2.6.38 being not standard for Maverick I did this test with the current 2.6.35 kernel.
Because jamesrl is using the non standard 2.6.38 kernel (according to the posted output) I guess maybe it would be easy for the conversation if I continue with that one too instead of the standard kernel?
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 03, 2011, 10:32:50 pm
9:58:53 was for you... q7icmfm1x0h609c6xiok

The drivers ARE the same ones... I want you to try those ones (newer), but make sure

rt2x00lib
rt2800usb
rt2x00usb

AREN'T blacklisted.

and modprobe rt2870sta

if that doesn't work... remove/blacklist rt3070sta (if it is loaded), and try modprobing rt2870sta again.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 03, 2011, 10:48:57 pm
I get an indication telling me: Chat(1)
Unfortunately the chatbox doesn't like my 20 character username. It only accepts 16 characters so it claims my username is invalid. Sorry, I can't join...
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 03, 2011, 10:58:57 pm
@ q7icmfm1x0h609c6xiok

Did you upgrade to 10.10, or was it a fresh install ?

BTW, jamesrl IS using the default kernel... he's running 11.04 :)

I didn't realise there was a limit on name length in chat :( .. you learn something every day ;)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 04, 2011, 12:52:10 am
You've clearly a lot of expertise in Linux on the other hand I'm good in website programming (that's how I make money). Therefore I know that the 16 character is not exactly a limit in the chat but that limit is imposed by the login screen. The code defining the username box says:
<input type="text" name="user" id="userNameField" maxlength="16"/>
If you change the number in maxlength="16" in something different or if you delete that part all together then the limit is set to the new number resp. there's no limit anymore.
Note: I can see it is a PHP page so if you look into the PHP source you´ll probably see something that differs a bit from what I've pasted.

Anyway, back on topic:
- The new version of the driver didn't work. Instead in dmesg there are even more warnings issued. The relevant part is:

[   22.875013] usbcore: registered new interface driver rt2870
[   22.880899] rt3070sta: Unknown symbol usb_register_driver (err 0)
[   22.882060] rt3070sta: Unknown symbol usb_put_dev (err 0)
[   22.882479] rt3070sta: Unknown symbol usb_get_dev (err 0)
[   22.883212] rt3070sta: Unknown symbol usb_submit_urb (err 0)
[   22.884355] rt3070sta: Unknown symbol usb_free_coherent (err 0)
[   22.949400] rt3070sta: Unknown symbol usb_control_msg (err 0)
[   22.950701] rt3070sta: Unknown symbol usb_deregister (err 0)
[   22.996995] rt3070sta: Unknown symbol usb_kill_urb (err 0)
.
.
.
[   25.126505] Registered led device: rt2800usb-phy0::radio
[   25.126584] Registered led device: rt2800usb-phy0::assoc
[   25.126653] Registered led device: rt2800usb-phy0::quality
[   25.127891] usbcore: registered new interface driver rt2800usb
[   25.298559] udev[374]: renamed network interface wlan0 to wlan1

So it seems to register first rt2870 and somewhat later rt2800usb and then it renames the interface name which already was the wrong one?!

That sequence of warnings led me to a new thought. Your driver contains a readme file that file talks about changing certain values in the rt2870.dat file,  like setting the SSID and so on. Is it necessary to do that because you didn't mention it anywhere in this thread.

B.T.W.: I've finally performed the actions you've asked for:

lsmod | grep rt2 gives:

rt2800usb               9580  0
rt2800lib              30847  1 rt2800usb
crc_ccitt               1351  1 rt2800lib
rt2x00usb               9736  1 rt2800usb
rt2x00lib              29556  3 rt2800usb,rt2800lib,rt2x00usb
led_class               2633  1 rt2x00lib
mac80211              235189  3 rt2800lib,rt2x00usb,rt2x00lib
cfg80211              142680  2 rt2x00lib,mac80211
rt2870sta             565472  0


lshw -C network gives as relevant part:

  *-network DISABLED
       description: Wireless interface
       physical id: 1
       bus info: usb@1:1
       logical name: wlan1
       serial: 00:1f:1f:87:e1:61
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=rt2800usb driverversion=2.6.35-30-generic-pae firmware=N/A link=yes multicast=yes wireless=IEEE 802.11bgn

And for no particular reason I've tried /etc/init.d/networking restart
That command replied something about not being able to start wpa_supplicant.

and from iwconfig I can't find the file with the output but it talks about wlan1 not being associated too.


My 10.10 is an upgrade, not a fresh install. In the past I've started with Ubuntu 9.04.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 04, 2011, 01:53:11 pm
I take it the wpasupplicant package is installed ? .. do you use WPA/WPA2 encryption ?

can you send the contents of /etc/network/interfaces

and the output from
Code: [Select]
sudo rfkill list

Quote
*-network DISABLED


Maybe a stupid question, but I also take it networking IS enabled in network manager ?

Quote
configuration: broadcast=yes driver=rt2800usb driverversion=2.6.35-30-generic-pae


are you back on the 2.6.35 kernel ? .. if not, you might want to look at installing linux-backports-modules-compat-wireless
http://packages.ubuntu.com/maverick/i386/linux-backports-modules-compat-wireless-2.6.38-2.6.35-30-generic-pae/download (http://packages.ubuntu.com/maverick/i386/linux-backports-modules-compat-wireless-2.6.38-2.6.35-30-generic-pae/download)
direct link:
http://security.ubuntu.com/ubuntu/pool/universe/l/linux-backports-modules-2.6.35/linux-backports-modules-compat-wireless-2.6.38-2.6.35-30-generic-pae_2.6.35-30.22_i386.deb (http://security.ubuntu.com/ubuntu/pool/universe/l/linux-backports-modules-2.6.35/linux-backports-modules-compat-wireless-2.6.38-2.6.35-30-generic-pae_2.6.35-30.22_i386.deb)

BTW, you *should* be able to log into chat by shortening your username to the first 16 characters q7icmfm1x0h609c6 and entering your password... this *should* be done "automagically" when you click on the "chat" link at the top of every page... at least it is for me, it just shortens mine to Mark_Greaves_(PC and adds underscores in the spaces  :o

16 characters is enough, otherwise the chat window could become very messy ;) .. first thing I do after logging into chat is change my name to Mark (/nick Mark) anyway ;)

If you still have problems with chat, I'll pass it on to our resident programming guru (Mad Penguin)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: jamesrl on July 04, 2011, 09:47:15 pm
@Mark Greaves

Sadly no connection. Below is the information you requested. I looked at my black listed drivers but could not see anything similar to the rtlink drivers. Also I ensured I was using the latest driver you supplied and with root permissions
sudo su
make && make install

Thanks again

user@user-Desktop:~$ lsusb
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 145f:013a Trust
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 004: ID 148f:5370 Ralink Technology, Corp.
Bus 002 Device 003: ID 090c:1000 Feiya Technology Corp. Flash Drive
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 03f0:4117 Hewlett-Packard LaserJet 1018
Bus 001 Device 002: ID 04a9:2224 Canon, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
user@user-Desktop:~$ sudo lshw -C network
[sudo] password for user:
  *-network               
       description: Ethernet interface
       product: RTL8111/8168B PCI Express Gigabit Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: eth1
       version: 02
       serial: .............
       size: 100Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full ip=192.168.1.71 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
       resources: irq:41 ioport:de00(size=256) memory:fdaff000-fdafffff memory:fdae0000-fdaeffff memory:fda00000-fda0ffff
user@user-Desktop:~$ iwconfig
lo        no wireless extensions.

eth1      no wireless extensions.

user@user-Desktop:~$ nm-tool

NetworkManager Tool

State: connected

- Device: eth1  [Auto eth1] ----------------------------------------------------
  Type:              Wired
  Driver:            r8169
  State:             connected
  Default:           yes
  HW Address:        ....................

  Capabilities:
    Carrier Detect:  yes
    Speed:           100 Mb/s

  Wired Properties
    Carrier:         on

  IPv4 Settings:
    Address:         .......................
    Prefix:          24 (255.255.255.0)
    Gateway:         ......................

    DNS:             ......................


user@user-Desktop:~$ lsmod
Module                  Size  Used by
nls_iso8859_1          12617  1
nls_cp437              12751  1
vfat                   17335  1
fat                    55505  1 vfat
nls_utf8               12493  1
isofs                  39571  1
vesafb                 13449  1
binfmt_misc            13213  1
fglrx                2434640  51
snd_hda_codec_hdmi     27479  1
snd_seq_midi           13132  0
snd_rawmidi            25269  1 snd_seq_midi
gspca_pac207           13301  0
snd_hda_codec_realtek   255820  1
gspca_main             27894  1 gspca_pac207
snd_seq_midi_event     14475  1 snd_seq_midi
ppdev                  12849  0
snd_hda_intel          24140  2
snd_hda_codec          90901  3 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_intel
snd_hwdep              13274  1 snd_hda_codec
snd_pcm                80244  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd_seq                51291  2 snd_seq_midi,snd_seq_midi_event
usblp                  17827  0
videodev               75143  1 gspca_main
parport_pc             32111  1
snd_seq_device         14110  3 snd_seq_midi,snd_rawmidi,snd_seq
rt2870sta             410104  0
snd_timer              28659  2 snd_pcm,snd_seq
psmouse                73312  0
snd                    55295  14 snd_hda_codec_hdmi,snd_rawmidi,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_seq,snd_timer,snd_seq_device
k8temp                 12872  0
serio_raw              12990  0
crc_ccitt              12595  1 rt2870sta
shpchp                 32345  0
sp5100_tco             13456  0
i2c_piix4              13095  0
soundcore              12600  1 snd
snd_page_alloc         14073  2 snd_hda_intel,snd_pcm
lp                     13349  0
parport                36746  3 ppdev,parport_pc,lp
usb_storage            43946  1
uas                    17676  0
firewire_ohci          31504  0
ahci                   21591  2
firewire_core          56138  1 firewire_ohci
floppy                 60032  0
crc_itu_t              12627  1 firewire_core
r8169                  42534  0
libahci                25548  1 ahci
pata_atiixp            12968  1
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 04, 2011, 10:53:36 pm
I'm sorry to hear that on jamesrl's computer things are still not working either. There's apparently a lot of work to do by the Ubuntu community to support wireless dongle decently.

In the meantime I've done an experiment on my own. Apart from the Ubuntu Server I own a laptop the runs on Ubuntu 11.04 (kernel 2.6.38-10) and I've a second WLAN usb stick that also identifies to be a 148f:3070. So I decided to find out what happened if the internal WLAN card was disabled and instead the WLAN usb stick inserted. Result: it connected immediately to the wireless network. So we can conclude that kernel 2.6.38 supports WLAN usb sticks that identify as 148f:3070. I noticed a few interesting things:
- According to lsmod it does not use RT2870 or RT 3070 drivers at all but it takes RT2x00:
rt2870sta             450556  0
rt2800usb              18235  0
rt2800lib              45181  1 rt2800usb
crc_ccitt              12667  2 rt2870sta,rt2800lib
rt2x00usb              20330  1 rt2800usb
rt2x00lib              49235  3 rt2800usb,rt2800lib,rt2x00usb
mac80211              294370  3 rt2800lib,rt2x00usb,rt2x00lib
parport_pc             36959  0
cfg80211              178528  3 rt2x00lib,mac80211,r8192se_pci
parport                46458  3 parport_pc,ppdev,lp

- Even more interesting: it appears that the name has changed. It is not ra0 any longer but it seems to be wlan0 or wlan1 whatever is available. See this:

wlan1     IEEE 802.11bgn  ESSID:"p2zFsepJ6jmue_MLehec2jVahWCW-jJE"
          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:04:0E:D0:8C:55
          Bit Rate=9 Mb/s   Tx-Power=20 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on
          Link Quality=33/70  Signal level=-77 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:2   Missed beacon:0

And this is confirmed by the output of lshw -C network:

  *-network
       description: Wireless interface
       physical id: 4
       bus info: usb@2:2.3
       logical name: wlan1
       serial: 00:06:4f:82:39:1c
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=rt2800usb driverversion=2.6.38-10-generic firmware=0.29 ip=10.0.0.12 link=yes multicast=yes wireless=IEEE 802.11bgn

So I've redefined my target. From the experiment I know that it should be definitely possible to get that adapter active in the new Ubuntu kernel and now I don't longer care about how to achieve this. If there's a nice driver package to do it that would be nice, but if I have to copy certain files between my laptop and my server I'll take that too as a viable option. Right now I'm interested in if we can identify why it does work in Ubuntu Desktop version but not in Ubuntu Server version.

And we've few open questions:

You asked if networking is enabled in network manager. Well that question is not relevant because there's no network manager. My server runs (of course) the Ubuntu Server version which has no desktop.
You asked if I was back on 2.6.35. It depends on how you see it. Currently there are multiple kernels on my server because I was hoping to find one in which the USB stick would work. I supposed the standard Maverick 2.6.35 kernel would be better so I did the tests on that one. But since that dongle on my laptop appears to work in 2.6.38 I'll rather like to continue with that kernel now.
You asked for /etc/network/interfaces. I can give you that:

auto ra0
iface ra0 inet static
address 10.0.0.19
netmask 255.255.255.0
gateway 10.0.0.140
wpa-driver wext
wpa-ssid <my ssid is normally here>
wpa-ap-scan 2
wpa-proto WPA RSN
wpa-pairwise TKIP CCMP
wpa-group TKIP CCMP
wpa-key-mgmt WPA-PSK
wpa-psk <I'd rather not publish the key online>

May be those ra0 items pose a problem now the interface name appears to be different?

A few supplemental observations:
My network is wpa/wpa2 mixed and it does not broadcast the ssid. Some fora state that will lead to problems. But in the old kernel 2.6.31 I can connect nevertheless.

You asked if wpasupplicant was installed. apt reports it's installed and it is the newest version, so that's a yes.

Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 05, 2011, 12:06:32 am
@ q7icmfm1x0h609c6xiok

Erm... yes ra0 will be a problem in /etc/network/interfaces because according to this post:
http://linuxforums.org.uk/hardware-compatibility/ralink-rt2870-based-usb-wireless-n-adapters-(ubuntu)/msg59151/#msg59151 (http://linuxforums.org.uk/hardware-compatibility/ralink-rt2870-based-usb-wireless-n-adapters-(ubuntu)/msg59151/#msg59151)

Quote
*-network DISABLED
       description: Wireless interface
       physical id: 1
       bus info: usb@1:1
       logical name: wlan1
       serial: 00:1f:1f:87:e1:61
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=rt2800usb driverversion=2.6.35-30-generic-pae firmware=N/A link=yes multicast=yes wireless=IEEE 802.11bgn


The wireless connetcions logical name is wlan1,

so you need to change both instances of ra0 to wlan1 and then:
Code: [Select]
sudo ifup wlan1

Sorry I didn't realise we were working on a server  ::)

jamesrl's problem is different because his card doesn't seem to be being recognised at all... probably a device ID issue... need to think on that one a bit.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 05, 2011, 11:26:02 pm
@Mark:
Sorry, but it didn't work.
For some weird reason in 2.6.35-30 the logical name has changed again and now it is once again ra0, so it should work but it doesn't.
On 2.6.35-28 the logical name is now wlan0 while a few days ago starting the 2.6.35-28 kernel resulted in a freeze.
Well, I can live with whatever name the interface has but now I can bring up wlan0 but it won't associate. May be something is wrong with my /etc/network/interfaces.
In this kernel and in a 2.6.38 kernel the led on the stick starts blinking like crazy but the stick can't associate.
My modemrouter registers in its log that it sees the connection attempts of the server but it refuses them (it does not log why). Is it possible that the encoded wpa-psk key in /etc/network/interfaces has to be adjusted according to the new situation and that the modemrouter refuses it because it is wrong? In the old 2.6.31 I still have network connectivity so in that case the wpa-psk key is not wrong.

I think I've messed up somehow certain things with blacklisting or whatever. I'm completely lost now and I think we need to repeat some steps.
Even better would be to completely remove the obsolete kernels including the drivers you've provided and then reinstall one current kernel and work with that. I know that before I discovered this website I've done things with backports but I don't know how to get rid of it.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 05, 2011, 11:43:42 pm
@ q7icmfm1x0h609c6xiok

You can show a list of installed packages with:
dpkg --get-selections | less

or export them t a file in your home directory with:
Code: [Select]
cd ~
dpkg --get-selections >> paackag_list

or search for "backports" in the output with:
Code: [Select]
dpkg --get-selections | grep backports

are you still getting the wpa_supplicant error ?

It's entirely possible the WPA key is wrong, but only you would know that ;)

So lets find out if it *IS* just a WPA encryption problem... will it associate with an unsecured wireless access point ?
(ie. turn off wireless security in your modem/router for a test connection)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 06, 2011, 02:43:08 am
@ jamesrl

For some reason it's loaded the rt2870sta module rather than rt5370sta... try running these 2 commands:

Code: [Select]
sudo modprobe -r rt2870sta
then:
Code: [Select]
sudo modprobe rt5370sta

then post the output from:

Code: [Select]
lsmod | grep rt
and:
Code: [Select]
sudo lshw -C network
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: jamesrl on July 06, 2011, 11:52:36 am
Thanks. I actually rebuilt my machine last night, and tried your driver and all seems OK now. Soz didn't get round to updating forum.

Thanks again for all your help.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 06, 2011, 12:46:15 pm
@ jamesrl

At least you're up and running, thanks for the update :)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 06, 2011, 06:11:35 pm
Nice, that  it works for jamesrl!

@mark:
I've tried dpkg --get-selections and it detected 3 different backports. So like I said I've messed up things.
Furthermore there are several packages indicated as deinstalled (but the configuration files are seemingly still present). So currently I'm in the process of cleaning up things.

I'm still not convinced about that wpa_supplicant thingy. I've found an interesting webpage which describes that the security settings in /etc/network/interfaces can be included in /etc/wpa/wpa_supplicant.conf.
I'll try it and if it works with my currently working 2.6.31 kernel we'll know for sure that wpa_supplicant is working.
And I've found an article claiming that Ralink wireless usb adapters simply do work with stock drivers but this article follows an approach using udev rules.
I'll report back to you soon.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 06, 2011, 09:56:29 pm
All right, I'm back again.

With the 2.6.31 kernel (with connectivity) the result of ps -A | grep wpa_supplicant is:
3332 ?        00:00:00 wpa_supplicant
So wpa_supplicant seems to be running.

I've made a new version of /etc/network/interfaces and now it's like this:

auto ra0
iface ra0 inet static
address 10.0.0.19
netmask 255.255.255.0
gateway 10.0.0.140
wpa-conf /etc/wpa_supplicant.conf
wpa-ap-scan 2

and my /etc/wpa_supplicant.conf looks like:

ctrl_interface=/var/run/wpa_supplicant
network={
ssid=<here the ssid>
psk=<here the key>
key_mgmt=WPA-PSK
proto=RSN WPA
pairwise=CCMP TKIP
group=CCMP TKIP

I was too lazy to reboot  ;-)
so I did sudo /etc/init.d/networking restart
and I got the message:
wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with returncode 1

So it seems that there's indeed something wrong with wpasupplicant.

B.T.W.: if I remove RSN from the proto statement in the original 2.6.31 network interfaces configuration in order to force a WPA2 connection the network connectivity breaks. If I put it back everything works.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 06, 2011, 11:39:57 pm
What is the verbose (-v) output from ifdown and ifup ?

Code: [Select]
sudo ifdown -v ra0

and

Code: [Select]
sudo ifup -v ra0

Hopefully this will give us an idea where WPA is failing.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 08, 2011, 01:58:37 am
Those commands did not produce any useful results but in the daemon log I noticed wpa_supplicant parsing errors.
In the end I discovered that wpa_supplicant wants my SSID in between quotes. So my old 2.6.31`kernel is now running with wpa_supplicant.
After that success I decided to proceed but that resulted in disaster. I lost all network connectivity including the 2.6.31 kernel. I took me about 3 hours to repair the damage.
It seems that after a series of many changes the USB stick gets somehow confused, locks up and ignores all changes as instructed by the driver. The only way to make it work again is unplug it and replug after 1 minute.

During the session I noticed that the driver tries to read the contents of the file /etc/Wireless/RT2870STA/RT2870STA.dat and it ignores what wpa_supplicant instructs. The only way to make the driver to ignore that file is to remove or rename it.
Furthermore I found that kernel 2.6.38-9 still hangs so that one won't work I guess.
Kernel 2.6.35-30 and the experimental kernel 2.6.38-02063808 produces these two errors:
- WPA: unsupported CCMP Group Cipher key length 32 (32).
- RSN: failed to configure GTK.
Kernel 2.6.35-28 is not able to connect and times out each attempt.

And in the logs I've found an error that I can't link to a specific kernel right now. It says: Failed to disable WPA in the driver.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 08, 2011, 02:41:38 am
With all this swapping of kernels, are you recompiling the driver each time ?

I think your last idea of picking a kernel and then trying to get it to work would probably be the better idea... the default kernel is probably the one you should go with unless there is a specific reason not to... AFAIK these drivers should work with any (recent) kernel they are compiled for.

My suggestion would be to go back to the default kernel (whatever that is, I've forgotten which Ubuntu version you are running), recompile/install the drivers, then try to sort out the configs.

Swapping kernels seems fairly pointless, the drivers are loaded as a module, so are not part of the kernel.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 09, 2011, 01:38:58 am
Recompiling each time? Well, actually no I didn't. I assumed that compiling it once for each kernel was good enough. Besides as far as I know the RT3070 driver is used by none of the tested kernels they all go for RT2870.
Currently I use Ubuntu Server Maverick so the default kernel would be 2.6.35-30, so I´ll continue with that one.
I think this weekend I don't have much time for testing purposes so I probably won't do anything until monday.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 13, 2011, 01:26:32 am
Well, I've resumed testing again. In the process I've caused a major connectivity breakdown. No kernel could establish a connection not even the so far always working 2.6.31 kernel.
It took me 6 hours to repair things. So far I've found out that:

- rt2800lib and rt2800usb need to be blacklisted otherwise no connection will be established in any circumstances.
- It does not matter if rt2x00lib and rt2x00usb are not blacklisted.
And there's something that was not necessary before: I need to blacklist rt3070sta otherwise the connection will not come up automatically (however it can be brought up by ifup, but I want it to come up automatically).
I expect to do some further testing with kernel 2.6.35 in order to make that one work.
May be something has changed so I would like to ask you again which driver do you recommend?
Do we have a working mode that involves NO touching of /etc/network/interfaces and the wpa_supplicant stuff? Wpa_supplicant is working in the old kernel so I like to keep it that way.
I´m a bit worried about the /etc/Wireless/RT2870STA/RT2870STA.dat file. For some reason I have to remove it otherwise no connection will be established. I've tried to fill it in with appropriate values but these are probably not appropriate enough because it's not working. Removing that file obviously causes messages in the log that the file can't be opened so it seems that it should be used somehow.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 13, 2011, 02:36:59 am
can you attach these 4 files:
/etc/Wireless/RT2870STA/RT2870STA.dat
/etc/network/interfaces
/etc/wpa_supplicant.conf
/etc/resolv.conf

The driver I'd go with is:
http://dl.dropbox.com/u/11876059/2011_0407_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.2_DPO.tar.bz2 (http://dl.dropbox.com/u/11876059/2011_0407_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.2_DPO.tar.bz2)
which is the latest driver that is *supposed* to support your card (148f:3070)

Writing a small script to bring the connection up automatically at starttup will be fairly easy.
or just adding
ifdown ra0
ifup ra0

to /etc/rc.local
should also run those 2 commands at startup
but let's just get it working first.

You also NEED to test it with an unsecured network as well, to check if it is JUST a WPA issue.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 14, 2011, 12:55:34 am
/etc/Wireless/RT2870STA/RT2870STA.dat:
#The word of "Default" must not be removed
Default
CountryRegion=5
CountryRegionABand=7
CountryCode=NL
ChannelGeography=1
SSID="here the SSID"
NetworkType=Infra
WirelessMode=9
Channel=0
BeaconPeriod=100
TxPower=100
BGProtection=0
TxPreamble=0
RTSThreshold=2347
FragThreshold=2346
TxBurst=1
PktAggregate=0
WmmCapable=1
AckPolicy=0;0;0;0
AuthMode=WPA
EncrypType=NONE
WPAPSK=
DefaultKeyID=1
Key1Type=0
Key1Str=
Key2Type=0
Key2Str=
Key3Type=0
Key3Str=
Key4Type=0
Key4Str=
PSMode=CAM
AutoRoaming=0
RoamThreshold=70
APSDCapable=0
APSDAC=0;0;0;0
HT_RDG=1
HT_EXTCHA=0
HT_OpMode=0
HT_MpduDensity=4
HT_BW=1
HT_BADecline=0
HT_AutoBA=1
HT_AMSDU=0
HT_BAWinSize=64
HT_GI=1
HT_MCS=33
HT_MIMOPSMode=3
HT_DisallowTKIP=1
HT_STBC=0
EthConvertMode=
EthCloneMac=
IEEE80211H=0
TGnWifiTest=0
WirelessEvent=0
MeshId=MESH
MeshAutoLink=1
MeshAuthMode=OPEN
MeshEncrypType=NONE
MeshWPAKEY=
MeshDefaultkey=1
MeshWEPKEY=
CarrierDetect=0
AntDiversity=0
BeaconLostTime=4
FtSupport=0
Wapiifname=ra0
WapiPsk=
WapiPskType=
WapiUserCertPath=
WapiAsCertPath=
PSP_XLINK_MODE=0
WscManufacturer=
WscModelName=
WscDeviceName=
WscModelNumber=
WscSerialNumber=
RadioOn=1

/etc/network/interfaces & /etc/wpa_supplicant.conf:
These are already in the post of  July 06, 2011, 09:56:29 pm

/etc/resolv.conf:
nameserver 10.0.0.19
nameserver 208.67.222.222
nameserver 208.67.220.220

The server runs its own DNS and queries the servers from OpenDNS when necessary.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 14, 2011, 03:51:25 am
What does:
Code: [Select]
wpa_supplicant -Dwext -ira0 -c /etc/wpa_supplicant.conf -dd
output ?

Have you tested the connection WITHOUT security yet ? .. we need to know if it is a driver issue, or a wpa_supplicant issue.

[EDIT]

IF this is just a wpa_supplicant issue... which you can only be 100% sure of by trying it with an unsecured AP...

After reading on a few sites that people seemed to be having more luck with -
HAS_WPA_SUPPLICANT=y
and
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n
set in config.mk before compiling and installing... you might want to give that a try.

then test the wpa_supplicant with:
Code: [Select]
wpa_supplicant -Dralink -ira0 -c /etc/wpa_supplicant.conf -dd

See last but one posting here:
http://forum.sabayon.org/viewtopic.php?t=19032 (http://forum.sabayon.org/viewtopic.php?t=19032)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 14, 2011, 04:19:29 pm
I'm sorry but this approach is not going to work for me.
Apparently one almost needs a university degree in network management before a simple wireless connection can be established.
All I know is that in Ubuntu Desktop version there's absolute no problem to establish a wireless WPA2 secured connection with that exact same wireless USB stick.

A few years ago I managed to create the wireless connection in Karmic Server version based upon an example and I'm still working with it. But in newer kernels it's definitely not working.
It must be somehow that wpa_supplicant stuff.

I've tried to test the connection against a non protected network like you've asked.
It's embarrassing to say but I failed. I even don't know how to adjust the relevant files in order to be able to connect to an insecure network. The network is detected but there's no association so I guess there must be something wrong with my configuration files.

I can only draw the conclusion that currently my knowledge about networks is absolute not sufficient to be able to do this and I don't have time to read more about it.
Can you provide me with configuration files, please?
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 14, 2011, 07:06:17 pm
Try these...

Run:
Code: [Select]
wpa_passphrase NetworkEssid your_passphrase

The output will be similar to -

Quote
network={
   ssid="NetworkEssid"
   #psk="your_passphrase"
   psk=559cb7c92c036b711ccdb40514c57b33c58372e7df912fc5f36a9f05a04d98ab

Obviously you need to replace NetworkEssid and your_passphrase



Now for the configs...

/etc/network/interfaces

Quote
auto ra0
iface ra0 inet static
address 10.0.0.19
netmask 255.255.255.0
gateway 10.0.0.140
wpa-driver wext
wpa-conf /etc/wpa_supplicant.conf



/etc/wpa_supplicant.conf

Quote
ctrl_interface=/var/run/wpa_supplicant
ap_scan=2
#eapol_version=1
#fast_reauth=1

network={
ssid="NetworkEssid"
proto=WPA2 WPA
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
#psk="your_passphrase"
psk=559cb7c92c036b711ccdb40514c57b33c58372e7df912fc5f36a9f05a04d98ab
}

Obviously you need to replace the bits in red with what you got from - wpa_passphrase NetworkEssid your_passphrase



/etc/resolv.conf

nameserver 10.0.0.19
nameserver 208.67.222.222
nameserver 208.67.220.220



Now try:
sudo ifdown ra0
then
sudo ifup ra0



If that doesn't work... post the output from:
Code: [Select]
wpa_supplicant -Dwext -ira0 -c /etc/wpa_supplicant.conf -dd
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 15, 2011, 03:20:24 pm
Hmm... I've just spotted this:

Quote
[   26.644532] BUG: unable to handle kernel paging request at 2982b000
[   26.644673] IP: [<f85ef5af>] MainVirtualIF_open+0x4f/0x120 [rt2870sta]
[   26.644812] *pdpt = 0000000025db7001 *pde = 0000000000000000
[   26.644939] Oops: 0002 [#1] SMP
[   26.645033] last sysfs file: /sys/module/snd_seq_device/initstate
[   26.645083] Modules linked in: iptable_filter snd_seq_midi_event iptable_mangle iptable_nat snd_seq nf_nat nf_conntrack_ipv4 snd_timer nf_conntrack snd_seq_device nf_defrag_ipv4 usbhid btusb ip_tables psmouse snd bluetooth x_tables hid serio_raw usblp soundcore snd_page_alloc shpchp sis_agp video rt2870sta lp parport usb_storage uas r8169 sata_sis
[   26.646131]
[   26.646169] Pid: 661, comm: wpa_supplicant Not tainted 2.6.38-9-generic-pae #43-Ubuntu To Be Filled By O.E.M. To Be Filled By O.E.M./To be filled by O.E.M.
[   26.646374] EIP: 0060:[<f85ef5af>] EFLAGS: 00010293 CPU: 0
[   26.646447] EIP is at MainVirtualIF_open+0x4f/0x120 [rt2870sta]
[   26.646494] EAX: f3bd8000 EBX: f4a1c000 ECX: f84e4104 EDX: 00000292
[   26.646542] ESI: f84e4000 EDI: f8405000 EBP: e509fe60 ESP: e509fe4c
[   26.646590]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[   26.646637] Process wpa_supplicant (pid: 661, ti=e509e000 task=e5f96500 task.ti=e509e000)
[   26.646689] Stack:
[   26.646723]  c1107c58 2e1c1025 f4a1c000 f4a1c048 f8405000 e509fe80 c145a22b e509fe70
[   26.646991]  c1531be6 e509fe80 f4a1c000 00001003 00000000 e509fea8 c145a4a2 00000001
[   26.647273]  c178f8c0 bfb2620c 00001002 00000001 f4a1c000 bfb2620c 00001002 e509febc
[   26.647567] Call Trace:
[   26.647627]  [<c1107c58>] ? __do_fault+0x418/0x520
[   26.647698]  [<c145a22b>] __dev_open+0x9b/0xf0
[   26.647758]  [<c1531be6>] ? _raw_spin_unlock_bh+0x16/0x20
[   26.647819]  [<c145a4a2>] __dev_change_flags+0x82/0x150
[   26.647879]  [<c145a613>] dev_change_flags+0x23/0x60
[   26.647939]  [<c14b0c04>] devinet_ioctl+0x624/0x680
[   26.647999]  [<c1287782>] ? copy_to_user+0x42/0x60
[   26.648064]  [<c14b15b5>] inet_ioctl+0x95/0xb0
[   26.648123]  [<c1445eed>] sock_ioctl+0x6d/0x290
[   26.648180]  [<c1445e80>] ? sock_ioctl+0x0/0x290
[   26.648241]  [<c1141eeb>] do_vfs_ioctl+0x7b/0x2e0
[   26.648300]  [<c11421d7>] sys_ioctl+0x87/0x90
[   26.648358]  [<c1131025>] ? sys_close+0x75/0xd0
[   26.648418]  [<c100ab5f>] sysenter_do_call+0x12/0x28
[   26.648465] Code: f4 8b 75 f8 8b 7d fc 89 ec 5d c3 90 8b 46 08 85 c0 74 59 83 c0 01 89 46 08 83 3d 00 9f 61 f8 02 0f 84 a8 00 00 00 a1 70 a0 61 f8 <64> ff 00 a1 7c e9 7b c1 85 c0 75 6e 8b 83 00 02 00 00 f0 80 60
[   26.648465] EIP: [<f85ef5af>] MainVirtualIF_open+0x4f/0x120 [rt2870sta] SS:ESP 0068:e509fe4c
[   26.648465] CR2: 000000002982b000
[   26.650653] ---[ end trace 25b99e8aa091c880 ]---


in he dmesg.0 file you attached to this post:
http://linuxforums.org.uk/hardware-compatibility/ralink-rt2870-based-usb-wireless-n-adapters-(ubuntu)/msg58931/#msg58931 (http://linuxforums.org.uk/hardware-compatibility/ralink-rt2870-based-usb-wireless-n-adapters-(ubuntu)/msg58931/#msg58931)

Which might explain the system becoming unstable... can you attach another dmesg from the kernel and driver you are now using.

If I'm reading this correctly (but I may not be) it *may* suggest some sort of conflict between the wireless device/wpa_supplicant and the sound card... maybe in virtual memory... I'm trying to find out what "MainVirtualIF is  ???
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 16, 2011, 01:10:46 am
Thanks for investigating the problem so far. I really appreciate all the effort you make for this.

I've compared my configs with the ones in your post of July 14, 2011, 07:06:17 pm. There were some minor differences which I guess are not that important but nevertheless I corrected them:
* In my configs access point scanning mode set to 2 was still in etc/network/interfaces not in wpa_supplicant.conf.
* Proto in my wpa_supplicant.conf was set to RSN WPA instead of WPA2 WPA.

These modifications don't make any difference. Kernel 2.6.31 still works and kernel 2.6.35 does not.
In kernel 2.6.35 the interfaces name is not ra0 but wlan0 so I did: wpa_supplicant -Dwext -iwlan0 -c /etc/wpa_supplicant.conf -dd. Initially this didn't work (message about wpa_supplicant already active) but after issuing ifdown it did work.
The command seems to finish never so I stopped it with CTRL+C after some time. You can read the output in the attachment. If I read it correctly I understand from it that the driver does recognize the wireless network but that it fails when it comes to the security key.

Besides I've decided to get rid of all failed attempts and so I've removed all kernel images and kernel headers except for 2.6.31 which I do need as long as this matter is not solved. After that I've installed the latest kernel image and header of 2.6.35.
So the above test was performed on a pristine kernel without any additional drivers not even the one you've provided. We can probably try additional drivers in a subsequent step.

The observation you've posted in your post of July 15, 2011, 03:20:24 pm is quite interesting. Unfortunately I can't provide you with another dmesg output because I've removed that kernel earlier this week because of persisting crashes. So far 2.6.35 does not produce errors concerning paging errors.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 16, 2011, 02:12:56 am
From your wpa_supplicant output, it seems like it's an issue with the group cipher key length... maybe the key that you generated with wpa_passphrase is invalid.

Does your "passphrase" contain any strange characters such as a tilde (~) etc.

you might (just as a test) want to try entering the passphrase as a plain text key... so make /etc/wpa_supplicant.conf read:

Quote
ctrl_interface=/var/run/wpa_supplicant
ap_scan=2
#eapol_version=1
#fast_reauth=1

network={
ssid="NetworkEssid"
proto=WPA2 WPA
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="your_passphrase_in_plain_text_here"
}

be sure to include the "" quotation marks.

and now see what:
Code: [Select]
wpa_supplicant -Dwext -iwlan0 -c /etc/wpa_supplicant.conf -d
returns, and whether it connects.

let's use just one -d in the last command this time, to turn down the verbosity level... the last output was a bit longer than I expected and probably unnecessary ;)



Just as a matter of interest, what is the make/model of your router/access point ?

what is the output from:
Code: [Select]
iwlist wlan0 scanning

and do you NEED WPA2... I know your router/AP is mixed mode, but can't you just connect to it with WPA ? .. or am I misunderstanding your network layout ?

What I'm getting at is... couldn't you just drop WPA2 and CCMP altogether and just connect with WPA/TKIP ?



This seems to be the important part:

Quote
State: 4WAY_HANDSHAKE -> GROUP_HANDSHAKE
RSN: received GTK in pairwise handshake - hexdump(len=34): [REMOVED]
WPA: Unsupported CCMP Group Cipher key length 32 (32).

RSN: Failed to install GTK
RSN: Failed to configure GTK
wpa_driver_wext_deauthenticate

I'm reading up on the 4way handshake and GTK (group temporal key) now  :o .. I'll post if I find anything.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 16, 2011, 06:27:33 pm
Just a quick reply for now.
Concerning WPA2: No, I do not insist on using WPA2 although it is safer. I have a rather old PC running Windows XP. Windows XP is supposed to handle WPA2 but it can't so that one connects with WPA too.
And that is merely the reason that my modem router is in mixed mode.
I can probably try what happens if I switch it to WPA or WPA2 only. I've found several claims that mixed mode means trouble with Ralink based adapters so it may be worth the effort to try it.

B.T.W.: Why doesn't it try WPA if WPA2 fails? if I am correct the config allows both types and the AP accepts both types.

Furthermore I still don't understand why the wireless USB adapter has no problems at all connecting to my network when I plug it into a laptop computer running the same Ubuntu version except it is the desktop version and besides with the 2.6.31 kernel on the server it also connects without problems. My guess is that there's nothing wrong with my wireless network, it is just a kernel/driver issue.
B.T.W.: I've brought the problem to the attention of the Ubuntu developers and their answer was that I should file a bugreport on Launchpad. Well, in Launchpad there are about 20 similar problems and virtually none of them has drawn the attention of the developers or is even triaged so I did not file a report after all.
The reality is simply that no one seems to know exactly what is happening with this type of adapters.

My passphrase does not contain strange characters. It is in hexadecimal form so it can't contain strange characters and the plaintext form is a mix of numbers and capitals.
And I know for sure it is correct because that old 2.6.31 kernel uses the same wpa_supplicant settings too and is still connecting without problems. The SSID does contain certain unusual characters but even that's not a problem for the 2.6.31 kernel.

My modem router is a FRITZ!Box Fon WLAN 7140 Annex A.

I didn't do any tests today. Probably tomorrow.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 16, 2011, 09:05:01 pm
I agree... I would have expected it to fall back on WPA if WPA2 failed to connect, but it just appears to go into a loop of retrying WPA2.

I'm also as baffled as you as to why it works in the desktop edition but not the server edition... I do realise -
a) the kernels are slightly different... but wouldn't have expected the drivers (which are modules) to be any different.
b) NetworkManager handles the network connections slightly differently, but I'm unsure of the exact differences in the way the keys are generated, but I *do* know... after creating a WPA2 connection in NetworkManager and checking its settings in /etc/NetworkManager/system-connections .. NetworkManager appears to store the psk= as a plain text string of the passphrase, and NOT a long passkey hash. (but sets read/write permissions for owner root only [-rw------- 600])

I also know NetworkManager doesn't use the /etc/wpa_supplicant.conf or /etc/network/interfaces config files .. but it *does* use the wpa_supplicant service, and will start it even if it is disabled... NetworkManager gets its settings from /etc/NetworkManager/system-connections/<connection name>

So I would *guess* that it isn't a kernel issue, or a driver issue, and probably isn't a wpa_supplicant issue either... but more an issue of the way the network is brought up, and the way the passkey (psk=) is handed to the wpa_supplicant service.

Have you tried regenerating the  long passkey hash from your passphrase, or are you just reusing the passkey hash that you previously had ?

It's a weird one this for sure.

I don't know whether you want to trust me with your passphrase and the passkey hash you are using so I can try them myself... if you are OK with that, send them to me either by email:
mark.greaves@linux.co.uk
or in a Personal Message here.

As I suggested in my last post... I'd still suggest you try entering the psk= as a plain text string in /etc/wpa_supplicant.conf and see what happens.

I read on another forum that when using NetworkManager for a WPA/WPA2 connection, it asks for your passphrase, but after the first time you connect, the passphrase has changed to a passkey hash .. I'll look into this tonight and see if that's correct... if it is, maybe you can connect with a desktop edition, then copy the passkey hash NetworkManager generates to your servers wpa_supplicant.conf .. just an idea ;)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Michael on July 17, 2011, 11:49:37 am
Hello,
I'm also having trouble getting my USB adapter (Sitecom WL-346) to work. I believe (I'm not absolutely sure) the appropriate driver for it is rt2870.
The problem is that the output of iwconfig only shows my loopback device.
By the way, I am using Ubuntu 11.04.

The output of lsusb:
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0df6:0051 Sitecom Europe B.V.
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Also the output of lsmod does not show a module with substring 'rt'.

When I unplug the adapter and replug it, and output the last lines of dmesg:
USB disconnect, address 2
new full speed USB device using uhci_hcd and address 3

I hope you guys can help.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 17, 2011, 04:14:13 pm
@ Micheal

Hmm... I have a funny feeling your adapter may be loading as a ZeroCD device... can you post the full dmesg.

Code: [Select]
cd ~
dmesg >> dmesg.txt
zip dmesg.zip dmesg.txt

the attach the dmesg.zip file that you'll  find in your home directory to your next post.

The reason... your mention of this line in dmesg:

Quote
new full speed USB device using uhci_hcd and address 3


and what I'm reading about another Sitecom device (Sitecom 300N Wireless WL-324) here:
http://ubuntuforums.org/showthread.php?t=1627423&page=2 (http://ubuntuforums.org/showthread.php?t=1627423&page=2)
in particular post #15 onwards.

So *maybe* this adapter also requires usb-modeswitch  :o

I'm also wondering if the button changes it from ZeroCD to Wireless mode ??

run:
Code: [Select]
lsusb
press the button, and run it again... and see if the:
Bus 001 Device 002: ID 0df6:0051 Sitecom Europe B.V.
line has changed.

BTW, I'm guessing when you say "Sitecom WL-346" that's a typo... the Sitecom WL-346 is a router... the Sitecom WL-364 is a USB wireless adapter ;)

http://www.sitecom.com/wireless-network-usb-micro-adapter-300n/wl-364/p/788 (http://www.sitecom.com/wireless-network-usb-micro-adapter-300n/wl-364/p/788)

[EDIT]

Further info...

I've just unpacked the Windows drivers from the Sitecom website, and the HWID.ini file reads

(click to show/hide)
(look for the device ID string in red in the above spoiler... it's in the RT3070 section)

So it would *seem* as though you need the RT3070 driver... BUT... the latest Linux 3070 driver doesn't contain the device ID string for that adapter.

I can add the device ID string to the latest 3070 driver... then give you a link to the customised driver... then you can try it if you like ?
Up to you.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Michael on July 17, 2011, 10:57:39 pm
Hi Mark, thanks for responding.
You're correct about the typo, it is indeed the WL-364.  :)

One of the problems was the outdated version of the rt2800usb driver.
In this commit the adapter is added: http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-oneiric.git;a=commitdiff;h=87a3b89f34fb20f644b42fa57d579b1f2833fd4d (http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-oneiric.git;a=commitdiff;h=87a3b89f34fb20f644b42fa57d579b1f2833fd4d)

I've downloaded the complete (and most recent) compat source and compiled & installed everything.
At this time, the adapter is recognized (it shows up in iwconfig):
(click to show/hide)

But there are still problems, when I plug the adapter in, NetworkManager shows "device not ready (firmware missing)"
The output of dmesg:
(click to show/hide)


Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 17, 2011, 11:40:26 pm
Is the adapter recognised by:
Code: [Select]
sudo lshw -C network
and what driver does it say it's using ?

You could try the latest firmware snapshot from here:
http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git (http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git)

or the debian firmware-ralink_0.32_all.deb package from here (which appears to only be 3 days older):
http://packages.debian.org/sid/all/firmware-ralink/download (http://packages.debian.org/sid/all/firmware-ralink/download)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Michael on July 18, 2011, 12:11:12 am
The adapter is not recognised if I type the aforesaid command (there is no output).
Installing either the deb file seems a good option. Though when I'm trying to install it, dpkg gives an error: "trying to overwrite /lib/firmware/rt2860.bin, which is also in package linux-firmware 1.52"
I'm looking into that.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 18, 2011, 12:20:22 am
Probably the best idea would be to manually backup all the files it's going to replace in /lib/firmware

ie.

Quote
rt73.bin
rt2561.bin
rt2561s.bin
rt2661.bin
rt2860.bin
rt2870.bin
rt3070.bin   <--- now replaced by a symlink
rt3071.bin
rt3090.bin   <---  symlink

then manually unpack the files from the .deb (using fileroller), and place them in /lib/firmware
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Michael on July 18, 2011, 12:33:00 am
Ok, I think it's success this time. There is a LED blinking, more info to be continued. :)

EDIT
I am now connected to my router which is WPA2 secured and IT WORKS! :)

Mark, thank you so much for helping me!! :)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 18, 2011, 12:35:33 am
:) glad to hear you're getting somewhere .. let us know if it works.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 18, 2011, 12:57:10 am
You're more than welcome... though you did most of the work ;)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 18, 2011, 02:22:42 am
@Mark:

Well, good to hear that it worked for Michael.

I guess I can add another success to this thread although it is not a complete success. The good news is that I managed to establish a connection with kernel 2.6.35.
The not so good news is that it still not works with WPA2. Based on our previous observations I've assumed that the fallback mechanism apparently fails for some reason so I've changed these lines of wpa_supplicant.conf:

proto=WPA2 WPA
pairwise=CCMP TKIP
group=CCMP TKIP

into these:

proto=WPA
pairwise=TKIP
group=TKIP

So now the driver is forced to work with WPA and that seems to work.

If I change it to this:

proto=WPA2
pairwise=CCMP
group=CCMP

thereby forcing WPA2 mode then the connection fails. However in this case scanning detects the AP (it gives the correct MAC-address) but fails to detect the SSID. I've a hunch that this might be due to the AP being hidden.

I've noticed a change in behavior that worries me a bit. In the old kernel the LED on the stick was blinking like mad. Now it blinks a few times and then it dims for several seconds and then blinks again a few times and this all happens in a random pattern.  According to the log of the modem router the server does not disconnect so it appears to be a stable connection.

It does not seem to make any difference whether the psk is encrypted or in plain text.

Since we both have invested a lot of time in it already I'm determined to find out why it isn't working in WPA2 mode.

Are you willing to assist further in this process? May be we can achieve more results with the drivers we tried earlier or may be the approach with new firmware which you tried with Michael may work.

Anyway, I'm very happy with this success.

Mark, thank you so much for all the assistance and advice you gave me so far!
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 18, 2011, 02:41:40 am
Yeh sure... I'm quite happy to keep looking for a WPA2 solution, I too hate being beaten ;)

Oddly enough after going through that with Michael, I was going to suggest a firmware update, and the latest drivers... maybe there is some kind of mismatch going on.

I also wonder if there is a later version of wpa_supplicant than the Maverick version... which version do you have:
Code: [Select]
wpa_supplicant -v
and for the Ubuntu package version:
Code: [Select]
sudo apt-get -v wpa_supplicant

Quote
I've a hunch that this might be due to the AP being hidden.

AFAIK the only way to be sure where the connection is failing would be to run:
Code: [Select]
wpa_supplicant -Dwext -iwlan0 -c /etc/wpa_supplicant.conf -d
and
Code: [Select]
iwlist wlan0 scanning

BTW, I wouldn't worry too much about the lights, I've got a PCMCIA card in an old laptop that flashes both the power and RX/TX lights very oddly in Linux (fine in Windows), but connects perfectly and has done for a year + .. both lights flash twice, then there's a gap, then they flash twice again... rinse and repeat.

I'll have a search for CCMP key length problems/solutions in the morning.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 19, 2011, 01:10:53 am
Yeh sure... I'm quite happy to keep looking for a WPA2 solution, I too hate being beaten ;)

Excellent observation...

Oddly enough after going through that with Michael, I was going to suggest a firmware update, and the latest drivers... maybe there is some kind of mismatch going on.

You mean a mismatch concerning what exactly?

I also wonder if there is a later version of wpa_supplicant than the Maverick version... which version do you have:
Code: [Select]
wpa_supplicant -v

That gives: v0.6.10

and for the Ubuntu package version:
Code: [Select]
sudo apt-get -v wpa_supplicant

That's not going to work as expected. Apt only displays information about itself.
According to aptitude the version in the repositories is v0.6.10-2 being the same version as the one installed.
According to the website of wpasupplicant (http://w1.fi/wpa_supplicant ([url]http://http://w1.fi/wpa_supplicant[/url])) there is a new version 0.7.3. but that one hasn't made it into the repository apparently.

Quote
I've a hunch that this might be due to the AP being hidden.


AFAIK the only way to be sure where the connection is failing would be to run:
Code: [Select]
wpa_supplicant -Dwext -iwlan0 -c /etc/wpa_supplicant.conf -d

That's what is in the attachment of the post of July 16, 2011, 01:10:46 am.

and
Code: [Select]
iwlist wlan0 scanning

Finds the correct MAC-address but fails to detect the SSID.


BTW, I wouldn't worry too much about the lights, I've got a PCMCIA card in an old laptop that flashes both the power and RX/TX lights very oddly in Linux (fine in Windows), but connects perfectly and has done for a year + .. both lights flash twice, then there's a gap, then they flash twice again... rinse and repeat.

So far the connection is still going strong without interruption. I guess this random blinking now represents the real activity while the earlier observed continuous blinking was in fact the odd behavior.
B.T.W.: in the older kernel there used to be frequent messages on the screen (but not in the logs) about a certain IOCTL error. That issue has stopped now either. Probably the connection in the old kernel was not so perfect after all.

I'll have a search for CCMP key length problems/solutions in the morning.

Did this result in new information?
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 19, 2011, 02:22:38 am
A (possible) mismatch between the newer drivers I was giving you links to, and the older firmware.

Sorry, I was after something like the "Version:" line from:
Code: [Select]
dpkg --status wpasupplicant

but it doesn't matter as there's no "easy" way to upgrade to 0.7.3 anyway... short of moving to Natty.

You suggested you thought it was something to do with the access point being hidden...What I meant by:

Quote
AFAIK the only way to be sure where the connection is failing would be to run:
Code: [Select]
wpa_supplicant -Dwext -iwlan0 -c /etc/wpa_supplicant.conf -d


was that that it would be impossible AFAIK, to discover exactly what was causing the issue, other than to run that command... which *seems* to suggest that it is more to do with the key than the fact that the AP's SSID is hidden.

Quote
Did this result in new information?


Sorry, I've been a bit busy today... I'll post as soon as I find anything useful :)

[EDIT]

I'm finding quite a few references to WMM (Wireless Multimedia aka. Wireless QoS) causing WPA/WPA2 authentication issues... from what I gather this is enabled by default in the Fritz!Box 7140.

It might be worth turning it OFF in the router, and trying with WPA2 again... though this at first glance doesn't explain why it would connect on an earlier kernel... plenty of people were having a similar issue with Atheros wireless cards, they worked on earlier kernels but not on newer kernels... the workaround was to disable WMM (Wireless QoS) in the router.

See post #17 here:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/273336 (https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/273336)

OK that's an very old bug report... but FritBox's own website says WMM can cause connection issues:
http://www.avm.de/help/Sets/avme/en/002/hilfe_wlan_allgemein.html (http://www.avm.de/help/Sets/avme/en/002/hilfe_wlan_allgemein.html)
(see "Enable WMM" section towards the bottom)

So worth a try ?
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 20, 2011, 06:13:49 pm
Disabling WMM can affect VoIP. I do have a VoIP telephone connection.
I'll keep it in mind but I'm not going to try it yet. That LaunchPad thread links to another one with several so called solutions. I don't trust the solutions in that thread.
It boils down to "if one tries enough solutions it will somehow work" and the thread is outdated also.

My other laptop can connect using WPA2 to the same modem with the same USB stick so I don't believe it is a WMM related problem.
I want to investigate the firmware for now. Is it possible to find the version number of the firmware in use?

B.T.W.: I've found a message of wpa_supplicant in the daemon log stating:

failed to disable WPA in driver

It only happens when in WPA2 mode not in WPA mode.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 20, 2011, 06:23:31 pm
Oh, I agree about the thread... but... I take it your other system is using NetworkManager, which "somehow" seems to do the authentication differently.

I still think you should at least "try" it with WMM switched OFF... if it works, it *probably* means there is no other solution other than using WPA, or updating wpa_supplicant.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 21, 2011, 04:06:35 pm
Indeed that other system is a regular desktop using NetworkManager.

Anyway, I did the test with WMM switched off on my server and it didn't make any difference.
Fortunately, I've finally found the factor that did make the difference. Switching the network to WPA2 mode only (so not mixed WPA + WPA2) seems to be the only way to get it working.
Apparently the driver, module or firmware or whatever else can't handle mixed mode and gets stuck. The older 2.6.31 kernel still handles mixed mode correctly.
I've done some tests with deliberately wrong settings. And if I set it to WPA2 + TKIP then I get more or less the same behavior as what the driver tries to do on a mixed mode network.

But there's still something strange with the 2.6.35 kernel. Somehow it insists on loading the RT2870STA module although you've pointed out that it is in fact more likely to use the RT3070STA because the stick identifies itself that way.

Now I've this in /etc/modprobe.d/blacklist.conf:
 blacklist rt2800usb
 blacklist rt2800lib
 blacklist rt2x00usb
 blacklist rt2x00lib

 blacklist rt2870sta
#blacklist rt3070sta

So those are all the appropriate modules for the usb stick as far as I know and I should expect it to obey this and thus loading rt3070sta but interestingly it still loads rt2870sta.
If I blacklist rt3070sta too, so that all appropriate modules are blacklisted then it also loads rt2870sta.
I can't imagine that this behavior is hardcoded somewhere.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 21, 2011, 04:24:42 pm
If you look in the recent firmware... rt3070 is just a symlink to rt2870, so I'm guessing it's similar with the more recent driver module.

So I guess if you force the loading of rt3070, it still loads rt2870... though I would have expected blacklisting BOTH would have killed the connection  :o

So are you sayiing that if you:
blacklist rt2800usb
blacklist rt2800lib
blacklist rt2x00usb
blacklist rt2x00lib
blacklist rt2870sta
blacklist rt3070sta

the connection STILL comes up, and loads rt2870sta ? .. if so, what is the output from
Code: [Select]
lsmod

It may give a clue as to what is loading rt2870sta

Strange, and a little disappointing that the driver/kernel/firmware/wpa_supplicant can't handle a router set to mixed mode  ::)

Thanks for letting us know that though... I'm sure someone will benefit from the info ;)

It would be interesting to know if this is specific to the combination of your wireless card and router, or if it is a more general problem with ANY card and ANY router set to mixed mode.

Are you now considering the issue unresolvable, or are you still experimenting ?



on another note...

Did you ever try setting 'HAS_WPA_SUPPLICANT=y' and 'HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n' in config.mk before compiling... then bringing the network up with:
Code: [Select]
wpa_supplicant -Dralink -ira0 -c wpa_supplicant.conf -d
or
Code: [Select]
wpa_supplicant -Dralink -iwlan0 -c wpa_supplicant.conf -d

I'm still a bit bothered about why you're wlan0 rather than ra0 as a logical device... as far as I'm aware, the ralink drivers should give you ra0, ra1, etc.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 22, 2011, 01:20:11 am
If you look in the recent firmware... rt3070 is just a symlink to rt2870, so I'm guessing it's similar with the more recent driver module.

So I guess if you force the loading of rt3070, it still loads rt2870... though I would have expected blacklisting BOTH would have killed the connection  :o

I would have guessed that too, but it is not.

So are you sayiing that if you:
blacklist rt2800usb
blacklist rt2800lib
blacklist rt2x00usb
blacklist rt2x00lib
blacklist rt2870sta
blacklist rt3070sta

the connection STILL comes up, and loads rt2870sta ? .. if so, what is the output from
Code: [Select]
lsmod

Yes indeed, that's what I said. In fact I'm running it now with all these items blacklisted and I do still have a nice WPA2 encrypted wireless connection.

The relevant part of the output from lsmod is:
xt_multiport            1577  2
parport_pc             26378  0
x_tables               15921  10 xt_multiport,iptable_nat,iptable_mangle,xt_limit,ipt_LOG,xt_recent,xt_state,xt_tcpudp,iptable_filter,ip_tables
rt2870sta             406818  1
agpgart                32075  1 sis_agp
crc_ccitt               1351  1 rt2870sta
parport                31492  3 parport_pc,ppdev,lp


It may give a clue as to what is loading rt2870sta

Strange, and a little disappointing that the driver/kernel/firmware/wpa_supplicant can't handle a router set to mixed mode  ::)

Well, I've found multiple claims on the internet that Ralink adapters and mixed mode means trouble. As far as I can see these claims are quite valid.

Thanks for letting us know that though... I'm sure someone will benefit from the info ;)

You're most welcome.

It would be interesting to know if this is specific to the combination of your wireless card and router, or if it is a more general problem with ANY card and ANY router set to mixed mode.

Are you now considering the issue unresolvable, or are you still experimenting ?

Actually I consider the issue as solved.
When I started participating in this thread the issue was kernel 2.6.31 being able to connect to a WPA2 encrypted wireless network and kernel 2.6.35 not being able to connect at all.
Later we managed to get kernel 2.6.35 to connect to a WPA encrypted wireless network and now I've found that 2.6.35 is able to connect to a WPA2 encrypted network provided that the network is not mixed mode. The only remaining difference is now that kernel 2.6.31 can connect regardless if the network is mixed mode while 2.6.35 needs a WPA2 only network but I can live with that "limitation".

Although my issue has been solved now, we can still work more things out if you like. I know what should be in my configuration so I can always restore that.
Judging by the rocketing number of views of this thread I guess there are certainly people who can benefit from it.
The past weeks at least I did learn a lot about this subject...
This seems to be one of the very few threads that really gives answers about issues with Ralink adapters and I guess we still have some answers to give, so let's try it.  ;D




on another note...

Did you ever try setting 'HAS_WPA_SUPPLICANT=y' and 'HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n' in config.mk before compiling... then bringing the network up with:
Code: [Select]
wpa_supplicant -Dralink -ira0 -c wpa_supplicant.conf -d
or
Code: [Select]
wpa_supplicant -Dralink -iwlan0 -c wpa_supplicant.conf -d

Well, not exactly. As I stated in Reply #83 on: July 16, 2011, 01:10:46 am, I've decided to get rid of all previous attempts so at that time I've reinstalled kernel 2.6.35 without touching kernel 2.6.31.
So the 2.6.35 kernel now works with the standard components that are available in the kernel itself. Currently I don't use any additional drivers or the drivers you've provided and therefore I did not need to compile anything.

I'm still a bit bothered about why you're wlan0 rather than ra0 as a logical device... as far as I'm aware, the ralink drivers should give you ra0, ra1, etc.

Yes, I don't like that part too but it is like it is. The only option I can think of is that I probably did leave something behind that has survived the reinstall of the 2.6.35 kernel and that is responsible for the changed device name, but I can't imagine what it would be.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 22, 2011, 03:38:19 am
@ q7icmfm1x0h609c6xiok

I'm going to guess rt2870sta is being loaded in initrd .. so if you updated it (now that rt2870sta is blacklisted in /etc/modprobe.d/blacklist.conf) that would stop it loading.

The problem with this is that there may not actually be a rt3070sta module.

What is the output from:
Code: [Select]
modinfo rt3070sta
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 22, 2011, 04:36:07 pm
rt2870sta being load in initrd? That might be possible although I don't understand why because I did reinstall kernel 2.6.35 and so I rebuild the initrd I guess.
In my notes I read that I did a trick involving udev rules that was proposed on a website. It did it BEFORE the fresh reinstall of the kernel.
It involves this:

Create a new file /etc/udev/rules.d/network_drivers.rules with this line in it:
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="148f", ATTR{idProduct}=="2870", RUN+="/sbin/modprobe -qba rt2870sta"

Create another new file /etc/modprobe.d/network_drivers.conf with this line in it:
install rt2870sta /sbin/modprobe –ignore-install rt2870sta $CMDLINE_OPTS; /bin/echo “148f 2870″ > /sys/bus/usb/drivers/rt2870/new_id

Then according to that website it should work. In my case it did not so I've removed those two files. I've tried it again and this time using 3070 in stead of 2870 but that didn't work either so I removed that too.

The only uncertainty is that the file /sys/bus/usb/drivers/rt2870/new_id is still present. I can't see its contents not even in superuser mode. I don't know if it is present in a fresh install so I didn't delete it.


modinfo rt3070sta indicates that the module isn't present.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 22, 2011, 05:03:23 pm
Removing those 2 files should have automagically removed the entry from /sys/bus/usb/drivers/rt2870/new_id, as it appears it is "injected" at each boot only if those files are present.

[EDIT]
Hmm... just had an idea... if you've removed those files, is the driver now aware of your device ID string ?, or is rt2870sta  somehow getting loaded for an "unknown" device as a default... in which case it would probably be unaware of the correct section of the firmware to load.

I know this is only slightly related:
https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/762987
but it does point out that different sections of the firmware are used for different "devices".

Adding the device ID to one of the installable drivers would be quite easy... and *should* leave you with ra0 rather than wlan0
[END EDIT]

But I'm still baffled where rt2870sta is being loaded, and why blacklisting has no effect... I know blacklist.conf will not stop drivers that are part of the kernel from being loaded, without updating initrd after blacklisting... so I'm afraid it's just a bit of an assumption on my part that the rt2870sta module is being loaded by something contained in initrd .. I'm not saying the module is itself "contained" in initrd, but your lsmod:

Quote
Module                  Size  Used by
rt2870sta             406818  1
crc_ccitt               1351  1 rt2870sta

seems to be saying rt2870sta is being used by one other module.

As far as I can remember, every lsmod I've seen it before read:

Quote
Module                  Size  Used by
rt2870sta             406818  0
crc_ccitt               1351  1 rt2870sta

OK, sometimes the rt2870sta module "size" varies depending on the version... but if I'm reading this correctly, something *appears* to be loading it as a dependency.

There definitely seems to be something rt2870 related in the kernel:
Code: [Select]
grep -i RT28 /boot/config-$(uname -r)*
output on my system (11.04 desktop)=
Quote
CONFIG_RT2800PCI=m
CONFIG_RT2800PCI_RT33XX=y
CONFIG_RT2800PCI_RT35XX=y
# CONFIG_RT2800PCI_RT53XX is not set
CONFIG_RT2800USB=m
CONFIG_RT2800USB_RT33XX=y
# CONFIG_RT2800USB_RT35XX is not set
CONFIG_RT2800USB_UNKNOWN=y   <--- This maybe ?
CONFIG_RT2800_LIB=m
CONFIG_RT2860=m
CONFIG_RT2870=m

That said, if there is no rt3070sta module, trying to load it seems somewhat pointess... I'll keep digging ;)
(see the EDIT above - I'm wondering if this is firmware "section" issue... ie. it's using the wrong section)

Did any of that make sense to you, or should I try to re-order my line of thought ?



OK, this is a pure guess but see what you think anyway...

The parameter:
CONFIG_RT2800USB_UNKNOWN=y
says to the kernel, if an unknown RT2800USB device is encountered... load rt2800usb, but as that's blacklisted, rt2870(staging) is loaded instead as it's the most commonly used, and semi-works with most USB ralink devices.

So rt2870sta gets loaded before the blacklist.conf is read.

As it's an "UNKNOWN" device (ie. the device ID is missing), rt2870sta uses the firmware section for RT2870 chipped cards, rather than the RT3070 section... which "semi" works with RT3070 chips

As I said, that it TOTAL speculation on my part... but it *may* explain things

So what I'm thinking is if we add your device ID to the most recent driver from ralink in the RT3070 section, and use the most recent firmware....

It would be nice to know for SURE where rt2870sta is getting loaded, so I'm off to see if I can find a way to discover this ;)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 23, 2011, 01:27:23 am
IS the device ID  set as a module alias ? .. What is the output from:

Code: [Select]
modinfo rt2870sta | grep v148Fp3070

[EDIT]

BTW, if some of my previous post seemed a little bit like guess work... it was (kind of)... it was just me "thinking out loud" :)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 23, 2011, 01:40:00 am
Removing those 2 files should have automagically removed the entry from /sys/bus/usb/drivers/rt2870/new_id, as it appears it is "injected" at each boot only if those files are present.

OK, but is that new_id entry always present? Because in my Ubuntu desktop version there isn't a sys/bus/drivers folder at all.

[EDIT]
Hmm... just had an idea... if you've removed those files, is the driver now aware of your device ID string ?, or is rt2870sta  somehow getting loaded for an "unknown" device as a default... in which case it would probably be unaware of the correct section of the firmware to load.

Well, I guess that's probably yes because it works in the older 2.6.31 which is the kernel that I did not experiment with and that one works pretty much out of the box.
Those two files don't exist in that older kernel.

I know this is only slightly related:
https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/762987
but it does point out that different sections of the firmware are used for different "devices".

It happens to be that user mrahk in that thread is... me!
I already said before that I mentioned the issue on launchpad and that the developers only suggested to file a bugreport...
In post #33 of that thread you can see that at that moment rt2870 was already loaded by something so it's not just an issue in kernel 2.6.35.


Adding the device ID to one of the installable drivers would be quite easy... and *should* leave you with ra0 rather than wlan0
[END EDIT]

I don't see any advantage in doing so. Post #10 in that launchpad thread reports also the name of interface as wlan0 so it happens more often.

But I'm still baffled where rt2870sta is being loaded, and why blacklisting has no effect... I know blacklist.conf will not stop drivers that are part of the kernel from being loaded, without updating initrd after blacklisting... so I'm afraid it's just a bit of an assumption on my part that the rt2870sta module is being loaded by something contained in initrd .. I'm not saying the module is itself "contained" in initrd, but your lsmod:

Quote
Module                  Size  Used by
rt2870sta             406818  1
crc_ccitt               1351  1 rt2870sta

seems to be saying rt2870sta is being used by one other module.

As far as I can remember, every lsmod I've seen it before read:

Quote
Module                  Size  Used by
rt2870sta             406818  0
crc_ccitt               1351  1 rt2870sta

OK, sometimes the rt2870sta module "size" varies depending on the version... but if I'm reading this correctly, something *appears* to be loading it as a dependency.

Yes I agree, it is loaded by something. B.T.W.: what does that size number mean? The rt2870sta module does not have that size (measured in bytes).

There definitely seems to be something rt2870 related in the kernel:
Code: [Select]
grep -i RT28 /boot/config-$(uname -r)*
output on my system (11.04 desktop)=
Quote
CONFIG_RT2800PCI=m
CONFIG_RT2800PCI_RT33XX=y
CONFIG_RT2800PCI_RT35XX=y
# CONFIG_RT2800PCI_RT53XX is not set
CONFIG_RT2800USB=m
CONFIG_RT2800USB_RT33XX=y
# CONFIG_RT2800USB_RT35XX is not set
CONFIG_RT2800USB_UNKNOWN=y   <--- This maybe ?
CONFIG_RT2800_LIB=m
CONFIG_RT2860=m
CONFIG_RT2870=m

On my Ubuntu Server the output is pretty much identical, the only difference is that RT33 is substituted by RT30 in my output and the lines are in a slightly different order.

That said, if there is no rt3070sta module, trying to load it seems somewhat pointess... I'll keep digging ;)
(see the EDIT above - I'm wondering if this is firmware "section" issue... ie. it's using the wrong section)

Did any of that make sense to you, or should I try to re-order my line of thought ?

I can follow your line of thought. No need to reorder them. However I assume the thoughts are preliminary and that you're going to elaborate anyway. Therefore I've added a few of my observations.
It is an interesting subject, that's for sure.



OK, this is a pure guess but see what you think anyway...

The parameter:
CONFIG_RT2800USB_UNKNOWN=y
says to the kernel, if an unknown RT2800USB device is encountered... load rt2800usb, but as that's blacklisted, rt2870(staging) is loaded instead as it's the most commonly used, and semi-works with most USB ralink devices.

So rt2870sta gets loaded before the blacklist.conf is read.

Sounds about right.
I guess the "m" in some of the above lines stand for "manual" configuration (as opposed to automatic configuration; the "y" option)?

As it's an "UNKNOWN" device (ie. the device ID is missing), rt2870sta uses the firmware section for RT2870 chipped cards, rather than the RT3070 section... which "semi" works with RT3070 chips

As I said, that it TOTAL speculation on my part... but it *may* explain things

So what I'm thinking is if we add your device ID to the most recent driver from ralink in the RT3070 section, and use the most recent firmware....

The device ID (148F:3070) is already in the RT3070 section if I recall it correctly. I did a test with kernel 2.6.35 with the firmware mentioned in the launchpad at that moment and it did not work.

It would be nice to know for SURE where rt2870sta is getting loaded, so I'm off to see if I can find a way to discover this ;)

B.T.W.: the rt2870sta that is loading is indeed the version that belongs to the 2.6.35 kernel according to lsmod (so it's no leftover from the 2.6.31 kernel).
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 23, 2011, 01:54:34 am
Quote
OK, but is that new_id entry always present? Because in my Ubuntu desktop version there isn't a sys/bus/drivers folder at all.

NO... only when the module is loaded... which is why they have to be "injected" every time (or compiled in).

You cannot *directly* add the device ID to the driver (using this method), as the driver isn't loaded yet... so you have to add the device ID to the USB subsystem, so when it's detected by that subsystem, it modprobes the driver... NOW you can add the device ID to the driver.

The first file effectively adds the device ID to the USB subsystem and if the device is then detected, modprobes rt2870sta

The second file then adds the device ID to the drivers "new_id" file (now that it has been created) so the *driver* is aware of the device.

If (on your desktop version) you force rt2870sta to load with:
Code: [Select]
sudo modprobe rt2870sta
(or plug the device in)
you'll see the *drivers* directory has now appeared ;) .. but that doesn't necessarily mean it knows what to do with the *device*.

Two thing have to happen when you plug a USB device in...
1) The USB subsystem has to be aware of the device ID so it knows what to do with the device, and what driver (if any) to load.
2) The driver (after being loaded by the USB subsystem) also has to be aware of the device ID so it know that it is supposed to handle it.

The above is a kind of simplified version... the USB subsystem can often take an educated guess as to the device type if it doesn't recognise the device ID

Non of this will survive a reboot if those files aren't present (or are empty), or unless the device ID has been compiled into the driver and added to the USB subsytem.

BTW, I'm assuming that was a typo... it should be /sys/bus/usb/drivers/rt2870



Quote
I don't see any advantage in doing so. Post #10 in that launchpad thread reports also the name of interface as wlan0 so it happens more often.

I'm not saying that there is an advantage to having the logical name ra0 (that's irrelevant) .. but I was under the impression that the ralink staging drivers used ra0 etc. as the logical name, but rt2800usb used wlan0 etc.

Post #10 in the launchpad thread is using the rt2800usb driver... NOT rt2870sta

So I still have a sneeking suspicion that rt2800usb is coming into play somewhere here... or that rt2870sta hasn't got the device ID string for your card compiled in.


Here's the important bit (if you want to skip the rest)
What I think *may* be happening is the USB subsystem *is* aware of the device ID (from a previous driver compile/install) so is loading rt2870sta... but the driver (because it's now the default version) *isn't* aware of the device ID, or is using the wrong section or wrong version of the firmware.



Quote
B.T.W.: what does that size number mean?

not sure... I'll see if I can find out.

[EDIT]
I haven't got a clue ??? .. but as you said it doesn't seem to have any relationship to the size of rt2870sta.ko, that's for sure... on my system

rt2870sta             450555  0
yet
rt2870sta.ko = 696712 bytes

I'm going to *guess* it's the "loaded" size... but it's a pure guess.
[END EDIT]



Quote
The device ID (148F:3070) is already in the RT3070 section if I recall it correctly. I did a test with kernel 2.6.35 with the firmware mentioned in the launchpad at that moment and it did not work.

Yes, but didn't *I* add that device ID to the most recent drivers before you downloaded them from my dropbox ? .. and even if I didn't, they were never tested with the "latest" firmware were they ? (I don't mean the firmware mentioned in that thread, I mean the very latest firmware)



ATM, I'm still trying to discover a way of being SURE where rt2870sta is being loaded...

Can you post the full output from:
Code: [Select]
modinfo rt2870sta
please.

and confirm that:
Code: [Select]
sudo lshw -C network
says the wireless device is using rt2870sta rather than rt2800usb

also, check to see if either of those are included in /etc/initramfs-tools/modules



BTW, I don't know if it was a typo... but those 2 lines you originally added had the wrong ID string anyway:

Quote
Create a new file /etc/udev/rules.d/network_drivers.rules with this line in it:
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="148f", ATTR{idProduct}=="2870", RUN+="/sbin/modprobe -qba rt2870sta"

Create another new file /etc/modprobe.d/network_drivers.conf with this line in it:
install rt2870sta /sbin/modprobe –ignore-install rt2870sta $CMDLINE_OPTS; /bin/echo “148f 2870″ > /sys/bus/usb/drivers/rt2870/new_id

Isn't your device ID 148f:3070 ?

Erm... sorry that was so long... I got a bit carried away :)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: coolmac on July 26, 2011, 09:26:12 am
hi,

i'm on linux 10.04 and got the Intex wireless usb adapter model no: IT-ULC21. I have been trying to follow the instructions but I think I'm missing something..

I can't see the conflict is at the first pointer: here's the output I get when I enter : sudo lsmod | grep rt28

Code: [Select]
rt2800usb              31531  0 
rt2x00usb               9703  1 rt2800usb
rt2x00lib              27509  2 rt2800usb,rt2x0

Moving on, I have a wireless icon in the top right corner that's not showing any network at all. In previous tests before doing this fresh install, I added rt2800usb to blacklist which resulted in no wireless network AT ALL.

other commands and their output:

ifconfig ra0 up

Code: [Select]
ra0: ERROR while getting interface flags: No such device

iwconfig

Code: [Select]
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:off/any 
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:on

lsusb

Code: [Select]
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 003: ID 413c:2106 Dell Computer Corp.
Bus 003 Device 002: ID 0461:4d81 Primax Electronics, Ltd
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 005: ID 148f:2070 Ralink Technology, Corp.
Bus 001 Device 002: ID 0bda:0181 Realtek Semiconductor Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I'm a total newbies so I kindly ask that you advise in plain, simple language.

Thanks.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 26, 2011, 02:12:24 pm
Hi coolmac, welcome to the forum :)

Your device *should* be included in rt2800usb... can you post the output from these commands to confirm:
Code: [Select]
modinfo rt2800usb | grep 2070
also
Code: [Select]
modinfo rt2870sta | grep 2070
also
Code: [Select]
modinfo rt3070sta | grep 148f
also
Code: [Select]
sudo lshw -C network

But I've also added the device ID (148f:2070) to this staging driver if you'd prefer to use that:
http://dl.dropbox.com/u/11876059/2011_0107_RT3070_RT3370_Linux_STA_v2.5.0.1_DPO.tar.bz2 (http://dl.dropbox.com/u/11876059/2011_0107_RT3070_RT3370_Linux_STA_v2.5.0.1_DPO.tar.bz2)
just follow the instructions at the top, but with this driver.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: coolmac on July 26, 2011, 02:48:55 pm
thanks for the warm welcome! glad to be here..here's the output

modinfo rt2800usb | grep 2070
Code: [Select]
alias:          usb:v148Fp2070d*dc*dsc*dp*ic*isc*ip*

modinfo rt2800sta | grep 2070
Code: [Select]
 could not find module rt2800sta

modinfo rt3070sta | grep 2070
Code: [Select]
ERROR: modinfo: could not find module rt3070sta

sudo lshw -C network

Code: [Select]
 *-network               
       description: Ethernet interface
       product: NetLink BCM57788 Gigabit Ethernet PCIe
       vendor: Broadcom Corporation
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: eth0
       version: 01
       serial: f0:4d:a2:e9:10:00
       size: 10MB/s
       capacity: 1GB/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.102 duplex=half firmware=sb latency=0 link=no multicast=yes port=MII speed=10MB/s
       resources: irq:27 memory:febf0000-febfffff
  *-network
       description: Wireless interface
       physical id: 1
       logical name: wlan0
       serial: 78:44:76:7f:75:d1
       capabilities: ethernet physical wireless
       configuration: broadcast=yes multicast=yes wireless=IEEE 802.11bgn

*fingers crossed*
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 26, 2011, 02:55:57 pm
You got the second command wrong... it should have been:
Quote
modinfo rt2870sta | grep 2070

But it's unimportant... just try the drivers I gave you a link to.

You'll still have to blacklist rt2800usb
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: coolmac on July 26, 2011, 03:21:23 pm
thanks man. I have downloaded them and blacklisted rt2800usb.

If i'm to go ahead with the instructions as per first  post (http://linuxforums.org.uk/hardware-compatibility/ralink-rt2870-based-usb-wireless-n-adapters-(ubuntu)/msg4472/#msg4472) of this topic,

there's mention of installing "build-essential, and linux-headers-generic". How can I do this on a computer that is offline..my thinking is it needs internet?

Am I wrong?  -how do I proceed from here?-

thanks
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 26, 2011, 03:22:47 pm
Yes, I'm afraid it *does* need an active internet connection to install those packages... can't you connect to the router with an ethernet cable ?

[EDIT]

If your 10.04 has never been updated, it may be best to remove the blacklisting of rt2800usb .. connect to a router with an ethernet cable .. run a complete system update .. then check if your wireless "just works", before installing the above mentioned driver ;)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 27, 2011, 12:25:39 am
All right, I'm back again.


Quote
OK, but is that new_id entry always present? Because in my Ubuntu desktop version there isn't a sys/bus/drivers folder at all.

<snip>

BTW, I'm assuming that was a typo... it should be /sys/bus/usb/drivers/rt2870

Yes and no... I meant of course the folder you mentioned. However I just looked at the wrong place searching for the folder I mentioned.
The correct folder is present even on a Ubuntu desktop...
Thanks for pointing this out.




<snip>

Post #10 in the launchpad thread is using the rt2800usb driver... NOT rt2870sta

So I still have a sneeking suspicion that rt2800usb is coming into play somewhere here... or that rt2870sta hasn't got the device ID string for your card compiled in.
It seems that rt2870sta indeed hasn't my device ID string compiled in. It is getting very strange now...


Here's the important bit (if you want to skip the rest)
What I think *may* be happening is the USB subsystem *is* aware of the device ID (from a previous driver compile/install) so is loading rt2870sta... but the driver (because it's now the default version) *isn't* aware of the device ID, or is using the wrong section or wrong version of the firmware.

Is there any way to verify this?

<snip>

Quote
The device ID (148F:3070) is already in the RT3070 section if I recall it correctly. I did a test with kernel 2.6.35 with the firmware mentioned in the launchpad at that moment and it did not work.

Yes, but didn't *I* add that device ID to the most recent drivers before you downloaded them from my dropbox ? ..

I don't recall that and I assume you didn't because if you did so that would mean that my device ID is not recognized by rt3070sta in its original state.
Why do you think then that rt3070sta is better suitable for my device than rt2870sta?
To be honest I'd rather get rid of those staging drivers and it would be very nice if one of the Ubuntu standard drivers would work. In the earlier mentioned launchpad thread the developers claim that the RaLink drivers are sort of inferior to the standard drivers and that they will never make it out of staging. It seems that in Natty they are removed all together.


and even if I didn't, they were never tested with the "latest" firmware were they ? (I don't mean the firmware mentioned in that thread, I mean the very latest firmware)

I've tested them with firmware 1.53 which was the newest at that time and it didn't work. If there's a newer firmware then that might be better.



ATM, I'm still trying to discover a way of being SURE where rt2870sta is being loaded...

Can you post the full output from:
Code: [Select]
modinfo rt2870sta
please.

well, that is a very long list. I'll dump it in an attachment.

and confirm that:
Code: [Select]
sudo lshw -C network
says the wireless device is using rt2870sta rather than rt2800usb

It displays:

  *-network
       description: Wireless interface
       physical id: 1
       logical name: wlan0
       serial: 00:1f:1f:87:e1:61
       capabilities: ethernet physical wireless
       configuration: broadcast=yes ip=10.0.0.19 multicast=yes wireless=Ralink STA

also, check to see if either of those are included in /etc/initramfs-tools/modules

That file contains a few commented lines.



BTW, I don't know if it was a typo... but those 2 lines you originally added had the wrong ID string anyway:

Quote
Create a new file /etc/udev/rules.d/network_drivers.rules with this line in it:
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="148f", ATTR{idProduct}=="2870", RUN+="/sbin/modprobe -qba rt2870sta"

Create another new file /etc/modprobe.d/network_drivers.conf with this line in it:
install rt2870sta /sbin/modprobe –ignore-install rt2870sta $CMDLINE_OPTS; /bin/echo “148f 2870″ > /sys/bus/usb/drivers/rt2870/new_id

Isn't your device ID 148f:3070 ?

Yes, that's the device ID. But I said I've tried both possibilities. So it is not a typo. I just reproduced the lines from the first event because I had this info still available.

Erm... sorry that was so long... I got a bit carried away :)

No problem at all... ;-)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 27, 2011, 03:12:39 am
First, it's probably best to ignore rt3070sta (as a module), it doesn't really exist anymore (at least not in Natty), 3070 based cards use rt2870sta, but load the rt3070.bin firmware.

Can you confirm this by running:
Code: [Select]
modinfo rt3070sta
I'm expecting -
Quote
ERROR: modinfo: could not find module rt3070sta


I'd also go with the staging driver over rt2800usb, which IMHO aren't ready yet... indeed according to here:
http://linuxwireless.org/en/users/Drivers/rt2800usb (http://linuxwireless.org/en/users/Drivers/rt2800usb)
Quote
Broken Hardware encryption

and the latest commit here:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d53d9e67b55f6a9fc3f836c5c392eb41ce5676f4 (http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d53d9e67b55f6a9fc3f836c5c392eb41ce5676f4)
Quote
Current problems:
 * Cannot scan 11n AP's
 * No TX during first minute after association
 * Broken Hardware encryption


There is something very strange going on with your drivers... rt2870sta *does* have the device ID...

From modinfo rt2870sta
Quote
alias:          usb:v148Fp3070d*dc*dsc*dp*ic*isc*ip*

maybe left over from an earlier driver installation attempt... which would explain rt2870sta loading even if it's blacklisted.

but I'm still baffled why it's wlan0, which suggests it's using rt2800usb  ???

Which driver is being used on the desktop edition ?

Is rt2870sta still blacklisted ?



OK, here's what I'd do (but it's up to you whether you want to mess with a working system)

1) Download these drivers:
http://dl.dropbox.com/u/11876059/q7icmfm%20-2011_0407_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.2_DPO.tar.bz2 (http://dl.dropbox.com/u/11876059/q7icmfm%20-2011_0407_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.2_DPO.tar.bz2)
unpack them, cd into the direectory, change to root with sudo su, then run make && make install

2) Make sure the ONLY thing that is blacklisted is rt2800usb .. ie. un-blacklist -
rt2800lib
rt2x00usb
rt2x00lib
rt2870sta
rt3070sta

3) Reboot and test the card (or ifdown wlan0 then modprobe -r rt2870sta then modprobe rt2870sta then ifup ra0)

4) if necessary, replace the firmware in /lib/firmware with the ones contained in the latest firmware from one of these Debian mirrors:
http://packages.debian.org/sid/all/firmware-ralink/download (http://packages.debian.org/sid/all/firmware-ralink/download)

Be aware - You cannot install this as you normally would a .deb... it's best to backup the files you are going to replace in /lib/firmware

ie.

Quote
rt73.bin
rt2561.bin
rt2561s.bin
rt2661.bin
rt2860.bin
rt2870.bin
rt3070.bin   <--- now replaced by a symlink
rt3071.bin
rt3090.bin   <---  symlink


then manually unpack the files from the .deb (using fileroller), and place them in /lib/firmware



Then I would expect
Code: [Select]
iwconfig
to return something like -

Quote
ra0 RT2870 Wireless ESSID:"" Nickname:"RT2870STA"
Mode:Managed Frequency=2.412 GHz Access Point:
Bit Rate=54 Mb/s
RTS thr:off Fragment thr:off
Link Quality=100/100 Signal level:-29 dBm Noise level:-71 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0


or similar.

If it *does* change to ra0, remember you'll have to change it in /etc/network/interfaces

But as I said, it's up to you if you want to mess with the wireless drivers/firmware, whilst it is (more or less) working ;)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: coolmac on July 27, 2011, 04:07:10 pm
Yes, I'm afraid it *does* need an active internet connection to install those packages... can't you connect to the router with an ethernet cable ?

[EDIT]

If your 10.04 has never been updated, it may be best to remove the blacklisting of rt2800usb .. connect to a router with an ethernet cable .. run a complete system update .. then check if your wireless "just works", before installing the above mentioned driver ;)

I managed to get an ethernet connection and ran sudo apt-get update..

I followed the instructions...delisted the blacklisted rt2800usb then restarted then ran sudo sh -c 'echo rt2870sta >> /etc/modules'. Still no connection or any wireless connection.

i proceeded to blacklist it and installed the drivers then ran sudo make && make install. Restarted and still nothing  shows. I then decided I'd delist the rt2800usb then see what happens. Wireless shows up but it doesn't recognize any networks. which is wrong because the wireless is up and running. I then blacklisted rt2800usb  and decided I'd come here again.

Output of a few commands that might help:

sudo lshw -C network
Code: [Select]
 *-network               
       description: Ethernet interface
       product: NetLink BCM57788 Gigabit Ethernet PCIe
       vendor: Broadcom Corporation
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: eth0
       version: 01
       serial: f0:4d:a2:e9:10:00
       size: 100MB/s
       capacity: 1GB/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.102 duplex=full firmware=sb ip=192.168.1.3 latency=0 link=yes multicast=yes port=MII speed=100MB/s
       resources: irq:27 memory:febf0000-febfffff

sudo ifconfig ra0 up
Code: [Select]
ra0: ERROR while getting interface flags: No such device

modinfo rt2870sta | grep 2070 and modprobe rt2870sta return nothing.

hope that gives you a clue. Thanks
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 27, 2011, 04:24:14 pm
I know this will be very long, but can you send the output from:
Code: [Select]
lsusb -v
and
Code: [Select]
lsmod
and
Code: [Select]
modinfo rt2870sta
and
Code: [Select]
modinfo rt3070sta

I know you've already answered some of these, but I'm a bit baffled as to why the device is no longer being discovered at all... it was plugged in wasn't it ?

and you did send the WHOLE output from:
Code: [Select]
sudo lshw -C network
didn't you ?
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 28, 2011, 01:27:14 am
First, it's probably best to ignore rt3070sta (as a module), it doesn't really exist anymore (at least not in Natty), 3070 based cards use rt2870sta, but load the rt3070.bin firmware.

Can you confirm this by running:
Code: [Select]
modinfo rt3070sta
I'm expecting -
Quote
ERROR: modinfo: could not find module rt3070sta


I've tested this on the desktop edition which is Natty and you're spot on.



I'd also go with the staging driver over rt2800usb, which IMHO aren't ready yet... indeed according to here:
http://linuxwireless.org/en/users/Drivers/rt2800usb ([url]http://http://linuxwireless.org/en/users/Drivers/rt2800usb[/url])
Quote
Broken Hardware encryption

and the latest commit here:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d53d9e67b55f6a9fc3f836c5c392eb41ce5676f4 ([url]http://http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d53d9e67b55f6a9fc3f836c5c392eb41ce5676f4[/url])
Quote
Current problems:
 * Cannot scan 11n AP's
 * No TX during first minute after association
 * Broken Hardware encryption


Well, I guess I can confirm that broken hardware encryption. Right now on the laptop (Natty desktop version) I have a wireless connection via the second RT3070 usb stick and it uses the rt2800usb driver. Every now and then it looses the connection for a short while...

There is something very strange going on with your drivers... rt2870sta *does* have the device ID...

From modinfo rt2870sta
Quote
alias:          usb:v148Fp3070d*dc*dsc*dp*ic*isc*ip*

maybe left over from an earlier driver installation attempt... which would explain rt2870sta loading even if it's blacklisted.

but I'm still baffled why it's wlan0, which suggests it's using rt2800usb  ???

Which driver is being used on the desktop edition ?

The desktop uses driver rt2800usb and detects the interface as wlan1 (because wlan0 is taken by the internal wireless network card which is made by Realtek)

Is rt2870sta still blacklisted ?

On the server it is still blacklisted.



OK, here's what I'd do (but it's up to you whether you want to mess with a working system)

1) Download these drivers:
http://dl.dropbox.com/u/11876059/q7icmfm%20-2011_0407_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.2_DPO.tar.bz2 ([url]http://http://dl.dropbox.com/u/11876059/q7icmfm%20-2011_0407_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.2_DPO.tar.bz2[/url])
unpack them, cd into the direectory, change to root with sudo su, then run make && make install

2) Make sure the ONLY thing that is blacklisted is rt2800usb .. ie. un-blacklist -
rt2800lib
rt2x00usb
rt2x00lib
rt2870sta
rt3070sta

3) Reboot and test the card (or ifdown wlan0 then modprobe -r rt2870sta then modprobe rt2870sta then ifup ra0)

4) if necessary, replace the firmware in /lib/firmware with the ones contained in the latest firmware from one of these Debian mirrors:
http://packages.debian.org/sid/all/firmware-ralink/download ([url]http://http://packages.debian.org/sid/all/firmware-ralink/download[/url])

Be aware - You cannot install this as you normally would a .deb... it's best to backup the files you are going to replace in /lib/firmware

ie.

Quote
rt73.bin
rt2561.bin
rt2561s.bin
rt2661.bin
rt2860.bin
rt2870.bin
rt3070.bin   <--- now replaced by a symlink
rt3071.bin
rt3090.bin   <---  symlink


then manually unpack the files from the .deb (using fileroller), and place them in /lib/firmware



Then I would expect
Code: [Select]
iwconfig
to return something like -

Quote
ra0 RT2870 Wireless ESSID:"" Nickname:"RT2870STA"
Mode:Managed Frequency=2.412 GHz Access Point:
Bit Rate=54 Mb/s
RTS thr:off Fragment thr:off
Link Quality=100/100 Signal level:-29 dBm Noise level:-71 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0


or similar.

If it *does* change to ra0, remember you'll have to change it in /etc/network/interfaces

But as I said, it's up to you if you want to mess with the wireless drivers/firmware, whilst it is (more or less) working ;)


FYI: I've checked it on the desktop version and the files you indicate as symlinks are no symlinks but just plain files.
The only mystery remaining is why it uses an unusual interface name but it seems we can't answer that for now.
Furthermore the wireless connection is WPA2 encrypted and it works on its maximum speed. I guess there's nothing to gain right now by messing with the drivers and/or firmware. I can only loose now by breaking it again so I think it is wise  that I'm not going to mess with the files on the server until I need to.
Besides I've new priorities. Based upon this success I've decided to connect all of my peripheral devices to the server. That went very well but I've some issues with a rather old flatbedscanner. So I'm going to search for a thread on this forum to get some clues about that.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 28, 2011, 01:37:10 am
Okey dokey... and I can't say I blame you, I'd probably not mess with it either ;)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 28, 2011, 01:53:12 am
I've tested the procedure above with my ubuntu desktop and the second RT3070 usb stick and guess what:
Even with rt2800usb blacklisted and rt2870 modprobed it STILL loads rt2800usb.
Weird...
I now have two separate computers and two different ubuntu versions (Server: Maverick; Desktop: Natty) that both completely seem to ignore that blacklist file. There's something strange going on with either blacklisting or that rt2800 driver.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on July 28, 2011, 04:06:45 am
Are you saying the line:
Code: [Select]
blacklist rt2800usb
is in /etc/modprobe.d/blacklist.conf

yet:
Code: [Select]
lsmod
still shows it as loading ?

If so, I agree, VERY weird  ???
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on July 30, 2011, 01:13:57 am
Yes, I did say that, but it turns out to be WRONG.
Apparently something had been screwed up. Now it does respect the blacklisting.

However there are other errors. ifup gives an error about wlan1=wlan1 or something like that.
I can't remember it exactly and I don't have the second usb stick available right now.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: pevers1 on August 06, 2011, 05:07:48 pm
I am a complete novice at Ubuntu and recently purchased a Linksys AE1000 wireless adapter for my desktop pc.
I have Ubuntu 10.4 I think running under VMware.

Can someone provide me with exact instructions on how to activate this adapter in Ubuntu? Don't assume I know anything.

I would be very grateful for some help.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on August 06, 2011, 05:24:25 pm
Hi pevers1, welcome to the forum :)

I'm not 100% sure how VMware handles USB devices... ie. whether it just passes through the hosts connection, or if you need to have the Linux drivers installed... Which OS is hosting VMware ? .. and does the adapter work in the host OS ?

I'll download VMware player lter and check, but for now can you (in Ubuntu) open a terminal and enter:
Code: [Select]
lsusb
hit enter, and post the output.

also post the output from:
Code: [Select]
sudo lshw -C network

Remember, Linux commands ARE case sensitive.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on September 05, 2011, 03:24:05 am
Now I'm absolutely done with that (***) Ubuntu.  >:(

I've installed it on a third computer. Exact same install CD as before (ubuntu 10.04), exact same USB wireless dongle (148f:3070).
No go.

So now I've:
- a working laptop (wireless works right out of the box)
- a working server (wireless works after a lot of messing around and absolutely no clue why it works).
- a not working regular desktop. Even trying all solutions mentioned here do not solve the problems.

There are a lot of solutions here but probably the most important one is not mentioned being:

Ubuntu's hardware detection is terrible, especially the wireless department.
Each install is different from another and each new release contains more and more errors.

If one wants to work wireless then better say goodbye to ubuntu.
Ubuntu for humans?! I don't think so. At least not "regular" humans  ;)

I'm going to ditch it anyway (the version on the not working desktop). Because of a major bug in grub2 in 11.04 (importance: undecided [ :-\ ] according to the developers) it won't boot anymore.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: BkS on September 05, 2011, 12:34:22 pm
Well I've install Ubuntu on 3 different laptop in the past year, and not once have I had a problem with wireless detection. So I don't see how Ubuntu's hardware detection is so bad.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on September 05, 2011, 12:48:17 pm
Without more evidence than an obscure USB-->Parallel adapter cable (which you state doesn't work properly in Windows) and a single generic Wireless device, I'm afraid I'm going to have to agree with BkS on this one.

And when you stack the price of a new PCI Parallel port card and a new wireless adapter, against the price of Windows + AV + Office +...... ;)

Sorry if this sounds like I'm "having a go", I'm not... but I've found Ubuntu hardware detection and driver support pretty darn good... though I suppose there *could* be an element of luck involved :)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: q7icmfm1x0h609c6xiok on September 05, 2011, 05:49:43 pm
What has the usb parallel adapter issue to do with this?  ???
Anyway, the wireless device identifies itself as 148f:3070 so I should think it uses RT3070sta.
Well wrong; that driver does not exist anymore so it goes for RT2870sta on the server computer. But only after a lot messing around.

On my laptop is uses rt2800usb driver and it does not need any editing or whatsoever. it is not even necessary to blacklist drivers.

On my rather old desktop (that might be a problem concerning the type of usb ports), it tries to use rt2870sta en rt2800usb simultaneously, so one needs to be blacklisted.
I chose to use rt2870sta then ubuntu states there are wireless networks. It does not tell which and it can't connect to the correct one.
So again: hardware detection is not exactly that bad but it is inaccurate in relating the device to a suitable driver.

But like I said I ditched Ubuntu on the desktop because it has a grub2 problem, but I'm going to reinstall a somewhat older version.
So the server has nothing not much to do with this.
FYI: I know that suggestion about a PCI parallel port but unfortunately that won't work.
It is a special computer. It has approximately the size of a old 5,25 inch floppy and the height if I may call it like that, is about 1 inch. So it is physically impossible to insert a new card.
But I must say this mini computer works quite good.

I'll go with the observation of Mark. Probably there's an element of luck involved.
I';ve had a few cases where things didn't work on the first few attempts but after some time doing nothing to it things start to work. It might be luck, or new insights or probably new updates. I don't know.
All I know is that a problem is rarely a permanent problem.
And I do like ubuntu better than windows anyway  ;D
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on September 05, 2011, 05:56:17 pm
Can you provide more info on the GRUB2 problem please... I've not heard of it  :o .. though the Reinstalling GRUB 1.99 in Ubuntu 11.04 from LiveCD - Command change (http://linuxforums.org.uk/ubuntu/reinstalling-grub-1-99-in-ubuntu-11-04-from-livecd-command-change/) page on this forum does seem to be getting a LOT of hits.
(I've never understood the whole GRUB2/Linux naming convention thing, where 0.x -> 0.99 is version 1, and 1.0 -> 1.99 is version 2, but there you go)

Or do you mean that particular PC doesn't like GRUB2 ? .. any ideas why ? .. is it a fakeRAID issue ?

I'll agree that where *new* hardware is concerned (and still sadly with some wireless devices in particular) Linux sometimes lags behind Windows as far as drivers are concerned, but I see this as the manufacturers that are at fault in not providing current working proprietary drivers, or at least open sourcing them... not that that helps in any way   ::)

Sadly, I suppose the moral of this story is that *sometimes* you need to do a little more homework with Linux and device drivers... but as you say they usually catch up, or the issue is solvable... again, not that that's always a help to everyone, or if you already own the hardware.

BTW, the RTXXXXSTA drivers are proprietary closed source drivers from Ralink, so are AFAIK legally un-modifiable, so somewhat of a manufacturer created issue again... they sell the chips to generic card manufacturers, then take forever to add the ID's to their drivers which can be a royal pain for users because the Linux devs (AFAIK) can't add them. ;)
but as you say the open source rt2800usb drivers are coming along in leaps and bounds, and getting better daily, so there's still hope for the near future :)

RT3070STA was "supposed" to have been absorbed into RT2870STA, but again how well that works is down to Ralink.

Do you think it may be worth giving Debian (testing or unstable) a test drive ? .. they flatly refuse to use proprietary drivers, so *may* put more effort into making sure the open source drivers work, and are upstream of Ubuntu anyway.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: ledgah on September 10, 2011, 03:52:25 pm
I have the same problem noobuntu had.

After:

iwconfig

there is no wireless interface (except lo and eth0)
rt2870sta module is loaded.

The output of commands
lshw -C network
tail -n 15
lsusb

is in the attachment.

I have tried using the rt3572 module with no luck.

Thank you
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on September 10, 2011, 04:08:04 pm
Can you post the output from:
Code: [Select]
lsmod | grep rt
and
Code: [Select]
modinfo rt2870sta | grep 2070
and
Code: [Select]
modinfo rt2800usb | grep 2070

And tell us which version of Ubuntu you are running:
Code: [Select]
cat /etc/*-release

And your kernel version:
Code: [Select]
uname -a

Oh, and which driver(s) you've already tried :)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: ledgah on September 11, 2011, 01:21:47 pm
lsmod | grep rt
rt2870sta             570769  0
parport_pc             32111  1
parport                36746  3 ppdev,parport_pc,lp

modinfo rt2870sta | grep 2070


modinfo rt2800usb | grep 2070
alias:          usb:v148Fp2070d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v8516p2070d*dc*dsc*dp*ic*isc*ip*

cat /etc/*=release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.04
DISTRIB_CODENAME=natty
DISTRIB_DESCRIPTION="Ubuntu 11.04"

uname -a
Linux chingu 2.6.38-11-generic #48-Ubuntu SMP Fri Jul 29 19:05:14 UTC 2011 i686 i686 i386 GNU/Linux

I have tried the driver that you have posted on the first page on the thread and then the one you have fixed for Noobuntu on the second page of the thread (both rt2870sta). I have also tried the rt3572 one. I can still connect to the Internet by loading the rt2800usb.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on September 11, 2011, 02:40:40 pm
OK, try this one:
http://dl.dropbox.com/u/11876059/custom-RT2070-added-2011_0407_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.2_DPO.tar.bz2 (http://dl.dropbox.com/u/11876059/custom-RT2070-added-2011_0407_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.2_DPO.tar.bz2)

I've added the 148f:2070 ID's

Your ID's obviously aren't contained in the driver you are currently using.

The rest of the instructions remain the same.



If rt2800usb is working, why do you want to change to the staging drivers ?
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: ledgah on September 11, 2011, 03:40:44 pm
I am using the new driver now.

Please note that there the code in makefile tried to copy files into /tftpboot .

With rt2800usb Internet was very slow and I got disconnected frequently.

Old rt2800 included with ubuntu 11.04 was working fine except crashing once or twice a week, which make me look for a new driver.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on September 11, 2011, 03:46:02 pm
So did the custom driver work ?

All I did was download them directly from Ralink, and add

   {USB_DEVICE(0x148F,0x2070)}, /* Ralink Generic 2070 */

to

/common/rtusb_dev_id.c
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: ledgah on September 11, 2011, 03:53:08 pm
Yes it is working now.

Thank you!
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on September 11, 2011, 04:03:42 pm
You're welcome :)

/tftpboot files, I'm guessing are for (PXE) remote booting/installations, but are pretty useless on their own... and I would have thought totally useless on a USB adapter (that doesn't contain a PXE boot ROM) anyway. ???
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: ohmysql on September 19, 2011, 07:36:13 pm
Question for you: if you check out the thread I've been working on here:

http://ubuntuforums.org/showthread.php?p=11232535 (http://ubuntuforums.org/showthread.php?p=11232535)

I'm not sure that rt2870sta is the right driver for my AM10. No one has EVER gotten this Cisco/Linksys device to work on linux, so we are breaking new ground here. But I was wondering how you can tell which driver I'll need.

If you would like any terminal outputs, just let me know. Thank you so much.

OMS!
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on September 19, 2011, 09:46:26 pm
So I can see which firmware you are using, and if your device id's are included in rt2800usb...

Can you send the output from:
Code: [Select]
ls -l /lib/firmware/rt2870.bin
and
Code: [Select]
modinfo rt2800usb | grep 0031
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: ohmysql on September 19, 2011, 09:59:19 pm
So I can see which firmware you are using, and if your device id's are included in rt2800usb...

Can you send the output from:
Code: [Select]
ls -l /lib/firmware/rt2870.bin

and
Code: [Select]
modinfo rt2800usb | grep 0031

Sure:

Code: [Select]
-rw-r--r-- 1 root root 4096 2010-11-18 16:20 /lib/firmware/rt2870.bin
for the first and

The second comes up blank. I think I deinstalled rt2800usb in trying to get rt2870sta to work. Here is the same command for rt2870sta

Code: [Select]
modinfo rt2870sta | grep 0031
alias:          usb:v13B1p0031d*dc*dsc*dp*ic*isc*ip*

I hope this helps.

OMS
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on September 19, 2011, 10:28:41 pm
OK, first thing to try... get firmware 1.53 from here:
https://launchpad.net/ubuntu/oneiric/+source/linux-firmware/1.53/+files/linux-firmware_1.53.tar.gz (https://launchpad.net/ubuntu/oneiric/+source/linux-firmware/1.53/+files/linux-firmware_1.53.tar.gz)

and see if that works with rt2870sta

meanwhile, is anything returned for:
Code: [Select]
modinfo rt2800usb
at all ?

The reason I ask is that your card is listed as working in Debian using rt2800usb, the latest firmware, and a kernel that has the device ID's included in rt2800usb

http://wiki.debian.org/rt2800usb (http://wiki.debian.org/rt2800usb)

Just to be sure I've got the correct ID's can you also post the output from:
Code: [Select]
lsusb
(I know it's on the Ubuntu forum dut I want to be sure)

The device ID's *ARE* included in the kernel I'm running (3.1.0-0301rc4-generic), and whilst you are answering the above, I'll try booting into other kernels to find which one they first appeared in.

BTW, we *may* need to replace the rt2870.bin firmware from the Debian firmware package, which is slightly newer than even Ubuntu's 1.53, but we'll try that later.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: ohmysql on September 19, 2011, 10:39:52 pm
Sorry for the mega n00b question but how do I update the firmware once I've downloaded it? It seems like I don't want to go into synaptic and just deinstall the previous stuff. But I can do that.

Here is lsusb:

Code: [Select]
Bus 002 Device 003: ID 045e:007d Microsoft Corp. Notebook Optical Mouse
Bus 002 Device 002: ID 045e:00db Microsoft Corp. Natural Ergonomic Keyboard 4000 V1.0
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 006: ID 13b1:0031 Linksys AM10 v1 802.11n [Ralink RT2870]
Bus 001 Device 005: ID 1307:1169 Transcend Information, Inc. TS2GJF210 JetFlash 210 2GB
Bus 001 Device 004: ID 1307:0169 Transcend Information, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Everything starting in Transcend Information or Linksys is the same card. If I unplug, all three disappear. Yes, the product and vendor addresses you gave me seem correct. If that Debian package is correct, wouldn't that mean that rt3070 is the correct driver?

I haven't heard of ANYBODY on the web getting AM10 to work in linux. As far as I know, I am #1 (in many ways, not all of them flattering).

Ah, something DID come up for modinfo rt28000usb!

Code: [Select]
modinfo rt2800usb
filename:       /lib/modules/2.6.38-11-generic/kernel/drivers/net/wireless/rt2x00/rt2800usb.ko
license:        GPL
firmware:       rt2870.bin
description:    Ralink RT2800 USB Wireless LAN driver.
version:        2.3.0
author:         http://rt2x00.serialmonkey.com
srcversion:     52008801035C9FD38B91EC7
alias:          usb:v0586p341Ad*dc*dsc*dp*ic*isc*ip*
alias:          usb:v177Fp0313d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v177Fp0153d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083ApF511d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083ApD522d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083ApC522d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083ApA512d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v18E8p6259d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v2019pAB24d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1D4Dp0011d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1D4Dp0010d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1D4Dp0002d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v05A6p0101d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1B75p3072d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1B75p3071d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v100Dp9032d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1737p0079d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1737p0078d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1737p0077d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1740p0615d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1740p0605d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1044p800Cd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v15A9p0010d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v203Dp14A1d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07D1p3C17d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07D1p3C15d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07D1p3C13d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07D1p3C0Bd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v18C5p0008d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07AAp0042d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07AAp0041d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v14B2p3C11d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v14B2p3C08d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0411p015Dd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0411p0150d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0411p0148d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0411p012Ed*dc*dsc*dp*ic*isc*ip*
alias:          usb:v050Dp825Ad*dc*dsc*dp*ic*isc*ip*
alias:          usb:v13D3p3322d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v13D3p3284d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v13D3p3262d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1761p0B05d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0B05p1790d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0B05p1761d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0B05p1760d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0E0Bp9041d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0E0Bp9031d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p0050d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v148Fp8070d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v148Fp3370d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0586p3416d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v5A57p5257d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v5A57p0283d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v5A57p0282d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v5A57p0280d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0CDEp0025d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0CDEp0022d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v157Ep300Ed*dc*dsc*dp*ic*isc*ip*
alias:          usb:v177Fp0302d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v15A9p0006d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083ApB522d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083ApA703d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083ApA702d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083ApA701d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083ApA618d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083Ap8522d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083Ap7522d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083Ap7512d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083Ap7511d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v083Ap6618d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p0048d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p0047d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p0042d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p0040d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p003Fd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p003Ed*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p003Dd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p003Bd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p0039d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p002Dd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p002Cd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p002Bd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DF6p0017d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v129Bp1828d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v04E8p2018d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v148Fp3072d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v148Fp3071d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v148Fp3070d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v148Fp2870d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v148Fp2770d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v148Fp2070d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1A32p0304d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v2019pED06d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v2019pAB25d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0471p200Fd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1D4Dp000Ed*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1D4Dp000Cd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v20B8p8888d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p899Ad*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p871Cd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p871Bd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p871Ad*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p870Ad*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p822Cd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p822Bd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p822Ad*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p821Ad*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p6899d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p3871d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p3870d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p3822d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p3821d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0DB0p3820d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v100Dp9031d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0789p0166d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0789p0164d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0789p0163d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0789p0162d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1737p0071d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1737p0070d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v04BBp0948d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v04BBp0947d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v04BBp0945d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0E66p0018d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0E66p0017d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0E66p0013d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0E66p000Bd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0E66p0009d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0E66p0003d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0E66p0001d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1044p800Dd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1044p800Bd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1740p9709d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1740p9708d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1740p9707d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1740p9706d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1740p9705d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1740p9703d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1740p9702d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1740p9701d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v203Dp14A9d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v203Dp1480d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v7392p7718d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v7392p7717d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v7392p7711d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07FAp7712d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07D1p3C16d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07D1p3C11d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07D1p3C0Fd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07D1p3C0Ed*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07D1p3C0Dd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07D1p3C0Ad*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07D1p3C09d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v18C5p0012d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07AAp003Fd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07AAp003Cd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07AAp002Fd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v14B2p3C28d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v14B2p3C27d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v14B2p3C25d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v14B2p3C23d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v14B2p3C12d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v14B2p3C09d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v14B2p3C07d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v14B2p3C06d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0411p00E8d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v050Dp815Cd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v050Dp805Cd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v050Dp8053d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v13D3p3321d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v13D3p3307d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v13D3p3305d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v13D3p3273d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v13D3p3247d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0B05p1784d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0B05p1742d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0B05p1732d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0B05p1731d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1690p0740d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v15C5p0008d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v8516p3072d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v8516p3071d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v8516p3070d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v8516p2870d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v8516p2770d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v8516p2070d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1EDAp2310d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v1482p3C09d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07B8p3072d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07B8p3071d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07B8p3070d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07B8p2770d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v07B8p2870d*dc*dsc*dp*ic*isc*ip*
depends:        rt2x00lib,rt2800lib,rt2x00usb
vermagic:       2.6.38-11-generic SMP mod_unload modversions
parm:           nohwcrypt:Disable hardware encryption. (bool)

OMS
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on September 19, 2011, 11:08:04 pm
OK easiest way...

Code: [Select]
sudo cp -rv /lib/firmware /lib/firmware-old
then
Code: [Select]
sudo cp -rv /usr/share/doc/linux-firmware /usr/share/doc/linux-firmware-old

OK that's the current firmware backed up (just in case)

now download this (even newer 1.54) .deb:
https://launchpad.net/~thomas-creutz/+archive/linux-firmware/+build/2556299/+files/linux-firmware_1.54%7Eppa1_all.deb

and just double-click it to install... when Ubuntu Software Centre opens, just click the Upgrade button.

Sorry, got a bit busy there for a while... I'll go check the earlier kernels now :)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: ohmysql on September 20, 2011, 03:40:27 am
 :)

Thanks, I've now updated the firmware. Nothing magical happened with regards to the rt2870 driver magically working when plugged in. But I'll try updating then using rt2800usb tomorrow.

Thanks for the instructions. (I always forget how easy debian packages are - software center's totally got my back - I'm always imagining I'll be pounding something out in the black terminal screen).

OMS
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: ohmysql on September 20, 2011, 04:28:42 pm
Ok, I'm going to try rt2800USB - I doubt I'll have much success.

Also, if I want rt2800usb to have an eye out for 13b1:0031 (FYI I now have all the vendor and product IDs memorized, how scary is that), how do I do that?

When I added 13b1:0031 to rt2870sta I had to take the original - what is that, a binary, is it source code? - anyway, and then I added that to the things it watches out for. I have no idea how to do that for rt2800usb. Forgive the n00b question, but I couldn't find source code for it. It must come off the Ralink site or something - I was googling for half an hour and clearly if it's obvious I missed it.

Also, I was also going to point out that you didn't answer my question above about - how do you know which version of rt.... to use? rt2870, rt2800usb, rt3572, rt3070 - I am not at all sure what the difference is. But I really appreciate the help.

I'll report back if I have any success, but I doubt it. I'll just edit this post so as not to create an even bigger thread.\

OMS
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on September 20, 2011, 04:42:10 pm
OK, it will be interesting to see what happens when you blacklist rt2870sta and modprobe rt2800usb... as rt2800usb on your kernel doesn't have the correct ID's built in.

After trying that, there are a couple of options...

a) try a different STA driver... your adapter seems to be an rt3072
Now though I can find NO info for your particular card online, a few people usin a SWEEX card based on the rt3072 seem to have had luck adding the device ID's to the rt3070 drivers... so may be worth a shot.

b) move to a later kernel... problem with this is that the correct device ID's aren't in the 2.6.39 kernel either, which means moving to kernel >= 3.0 (I only know for sure they are in 3.1), vut this *may* introduce other problems, such as having to reload your graphics drivers... 3.1 works fine for me, but there are NO guarantees it will work (without issue) for you.

That said, you should still be able to boot the old kernel, if 3.1 gives you problems.

OR

You could just wait for Ubuntu 11.10, which will use kernel >=3.0 by default.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on September 20, 2011, 04:46:23 pm
Quote from: ohmysql
Also, if I want rt2800usb to have an eye out for 13b1:0031 (FYI I now have all the vendor and product IDs memorized, how scary is that), how do I do that?

AFAIK, you can't... rt2800usb is built into the kernel, so without downloading the kernel source, patching it, and recompiling it, there is no way to add the ID's (at least that I'm aware of).

But you never know your luck... it *may* work anyway, as long as rt2800usb is loaded (and rt2870sta NOT loaded)

As I said Ubuntu 11.10 will use (at least) kernel 3.0 which *may* contain the correct ID's by default... even if it doesn't, upgrading the kernel to 3.1 (which definitely has the ID's) should be less risky in 11.10... so it *may* just be best to wait.

But as ever, the choice of which way you want to go is up to you.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: ohmysql on September 20, 2011, 05:09:04 pm
Well, I'm running rt2800usb - I tried it earlier, it officially wasn't working. Unlike before with rt2870, network manager wasn't even picking up that a wireless device had been plugged or unplugged (at least I assume it's network-manager that creates the notifications when you gain and lose internet access. I'm going to try a udev rule to see if I can get that to work.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on September 20, 2011, 05:13:53 pm
Yup, worth a shot ;)

If that works, please let me know.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: ohmysql on September 20, 2011, 05:26:15 pm
Do you think it would help to add a line here:

Code: [Select]
gksudo gedit /etc/udev/rules.d/70-persistent-net.rules

Code: [Select]
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="13b1", ATTR{idProduct}=="0031", RUN+="/sbin/modprobe -qba rt2800usb"

Already my udev rules have:

Code: [Select]
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="68:7f:74:e3:f6:4b", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="ra*", NAME="ra0"

I'm not sure what, if anything this line that is there accomplishing. But maybe I could call a driver.

OMS
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on September 20, 2011, 05:54:35 pm
Give me a while... I want to try something in a VM
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: ohmysql on September 20, 2011, 05:59:10 pm
Give me a while... I want to try something in a VM
OK. And thank you!

I did add that line to udev. As far as I can tell, it didn't help. Here's my udev code:

Code: [Select]
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x10de:0x03ef (forcedeth)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="50:e5:49:6a:d2:1d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# USB device 0x13b1:0x0031 (usb) OLD EFFORT DAS 2011-09-20
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="68:7f:74:e3:f6:4b", ATTR{dev_id}=="0x0", ATTR{type}=="1", #KERNEL=="ra*", NAME="ra0"

# USB device 0x13b1:0x0031 (usb)
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="13b1", ATTR{idProduct}=="0031", RUN+="/sbin/modprobe -qba rt2800usb"

Let me respond to your previous response a bit more:

Quote
OK, it will be interesting to see what happens when you blacklist rt2870sta and modprobe rt2800usb... as rt2800usb on your kernel doesn't have the correct ID's built in.

After trying that, there are a couple of options...

a) try a different STA driver... your adapter seems to be an rt3072
Now though I can find NO info for your particular card online, a few people usin a SWEEX card based on the rt3072 seem to have had luck adding the device ID's to the rt3070 drivers... so may be worth a shot.

b) move to a later kernel... problem with this is that the correct device ID's aren't in the 2.6.39 kernel either, which means moving to kernel >= 3.0 (I only know for sure they are in 3.1), vut this *may* introduce other problems, such as having to reload your graphics drivers... 3.1 works fine for me, but there are NO guarantees it will work (without issue) for you.

That said, you should still be able to boot the old kernel, if 3.1 gives you problems.

OR

You could just wait for Ubuntu 11.10, which will use kernel >=3.0 by default.

When you talk about kernel 2.6.39 - are you talking about of ubuntu? And what is kernel 3.0 - is that the version of Ubuntu that's coming out next month?

I'm going to try rt3572 and after that, rt3070, so we'll see what happens. The old rotating driver trick. Do you think SWEEX is worth a shot? Never heard of it - if you have the link where you're reading, that may be helpful.

OMS
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on September 20, 2011, 06:33:15 pm
OK, try this...

Unplug the device, then run:

Code: [Select]
sudo modrope -r rt2870sta
sudo modprobe rt2800usb
sudo -s
echo 13B1 0031 > /sys/bus/usb/drivers/rt2800usb/new_id
exit

then plug in your device, and see if it works.

If it does, we'll add it permanently.

The reason I used a capital B in 13B1 is that's the way it's listed in rt2800usb from kernel 3.1 .. though I'm fairly sure case doesn't matter.



Quote
When you talk about kernel 2.6.39 - are you talking about of ubuntu? And what is kernel 3.0 - is that the version of Ubuntu that's coming out next month?


No... think of the kernel as the core of OS .. at the moment, Ubuntu 11.04 is using kernel 2.6.38 by default, but it is easy to upgrade that to 2.6.39

The kernel devolopers have changed the kernel naming convention after 2.6.39 to 3.0. 3.1 etc.

The next version of Ubuntu (11.10) will use kernel 3.0 (or maybe 3.1)

rt2800usb is part of the kernel (not a separate module like the STA drivers)... so you can't add the ID's before compiling the driver, you'd have to compile the whole kernel .. but there is a way :)

The kernel IS Linux .. Ubuntu is a Linux "Distribution", which consists of the Linux kernel, the GNU tool chain, and a lot of applications, all put together as a "Distribution".

If you want to know more about the kernels job... see here:
http://en.wikipedia.org/wiki/Kernel_%28computing%29 (http://en.wikipedia.org/wiki/Kernel_%28computing%29)
and
http://en.wikipedia.org/wiki/Linux_kernel (http://en.wikipedia.org/wiki/Linux_kernel)



Quote
Do you think SWEEX is worth a shot?


I think (but i'd have to check) the people who had cards made by SWEEX that used the same chip as yours (rt3072) were using the
2011_0407_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.2_DPO
driver, and adding their ID's to the 3070 section.

Lost the damn link though... but I'll see if I can find it again.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: peterthewolf on January 12, 2012, 08:47:10 pm
Thank you Mark

The advice you gave jamesrl worked on my ubuntu pc with kernel 2.6.35-31-generic.

It also worked on another xubuntu pc with kernel 3.0.0-14.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on January 17, 2012, 12:44:16 pm
You're more than welcome .. and welcome to the forum :)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: oblio on February 17, 2012, 10:19:04 pm
Thanks Mark,

I really appreciate the fix you provided which enabled me (once again) to compile a driver for my RT2870 based wireless USB adapter (DWA140) on kernels  >= 2.6.35. 
I'm running Mepis 11 which has the 2.6.36 kernel.
Of course I searched and searched the net, begged Ralinktech to provide a newer source package that would support kernels >= 2.6.35.   No dice..... :-[ 
In the end I decided to installed the then current Debian 2.6.32 kernel and compiled/checkinstalled a .deb for that kernel.  All went well of course...
Pure chance led me here and there it was:  renamed usb functions as of 2.6.35 + a fix that enabled successfully compiling for newer kernels.

I'm happy to report that my DWA140 is happily humming along in M11 with its default Mepis kernel 2.6.36....:-)   

Once again, thanks,

Ko 
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on February 17, 2012, 10:27:49 pm
You're very welcome .. thanks for letting me know it helped :)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: oblio on February 18, 2012, 01:26:42 pm
@Mark:

On the issue of "somehow rt2870sta loads, despite blacklisting":
Have you considered that (since kernel 2.6.30?) the kernel itself provides a number of experimental ('staging') wireless drivers - including one for rt2870sta?
See the attached screenshot (found 3 instances of rt2870sta,ko -- one in the 'staging' folder.  And that one has been proven worthless _to me_ in the past.
Normally I used to either rename it or replace it there with the newer rt2870sta.ko from self-compiling/installing the driver.
Somehow I forgot to do that yesterday, but my wireless still works OK, so it may not be necessary any longer
The relevant output from lsmod shows:  'rt2870sta             448934  1'   as module-size.

I also use "checkinstall" instead of "make install" during compilation.  That also provides a .deb package...:-)

(http://[url=http://linuxforums.org.uk/index.php?action=dlattach;topic=852.0;attach=1871]http://linuxforums.org.uk/index.php?action=dlattach;topic=852.0;attach=1871[/url])
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on February 18, 2012, 01:58:28 pm
AFAIK the included staging rt2870sta.ko is a loadable kernel object (module), and not compiled into the kernel itself .. so I would have expected it to be blacklistable .. but I no longer have an rt2870 based adapter to test it on, so who knows.

I'm pretty certain "staging" drivers are NOT merged into the mainline kernel and are stand-alone drivers, but could be wrong  :o

http://www.kroah.com/log/linux/linux-staging-update.html (http://www.kroah.com/log/linux/linux-staging-update.html)

Searching for and renaming the .ko may have been a good idea though :)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: oblio on February 18, 2012, 02:08:23 pm
AFAIK the included staging rt2870sta.ko is a loadable kernel object (module), and not compiled into the kernel itself .. so I would have expected it to be blacklistable .. but I no longer have an rt2870 based adapter to test it on, so who knows.

I'm pretty certain "staging" drivers are NOT merged into the mainline kernel and are stand-alone drivers, but could be wrong  :o
You're right that the staging drivers are loadable kernel objects.
I didn't imply that is was compiled into the kernel.  Just that they're provided at kernel installation and loaded as experimental driver at startup...

Sorry for the misunderstanding. English is not my native langage....:-)

Ko
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on February 18, 2012, 02:20:13 pm
Quote
Sorry for the misunderstanding. English is not my native langage....:-)

You seem pretty damn good at it to me .. until you said so I'd never have guessed you weren't English, you're certainly better at it than I'd be at whatever your native language is .. and better than some Englishmen (probably myself included) ;)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: oblio on February 18, 2012, 02:47:05 pm
My native language is Dutch....:-)   
Having worked for several companies where english was the spoken/written language probably did help....:)

PS: are those Captcha's really necessary for posting AND editing posts... (yes, I made some typo's....) ?

Ko

Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on February 18, 2012, 03:00:46 pm
Captcha(s) are only for the first 5 posts (I'm sure that's how we set it) to keep spam down .. after you've made 5 postings, you shouldn't see them again :)

Please let me know if you do.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: oblio on February 19, 2012, 11:18:41 pm
Thanks for telling me... ;)

Ko
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: oblio on February 19, 2012, 11:19:12 pm
You're right

Ko
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on February 19, 2012, 11:52:49 pm
:) Now you can make typos to your hearts content :)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: fatguy1121 on March 01, 2012, 10:01:59 pm
Mark, it seems you are very patient to help noobs, well thats me... I need help. I just purchased a Rosewill RNXN600UBE and I need to get the drivers installed on 3 different machines all running Ubuntu 11.10.  I noticed the driver for this from Rosewill's website is labeled as the Ralink RT3572, but in the config file it says RT2870 for everything.

I went to Ralink's website and noticed the RT3572 and the RT2870 drivers for download, to me they look like the same thing. maybe this is my problem? I dont know. (maybe they are different because its a dual band adapter?)

I followed all the instructions and everything went fine, I even used your uploaded build for make install. it seems to have installed, except when I do the modprobe command it seems to do nothing, it takes a second then finishes. It does not make an ra0 network device. Iwconfig shows nothing, and lsmod shows the driver there but nothing is happening.

lsusb says this "Bus 002 Device 005: ID 148f:3572 Ralink Technology, Corp. RT3572 Wireless Adapter"
lsmod says this "rt2870sta             570803  0 " this is the only rt28 driver.

Did I fucked up by installing the RT2870 driver compared to the RT3572? Did my installation fail? What do I do? Please help me Mark, I really reallllllly would appreciate it. I Tip my hat to your patience, and Thank You in advance.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on March 01, 2012, 10:23:46 pm
Hi fatguy1121, and welcome to the forum :)

Can you post the output from:
Code: [Select]
sudo lshw C network
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: fatguy1121 on March 01, 2012, 10:29:52 pm
Thank you so much for the speedy reply.
Code: [Select]
root@fatguy1121-System-Product-Name:~# sudo lshw -C network
  *-network               
       description: Ethernet interface
       product: 88E8056 PCI-E Gigabit Ethernet Controller
       vendor: Marvell Technology Group Ltd.
       physical id: 0
       bus info: pci@0000:06:00.0
       logical name: eth0
       version: 12
       serial: e0:cb:4e:7a:ef:a5
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msi pciexpress bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=sky2 driverversion=1.28 duplex=full firmware=N/A ip=1.2.3.106 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
       resources: irq:68 memory:fbdfc000-fbdfffff ioport:d800(size=256) memory:fbdc0000-fbddffff
  *-network
       description: Ethernet interface
       product: 88E8056 PCI-E Gigabit Ethernet Controller
       vendor: Marvell Technology Group Ltd.
       physical id: 0
       bus info: pci@0000:04:00.0
       logical name: eth1
       version: 12
       serial: e0:cb:4e:7a:f2:eb
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msi pciexpress bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=sky2 driverversion=1.28 firmware=N/A latency=0 link=no multicast=yes port=twisted pair
       resources: irq:69 memory:fbbfc000-fbbfffff ioport:b800(size=256) memory:fbbc0000-fbbdffff

That is showing the 2 Ethernet ports. Thats all that comes up.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on March 01, 2012, 10:47:07 pm
OK first of all you'll need the 2011_0427_RT3572_Linux_STA_v2.5.0.0.DPO.bz2 driver from the Ralink website -

Go to this page:
http://www.ralinktech.com/en/04_support/license.php?sn=5017# (http://www.ralinktech.com/en/04_support/license.php?sn=5017#)

and fill in your name and email, then click Accept .. the file will then download
(you can enter ANY name and email .. it's not checked)

Unpack the driver (I needed to do it twice for some reason)

Then compile/install as usual

IIRC the 2.5.0.0 driver compiles OK in 11.10, if it doesn't let me know.

I've checked it and it DOES contain the ID strings for your card (148f:3572).

If you don't know how to compie/install, just ask :)



The unpacked drivers may *look* like rt2870 as they contain files with that name .. but they ARE different.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: fatguy1121 on March 01, 2012, 11:07:09 pm
What do I use for modprobe after install?

If I run
Code: [Select]
modprobe rt3572
it says
Code: [Select]
root@fatguy1121-System-Product-Name:~# modprobe rt3572sta
FATAL: Error inserting rt3572sta (/lib/modules/3.0.0-16-generic-pae/kernel/drivers/net/wireless/rt3572sta.ko): Device or resource busy
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on March 01, 2012, 11:27:28 pm
If you've already compiled and installed (ie. already run the make && sudo make install) ..

Log off, then on again .. then unplug the USB adapter .. wait ten seconds .. replug it .. and send the output from:
dmesg | tail -n 25
and
sudo lshw -C network
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: fatguy1121 on March 01, 2012, 11:43:46 pm
Code: [Select]
root@fatguy1121-System-Product-Name:~# dmesg | tail -n 25
[  209.462442] Error: Driver 'rt2870' is already registered, aborting...
[  215.066454] rtusb init rt2870 --->
[  215.066520] Error: Driver 'rt2870' is already registered, aborting...
[ 1595.030337] usb 1-5: new high speed USB device number 5 using ehci_hcd
[ 1595.351736] rtusb init rt2870 --->
[ 1595.351741] Error: Driver 'rt2870' is already registered, aborting...
[ 1779.959823] HDMI hot plug event: Pin=5 Presence_Detect=1 ELD_Valid=0
[ 1779.964735] HDMI status: Pin=5 Presence_Detect=0 ELD_Valid=0
[ 1780.772260] vmap allocation for size 16781312 failed: use vmalloc=<size> to increase size.
[ 1780.772808] NVRM: failed to map registers!!
[ 1780.772809] NVRM: RmInitAdapter failed! (0x10:0x32:1351)
[ 1780.772815] NVRM: rm_init_adapter(1) failed
[ 1780.780259] HDMI hot plug event: Pin=5 Presence_Detect=1 ELD_Valid=0
[ 1780.786644] HDMI status: Pin=5 Presence_Detect=1 ELD_Valid=0
[ 1780.799039] HDMI hot plug event: Pin=5 Presence_Detect=0 ELD_Valid=1
[ 1780.806578] HDMI status: Pin=5 Presence_Detect=1 ELD_Valid=1
[ 1781.098923] gnome-settings-[2134]: segfault at 0 ip b42d01d3 sp bfec8f10 error 4 in libxsettings.so[b42cd000+9000]
[ 1781.588519] HDMI: detected monitor ASUS VW266H
[ 1781.588521]   at connection type HDMI
[ 1781.588525] HDMI: available speakers: FL/FR
[ 1781.588538] HDMI: supports coding type LPCM: channels = 2, rates = 44100 48000 88200, bits = 16 20 24
[ 1786.296730] usb 1-5: USB disconnect, device number 5
[ 1808.743960] usb 1-5: new high speed USB device number 6 using ehci_hcd
[ 1809.065156] rtusb init rt2870 --->
[ 1809.065161] Error: Driver 'rt2870' is already registered, aborting...

Code: [Select]
root@fatguy1121-System-Product-Name:~# sudo lshw -C network
  *-network               
       description: Ethernet interface
       product: 88E8056 PCI-E Gigabit Ethernet Controller
       vendor: Marvell Technology Group Ltd.
       physical id: 0
       bus info: pci@0000:06:00.0
       logical name: eth0
       version: 12
       serial: e0:cb:4e:7a:ef:a5
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msi pciexpress bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=sky2 driverversion=1.28 duplex=full firmware=N/A ip=1.2.3.106 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
       resources: irq:68 memory:fbdfc000-fbdfffff ioport:d800(size=256) memory:fbdc0000-fbddffff
  *-network
       description: Ethernet interface
       product: 88E8056 PCI-E Gigabit Ethernet Controller
       vendor: Marvell Technology Group Ltd.
       physical id: 0
       bus info: pci@0000:04:00.0
       logical name: eth1
       version: 12
       serial: e0:cb:4e:7a:f2:eb
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msi pciexpress bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=sky2 driverversion=1.28 firmware=N/A latency=0 link=no multicast=yes port=twisted pair
       resources: irq:69 memory:fbbfc000-fbbfffff ioport:b800(size=256) memory:fbbc0000-fbbdffff

Could the old driver I installed "the real RT2870" be conflicting with the new one. considering they are the same name?
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on March 01, 2012, 11:47:01 pm
No .. can you send the output from:
Code: [Select]
lsmod
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: fatguy1121 on March 01, 2012, 11:51:06 pm
I am going to attempt the install on one of my other machines, let me see if thats working....

Code: [Select]
root@fatguy1121-System-Product-Name:~# lsmod
Module                  Size  Used by
parport_pc             32114  0
ppdev                  12849  0
vesafb                 13489  1
bnep                   17923  2
rfcomm                 38408  0
bluetooth             148839  10 bnep,rfcomm
snd_hda_codec_hdmi     31426  8
snd_hda_codec_analog    75090  1
binfmt_misc            17292  1
nvidia              10390874  40
snd_hda_intel          28358  3
snd_hda_codec          91859  3 snd_hda_codec_hdmi,snd_hda_codec_analog,snd_hda_intel
snd_hwdep              13276  1 snd_hda_codec
snd_pcm                80435  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd_seq_midi           13132  0
snd_rawmidi            25241  1 snd_seq_midi
snd_seq_midi_event     14475  1 snd_seq_midi
snd_seq                51567  2 snd_seq_midi,snd_seq_midi_event
snd_timer              28932  2 snd_pcm,snd_seq
snd_seq_device         14172  3 snd_seq_midi,snd_rawmidi,snd_seq
snd                    55902  16 snd_hda_codec_hdmi,snd_hda_codec_analog,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore              12600  1 snd
snd_page_alloc         14108  2 snd_hda_intel,snd_pcm
joydev                 17393  0
mxm_wmi                12859  0
psmouse                63474  0
serio_raw              12990  0
usbhid                 41905  0
hid                    77367  1 usbhid
i7core_edac            23254  0
edac_core              46858  1 i7core_edac
asus_atk0110           17742  0
wmi                    18744  1 mxm_wmi
rt2870sta             570803  0
lp                     17455  0
parport                40930  3 parport_pc,ppdev,lp
firewire_ohci          35846  0
usb_storage            44173  0
firewire_core          56937  1 firewire_ohci
uas                    17699  0
crc_itu_t              12627  1 firewire_core
ahci                   21634  0
libahci                25761  1 ahci
pata_jmicron           12651  0
sky2                   49304  0
floppy                 60310  0
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on March 01, 2012, 11:55:44 pm
[EDIT]

See my next posting first

[END EDIT]

First try
Code: [Select]
sudo modprobe -r rt2870sta
then
Code: [Select]
sudo modprobe rt2870sta

If that doesn't work, try blacklisting rt2870sta .. then rebooting

Did you make the edits to the driver for WPA support before compiling and installing ?
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on March 02, 2012, 12:27:59 am
OK, looks like you were right, rt2870sta IS conflicting with the rt3572sta module..
(Please see the IMPORTANT note at the bottom first)

You'll need to blacklist the rt2870sta module, so open a terminal and run:
Code: [Select]
sudo gedit /etc/modprobe.d/blacklist.conf

add a new line that reads

blacklist rt2870sta

Save the file and exit.

Now run:
Code: [Select]
sudo modprobe -r rt2870sta
then
Code: [Select]
sudo modprobe rt3572sta

If it works, but doesn't survive a reboot, run:
Code: [Select]
sudo sh -c 'echo rt3572sta >> /etc/modules'
and reboot.



THIS IS IMPORTANT (if you use WPA(2) encryption) ..

If you DIDN'T make the edits to the Ralink driver for WPA(2) support BEFORE compiling and installing.

Download these drivers from my dropbox, they are allready edited to give WPA(2) support:
http://dl.dropbox.com/u/11876059/2011_0427_RT3572_Linux_STA_v2.5.0.0.DPO.tar.bz2 (http://dl.dropbox.com/u/11876059/2011_0427_RT3572_Linux_STA_v2.5.0.0.DPO.tar.bz2)

then compile and install them.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: fatguy1121 on March 02, 2012, 06:50:55 am
Honestly Mark, You have no idea how grateful I am for your help. I had to go out and I am now back. Ill do everything you said before later, but for now I installed the driver the laptop, except.... It will not connect to my network and consistently tries to reconnect but never gets there. with Airodump-ng it wont pick up any networks even though its in monitor mode. Maybe you can help with that? I do have a WPA network and I did make the WPA config change. The computer recognizesthe card fine and "finds" networks but wont connect and like I said, It doesnt find anything with airodump-ng... here are some things you might ask for.

Code: [Select]
fatguy1121@fatguy1121-Qosmio-X505:~$ sudo -s
[sudo] password for fatguy1121:
Sorry, try again.
[sudo] password for fatguy1121:
root@fatguy1121-Qosmio-X505:~# lshw -C network
  *-network               
       description: Wireless interface
       product: RTL8191SEvB Wireless LAN Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:0a:00.0
       logical name: wlan0
       version: 10
       serial: 1c:65:9d:0f:56:98
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=rtl8192se driverversion=3.0.0-16-generic firmware=N/A ip=1.2.3.196 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
       resources: irq:16 ioport:4000(size=256) memory:f0600000-f0603fff
  *-network
       description: Ethernet interface
       product: AR8131 Gigabit Ethernet
       vendor: Atheros Communications
       physical id: 0
       bus info: pci@0000:0b:00.0
       logical name: eth0
       version: c0
       serial: 60:eb:69:50:24:3d
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=atl1c driverversion=1.0.1.0-NAPI firmware=N/A latency=0 link=no multicast=yes port=twisted pair
       resources: irq:46 memory:f0400000-f043ffff ioport:5000(size=128)
  *-network
       description: Wireless interface
       physical id: 2
       logical name: ra0
       serial: 78:44:76:8d:b5:f4
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=RALINK WLAN promiscuous=yes wireless=Ralink STA
root@fatguy1121-Qosmio-X505:~# lsmod
Module                  Size  Used by
parport_pc             32114  0
ppdev                  12849  0
joydev                 17393  0
snd_hda_codec_hdmi     31426  4
bnep                   17923  2
rfcomm                 38408  8
rt3572sta             597215  1
arc4                   12473  2
snd_hda_codec_conexant    52418  1
snd_hda_intel          24262  3
snd_hda_codec          91859  3 snd_hda_codec_hdmi,snd_hda_codec_conexant,snd_hda_intel
uvcvideo               67271  0
videodev               85626  1 uvcvideo
snd_hwdep              13276  1 snd_hda_codec
btusb                  18160  2
snd_seq_midi           13132  0
snd_pcm                80435  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
bluetooth             148839  23 bnep,rfcomm,btusb
snd_rawmidi            25241  1 snd_seq_midi
snd_seq_midi_event     14475  1 snd_seq_midi
psmouse                73673  0
snd_seq                51567  2 snd_seq_midi,snd_seq_midi_event
snd_timer              28932  2 snd_pcm,snd_seq
snd_seq_device         14172  3 snd_seq_midi,snd_rawmidi,snd_seq
i7core_edac            23254  0
nouveau               663226  2
rtl8192se              94139  0
edac_core              46858  3 i7core_edac
rtlwifi                95614  1 rtl8192se
mac80211              393421  2 rtl8192se,rtlwifi
serio_raw              12990  0
ttm                    65224  1 nouveau
drm_kms_helper         32889  1 nouveau
drm                   192194  4 nouveau,ttm,drm_kms_helper
cfg80211              172427  2 rtlwifi,mac80211
snd                    55902  16 snd_hda_codec_hdmi,snd_hda_codec_conexant,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
i2c_algo_bit           13199  1 nouveau
mxm_wmi                12859  1 nouveau
soundcore              12600  1 snd
snd_page_alloc         14115  2 snd_hda_intel,snd_pcm
video                  18908  1 nouveau
sparse_keymap          13658  0
toshiba_bluetooth      12711  0
wmi                    18744  1 mxm_wmi
binfmt_misc            17292  1
lp                     17455  0
parport                40930  3 parport_pc,ppdev,lp
ahci                   21634  1
libahci                25727  1 ahci
atl1c                  36638  0
firewire_ohci          35854  0
firewire_core          56937  1 firewire_ohci
crc_itu_t              12627  1 firewire_core
sdhci_pci              13658  0
sdhci                  27360  1 sdhci_pci
root@fatguy1121-Qosmio-X505:~# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"FUCK YOU!" 
          Mode:Managed  Frequency:2.417 GHz  Access Point: 00:14:D1:CD:F0:AC   
          Bit Rate=150 Mb/s   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr=2347 B   Fragment thr:off
          Encryption key:off
          Power Management:on
          Link Quality=70/70  Signal level=-35 dBm 
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:11   Missed beacon:0

ra0       Ralink STA  ESSID:"11n-AP"  Nickname:"RT3572STA"
          Mode:Auto  Frequency=2.412 GHz  Access Point: Not-Associated   
          Bit Rate:1 Mb/s   
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Link Quality=10/100  Signal level:0 dBm  Noise level:0 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

root@fatguy1121-Qosmio-X505:~#

Forget that realtek card, it sucks, and it isnt even realtek its Atheros
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: BkS on March 02, 2012, 08:41:34 am
Nice wlan0 ESSID. ;)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on March 02, 2012, 10:10:58 am
Firstly can you mind the language please.

Secondly this will get confusing very quickly if we're working on 2 PC's with different setups at the same time .. I mean, I have no idea what has or hasn't been done on the laptop, no idea what distro/version, etc.

Also can we leave and airodump-ng out of it .. I can't help with that, and because (IIRC) it sometimes needs a modification to the wireless cards firmware, which *may* have a bearing on whether the card works or not as a regular Wifi adapter ?

I will try to help you with the drivers to get the card working as a normal Wifi card if you want, but need to know if you've been messing with the firmware ?



@BkS

It is kinda funny as an SSID, but not so much on a public forum that's here to help everyone, including kids and those that may be offended.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on March 02, 2012, 09:02:12 pm
Have you tried turning off wireless security in the router .. just to check if it connects .. you can turn it back on afterwards .. I just want to rule out encryption and/or a problem with the wireless key.

Can you also try setting the router to wireless G (54mbps) or mixed mode G/N .. and not N only .. just as a test.

Once we know it's not an issue with wireless security, or speed settings .. we can maybe try some other drivers.

I know this seems obvious, but have you also ruled out it just being a signal strength issue ?

Can you send the output from
Code: [Select]
ifconfig
and
Code: [Select]
iwconfig
and
Code: [Select]
iwlist scanninng



[EDIT]

Also, turn OFF the onboard wireless adapter .. so we're only working with the rt3572 based card.

Is the rt3572 set to get its IP from the routers DHCP server ? or have you given it a static IP ?

Something else I've noticed (from your previous iwconfig output) is that the adapter seems to be in "Auto" mode .. can you go into NetworkManager and set the mode to "infrastructure".
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: fatguy1121 on March 03, 2012, 12:01:58 am
I checked all the settings and they are what you said they should be at. I removed all security and reset the SSID to default "TRENDnet TEW-691GR"

It connected for about 2 minutes then disconnected I was typing this message when it stopped.

Here are the outputs from the commands. I am working with the onboard wireless for now, and the receiver is not but 5' away from the router

Code: [Select]
fatguy1121@fatguy1121-Qosmio-X505:~$ sudo -s
[sudo] password for fatguy1121:
root@fatguy1121-Qosmio-X505:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 60:eb:69:50:24:3d 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:47

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:2768 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2768 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:218672 (218.6 KB)  TX bytes:218672 (218.6 KB)

ra0       Link encap:Ethernet  HWaddr 78:44:76:8d:b5:f4 
          inet6 addr: fe80::7a44:76ff:fe8d:b5f4/64 Scope:Link
          UP BROADCAST  MTU:1500  Metric:1
          RX packets:15783 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3830 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3750911 (3.7 MB)  TX bytes:457007 (457.0 KB)

wlan0     Link encap:Ethernet  HWaddr 1c:65:9d:0f:56:98 
          inet addr:1.2.3.101  Bcast:1.2.3.255  Mask:255.255.255.0
          inet6 addr: fe80::1e65:9dff:fe0f:5698/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5047 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5004 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2758416 (2.7 MB)  TX bytes:849416 (849.4 KB)

root@fatguy1121-Qosmio-X505:~# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"TRENDnet TEW-691GR" 
          Mode:Managed  Frequency:2.417 GHz  Access Point: 00:14:D1:CD:F0:AC   
          Bit Rate=150 Mb/s   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr=2347 B   Fragment thr:off
          Encryption key:off
          Power Management:on
          Link Quality=70/70  Signal level=-35 dBm 
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

ra0       Ralink STA  ESSID:"FUCK YOU!"  Nickname:"RT3572STA"
          Mode:Auto  Frequency=2.417 GHz  Access Point: 00:14:D1:CD:F0:AC   
          Bit Rate=1 Mb/s   
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Link Quality=100/100  Signal level:-41 dBm  Noise level:-41 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

root@fatguy1121-Qosmio-X505:~# iwlist scanning
lo        Interface doesn't support scanning.

eth0      Interface doesn't support scanning.

wlan0     Scan completed :
          Cell 01 - Address: 00:14:D1:CD:F0:AC
                    Channel:2
                    Frequency:2.417 GHz (Channel 2)
                    Quality=69/70  Signal level=-41 dBm 
                    Encryption key:off
                    ESSID:"TRENDnet TEW-691GR"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 9 Mb/s
                              18 Mb/s; 36 Mb/s; 54 Mb/s
                    Bit Rates:6 Mb/s; 12 Mb/s; 24 Mb/s; 48 Mb/s
                    Mode:Master
                    Extra:tsf=000000002c0c9166
                    Extra: Last beacon: 50760ms ago
                    IE: Unknown: 00125452454E446E6574205445572D3639314752
                    IE: Unknown: 010882848B961224486C
                    IE: Unknown: 030102
                    IE: Unknown: 2A0100
                    IE: Unknown: 32040C183060
                    IE: Unknown: 2D1A6E1017FFFFFF00010000000000000000000000000F0000000000
                    IE: Unknown: 3D1602050400000000000000000000000000000000000000
                    IE: Unknown: 3E0100
                    IE: Unknown: DD180050F2020101030003A4000027A4000042435E0062322F00
                    IE: Unknown: 0B0501001F127A
                    IE: Unknown: 4A0E14000A002C01C800140005001900
                    IE: Unknown: DD07000C4307000000

ra0       Scan completed :
          Cell 01 - Address: 08:86:3B:17:51:9A
                    Protocol:802.11b/g/n
                    ESSID:"belkin.19a"
                    Mode:Managed
                    Frequency:2.417 GHz (Channel 2)
                    Quality=0/100  Signal level=-93 dBm  Noise level=-88 dBm
                    Encryption key:on
                    Bit Rates:54 Mb/s
                    IE: WPA Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    IE: Unknown: DD0E0050F204104A0001101044000102
          Cell 02 - Address: 08:86:3B:1A:E1:08
                    Protocol:802.11b/g/n
                    ESSID:"belkin.108"
                    Mode:Managed
                    Frequency:2.417 GHz (Channel 2)
                    Quality=7/100  Signal level=-87 dBm  Noise level=-82 dBm
                    Encryption key:on
                    Bit Rates:54 Mb/s
                    IE: WPA Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    IE: Unknown: DD0E0050F204104A0001101044000102
          Cell 03 - Address: 20:4E:7F:6C:DD:B1
                    Protocol:802.11b/g/n
                    ESSID:"reagansavestheday"
                    Mode:Managed
                    Frequency:2.422 GHz (Channel 3)
                    Quality=13/100  Signal level=-85 dBm  Noise level=-80 dBm
                    Encryption key:on
                    Bit Rates:54 Mb/s
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
          Cell 04 - Address: 00:1E:E5:45:42:9F
                    Protocol:802.11b/g
                    ESSID:"TheRays"
                    Mode:Managed
                    Frequency:2.437 GHz (Channel 6)
                    Quality=2/100  Signal level=-89 dBm  Noise level=-84 dBm
                    Encryption key:on
                    Bit Rates:54 Mb/s
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (1) : TKIP
                        Authentication Suites (1) : PSK
          Cell 05 - Address: 00:1E:E5:B5:15:73
                    Protocol:802.11b/g
                    ESSID:"@Home1573"
                    Mode:Managed
                    Frequency:2.437 GHz (Channel 6)
                    Quality=47/100  Signal level=-71 dBm  Noise level=-66 dBm
                    Encryption key:on
                    Bit Rates:54 Mb/s
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
          Cell 06 - Address: 00:1C:DF:D8:E1:17
                    Protocol:802.11b/g
                    ESSID:"homemj"
                    Mode:Managed
                    Frequency:2.462 GHz (Channel 11)
                    Quality=0/100  Signal level=-95 dBm  Noise level=-102 dBm
                    Encryption key:on
                    Bit Rates:54 Mb/s
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : TKIP CCMP
                        Authentication Suites (1) : PSK
          Cell 07 - Address: 00:1F:C6:74:45:03
                    Protocol:802.11b/g
                    ESSID:"TWC7932"
                    Mode:Managed
                    Frequency:2.462 GHz (Channel 11)
                    Quality=26/100  Signal level=-79 dBm  Noise level=-86 dBm
                    Encryption key:on
                    Bit Rates:54 Mb/s
          Cell 08 - Address: 00:24:B2:B7:1B:86
                    Protocol:802.11b/g
                    ESSID:"Danielle-PC-Wireless"
                    Mode:Managed
                    Frequency:2.412 GHz (Channel 1)
                    Quality=2/100  Signal level=-89 dBm  Noise level=-84 dBm
                    Encryption key:on
                    Bit Rates:54 Mb/s
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
          Cell 09 - Address: B8:C7:5D:0C:1E:73
                    Protocol:802.11b/g
                    ESSID:"Tranquility Base"
                    Mode:Managed
                    Frequency:2.452 GHz (Channel 9)
                    Quality=0/100  Signal level=-91 dBm  Noise level=-86 dBm
                    Encryption key:on
                    Bit Rates:54 Mb/s
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
          Cell 10 - Address: 00:14:D1:CD:F0:AC
                    Protocol:802.11b/g/n
                    ESSID:"TRENDnet TEW-691GR"
                    Mode:Managed
                    Frequency:2.417 GHz (Channel 2)
                    Quality=100/100  Signal level=-41 dBm  Noise level=-92 dBm
                    Encryption key:off
                    Bit Rates:300 Mb/s

root@fatguy1121-Qosmio-X505:~#


EDIT: Now that I look at iwconfig it is listing the thing as connected to the old SSID, that doesnt exist anymore.
EDIT/EDIT I unplugged the thing and rebooted. It connected again for only a few minutes then disconnected.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on March 03, 2012, 01:42:32 am
OK, let's try an older pre-modified driver ..
(this is pre-modified, so no need to change the WPA lines in config.mk)

Just follow these instructions -

Open a terminal and run:
Code: [Select]
cd ~
then
Code: [Select]
wget http://dl.dropbox.com/u/11876059/2010_0709_RT3572_Linux_STA_v2.4.0.1.tar.bz2
then
Code: [Select]
tar -xjvf 2010_0709_RT3572_Linux_STA_v2.4.0.1.tar.bz2
then
Code: [Select]
cd 2010_0709_RT3572_Linux_STA_v2.4.0.1
then
Code: [Select]
make
then
Code: [Select]
sudo make install
then
Code: [Select]
sudo modprobe -r rt3572sta
then
Code: [Select]
sudo modprobe rt3572sta

Then check the version with:
Code: [Select]
modinfo rt3572sta | grep version
if it reads -
version:        2.4.0.0

REBOOT, and test your wireless.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: fatguy1121 on March 03, 2012, 01:59:27 am
Mark, You amaze me. Thank You so much! It is finally working, and believe it or not, It has a light on it.... i never saw the light on the adapter before.  I saved the download for all my other machines.

The only problem now is that airodump-ng doesnt work, it doesnt display any networks... can you help me with that? Do you know anything about aircrack? Should I start a new thread for it?
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on March 03, 2012, 02:10:54 am
As far as I'm aware, I *think* you have to put the adapter into "monitor mode"

But I'm not an aircrack/dump-ng expert .. you'd probably be better off asking on their forum:
http://forum.aircrack-ng.org/index.php (http://forum.aircrack-ng.org/index.php)

Sorry.

[EDIT]

Bit of info (which could be wrong) .. this topic:
http://forum.aircrack-ng.org/index.php?topic=7108.0 (http://forum.aircrack-ng.org/index.php?topic=7108.0)
*seems* to suggest the rt3572sta driver isn't supported by aircrack-ng, but the rt2800usb driver IS supported.

The good news for you is that I'm *fairly* sure your cards ID strings (148f:3572) have been added to rt2800usb in kernel 3.2 .. so you can either wait for Ubuntu 12.04, Switch to Debian, or install the 3.2 kernel in 11.10

It's definitely supported by the rt2800usb thats included in the 3.2 kernel in Debian .. see here:
http://wiki.debian.org/rt2800usb (http://wiki.debian.org/rt2800usb)

Anyway .. Good luck.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: fatguy1121 on March 03, 2012, 05:27:18 am
Well, I kinda screwed myself because the whole reason I got this network adapter was so that I could use aircrack-ng. All of my Atheros wireless cards dont have native linux support and I figured that if I found one that did have native linux drivers that I could. Then I went off and bought this card..... So if I update the kernel to 3.2 will I need to reinstall the drivers and crap?
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on March 03, 2012, 11:43:03 am
Hopefully not .. you'd (hopefully) just need to use the rt2800usb driver (which is built into the 3.2 kernel) instead of the rt3572sta staging driver.

If you can wait till tomorrow, I'll test it and get back to you.

Meanwhile it would be a good idea for you to search the aircrack forums for any info on whether the rt3572sta drivers ARE supported .. and if not, how to make it work with the rt2800usb drivers (if we can get them to work)

At the end of the day I may be able to help get the rt2800usb drivers to work with your card .. but I won't be able to give you help with aircrack-ng .. the last thing I want is to get bombarded by requests for hep with aircrack-ng, so have to run off and learn all the ins and outs of it ;) .. that's what *their* forum is for :)

Have you considered asking if you can return the card for another make/model, then asking on the aircrack-ng forum for suggestions on which one to get ?
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: joshuafcole on March 09, 2012, 11:57:46 pm
Hey there! I'm having an identical issue with a different wireless card. I'm currently using the ASUS PCE-N15 and running Kubuntu 11.10.
For reference: http://www.newegg.com/Product/Product.aspx?Item=N82E16833320074 (http://www.newegg.com/Product/Product.aspx?Item=N82E16833320074)

lsmod | grep rt
*snip*
rtl8192ce              84775  0
rtl8192c_common        75767  1 rtl8192ce
rtlwifi               110972  1 rtl8192ce
mac80211              462046  3 rtl8192ce,rtl8192c_common,rtlwifi
cfg80211              199630  2 rtlwifi,mac80211
*snip*

Any recommendations on a fix I could implement? I'm reasonably savvy. I'm capable of manual or automatic patches, recompiling, etc.

Thanks in advance for any pointers you might have!

- Josh
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on March 10, 2012, 01:55:17 pm
What makes you think this card has a Ralink chip ? .. your lsmod output seems to be suggesting it's a Realtek chip, my guess is an

Quote
       product: RTL8188CE 802.11b/g/n WiFi Adapter
       vendor: Realtek Semiconductor Co., Ltd.


Can you post the output from:
Code: [Select]
lspci -vnn

So we can get the Vendor:Product ID string, and work out what the card is.

Can you also post the output from
Code: [Select]
sudo lshw -C network
and
Code: [Select]
ifconfig
and
Code: [Select]
iwconfig
and
Code: [Select]
iwlist scanning
and
Code: [Select]
rfkill list

And preferably a description of what the problem actually is ..

Quote
I'm having an identical issue with a different wireless card.


isn't very helpful in a topic that contains MANY different issues ;)

And is this the ONLY wireless adapter fitted to the system.

[EDIT]

Have you tried the driver from the ASUS site:
http://www.asus.com/Networks/Wireless_Adapters/PCEN15/#download (http://www.asus.com/Networks/Wireless_Adapters/PCEN15/#download)
?
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: criesca on March 23, 2012, 05:03:04 am
Hi!

Wow, you seem to rock hard!

I just got a Tenda Adapter W311MI and it claims to have a 148F:5370, but I tried the original driver and it did not work, I also tried your 5372 driver and it loads but does not show any devices, I am about to try installing linux 3.3 on Centos 6.2 x86_64 instead.

Any suggestions? I would love a fail safe to be able to use this 5370 card on any linux based distro (at least ubuntu 11.10/12.04) if at all possible, just if it is not too much to ask, could you point me in the right direction?
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on March 23, 2012, 12:03:37 pm
Your devices vendor:product ID strings are contained in the Ralink
2011_0225_RT5370_RT5372_Linux_STA_V2.5.0.1_DPO.tar.bz2
driver.

Which can be downloaded from here:
http://eng.ralinktech.com.tw/en/Products/support_list.php?sn=5003# (http://eng.ralinktech.com.tw/en/Products/support_list.php?sn=5003#)

You'll have to fill in a name and email, but you can put whatever you like (it's not checked), and click the Accept button.

Name:a
email:a@b.com

will do

DON'T FORGET - be sure to make the edits to /os/linux/config.mk if you want/need WPA(2) support .. and that make && make install MUST be run as root.

and the you have to modprobe rt5370sta not rt2870sta

You *may* also need to blacklist the rt2870sta module if it's being loaded.
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: fishfinger on January 21, 2013, 05:51:11 pm
I have problem with ASUS n-11 USB, instal driver was successful (make and install - no error) but nothing happen when i put wifi in USB.

ubuntu 12.04

Code: [Select]
sudo lsmod | grep rt28
rt2870sta             570836  0
mediacenter@mediacenter-xbmc:~$

Code: [Select]
iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

Code: [Select]
sudo lshw -C network
  *-network               
       description: Ethernet interface
       product: RTL8111/8168B PCI Express Gigabit Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:04:00.0
       logical name: eth0
       version: 03
       serial: 20:cf:30:f2:df:c6
       size: 10Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl_nic/rtl8168d-2.fw latency=0 link=no multicast=yes port=MII speed=10Mbit/s
       resources: irq:41 ioport:e800(size=256) memory:f8fff000-f8ffffff memory:f8ff8000-f8ffbfff memory:fbff0000-fbffffff

Code: [Select]
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 15d9:0a4c Trust International B.V. USB+PS/2 Optical Mouse
Bus 002 Device 002: ID 14cd:6600 Super Top USB 2.0 IDE DEVICE
Bus 002 Device 003: ID 1058:0706 Western Digital Technologies, Inc.
Bus 004 Device 002: ID 0bc7:0006 X10 Wireless Technology, Inc. Wireless Transceiver (ACPI-compliant)
Bus 002 Device 007: ID 1761:0b05 ASUSTek Computer, Inc. (wrong ID) 802.11n Network Adapter (wrong ID - swapped vendor and device)

What`s  wrong?
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mad Penguin on January 21, 2013, 05:58:10 pm
Mmm, it's looking a bit like that driver doesn't support your particular network card ... however;

Take a look at;

Code: [Select]
common/rtusb_dev_id.c
Try adding;

Code: [Select]
{USB_DEVICE(0x1761,0x0B05)}, 
To the list of recognised devices, then recompile, rmmod, insmod, and try again ...
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on January 21, 2013, 06:05:33 pm
Any particular reason you're not using rt2800usb which contains that VENDOR:DEVICE ID string:-

Quote
alias:          usb:v1761p0B05d*dc*dsc*dp*ic*isc*ip*

What happens if you run:
Code: [Select]
sudo modprobe -r rt2870sta
then
Code: [Select]
sudo modprobe rt2800usb

Does Wireless spring to life ?
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: fishfinger on January 21, 2013, 08:29:05 pm
Quote
Take a look at;

Code: [Select]

common/rtusb_dev_id.c

Try adding;

Code: [Select]

{USB_DEVICE(0x1761,0x0B05)},

To the list of recognised devices, then recompile, rmmod, insmod, and try again ...

BIG THX - asus n-11 USB - its live



Quote
Any particular reason you're not using rt2800usb which contains that VENDOR:DEVICE ID string:-
wifi is suspended after 20 minutes and I have to reset the device to re-work...
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Cataleyo on April 29, 2014, 06:27:06 pm
Hello,
I try to install a rt2870sta driver a 4th day (I am newbie in Linux) and its still not working, fully desperated I decided to ask you whats wrong. I read steps written here but nothing helped me. This is output what i get

Code: [Select]
root@cataleyo:/home/cataleyo/2010_0709_RT2870_Linux_STA_v2.4.0.1# make && make install
make -C tools
make[1]: Entering directory `/home/cataleyo/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory `/home/cataleyo/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools'
/home/cataleyo/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools/bin2h
cp -f os/linux/Makefile.6 /home/cataleyo/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/Makefile
make -C /lib/modules/2.6.32-25-generic/build SUBDIRS=/home/cataleyo/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux modules
make: *** /lib/modules/2.6.32-25-generic/build: No such file or directory.  Stop.
make: *** [LINUX] Error 2

uname -a output:
Code: [Select]
Linux cataleyo 2.6.32-25-generic #44-Ubuntu i686 GNU/Linux


its NodeZero linux

I was trying this drivers:
2009_0302_RT2870_Linux_STA_v2.1.0.0
2010_0709_RT2870_Linux_STA_v2.4.0.1

also tried this commands to edit:
Code: [Select]
make clean
find . -name \*.[ch] -exec grep usb_buffer_alloc "{}" ";" -exec sed -i 's/usb_buffer_alloc/usb_alloc_coherent/g' "{}" ";"
find . -name \*.[ch] -exec grep usb_buffer_free "{}" ";" -exec sed -i 's/usb_buffer_free/usb_free_coherent/g' "{}" ";"
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on April 29, 2014, 06:41:59 pm
This line:
make: *** /lib/modules/2.6.32-25-generic/build: No such file or directory.  Stop.
suggests you don't have the kernel headers for your kernel installed

Run a full system update.

then REBOOT

then make sure you have build-essential and linux-headers-generic installed:
Code: [Select]
sudo apt-get install build-essential linux-headers-generic
any errors from that command, post them here .. if not, carry on below

then try building 2.4.0.1 again without making any edits
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Cataleyo on May 01, 2014, 02:01:40 pm
system update was smoothly, driver install also I did all steps without the edit section and after reboot the output from iwconfig was:

Code: [Select]
cataleyo@cataleyo:~$ iwconfig 
lo        no wireless extensions.

eth0      no wireless extensions.

vboxnet0  no wireless extensions.

pan0      no wireless extensions.

wlan1     IEEE 802.11bgn  ESSID:off/any 
          Mode:Managed  Access Point: Not-Associated   Tx-Power=16 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:on

and lsmod
Code: [Select]
sudo lsmod | grep rt28  
rt2800usb              31531  0
rt2x00usb               9639  1 rt2800usb
rt2x00lib              27573  2 rt2800usb,rt2x00usb
crc_ccitt               1339  1 rt2800usb
rt2870sta             556845  0

but I cant see any networks, I tried network manager and also the airodump-ng with monitoring mode

but after edit of blacklist.conf by rt2800usb output is
rt2870sta             556845  0

and iwconfig

Code: [Select]
iwconfig 
lo        no wireless extensions.

eth0      no wireless extensions.

vboxnet0  no wireless extensions.

pan0      no wireless extensions.

Code: [Select]
sudo lshw -C network 
  *-network UNCLAIMED     
       description: Network controller
       product: Broadcom Corporation
       vendor: Broadcom Corporation
       physical id: 0
       bus info: pci@0000:07:00.0
       version: 01
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress cap_list
       configuration: latency=0
       resources: memory:80400000-80403fff
  *-network
       description: Ethernet interface
       product: AR8131 Gigabit Ethernet
       vendor: Atheros Communications
       physical id: 0
       bus info: pci@0000:09:00.0
       logical name: eth0
       version: c0
       serial: c8:0a:a9:c6:81:7e
       capacity: 1GB/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=atl1c driverversion=1.0.0.1-NAPI firmware=N/A latency=0 link=no multicast=yes port=twisted pair
       resources: irq:29 memory:80800000-8083ffff ioport:4000(size=128)
  *-network DISABLED
       description: Ethernet interface
       physical id: 2
       logical name: vboxnet0
       serial: 0a:00:27:00:00:00
       capabilities: ethernet physical
       configuration: broadcast=yes multicast=yes
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on May 01, 2014, 04:12:01 pm
Erm .. I'm not sure you need the Ralink drivers at all .. you seem to have a Broadcom adapter

What's the output from:
Code: [Select]
lsusb
and
Code: [Select]
lspci -vnn | grep -i net
?
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Cataleyo on May 01, 2014, 04:46:22 pm
yes I have Broadcom also, but working on ralink first bc. of distance to acess point

Code: [Select]
lsusb
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 002: ID 0489:e011 Foxconn / Hon Hai
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 005: ID 148f:3070 Ralink Technology, Corp.
Bus 002 Device 003: ID 04f2:b044 Chicony Electronics Co., Ltd
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Code: [Select]
lspci -vnn | grep -i net
07:00.0 Network controller [0280]: Broadcom Corporation Device [14e4:4357] (rev 01)
09:00.0 Ethernet controller [0200]: Atheros Communications AR8131 Gigabit Ethernet [1969:1063] (rev c0)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on May 01, 2014, 05:08:11 pm
Your adapter requires the rt3070sta driver, not rt2870sta

With an active (wired) internet connection run these commands in sequence:
Code: [Select]
mkdir ~/rt3070sta
then
Code: [Select]
cd ~/rt3070sta
then
Code: [Select]
wget https://dl.dropboxusercontent.com/u/11876059/2010_0831_RT3070_Linux_STA_v2.4.0.1_DPO.tar.bz2
then
Code: [Select]
tar xjvf 2010_0831_RT3070_Linux_STA_v2.4.0.1_DPO.tar.bz2
then
Code: [Select]
cd ~/rt3070sta/2010_0831_RT3070_Linux_STA_v2.4.0.1_DPO
then
Code: [Select]
sudo su
then
Code: [Select]
make
then
Code: [Select]
make install
then
Code: [Select]
exit
then
Code: [Select]
sudo modprobe -r rt2870sta
then
Code: [Select]
sudo modprobe rt3070sta
did wireless spring to life ?
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Cataleyo on May 01, 2014, 05:46:16 pm
many thanks to you, wifi working well :)

ps. just dont got it why producer gives 2870 driver for this card :D
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: Mark Greaves (PCNetSpec) on May 01, 2014, 06:48:40 pm
You're most welcome :)
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: aspivak on May 09, 2014, 12:33:35 am
Hi friends just made all the steps didn't worked for me

running Kali on vmware

my lsusb
Quote
Bus 001 Device 002: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 004: ID 0e0f:0008 VMware, Inc.
lspci -vnn | grep -i net
Quote
02:01.0 Ethernet controller [0200]: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) [8086:100f] (rev 01)

iwconfig
Quote
eth0      no wireless extensions.

lo        no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:off/any 
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on




got some errors after running make


Quote
make -C tools
make[1]: Entering directory `/root/RT3070/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory `/root/RT3070/tools'
/root/RT3070/tools/bin2h
cp -f os/linux/Makefile.6 /root/RT3070/os/linux/Makefile
make -C /lib/modules/3.12-kali1-amd64/build SUBDIRS=/root/RT3070/os/linux modules
make[1]: Entering directory `/usr/src/linux-headers-3.12-kali1-amd64'
  CC [M]  /root/RT3070/os/linux/../../os/linux/rt_linux.o
/root/RT3070/os/linux/../../os/linux/rt_linux.c: In function ‘duplicate_pkt’:
/root/RT3070/os/linux/../../os/linux/rt_linux.c:498:3: warning: passing argument 1 of ‘memmove’ makes pointer from integer without a cast [enabled by default]
In file included from /usr/src/linux-headers-3.12-kali1-common/arch/x86/include/asm/string.h:4:0,
                 from /usr/src/linux-headers-3.12-kali1-common/include/linux/string.h:17,
                 from /usr/src/linux-headers-3.12-kali1-common/include/linux/dynamic_debug.h:111,
                 from /usr/src/linux-headers-3.12-kali1-common/include/linux/kernel.h:14,
                 from /usr/src/linux-headers-3.12-kali1-common/include/linux/cache.h:4,
                 from /usr/src/linux-headers-3.12-kali1-common/include/linux/time.h:4,
                 from /usr/src/linux-headers-3.12-kali1-common/include/linux/stat.h:18,
                 from /usr/src/linux-headers-3.12-kali1-common/include/linux/module.h:10,
                 from /root/RT3070/include/os/rt_linux.h:31,
                 from /root/RT3070/include/rtmp_os.h:44,
                 from /root/RT3070/include/rtmp_comm.h:60,
                 from /root/RT3070/os/linux/../../os/linux/rt_linux.c:32:
/usr/src/linux-headers-3.12-kali1-common/arch/x86/include/asm/string_64.h:58:7: note: expected ‘void *’ but argument is of type ‘sk_buff_data_t’
/root/RT3070/os/linux/../../os/linux/rt_linux.c:500:3: warning: passing argument 1 of ‘memmove’ makes pointer from integer without a cast [enabled by default]
In file included from /usr/src/linux-headers-3.12-kali1-common/arch/x86/include/asm/string.h:4:0,
                 from /usr/src/linux-headers-3.12-kali1-common/include/linux/string.h:17,
                 from /usr/src/linux-headers-3.12-kali1-common/include/linux/dynamic_debug.h:111,
                 from /usr/src/linux-headers-3.12-kali1-common/include/linux/kernel.h:14,
                 from /usr/src/linux-headers-3.12-kali1-common/include/linux/cache.h:4,
                 from /usr/src/linux-headers-3.12-kali1-common/include/linux/time.h:4,
                 from /usr/src/linux-headers-3.12-kali1-common/include/linux/stat.h:18,
                 from /usr/src/linux-headers-3.12-kali1-common/include/linux/module.h:10,
                 from /root/RT3070/include/os/rt_linux.h:31,
                 from /root/RT3070/include/rtmp_os.h:44,
                 from /root/RT3070/include/rtmp_comm.h:60,
                 from /root/RT3070/os/linux/../../os/linux/rt_linux.c:32:
/usr/src/linux-headers-3.12-kali1-common/arch/x86/include/asm/string_64.h:58:7: note: expected ‘void *’ but argument is of type ‘sk_buff_data_t’
/root/RT3070/os/linux/../../os/linux/rt_linux.c: In function ‘ClonePacket’:
/root/RT3070/os/linux/../../os/linux/rt_linux.c:652:20: warning: assignment makes integer from pointer without a cast [enabled by default]
/root/RT3070/os/linux/../../os/linux/rt_linux.c: In function ‘RtmpOsPktInit’:
/root/RT3070/os/linux/../../os/linux/rt_linux.c:671:2: warning: assignment makes integer from pointer without a cast [enabled by default]
/root/RT3070/os/linux/../../os/linux/rt_linux.c: In function ‘wlan_802_11_to_802_3_packet’:
/root/RT3070/os/linux/../../os/linux/rt_linux.c:698:15: warning: assignment makes integer from pointer without a cast [enabled by default]
/root/RT3070/os/linux/../../os/linux/rt_linux.c: In function ‘__RtmpOSFSInfoChange’:
/root/RT3070/os/linux/../../os/linux/rt_linux.c:1126:20: error: incompatible types when assigning to type ‘int’ from type ‘kuid_t’
/root/RT3070/os/linux/../../os/linux/rt_linux.c:1127:20: error: incompatible types when assigning to type ‘int’ from type ‘kgid_t’
make[4]: *** [/root/RT3070/os/linux/../../os/linux/rt_linux.o] Error 1
make[3]: *** [_module_/root/RT3070/os/linux] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.12-kali1-amd64'
make: *** [LINUX] Error 2
Title: Re: Ralink RT2870 based USB Wireless N adapters (Ubuntu)
Post by: chemicalfan on May 09, 2014, 08:56:51 am
Don't know why make failed, but the procedure will be different for a VM.
What is the host CPU & OS? Do you have the guest extensions installed (if applicable - I'm only familar with Virtualbox myself)?
SimplePortal 2.3.3 © 2008-2010, SimplePortal