# [solved]wireless rt2500 problem

## Terra_Nova

Hey, i Just got gentoo installed for the 1st time, using a wired connection, im now trying to get wireless to work, the card i have is a belkin F5D7000 though its listed in lspci as

```
0000:01:0a.0 Network controller: RaLink Ralink RT2500 802.11 Cardbus Reference Card (rev 01)
```

which explains why ndiswrapper with the belkin drivers didnt work, i then emerged the rt2500 and now i get

```
 localhost etc # iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

eth1      no wireless extensions.

ra0       RT2500 Wireless  ESSID:""

          Mode:Managed  Frequency=2.412 GHz  Bit Rate:11 Mb/s

          RTS thr:off   Fragment thr:off

          Encryption key:off

          Link Quality=0/100  Signal level=-120 dBm  Noise level:-192 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

sit0      no wireless extensions.

```

when i run iwconfig and when i run ifconfig

```
 localhost etc # ifconfig

eth0      Link encap:Ethernet  HWaddr 00:11:09:90:D0:4D

          inet addr:192.168.2.4  Bcast:192.168.2.255  Mask:255.255.255.0

          inet6 addr: fe80::211:9ff:fe90:d04d/64 Scope:Link

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000

          RX bytes:2005544 (1.9 Mb)  TX bytes:307571 (300.3 Kb)

          Interrupt:11 Base address:0xa000

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:104 errors:0 dropped:0 overruns:0 frame:0

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

          collisions:0 txqueuelen:0

          RX bytes:6575 (6.4 Kb)  TX bytes:6575 (6.4 Kb)

```

the contents of /etc/conf.d/net are as follows

```
# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

modules=( "iwconfig" )

#Wired LAN

ifconfig_eth0=( "dhcp" )

ifconfig_eth1=( "dhcp" )

#Wireless LAN

config_31OldFarm=( "dhcp" )

key_31OldFarm="[1] s:*my wep code here* key [1] enc open"

#Use this if there are more than one network in range to prioritise

#preferred_aps( "31OldFarm" )

```

when i run /etc/init.d/net.ra0 start i get

```

localhost etc # /etc/init.d/net.ra0 start

 * Starting ra0

 *   Configuring wireless network for ra0

 *   Failed to configure wireless for ra0     

```

has anyone had much luck in this area? i know there is an ndiswrapper version fo this device, but i figure i have the device already detected, its just configuring the network now. Is there anything i have missed out? Any help would be much appreciated! Thanx guys!Last edited by Terra_Nova on Tue Sep 13, 2005 7:58 pm; edited 1 time in total

----------

## NeddySeagoon

Terra_Nova,

Since you have a device ra0, the kernel module is loaded.

Your net file looks a bit thin. Do you have the rest of the wireless setup in /etc/conf.d/wireless ?

You will really have problems getting the encryption to work suning the s: option.

Its much more likely to work with a hex key.

How do you assign an IP address to ra0?

I use the USB version (rt2570) with no problems - hers my setup:-

```
# Use iwconfig for wireless

modules=("iwconfig")

#############  This is Grytpype-Thynne ##################

config_eth0=( "192.168.100.12 netmask 255.255.255.0" )

routes_eth0=( "default gw 192.168.100.1"

              "-net 192.168.0.0/24 gw 192.168.100.6"

            )

#############    Wireless  ###########################

######  Beware - they are both in the same Subnet #######

key_RadioNet="[1] hex-key-goes-here key [1] enc open"

#iwconfig_rausb0="essid RadioNet"

essid_rausb0="RadioNet"

#iwconfig_rausb0="channel 2"

channel_rausb0="2"

#iwconfig_rausb0="mode managed"

mode_rausb0="managed"

config_rausb0=( "192.168.100.90 netmask 255.255.255.0" )

routes_rausb0=( "default gw 192.168.100.1"

              "-net 192.168.0.0/24 gw 192.168.100.6"

            )

```

There is nothing in /etc/conf.d/wireless

----------

## thechris

i've never gotten ra0 to work.  the signal strength peaks at about -84dB.  this is below the -80dB threshold limit.  my roomate's laptop wifi card works just great.  also in winXP, the card works fine.  only in linux does the card become useless.

----------

## Pip101

Mine seems to be set up a bit differently but works perfectly for me now, so here are my files (minus comments):

/etc/conf.d/net

```
iface_eth0="192.168.1.101 broadcast 192.168.1.255 netmask 255.255.255.0"

iface_ra0="dhcp"

dhcpcd_ra0="-t 5"
```

And /etc/conf.d/wireless

```
preferred_aps=( "HomeWirelessLANAP" "saunders" )

key_HomeWirelessLANAP="s:[key]"

sleep_scan_eth0="5"

sleep_associate_eth0="15"

preferred_aps_ra0=( "HomeWirelessLANAP" "saunders" )

associate_order="forcepreferredonly"
```

----------

## Terra_Nova

ok thanx for the replys, NeddySeagoon i basically took ur advice and plugged all the appropriate stuff into my /etc/conf.d/net file (using yours as a guide), to no avail, everything is still not working, with exactly the same errors, only difference was i used DHCP instead of specifying an ip, but i know the router is DHCP and i have DHCP enabled and working cos its fine for the eth0 connection. im beggining to think that mage its not the config i should be looking at. Maybe hardware fault? i have had issues with belkin stuff in the past, im dual booting with windows so ill keep an eye on that to see if there is any change. just about to try pip101's suggestion!

Ok just treid pip101's suggestion, seemd to, although not have worked, given a bit more info, when i do /etc/init.d/net.ra0 start i get

```
# /etc/init.d/net.ra0 start

 * Caching service dependencies ...                                       [ ok ] * Starting ra0

 *   Configuring wireless network for ra0

 *   Trying to force preferred in case they are hidden

 *   Failed to associate with any preferred access points on ra0

 *   Couldn't find any access points on ra0

 *   Failed to configure wireless for ra0                                 [ !! ]
```

so apparently its not seeing any networks! looks like its a dodgy card, as i see no reason why any of these suggestions shouldnt work! as they all do the required tasks, such as specifying the essid and the wep key, and specifying dhcp. 

I used to use mandriva, boy am i missing that GUI wireless config  :Wink:  have to do sum card swapping tomorrow, only problem is my other card is a belkin that needs ndiswrapper! but the config should be the same process? well, i guess its there just change ra0 to whatever ndiswrapper calls my interface?

ill keep going with it and let u know if anything jumps to mind!

Thanx for your help!Last edited by Terra_Nova on Mon Sep 12, 2005 6:29 pm; edited 1 time in total

----------

## NeddySeagoon

Terra_Nova,

Post the output of 

```
iwconfig ra0
```

----------

## Terra_Nova

iwconfig ra0 gives

```
iwconfig ra0

ra0       RT2500 Wireless  ESSID:""

          Mode:Managed  Frequency=2.412 GHz  Bit Rate:11 Mb/s

          RTS thr:off   Fragment thr:off

          Encryption key:off

          Link Quality=0/100  Signal level=-120 dBm  Noise level:-192 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

```

thats with everything in the /etc/conf.d/net and nothing in wireless and the essid and key assigned to each other with the interface using dhcp

i find it odd that the interface hasnt picked up the key and essid, is this right? here is the updated /etc/conf.d/net

```

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

modules=( "iwconfig" )

#Wired LAN

ifconfig_eth0=( "dhcp" )

ifconfig_eth1=( "dhcp" )

#Wireless LAN

#config_31OldFarm=( "dhcp" )

#key_31OldFarm="[1] s*my key here* key [1] enc open"

#Use this if there are more than one network in range to prioritise

#preferred_aps( "31OldFarm" )

#############    Wireless  ###########################

######  Beware - they are both in the same Subnet #######

key_31OldFarm="[1] *mykeyhere* [1] enc open"

iwconfig_ra0="essid 31OldFarm"

#essid_ra0="31OldFarm"

#iwconfig_ra0="channel 2"

#channel_ra0="2"

iwconfig_ra0="mode managed"

#mode_ra0="managed"

config_ra0=( "dhcp" )

#routes_ra0=( "default gw 192.168.0.1" )

```

----------

## NeddySeagoon

Terra_Nova,

I set channel 2 because its not the defualt that Gentoo uses and its not the defualt that my AP was set to, so there is a good chance of getting it to myself. That seems to work so far.

You do need to set your AP to channe 2 too, to get the link up.

It looks like 

```
/etc/init.d/net.ra0 start
```

has not been run or the ESSID and key should be set.

Can you set the parameters manually with iwconfig ?

Do you have a /etc/init.d/net.ra0 ? it should be a symbolic link to net.lo.

To run it at startup, add it to the defualt runlevel.

----------

## Terra_Nova

I didnt have that symlink, i do now, output to /etc/init.d/net.ra0 start is as follows

```
 /etc/init.d/net.ra0 start

 * Starting ra0

 *   Configuring wireless network for ra0

 *     no access points found

 *   Couldn't find any access points on ra0

 *   Failed to configure wireless for ra0                                 [ !! ]
```

also, i can manually enter the essid and wep key using iwconfig in the terminal

i left the channel stuff out (i think its commented out, just took out as little as possible)

even after i run /etc/init.d/net.ra0 there is no change to the output of iwconfig, no assignment of the key or the essid

----------

## NeddySeagoon

Terra_Nova,

If you leave the channel setting out Gentoo sets channel 3.

Should your AP be on another channel, the link won't come up. 

The two ends of the raido link need to be on the same channel.

Its better to explicitly set everything - then you know how its set.

----------

## wjb

Also, take a look at /etc/Wireless/RT2500STA/RT2500STA.dat - its where the stuff from iwconfig ends up. Just check whats in there looks sane.

I found it a lot simpler to get rid of eth0 and dhcp while I was trying to get the ra0 connection going. This made some of the weird stuff in the boot messages and logs go away.

----------

## Terra_Nova

OK, i had a look at the card and the setup, the config help u guys gave me was HUGELY helpful, and right in the end, chucked the card in a windows box and nothing, so out i went to get myself a new one, got a D-Link DWL-G520, emerged madwifi, and ur configs worked pretty much 1st time but for a bit of editing!

Thanx again for the help!

----------

## bilbod

[quote="Terra_Nova"]I didnt have that symlink, i do now, output to /etc/init.d/net.ra0 start is as follows

```
 /etc/init.d/net.ra0 start

 * Starting ra0

 *   Configuring wireless network for ra0

 *     no access points found

 *   Couldn't find any access points on ra0

 *   Failed to configure wireless for ra0                                 [ !! ]
```

I had the same problem. I think it is a nic configuration issue. kismet can see the access point using the card so the hardware is OK.

This always brings the card up (nothing in /etc/conf.d/net):

ifconfig ra0 up

/etc/init.d/net.ra0 restart

using start instead of restart crashes the system.

At one point it was working at boot up with nothing in /etc/conf.d/net, now it won't. I have to start it manually after boot up.

Bill

----------

## NeddySeagoon

bilbod,

There are reports of some wireless cards needing a pause for breath in some systems if iwconfig has done its stuff  and before you attempt to set up the interface with dhcp. See the debug variablesjust above Code Listing 4d, espesially sleep_scan_eth0.

----------

## bilbod

>> There are reports of some wireless cards needing a pause for breath in some systems <<

I don't know what the problem was but I was looking for a way to reset the card. I did not find one but tried turning my computer off and that fixed the problem. Now the wireless nic comes up and gets assigned an IP address during bootup.

Next I'm trying to get WEP and WPA working.

Bill

----------

## bilbod

>> I don't know what the problem was but I was looking for a way to reset the card. <<

Found the problem and solution.

Kismet puts the card in Monitor mode but does not return it to managed mode when you exit.

iwconfig ra0 mode Managed

is the way to fix the problem. No more powering down

Bill

----------

