# rt2500 setup problems [Solved]

## MrApples

i recently purchased a sager 4750 laptop that came with a ralink rt2500 based integrated wireless nic

i followed the following steps:

emerged rt2500

linked /etc/init.d/net.lo to net.ra0

modprobed rt2500

ran /etc/init.d/net.ra0

from that i got the following error:

starting ra0

bringing up ra0

dhcp

ra0 does not exist

lspci shows:

```
0000:00:05.0 Network controller: RaLink Ralink RT2500 802.11 Cardbus Reference Card (rev 01)

```

----------

## bigfunkymo

are you 100% sure you modprobe'd rt2500?

my lspci shows me one of these:

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

couple of possible headaches here:  Make sure you are not using the smaller stack size in your kernel config (causes lockups with rt2500 driver), and make sure you are using a /etc/Wireless/RT2500STA/RT2500STA.dat (generated by RaConfig2500 program).  My /etc/conf.d/net looks like this:

```
config_ra0=("null")
```

----------

## MrApples

yes, im sure i modprobed it, its in lsmod

and im using 8k stacks

----------

## erik258

Dear Mr A, 

There are a few different topics in the forums which i suggest you investigate, mostly because I couldn't easily remember/enumerate their content here and now.  They may be helpful.  

At any rate, you should show us the output of an ifconfig.  It's possible your device has a different name for some strange reason I would think.

----------

## MrApples

dont worry, ive read everything here pertaining to the rt2x00 chipsets

```
appletop ~ # ifconfig 

eth0      Link encap:Ethernet  HWaddr 00:90:F5:32:C9:8B  

          inet addr:192.168.1.104  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::290:f5ff:fe32:c98b/64 Scope:Link

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000 

          RX bytes:6031060 (5.7 Mb)  TX bytes:163830 (159.9 Kb)

          Interrupt:193 Base address:0x2800 

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

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

          collisions:0 txqueuelen:0 

          RX bytes:100 (100.0 b)  TX bytes:100 (100.0 b)

```

```
appletop ~ # iwconfig 

lo        no wireless extensions.

sit0      no wireless extensions.

eth0      no wireless extensions.

```

```
appletop ~ # lsmod |grep rt2500

Module                  Size  Used by

rt2500                193096  0 
```

```
appletop ~ # cat /etc/conf.d/net |grep ra0

iface_ra0="dhcp"

dhcpcd_ra0="-t 10"

```

----------

## spengy

are you running on AMD64?

do an lsmod and see if the driver is being used.

I too have an rt2500 802.11g card, (Zonet ZEW1500) which should work with linux. (It has open source drivers, made my ralink)

But the drivers have problems with amd64 that havent been fixed yet. (The official drivers, AND the unofficial offshoot drivers)

So if you are running amd64, you may have to wait a few months for amd64 support to get fixed.

----------

## MrApples

yeah its amd64, and the lsmod is above, but other people have it working fine

----------

## MrApples

any more tips?

----------

## MrApples

bump

----------

## b3rT

i just setup my rt2500-card on a amd64-machine. you should try the daily-cvs-build as it is written in the gentoo-wiki http://gentoo-wiki.com/HARDWARE_rt2500_on_AMD64

----------

## MrApples

i did try it, perhaps its worth another shot tho

----------

## erik258

what I am confused about -and of course i don't really know what i'm talking about - is this : the module loaded but where's the device?  Of course, it won't show up in ifconfig unless its configured or the command is invoked with the -a option...

It seems like you can certainly see the device and so if the driver loads it seems like you should have a device.  This reminds me of a similar problem i had with an atheros card, it would load ndiswrapper stuff which listed hardware present but the device never actualyl was around under the name i expected.  

But assuming you've kept your eye on the syslogs and all it seems as if there must be a misnamed device floating around somewhere... although it seems like, if that were the case, it would at least show up under iwconfig.  hmm...

----------

## MrApples

yeah. thats what im confused about too, it seems to be fine except that i cannot find the device name to configure/start it

----------

## xepk

If the module is loaded correctly, ra0 should show up in your iwconfig output.  This seems to indicate the module is not loaded correctly.  Did you emerge rt2500 with or without the qt flag? If with, try configuring with the RaConfig2500 utility, or try reemerging it without the qt use flag.

----------

## MrApples

i emerged without the qt flag, ill try it with

----------

## MrApples

i run the utility and it says "Device Driver Not Found" and then exits

----------

## MrApples

bump

----------

## erik258

I've been working w/ these unreliable drivers for a bit and I haven't found anyone that uses the RaConfig utility, it seems to fail for everyone or else screw things up.  I don't think you need it.

Is it possibly a problem with configuration files?  I am just doing it manually... perhaps your device is being aliased to something incorrect, but that should still show up in the ifconfig -a output methinks.

----------

## MrApples

how are devices aliased/created through modules?

----------

## MrApples

bump

----------

## overkll

MrApples,

Have you resolved this yet?  If not, I've got some suggestions.

1.  I've read the whole thread, but I can't find anything mentioning how you configured the module.  Did you configure the module? If so, how?

2.  I suspect your problem lies with the /etc/Wireless/RT2500STA/RT2500STA.dat file.  The damn thing was in DOS format.  It's was causing all sorts of wierd issues on my system.  That's been updated as today in portage.  You could try an emerge sync and emerge the updated ebuild and see if that helps.  Make sure you move the old RT2500STA.dat file to a different name first.

3.  Check the output of "iwconfig" to view your module's config. 

4.  Also see if "iwlist scan" turns up any access points in your area.

Hope this helps.

----------

## MrApples

i configured that file, and i already posted the iwconfig output, and there are no wireless capable devices according to iwlist

see, there isnt even a device created when the module is loaded, that is the big problem

----------

## overkll

It may be a while until I check my posts again, so this is a long post.  :Very Happy:   I'll also include my config files at the end.

 *MrApples wrote:*   

> i configured that file, and i already posted the iwconfig output, and there are no wireless capable devices according to iwlist
> 
> see, there isnt even a device created when the module is loaded, that is the big problem

 

Yes, that is a big problem.  Let's concentrate on that for the moment.  If you haven't done so already DELETE, MOVE OR RENAME the /etc/Wireless/RT2500STA/RT2500STA.dat file so that it won't be read by the module upon loading.  Until recently, it was in DOS/WINDOWS format - see this thread from dev's site.  Linux isn't going to parse the old DOS formated file correctly which causes all sorts of problems.  If you've done a sync lately, you can copy the UNIX formated file from /usr/portage/net-wireless/files/RT2500STA.dat.  Alternatively, you can copy it from the latest CVS tarball's /Module directory.

Will the module load and show a ra0 interface now?

I also noticed that in this thread, 

 *b3rT wrote:*   

> i just setup my rt2500-card on a amd64-machine. you should try the daily-cvs-build as it is written in the gentoo-wiki http://gentoo-wiki.com/HARDWARE_rt2500_on_AMD64

 

and your response,

 *MrApples wrote:*   

> i did try it, perhaps its worth another shot tho

 

I tried the CVS too.  Found a problem though.  Unmerging (emerge -C rt2500) rt2500 doesn't remove the ebuild generated module file /lib/modules/<current-kernel-version>/net/rt2500.ko and installing the CVS with "make" and "make install" installs the new CVS version of the module into /lib/modules/<current-kernel-version>/extra/rt2500.ko.  So I ended up with two modules, and modprobe was using the old one!  The result was erratic behavior and a couple of hard freezes before I figured it out.  If you have the package "slocate" installed, you can check for the modules by doing

```
locate */rt2500.ko
```

So to get the CVS version of the module working on my system, I did the following (if you want to use the CVS you could try this or the alternative below)

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

modprobe -r rt2500 #(remove module if it is loaded)

emerge -C rt2500

rm -iv /lib/modules/<current-kernel-version>/net/rt2500.ko

cd /<rt2500-cvs-directory>/Module

make clean

make debug  #(incase debugging is needed later)

make install

depmod

modprobe rt2500
```

Alternatively, you could just do a "make" in the CVS dir, then copy the rt2500.ko file to the net/ directory, replacing the portage ebuild module:

```
cd /<rt2500-cvs-directory>/Module

modprobe -r rt2500  #(if you have it loaded)

make clean

make debug  #(incase debugging is needed later)

cp rt2500.ko -iv /lib/modules/<your-kernel-version>/net/

modprobe rt2500
```

That way, if you decide to "emerge rt2500" at a later time, the CVS module will be overwritten.  

To load the module with debugging, just do "modprobe rt2500 debug=1".  The debug output destination is dependent on which sysloger you use.  It should end up in /var/log/messages, syslog, kern.log or something like that.  If you are still having problems, you can post your debug info at the developer's forum - http://rt2x00.serialmonkey.com/phpBB2/index.php.  WARNING - debug is very verbose - 1 or 2 meg per minute.  Don't leave it enabled more than you have to or it will fill up your log file.

Do you have an ra0 interface yet?

FYI, There's been several bug fixes lately to the rt2500 package.  Most changes are sanity checks, cosmetic changes and the UNIX formated .dat file.

If you succeed in getting the ra0 interface to list with iwconfig, I suggest trying a simple config first - no encryption.  You may or may not have to change your AP's config.

IMPORTANT: Don't forget to reload the module after config file changes:

```
modprobe -r rt2500 && modprobe rt2500
```

MY CONFIG FILES

I use baselayout-1.11.12-r4 (current stable) and I don't need the /etc/conf.d/wireless file.  I choose to use a static ip as I don't like to wait for the DHCP assigned address at boot, but DHCP works for me too.  Here's my /etc/conf.d/net file:

```
modules=( "!iwconfig" )

# eth0

config_eth0=( "10.0.0.8/24 brd 10.0.0.255" )

routes_eth0=( "default via 10.0.0.1" )

# ra0 DHCP Address

#config_ra0=( "dhcp" )

#dhcpcd_ra0="-R -N"

# ra0 static address

config_ra0=( "10.0.0.100/24 brd 10.0.0.255" )

routes_ra0=( "default via 10.0.0.1" )
```

and my /etc/Wireless/RT2500STA/RT2500STA.dat file.  I use WPAPSK with TKIP

```
# Copy this file to /etc/Wireless/RT2500STA/RT2500STA.dat

# This file is a binary file and will be read on loading rt2500.o module.

#

# Use "vi -b RT2500STA.dat" to modify settings according to your need.

# 

# 1.) set NetworkType to "Adhoc" for using Adhoc-mode, otherwise using Infrastructure

# 2.) set Channel to "0" for auto-select on Infrastructure mode

# 3.) set SSID for connecting to your Accss-point.

# 4.) AuthMode can be "OPEN", "SHARED", "WPAPSK", "WPANONE"

# 5.) EncrypType can be "NONE", "WEP", "TKIP", "AES"

# for more information refer to the Readme file.

# 

[Default]

CountryRegion=0

WirelessMode=0

TXBurst=1

TurboRate=0

BGProtection=0

ShortSlot=0

TxRate=12

PSMode=CAM

# All parameters below can be set by iwconfig in the if-pre scripts

# if required or enabled here if you wish

# Anything enabled here will be used when EVEN the net interface is brought up

# this will undo any iwconfig pre-up settings.

SSID=myssid

NetworkType=Infra

Channel=6

AuthMode=WPAPSK

EncrypType=TKIP

WPAPSK=notreallymypassphrase

#DefaultKeyID=1

#Key1Type=0

#Key1Str=

#Key2Type=0

#Key2Str=

#Key3Type=0

#Key3Str=

#Key4Type=0

#Key4Str=

PSMode=CAM

#RFMON=0

ProfileID=PROF001

PreambleType=Auto

AdhocOfdm=0

RTSThreshold=2312

FragThreshold=2312
```

I didn't like that my net dependent services (postfix, mysql, etc.) would be stopped when I bring the interface down.  I changed the behavior by changing the RC_NET_STRICT_CHECKING variable in /etc/conf.d/rc from "no" to "lo"

```
# RC_NET_STRICT_CHECKING allows some flexibility with the 'net' service.

# The following values are allowed:

#  none  - The 'net' service is always considered up.

#  no    - This basically means that at least one net.* service besides net.lo

#          must be up.  This can be used by notebook users that have a wifi and

#          a static nic, and only wants one up at any given time to have the

#          'net' service seen as up.

#  lo    - This is the same as the 'no' option, but net.lo is also counted.

#          This should be useful to people that do not care about any specific

#          interface being up at boot.

#  yes   - For this ALL network interfaces MUST be up for the 'net' service to

#          be considered up.

RC_NET_STRICT_CHECKING="lo"
```

Hope this helps

----------

## MrApples

thanks for the detailed post, but i just tried it all and had no luck, the debug shows this only:

```
ACPI: PCI interrupt 0000:00:05.0[A] -> GSI 16 (level, low) -> IRQ 177

rt2500 1.1.0 CVS 2005/07/10 http://rt2x00.serialmonkey.com
```

----------

## MrApples

2.6.12 fixed the problem completely, weird

----------

## overkll

Glad to hear you got it working!

BTW, which kernel sources are you using?  Gentoo or another source like ck-sources or something?  That info may be helpful to others who read this post.

You should also add [solved] to the subject of this thread (edit first post).

----------

## MrApples

2.6.12-ck3

----------

