# Wireless usb RT drivers won't work

## plice

Hi,

Got Belkin wless usb g. F5D7050 (A). Tried everything that I know of, and i still can't make it work. Got WPA2 encrytption on the router. I've used wpa_supplicant. Loading rt2500usb module dmesg:

```
[74913.719354] rt2500usb 1-8:1.0: usb_probe_interface

[74913.719358] rt2500usb 1-8:1.0: usb_probe_interface - got id

[74913.829370] phy16 -> rt2500usb_init_eeprom: Error - Invalid RT chipset detected.

[74913.829377] phy16 -> rt2x00lib_probe_dev: Error - Failed to allocate device.

[74913.829426] usbcore: registered new interface driver rt2500usb
```

so i've loaded rt73usb (yet on the vendors website i should been using 2500 driver)

```
[74913.829426] usbcore: registered new interface driver rt2500usb

[74969.262559] usbcore: deregistering interface driver rt2500usb

[74973.666125] rt73usb 1-8:1.0: usb_probe_interface

[74973.666130] rt73usb 1-8:1.0: usb_probe_interface - got id

[74973.929129] phy17: Selected rate control algorithm 'minstrel'

[74973.929666] Registered led device: rt73usb-phy17::radio

[74973.929775] Registered led device: rt73usb-phy17::assoc

[74973.929890] Registered led device: rt73usb-phy17::quality

[74973.930383] usbcore: registered new interface driver rt73usb

```

ifconfig shows nothing. Tried ifconfig wlan0 up. Wlan0 pops up then.

wpa_supplicant:

wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf

i

```
octl[SIOCSIWMODE]: Operation not supported

Could not configure driver to use managed mode

ioctl[SIOCGIWRANGE]: Operation not supported

ioctl[SIOCSIWENCODEEXT]: Operation not supported

ioctl[SIOCSIWENCODE]: Operation not supported

ioctl[SIOCSIWENCODEEXT]: Operation not supported

ioctl[SIOCSIWENCODE]: Operation not supported

ioctl[SIOCSIWENCODEEXT]: Operation not supported

ioctl[SIOCSIWENCODE]: Operation not supported

ioctl[SIOCSIWENCODEEXT]: Operation not supported

ioctl[SIOCSIWENCODE]: Operation not supported

ioctl[SIOCGIWSCAN]: Operation not supported

ioctl[SIOCSIWSCAN]: Operation not supported

Failed to initiate AP scan.
```

I have used gentoo guides and checked /re checked net and wpa config files etc

Trying with ndiswrapper. Got winxp drivers for the usb:

ndiswrapper -l

rt2500usb : driver installed

lsmod:

```
lsmod

Module                  Size  Used by

rt73usb                22584  0 

rt2x00usb              10669  1 rt73usb

rt2x00lib              29942  2 rt73usb,rt2x00usb

ndiswrapper           218444  0 
```

 I don't think that ndiswrapper is recognising the usb correctly. By unloading all rt drivers, and loading only ndiswrapper. I can't get wlan0 at all, and it doesn't associate it with the usb, dmesg:

```
ndiswrapper version 1.55 loaded (smp=yes, preempt=no)

[75364.601307] ndiswrapper 1-8:1.0: usb_probe_interface

[75364.601311] ndiswrapper 1-8:1.0: usb_probe_interface - got id

[75364.602072] usbcore: registered new interface driver ndiswrapper
```

i've addes usb flag and emerged ndiswrapper (apparently i had to do that way)

ifconfig wlan0 up

wlan0: ERROR while getting interface flags: No such device

Pls advise  :Smile: 

thank you

```

Linux box 2.6.33-gentoo-r1 #2 SMP  x86_64 Intel(R) Pentium(R) Dual CPU E2220 @ 2.40GHz GenuineIntel GNU/Linux

flags:

USE="usb alsa mmx sse sse2 sse3 -m3dnow mysql ssh qt3 qt4 kde ftp mythtv ftp ssl php apache2 crypt ctype pcre session unicode cracklib clamav xface gnome imap mbox -sendmail exim dovecot-sasl curl javascript offensive png samba smp spell syslog 64bit pop3d x11 cairo gtk X jpeg opengl hal lock session startup-notification thunar lirc dbus qt3support server webinterface bwscheduler downloadorder infowidget ipfilter logviewer scanfolder search stats upnp 

```

----------

## mikegpitt

Do you have net-wireless/rt73-firmware installed?  I believe you need this to use the native driver.  Also be sure to rmmod the ndiswrapper driver so they don't conflict.

----------

## plice

yes, i got all that. Just tried on ubuntu laptop and got the native driver rt73usb and it found the usb card, and it found the router. The rt2500usb is for sure wrong, dmesg popped errors about wrong chip.

 Still i got the same problem with wpa_suppclient. I will try with no encryption and see if the card actually works on gentoo box

thank you

----------

## mikegpitt

Can you post the output of the following?

```
lsusb

ifconfig -a

iwconfig
```

----------

## plice

```
  lsusb

Bus 002 Device 002: ID 1784:0001 TopSeed Technology Corp. 

Bus 002 Device 003: ID 04f2:0760 Chicony Electronics Co., Ltd 

Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 001 Device 018: ID 050d:705a Belkin Components F5D7050A Wireless Adapter

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

```

```
ifconfig -a 

eth0      Link encap:Ethernet  HWaddr 00:21:97:3e:7a:23  

          inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:2765807 errors:0 dropped:0 overruns:0 frame:0

          TX packets:2001072 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:2495560175 (2.3 GiB)  TX bytes:270549209 (258.0 MiB)

          Interrupt:28 Base address:0xa000 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:13 errors:0 dropped:0 overruns:0 frame:0

          TX packets:13 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:1213 (1.1 KiB)  TX bytes:1213 (1.1 KiB)

wlan0     Link encap:Ethernet  HWaddr 00:17:3f:c5:4e:ff  

          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)

```

```
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     no wireless extensions.

```

thanks

----------

## mikegpitt

I've actually used a similar model Belkin device before, so I believe everything should be fine with the rt73 driver, as you probably figured by now.  What kernel version are you using?

A few things to try... 

1) Can you unplug and plug the device back in, and post what it says at the bottom of `dmesg` for wlan0?

2) It might be worthwhile to blacklist or just remove the rt2500 module from the kernel to make sure it doesn't interfere with the rt73 drivers.

----------

## plice

hi, 

sorry for late delays.

I removed all rt drivers from the kernel and re emerged the rt73-firmware, i thought that i'd give it a try. Now i'm bit confused. After emerging the firmware, i got no drivers for any rt 2500 or 73usb etc, nothing shows up on modprobe -l. (I'v updated the modules depmod and modules-update). I'll have to post rest bit later (time difference)

thanks

----------

## mikegpitt

 *plice wrote:*   

> I removed all rt drivers from the kernel and re emerged the rt73-firmware, i thought that i'd give it a try. Now i'm bit confused. After emerging the firmware, i got no drivers for any rt 2500 or 73usb etc, nothing shows up on modprobe -l.

 This is my bad actually... it looks like RT73USB depends on some of the RT2X00 stuff.  From menuconfig:

```

  x Symbol: RT73USB [=m]                                                                                            x  

  x Prompt: Ralink rt2501/rt73 (USB) support                                                                        x  

  x   Defined at drivers/net/wireless/rt2x00/Kconfig:97                                                             x  

  x   Depends on: NETDEVICES [=y] && WLAN [=y] && RT2X00 [=m] && USB [=m]                                           x  

  x   Location:                                                                                                     x  

  x     -> Device Drivers                                                                                           x  

  x       -> Network device support (NETDEVICES [=y])                                                               x  

  x         -> Wireless LAN (WLAN [=y])                                                                             x  

  x           -> Ralink driver support (RT2X00 [=m])                                                                x  

  x   Selects: RT2X00_LIB_USB [=m] && RT2X00_LIB_FIRMWARE [=y] && RT2X00_LIB_CRYPTO [=y] && CRC_ITU_T [=y]          x  
```

Under menuconfig I think all you will need to select is "Ralink driver support  --->"  and under that "Ralink rt2501/rt73 (USB) support".

----------

## plice

hi,

sorry but had some fun, deleted by accident /boot . . . 

Yes, i've re-compiled it with the rlink drivers as you have said. dmesg registers it correctly:

```
ehci_hcd 0000:00:04.1: GetStatus port 7 status 001005 POWER sig=se0 PE CONNECT

[  314.340016] usb 1-7: reset high speed USB device using ehci_hcd and address 3

[  314.396889] ehci_hcd 0000:00:04.1: port 7 high speed

[  314.396892] ehci_hcd 0000:00:04.1: GetStatus port 7 status 001005 POWER sig=se0 PE CONNECT

[  340.426796] rt73usb 1-8:1.0: usb_probe_interface

[  340.426800] rt73usb 1-8:1.0: usb_probe_interface - got id

[  340.689839] phy1: Selected rate control algorithm 'minstrel'

[  340.690132] Registered led device: rt73usb-phy1::radio

[  340.690145] Registered led device: rt73usb-phy1::assoc

[  340.690160] Registered led device: rt73usb-phy1::quality

[  340.691370] usbcore: registered new interface driver rt73usb

[  357.971469] rt73usb 1-8:1.0: firmware: requesting rt73.bin

```

i can do ifconfig wlan0 up, then the ifconfig shows:

```

wlan0     Link encap:Ethernet  HWaddr 00:17:3f:c5:4e:ff  

          inet addr:192.168.1.101  Bcast:192.168.1.255  Mask:255.255.255.0

          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)
```

lsmod:

```
rt73usb                22584  0 

rt2x00usb              10669  1 rt73usb

rt2x00lib              29696  2 rt73usb,rt2x00usb

```

So now it looks better with the correct modules. 

 I still can't bring it up to life, eg.

```
wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf

ioctl[SIOCSIWPMKSA]: Invalid argument

ioctl[SIOCSIWMODE]: Invalid argument

Could not configure driver to use managed mode

ioctl[SIOCGIWRANGE]: Invalid argument

ioctl[SIOCSIWENCODEEXT]: Invalid argument

ioctl[SIOCSIWENCODEEXT]: Invalid argument

ioctl[SIOCSIWENCODEEXT]: Invalid argument

ioctl[SIOCSIWENCODEEXT]: Invalid argument

ioctl[SIOCSIWPMKSA]: Invalid argument

ioctl[SIOCGIWSCAN]: Invalid argument

ioctl[SIOCSIWSCAN]: Invalid argument

Failed to initiate AP scan.

ioctl[SIOCGIWSCAN]: Invalid argument

ioctl[SIOCSIWSCAN]: Invalid argument

Failed to initiate AP scan.

^CCTRL-EVENT-TERMINATING - signal 2 received

Failed to disable WPA in the driver.

ioctl[SIOCSIWAP]: Invalid argument

```

Running :

Linux box 2.6.33-gentoo-r1 #4 SMP Sun Apr 25 17:23:20 WST 2010 x86_64 Intel(R) Pentium(R) Dual CPU E2220 @ 2.40GHz GenuineIntel GNU/Linux

kernel config:  /networking/wireless:

```

 <*>   cfg80211 - wireless configuration API                                                                 │ │  

  │ │                                      [ ]     nl80211 testmode command                                                                            │ │  

  │ │                                      [ ]     enable developer warnings                                                                           │ │  

  │ │                                      [ ]     cfg80211 regulatory debugging                                                                       │ │  

  │ │                                      [ ]     enable powersave by default                                                                         │ │  

  │ │                                      [ ]     cfg80211 DebugFS entries                                                                            │ │  

  │ │                                      [*]     Old wireless static regulatory definitions                                                          │ │  

  │ │                                      [ ]     cfg80211 wireless extensions compatibility                                                          │ │  

  │ │                                      < >   Common routines for IEEE802.11 drivers                                                                │ │  

  │ │                                      <*>   Generic IEEE 802.11 Networking Stack (mac80211)                                                       │ │  

  │ │                                            Default rate control algorithm (Minstrel)  --->                                                       │ │  

  │ │                                      [ ]   Enable mac80211 mesh networking (pre-802.11s) support                                                 │ │  

  │ │                                      [*]   Enable LED triggers                                                                                   │ │  

  │ │                                      [ ]   Export mac80211 internals in DebugFS                                                                  │ │  

  │ │                                      [ ]   Select mac80211 debugging features  --->    
```

Device drivers / networking /wireless LAN

```
 <M>   Ralink driver support  --->                                                                           │ │  

< >   Ralink rt2400 (PCI/PCMCIA) support                                                                    │ │  

  │ │                                      < >   Ralink rt2500 (PCI/PCMCIA) support                                                                    │ │  

  │ │                                      < >   Ralink rt2501/rt61 (PCI/PCMCIA) support                                                               │ │  

  │ │                                      < >   Ralink rt2800 (PCI/PCMCIA) support (VERY EXPERIMENTAL)                                                │ │  

  │ │                                      < >   Ralink rt2500 (USB) support                                                                           │ │  

  │ │                                      <M>   Ralink rt2501/rt73 (USB) support                                                                      │ │  

  │ │                                      < >   Ralink rt2800 (USB) support (EXPERIMENTAL)                                                            │ │  

  │ │                                      [ ]   Ralink debug output   
```

Not sure now, I guess I'm doing something really stupid :/

Also, after the kernel config, i got error on ndiswrapper while compiling it:

*   CONFIG_WIRELESS_EXT:	 is not set when it should be.

Thanks for helping out hey  :Smile: 

----------

## mikegpitt

It looks like from your above output that wlan0 is getting an ip address...  is this correct?  I think the issue is that the device isn't up by default and when you manually bring it up it starts working well.  

Can you post this?

```
grep RC_PLUG_SERVICES /etc/conf.d/rc
```

Also, is there a reason why you are starting wpa_supplicant manually and not with the net.wlan0 init script?

----------

## plice

Hi bud,

I made a progress. Compiled the kernel again, and this time i put 

    cfg80211 wireless extensions compatibility   

the wlan0 is actually responding correctly now  :Smile:  i.e. it's giving me correct results with the iwlist wlan0 scanning. Now I just have to hook it up to the router.

I manually gave the wlan0 ip address; that was before the cfg802.11 module was compiled in, and it didn't work. now it's out of box pretty much.

wpa_supplicant, was only testing it, before i get it fully up and running, but then, i'm not sure how to put it to the net.wlan0.

Again, sorry for late replies, but i ended up in hospital . . . my luck!

thanks mate

edit: it successfully associated with the router using wpa2. I guess the last thing is to make it start at the boot . . .  thanks for helping out  :Smile: 

----------

## mikegpitt

 *plice wrote:*   

> 
> 
> wpa_supplicant, was only testing it, before i get it fully up and running, but then, i'm not sure how to put it to the net.wlan0.

 All you need to do in symlink it to net.lo as such:

```
ln -s /etc/init.d/net.wlan0 /etc/init.d/net.lo
```

If you want to use wpa_supplicant, which it seems like you do, put this in your /etc/conf.d/net:

```
config_wlan0=( "dhcp" )

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"
```

----------

