# rt2570, kernel, but no internet ... [SOLVED]

## pathfinder

Guys, I have a problem here.

My gentoo has an OK 2.6.22-gentoo-r2 kernel. DVB tv working, but wifi not working. That was not a problem cause I had a wired connection.

Now, it s been 4 months since I moved. And no way to have internet at my place. No way. Still waiting, was supposed to be there 2 months ago.

Pissed off, i asked the coffee downstairs my place and they gently gave me their internet wifi code.

Now, the problem is I can t load module rt2570 as I was doing in previous kernel versions.

After reading I found out that actually I need to update my kernel.

I don t have internet.

However, I have one kernel (an emerge sync 4 months ago): 2.6.25gentoo-r9 (r9 i m not sure)

It has rt2500pci and rt2570usb.                    (I both have PCI and USB pen for wifi)

But this is weird. 

I rm /usr/src/linux

created new symlink pointing to new kernel.

copied .config of 2.6.22 to the new cd /usr/src/linux.

make oldconfig, 

compiled went ok.

mount boot

cp arch...

edit grub.

rc-update del xdm default, 

emerge nvidia drivers and boot again in graphics mode.

Now, if I launch back my new kernel, I have many problems:

uname -pmrs   gives the newer version (OK)

but

iwconfig no longer recognizes my devices as ra0 or rausb0

Instead, there s a master and a wlan0 and wlan1 thing.

And it doesn t work.

What  s more, emerged back gentoo-vdr and all the scripts, cd v4l_dvb/ and make then make install as root (this works so smoothly on all other kernels)

Not anymore.

At boot time, it says NO DVB device found.

So I have no wifi, no TV.

And the weird thing is when I make and make install from v4l-dvb directory, it says "using 2.6.22r2 kernel". I don t know why it always sticks to this kernel version.

What am I doing bad?

Can I copy another gentoo kernel from another windows running PC (sorry) and do the trick?

Anyone has the right ra0 and rausb0 drivers?

I had to go back to the old kernel (I thought then the DVB wouldn  t work, neither the NVIDIA drivers, compiled for 2.6.25): to my surprise, it just worked!!!!! WORKED PERFECTLY without having to do anything. Is this normal behaviour?

What am I missing?

Sorry for the long mail,  hope anyone here will help, I can t connect to freenode...Last edited by pathfinder on Thu Apr 02, 2009 9:49 am; edited 1 time in total

----------

## pathfinder

I dl the latest CVS drivers from http://rt2x00.serialmonkey.com/rt2570-cvs-daily.tar.gz

tar zxvf rt2570-cvs-daily.tar.gz

cd rt2570-cvs-2008041716/Module

make

make install

but it doesn t want to compile anything. make returns an error (don t remember now). but something really short, like "can t find..."

HTH.

----------

## NeddySeagoon

pathfinder,

That driver went into the kernel at 2.6.23.  Please update your kernel and use the in kernel drivers.

The USB wireless needs firmware in /lib/firmware but you should already have that, if not, get the latest firmware from ralinks site.

Your devices will be wlan0 and wlan1

----------

## pathfinder

Thanks neddyseagoon!

Well, I read about the in kernel thing.

my drivers are appearing, actually, as wlan0 and wlan1.

What was suspicious is that in other distros, i was still seeing them as ra0 and rausb0...

I guess my problem is certainly a problem of firmware.

 :Smile: 

i ll try to get it and paste it where it has to be.

As for the dvb, any idea?

(i have  a v4ldvb folder, go into it, make returns error and i guess because it still tries to (i dont know why) use 2.6.22...

anyway, I ll get the firmware and try it.

Thanks for your help.

My kernel is a 2.6.25r?  and, as you said, the drivers for RALINK are there. 

After copying firmware in /lib/iirmware, should I do something? (like env-update or firmware update?)

If you have an idea for the dvb thing, really appreciated.

----------

## pathfinder

....

sorry to say this, 

but I just can t find the firmware.

googled 

rt2500 firmware download

and nothing under linux, just windows related.

actually, 

 *Quote:*   

> rt2570USB drives do not work do we need to update firmware?
> 
> rt2570/rt2500usb doesn't work with firmware, so no update is needed.

 

seen here:

http://rt2x00.serialmonkey.com/phpBB/viewtopic.php?f=4&t=4816

OK so this invalidates the firmware question for my rt2570 USB.

for the 2500PCI, do you know if it needs formware? (i don t think so, i think this is for the latesst chipsets...)

anyway, i configure my connection as followinf:

iwconfig wlan0 essid ESSIDNAME mode managed key TH:EW:EP:KE:Y?:??

ping www.google.es doesnt work.

Do i need to 

dhcpch wlan0?  (that says TIMED OUT)

----------

## NeddySeagoon

pathfinder,

The firmware is operating system independant. It runs in the processor inside the device.

USB devices typically need firmware. PCI devices do not.

Linux Drivers and firmware

Your USB firmware

Unzip the file and put the output file into /lib/firmware, which is where the kernel looks for it.

There are firmware files at the first link for PCI devices - treat them the same way once you have identified your PCI device.

To get wireless started follow the handbook

For your dvb problem, post the lspci/lsusb output that shows the device and we can take it from there

----------

## pathfinder

Thanks again!

About the firmware: this is for rt71... i have a rt2500 pci chipset and a rt2570 usb chipset.

Fair enough, I ll try.

Annoying point: no internet connection  :Very Happy: 

So, I'll try.

But right now, iwconfig returns master0 and wlan0.

Modules have been built inside the kernel.

I think now it's time for the handbook session. I already have wpa_supplicant and wireless_tools ready.

A pity I did not install wlassistant, really effective. Now i don t have the net  :Smile: 

But I thought that just for a testing purpose, I could iwconfig wlan0 mode managed essid XXXXXX key XXXXXXXXXX

dhcpcd wlan0 returns a timed out. 

I ll read the guide.

The dvb thing: lsusb recognizes perfectly the Avermedia stick. but the really dodgy thing is that when I make inside the v4l-dvb folder, It automatically tries to build inside the older kernel.

I think once my internet connection is ok, I ll just have to hg clone the site and compile again.

We'll see. By parts. And one question, one post  :Smile: 

Many thanks for your support.

Lovely gentoo.

----------

## NeddySeagoon

pathfinder,

```
iwconfig returns master0 and wlan0. 
```

That shows your kernel is ok and the firmware loaded, so its a configuration thing now.

Do you have a /etc/init.d/net.wlan0 ?  

If not, make it a symlink to /etc/init.d/net.lo

Now 

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

will attempt to start wlan0.

For testing, turn encryption off. Its one less complication when you are trying to find out why the wireless is not connecting.

Once wireless works, play with the encryption.

----------

## pathfinder

 *Quote:*   

> Do you have a /etc/init.d/net.wlan0 ?
> 
> If not, make it a symlink to /etc/init.d/net.lo
> 
> 

 

i didn t 

so I created it, started the service. 

not running. "timed out".

there s an annoying thing here: it detects automatically a WPA ESSID, which is not the one I should use...

I don t know why it goes directly to the wpa thing: there s a modules=("iwconfig") in file conf.d/net and no wpa_supplicant anywhere.

and i did not followed the wpa_supplicant guide as I don t even have a WPA compatible device...

I tried with a live ubuntu, and exactly the same thing: it detects by default the WPA network. I made him search other ones, then it detected the WEP one.

When I try to connect, it doesn t work. It automatically asks for a 128 ascii key (there s not. i have something like xx:xx:xx:xx:xx ... this is a wep 64 bits, isn t it?)

I don t know what I should do... dhcpcd wlan0 says timed out too.

and the handbook is essentially for WPA things; i don  t know how to check things...

how do I turn encryption "off"? you mean "no key" at all? or is it the "shared/open/..." thing? cause i m not sure he ll want to turn off the keys in his bar... I could probably ask him to put the "open" authentication to a "shared one"... but do you think this will help?

(in windows it works ok, though sometimes it disconnects without saying anything. a reconnection and ok).

i desperately tried  a 

iwconfig wlan0 essid coffeebar key 64:bi:t_:ke:y.:.. 

then added

 mode managed 

Should I specify also the channel, the AP, etc? "everything"?

shouldn t it just work out of the box?

the kernel returns the good devices now (wmaster and wlan0).

When does the file conf.d/net is loaded?

Thanks for your time and your help.

----------

## NeddySeagoon

pathfinder,

If you tell it the ESSID, the key and mode managed, your interface sould find everything else.

It will prefer strong APs to weak ones, regardless of the encryption as all APs are supposed to broadcast their ESSID without encryption.

There has to be some negiotiation before encryption can be started.

My 64 bit WEP setup is  

```
key_RadioNet="8B9A-9CF8-EA"

mode_wlan0="managed"

txpower_wlan0="30dBm"
```

I also have 

```
#sleep_scan_wlan0="10"

#associate_timeout_wlan0="15"

#scans_wlan0="5"
```

so I was playing with the delays at some time but notice those lines are commented.

Those are all real numbers and settings which I used to use before I switched to WPA_supplicant.

txpower_wlan0="30dBm" is/was needed as the device switched the transmitter off at some time.

You can't actually set 30dBm. In Europe, txpower is limited to 27dBm

If you use the option 

```
ap_wlan0="00:06:25:4B:4E:C3"
```

then the wireless will try to associate with the given AP.

For the belts and braces approach there is also 

```
preferred_aps_wlan0="'RadioNet'"
```

----------

## pathfinder

hey!!!

thanks!

i think i have a problem with the AP

cause w/o adding any of your valuable advices, it just worked.

sometimes it works, sometimes not.

somtimes the AP is not found (I have a huge signal, almost 100%), don  t know why.

Even adding your line with the ap specified.

it s weird.

but now it works.

at least i can check my emails.

Thanks again!!

----------

