LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   rt2870sta.ko driver (https://www.linuxquestions.org/questions/slackware-14/rt2870sta-ko-driver-912689/)

slackunix 11-09-2011 01:34 PM

rt2870sta.ko driver
 
Hello, I have problems with this driver, I read the make file but don't understand certain things.For example when it tells:
" Please set HAS_WPA_SUPPLICANT=y' and 'HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y'.
=> #>cd wpa_supplicant-x.x
=> #>./wpa_supplicant -Dwext -ira0 -c wpa_supplicant.conf -d";
and when it tells:
"$make
# compile driver source code
# To fix "error: too few arguments to function ”„iwe_stream_add_event"
=> $patch -i os/linux/sta_ioctl.c.patch os/linux/sta_ioctl.c

What is that "$patch -i" patch???, and from what directory I must to execute that code's line??

Someone who knows this stuff can show me a bit how can I proceed correctly??!:confused: Thanks!

markush 11-09-2011 02:13 PM

Hello slackunix, welcome to LQ,

Try the following command:
Code:

wpa_supplicant -Dwext -ira0 -c/etc/wpa_supplicant.conf &
provided your wpa_supplicant.conf is correct and the interface is indeed ra0.
Afterwards you'll have to execute
Code:

dhcpcd ra0
Long story short: the -c option needs the full path.

What are you trying to do? isn't the driver in the kernel? it's named .sta, so I'd assume it's from the staging-drivers section. If it's not available in Slackware's kernel, you'll only have to rebuild the kernel with this driver. Which version of Slackware are your running?

Markus

slackunix 11-09-2011 02:37 PM

Thanks, fast response, I have the driver rt2870sta, but I want to install this because I think is a version more advanced, I guess, I'm not 100% sure, I have slackware 13.37, kernel 2.6.37, and is a bit of curiosity trying to install a driver, I think the driver the kernel have, is 2800usb and I want to install rt2870sta, or it's the same? The command I have to write it from console? "wpa_supplicat -DWext...", I don't know what is staging-drivers, the driver I'm trying to install is in the original cd, when I bought the wifi-card. I have another linux system on usb and the wifi card is recognized as "ra0" and it works better(more fast) than in slackware.

markush 11-09-2011 02:43 PM

You can load the module if it is available for the kernel
Code:

modprobe rt2870sta
or check if it's already loaded
Code:

lsmod | grep rt2870
if it is loaded, you can execute wpa_supplicant. Be sure that your wpa_supplicant.conf has the correct settings and execute it as I wrote in my first post. Are you sure that the interface is ra0? and not wlan0?

Markus

slackunix 11-10-2011 06:28 AM

hello, the drivers is loaded, rt2870sta, not doubt, but I surf with this driver in other system, puppylinux 5.2.8 more fast, is recognized as wlan1,so I thought the driver in slackware not was properly installed, in the forum someone tells me that wpa_supplicant is not neccesary for ralink drivers, anyway I tried the command "wpa_supplicant.conf -D wext..." and it gives me errors, so it works the driver in slackware but I note less speed, is that the reason I wanted reinstall the driver. Anyway thanks.

markush 11-10-2011 07:06 AM

Quote:

Originally Posted by slackunix (Post 4520554)
... in the forum someone tells me that wpa_supplicant is not neccesary for ralink drivers...

if you need wpa_supplicant depends on the encryption of your wireless network and not on the hardware.
Quote:

...anyway I tried the command "wpa_supplicant.conf -D wext..." and it gives me errors, ...
you'd be better off when you post the error-messages if you want us to help you.

Markus

coralfang 11-10-2011 07:32 AM

Quote:

Originally Posted by slackunix (Post 4520554)
hello, the drivers is loaded, rt2870sta, not doubt, but I surf with this driver in other system, puppylinux 5.2.8 more fast, is recognized as wlan1,so I thought the driver in slackware not was properly installed, in the forum someone tells me that wpa_supplicant is not neccesary for ralink drivers, anyway I tried the command "wpa_supplicant.conf -D wext..." and it gives me errors, so it works the driver in slackware but I note less speed, is that the reason I wanted reinstall the driver. Anyway thanks.

Hi, my wireless usb device uses the rt2870sta driver. It works fine in slackware's default kernel.
For some reason in linux 2.6.X kernels it tries to load the rt2800usb and rt2x00usb modules aswell. This tends to cause all kinds of problems, like slower speeds as you stated, or worse not allowing you to even bring up the interface.

To get it to work (without manually compiling it) all you need to do is blacklist 4 modules:

/etc/modprobe.d/ralink-blacklist.conf
Code:

blacklist rt2800usb
blacklist rt2800lib
blacklist rt2x00usb
blacklist rt2x00lib

If you simply reboot after creating that file it should only load the rt2870sta module and your device will be named wlanX (where X is a number), hopefully your wireless should then work.

Piece of advice: in linux kernel's 3.X and above, the driver code for rt2870sta has been properly merged with the rt2x00usb modules, so you will not need to blacklist them when using a 3.X kernel in the future :hattip:

slackunix 11-10-2011 10:25 AM

Coralfang, are you sure that including rt2800usb,rt2800lib..., the wirereless card works?? I tried that and not recognize the card, I added on blaclist.conf, at the end, rt2x00usb and rt2x00lib, and works but not sure if more fast than before,I'm testing, I created a file ralink-blacklist.conf and added the 4 modules, reboot and wifi is off, not recognized, I removed rt2800usb and rt2800lib and returns to works,may be I don't have another files that you has.

coralfang 11-10-2011 11:16 AM

Quote:

Originally Posted by slackunix (Post 4520775)
Coralfang, are you sure that including rt2800usb,rt2800lib..., the wirereless card works?? I tried that and not recognize the card, I added on blaclist.conf, at the end, rt2x00usb and rt2x00lib, and works but not sure if more fast than before,I'm testing, I created a file ralink-blacklist.conf and added the 4 modules, reboot and wifi is off, not recognized, I removed rt2800usb and rt2800lib and returns to works,may be I don't have another files that you has.

I can't be completely sure why, but i know that the rt2870sta and the rt2800usb modules share alot of the same code, some devices prefer one over the other.

Have you tried blacklisting the rt2870sta module on its own?

slackunix 11-10-2011 11:16 AM

Markush, these are the errors I have when execute the command "wpa_supplicant.conf -D wext -i ra0 -c /etc/wpa_supplicant.conf&". I must tell you that I write "-i wlan1" and not "-i ra0", because my wireless card is recognized as "wlan1". Also, I don't have wpa-security I surf with an public AP, without security, only a login and password. Errors:
-----
bash-4.1# wpa_supplicant -D wext -i wlan1 -c/etc/wpa_supplicant.conf &
[1] 3437
bash-4.1# Line 22: Invalid PSK 'your_64_char_psk_here'.
Line 22: failed to parse psk 'your_64_char_psk_here'.
Line 24: WPA-PSK accepted for key management, but no PSK configured.
Line 24: failed to parse network block.
Failed to read or parse configuration '/etc/wpa_supplicant.conf'.
-----
About the advice or instruction of coralfang, I wrote in blacklist.conf "blacklist rt2x00usb" and "blacklist rt2x00lib", and it seems that the websurf is a bit more fast and soft, it seems at the moment.
P.D. Sorry I just saw your last post and I'll try with that, blacklisting rt2870sta, in other moment, I'm testing with this now(blacklist rt2x00usb and blacklist rt2x00lib".Thnkx.:hattip:

Alien Bob 11-10-2011 12:00 PM

Quote:

Originally Posted by slackunix (Post 4520827)
Markush, these are the errors I have when execute the command "wpa_supplicant.conf -D wext -i ra0 -c /etc/wpa_supplicant.conf&". I must tell you that I write "-i wlan1" and not "-i ra0", because my wireless card is recognized as "wlan1". Also, I don't have wpa-security I surf with an public AP, without security, only a login and password.

Then why are you trying to run wpa_supplicant, if you do not use a WPA encrypẗed connection?

Quote:

Errors:
-----
bash-4.1# wpa_supplicant -D wext -i wlan1 -c/etc/wpa_supplicant.conf &
[1] 3437
bash-4.1# Line 22: Invalid PSK 'your_64_char_psk_here'.
Line 22: failed to parse psk 'your_64_char_psk_here'.
Line 24: WPA-PSK accepted for key management, but no PSK configured.
Line 24: failed to parse network block.
Failed to read or parse configuration '/etc/wpa_supplicant.conf'.
Those are strings that are present in a default "/etc/wpa_supplicant.conf" file. If you really want to use wpa_supplicant you will have to configure it first !!

Eric

slackunix 11-10-2011 12:12 PM

Thanks, Alien_Bob, these are the problems of beeing a newbie and not to try :study:read documentation, I take note about it.

slackunix 11-14-2011 04:13 PM

Well, I have done, this: http://www.linuxquestions.org/questi...how-to-897422/ and it doesn't work, I put rt2800usb, rt2x00lib and rt2x00usb on "/etc/modprobe.d/blacklist.conf", reboot and the wireless card is recognized with the drivers rt2870sta, but when I go to put up the card from console "ifconfig wlan0 up", I get "operation not permitted", so what am I doing wrong. The wireless card before this, worked but slowly, the connection was stopped from time to time and now it doesn't work, so I think the driver that comes with slackware 13.37 is not very refined, I think but I can be wrong.
Any help would be appreciated!

audriusk 11-15-2011 08:27 AM

I just now installed Slackware-13.37 on EeePC 1000H (which has Ralink RT2860 wireless, although the steps should be the same as for RT2870), here's what I did:
  • First I had to blacklist the following modules:
    Code:

    blacklist rt2800usb
    blacklist rt2800lib
    blacklist rt2800pci
    blacklist rt2x00usb
    blacklist rt2x00lib
    blacklist rt2x00pci

  • Then I installed firmware package for my wireless NIC (that's because I didn't do full install; if you're new to Slackware, it is strongly recommended to choose full install). In your case it should be rt2870-firmware-22-fw-1.txz. You can check if it's installed like this:
    Code:

    $ ls /var/log/packages/rt2870*
After doing this and rebooting I had nicely working wifi. Hope this helps.

slackunix 11-16-2011 11:52 AM

I checked my driver with "lsmod | grep -i rt28", and then I did "ln -L /lib/firmware/rt2870.bin /lib/firmware/rt3070.bin" and it works well, also I blacklisted "rt2800usb, rt2x00lib, rt2x00usb", now I have wifi, working well, but I have one doubt, there is a network before was detected for my wireless card with the old driver, and now not. I did a full install, I'm newbie with linux, thanks, I learned with your post.


All times are GMT -5. The time now is 08:12 PM.