Difference between revisions of "Rt2870"

From ArchWiki
Jump to: navigation, search
m (Bot: Removing from Category:HOWTOs (English))
(21 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{i18n|Rt2870}}
+
[[Category:Wireless Networking]]
[[Category:Wireless Networking (English)]]
+
{{out of date}}
 +
{{note|As of {{pkg|linux}} kernel 3.0, the rt2800usb driver automatically works with devices using the rt2870 chipset.}}
  
= Introduction =
+
This entry is to aid you in configuring wireless settings for use with devices built with Ralink's rt2870 chipset. I hope that this entry will encourage further contribution regarding the configuration of Ralink drivers.
  
This entry is to aid you in configuring wireless settings for use with devices built with Ralink's rt2870 chipset. I hope that this entry will encourage further contribution regarding the configuration of ralink drivers.
+
{{note|This entry has been (so far) written with Infrastructure mode and WPA authentication in mind. Please contribute any other configurations.}}
  
{{Box Note | This entry has been (so far) written with Infrastructure mode and WPA authentication in mind. Please contribute any other configurations.}}
+
== Installation (kernels from 2.6.29 to 2.6.39) ==
 
+
= Installation (kernels from 2.6.29 and on) =
+
 
Since version 2.6.29 this driver has been included in the kernel
 
Since version 2.6.29 this driver has been included in the kernel
  
= Installation - source =
+
== Configuration ==
* Install the Drivers
+
This driver is best configured using tools that utilize the standard wireless extensions, such as {{Pkg|wpa_supplicant}}, {{Ic|iwconfig}}, and their front-ends.
** Grab the tarball from AUR
+
*** http://aur.archlinux.org/packages.php?ID=14558
+
** Extract the Tarball
+
*** tar xvf rt2870.tar.gz
+
** Enter the rt2870 directory and build and install the driver; the driver installed will be called rt2870sta.ko
+
*** makepkg -i
+
 
+
* To simplify things, create a modprobe alias by editing /etc/modprobe.d/modprobe.conf and entering the following line
+
alias ra0 rt2870
+
 
+
= Configuration =  
+
This driver is best configured using tools that utilize the standard wireless extensions, such as wpa_supplicant, iwconfig and their frontends.
+
  
 
Various driver specific options can be configured using iwpriv.
 
Various driver specific options can be configured using iwpriv.
  
 
+
== Configuration - File (maybe obsolete) ==
= Configuration - File (maybe obsolete) =
+
This section is to help you with the configuration file used to set the parameters of the device when it is brought up (e.g. {{ic|ip link set ra0 up}}).
This section is to help you with the configuration file used to set the parameters of the device when it is brought up (e.g. ifconfig ra0 up).
+
* First, go into the {{ic|src/}} directory where you built the package and into the source code's directory. For example
* First, go into the src/ directory where you built the package and into the source code's directory. For example
+
 
  cd ~/AUR/rt2870/src/2008_0925_RT2870_Linux_STA_v1.4.0.0
 
  cd ~/AUR/rt2870/src/2008_0925_RT2870_Linux_STA_v1.4.0.0
* Copy the RT2870STA.dat file to /etc/Wireless/RT2870STA (if the directory doesn't exist, create it)
+
* Copy the {{ic|RT2870STA.dat}} file to {{ic|/etc/Wireless/RT2870STA}}. If the directory does not exist, create it.
 
  cp RT2870STA.dat /etc/Wireless/RT2870STA
 
  cp RT2870STA.dat /etc/Wireless/RT2870STA
  
== Initial Configuration ==
+
=== Initial Configuration ===
 
* In this file, the first line must always contain the word Default, so it should be on the first line.
 
* In this file, the first line must always contain the word Default, so it should be on the first line.
 
  Default
 
  Default
Line 56: Line 42:
 
My configuration
 
My configuration
 
  ConuntryCode=US
 
  ConuntryCode=US
* Edit the ssid to your network's ssid using either characters 0-z or 1~32 ascii characters
+
* Edit the ssid to your network's SSID using either characters 0-z or 1~32 ASCII characters
 
For example
 
For example
 
  SSID=mywirelessnetwork
 
  SSID=mywirelessnetwork
* Change the newtork type to whatever type of network you are using:
+
* Change the network type to whatever type of network you are using:
 
**Infra (for Infrastructure)
 
**Infra (for Infrastructure)
 
**Adhoc (for Ad-hoc)
 
**Adhoc (for Ad-hoc)
Line 78: Line 64:
 
I use 0
 
I use 0
 
  WirelessMode=0
 
  WirelessMode=0
* Edit the channel number. This must correspond to the CountryRegion setting.
+
* Edit the channel number. This must correspond to the {{ic|CountryRegion}} setting.
 
My configuration
 
My configuration
 
  Channel=10
 
  Channel=10
  
== Authentication ==
+
=== Authentication ===
{{Box Note | Because I use WPA and have not tested WEP configuration, the WEP configuration type explained is just a guess. If you use a rt2870 device with a WEP protected network, then by all-means correct me.}}
+
{{Note|Because I use WPA and have not tested WEP configuration, the WEP configuration type explained is just a guess. If you use a rt2870 device with a WEP-protected network, then please correct the wiki.}}
  
 
* Set authmode to one of the following options:
 
* Set authmode to one of the following options:
**Open (for WEP)
+
**Open
 +
**AUTOWEP (for WEP)
 
**WPA (WPA with WPA Supplicant)
 
**WPA (WPA with WPA Supplicant)
 
**WPA2 (WPA2 with WPA supplicant)
 
**WPA2 (WPA2 with WPA supplicant)
Line 92: Line 79:
 
**WPA2PSK
 
**WPA2PSK
  
The WPA and WPA2 options should work with netcfg and networkmanager.
+
The WPA and WPA2 options should work with [[netcfg]] and [[NetworkManager]].
I use WPA so,
+
For WPA,
 
  AuthMode=WPA
 
  AuthMode=WPA
 
* Set the encryption type to one of the following:
 
* Set the encryption type to one of the following:
Line 100: Line 87:
 
**AES
 
**AES
 
**None
 
**None
I use TKIP, so
+
For TKIP,
 
  EncrypType=TKIP
 
  EncrypType=TKIP
  
=== WPA ===
+
==== WPA ====
* If you're using WPA, set your WPAPSK
+
* If you are using WPA, set your pre-shared key (PSK):
 
  WPAPSK=mysecretkey
 
  WPAPSK=mysecretkey
  
=== WEP ===
+
==== WEP ====
* If you're using WEP, first set the key index using numbers 1 through 4
+
* If you are using WEP, first set the key index using numbers 1 through 4
 
For example,
 
For example,
 
  DefaultKeyID=1
 
  DefaultKeyID=1
* Now, set the key type (of your corresponding key index) so it know what kind of key to look for:
+
* Now, set the key type (of your corresponding key index) so it knows what kind of key to look for:
 
**0: hex
 
**0: hex
 
**1: ASCII string
 
**1: ASCII string
Line 121: Line 108:
 
  Key1=01234
 
  Key1=01234
  
== Examples ==
+
=== Examples ===
 
Here are some example options for reference.  
 
Here are some example options for reference.  
  
Line 179: Line 166:
  
  
And a netcfg profile
+
And a [[netcfg]] profile:
 
+
 
  CONNECTION="wireless"
 
  CONNECTION="wireless"
 
  INTERFACE=ra0
 
  INTERFACE=ra0
Line 191: Line 177:
 
  DHCP_TIMEOUT=30
 
  DHCP_TIMEOUT=30
  
No need to set the channel in the netcfg profile since the .dat file took care of it.
+
There is no need to set the channel in the [[netcfg]] profile since the {{ic|.dat}} file took care of it.
  
= Troubleshooting =
+
== Troubleshooting ==
  
===dmesg:Bulk In Failed, CMDTHREAD_RESET_BULK_IN, etc===
+
===dmesg:Bulk In Failed, CMDTHREAD_RESET_BULK_IN, etc.===
 
Bulk In Failed messages are not so bad, but a problem arises when and if the failed data leads to CMDTHREAD_RESET_BULK_IN which results in the module removing itself (e.g. modprobe -r rt2870sta).  
 
Bulk In Failed messages are not so bad, but a problem arises when and if the failed data leads to CMDTHREAD_RESET_BULK_IN which results in the module removing itself (e.g. modprobe -r rt2870sta).  
  
This probably happened because you created your own RT2870STA.dat file. Go into the rt2870 tarball directory, into the source code directory, and replace the RT2870STA.dat in /etc/Wireless/RT2870STA/ with the preconfigured .dat file in the 2008_0718_RT2870_Linux_STA_v1.3.1.0 directory. From there, set the options that correspond to your network without removing any of the options.
+
This probably happened because you created your own RT2870STA.dat file. Go into the rt2870 tarball directory, into the source code directory, and replace the RT2870STA.dat in {{ic|/etc/Wireless/RT2870STA/}} with the preconfigured .dat file in the {{ic|2008_0718_RT2870_Linux_STA_v1.3.1.0}} directory. From there, set the options that correspond to your network without removing any of the options.
  
 
===rt2870CmdThread is using a lot of CPU===
 
===rt2870CmdThread is using a lot of CPU===
I don't specifically know why this occurs, but it is probably because you connected your device to a hub.
+
I do not specifically know why this occurs, but it is probably because you connected your device to a hub.
 
+
===Kernel 2.6.30 issues===
+
There seem to be multiple issues with the rt2870 driver in the 2.6.30 kernel. Please refer to [http://bbs.archlinux.org/viewtopic.php?id=73964 this thread]
+
  
 
===Kernel 2.6.31 module conflicts===
 
===Kernel 2.6.31 module conflicts===
The 2.6.31 kernel caused the rt2870 driver to conflict with other wireless modules. The fix in [http://bbs.archlinux.org/viewtopic.php?pid=646813#p646813 this thread] says that you need to blacklist the '''rt2800usb rt2x00usb''' and '''rt2x00lib''' modules by modifying the MODULES array in /etc/rc.conf
+
The 2.6.31 kernel caused the rt2870 driver to conflict with other wireless modules. The fix in [https://bbs.archlinux.org/viewtopic.php?pid=646813#p646813 this thread] says that you need to blacklist the {{ic|rt2800usb}}, {{ic|rt2x00usb}}, and {{ic|rt2x00lib}} modules. See [[Kernel modules#Blacklisting]] for information about blacklisting kernel modules.
MODULES=( ... !rt2800usb !rt2x00usb !rt2x00lib ... )
+
  
= What next? =
+
== What next? ==
  
Insert the device and try connecting. See the [http://wiki.archlinux.org/index.php/Wireless_Setup#Part_II:_Wireless_Management Wireless Management] section of [[Wireless_Setup]] for details on connection methods.
+
Insert the device and try connecting. See the [[Wireless Setup#Part II: Wireless management|Wireless Management]] section of [[Wireless Setup]] for details on connection methods.

Revision as of 15:52, 21 November 2012

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:Rt2870#)
Note: As of linux kernel 3.0, the rt2800usb driver automatically works with devices using the rt2870 chipset.

This entry is to aid you in configuring wireless settings for use with devices built with Ralink's rt2870 chipset. I hope that this entry will encourage further contribution regarding the configuration of Ralink drivers.

Note: This entry has been (so far) written with Infrastructure mode and WPA authentication in mind. Please contribute any other configurations.

Installation (kernels from 2.6.29 to 2.6.39)

Since version 2.6.29 this driver has been included in the kernel

Configuration

This driver is best configured using tools that utilize the standard wireless extensions, such as wpa_supplicant, iwconfig, and their front-ends.

Various driver specific options can be configured using iwpriv.

Configuration - File (maybe obsolete)

This section is to help you with the configuration file used to set the parameters of the device when it is brought up (e.g. ip link set ra0 up).

  • First, go into the src/ directory where you built the package and into the source code's directory. For example
cd ~/AUR/rt2870/src/2008_0925_RT2870_Linux_STA_v1.4.0.0
  • Copy the RT2870STA.dat file to /etc/Wireless/RT2870STA. If the directory does not exist, create it.
cp RT2870STA.dat /etc/Wireless/RT2870STA

Initial Configuration

  • In this file, the first line must always contain the word Default, so it should be on the first line.
Default
  • Change the country/region channel number to the one that corresponds to your network:
    • 0: channels 1 through 11
    • 1: channels 1 through 12
    • 2: channels 10 and 11 (according to ralink)
    • 3: channels 10 through 13
    • 4: channel 14
    • 5: channels 1 through 14
    • 6: channels 3 through 9
    • 7: channels 5 through 13

My configuration

CountryRegion=0
  • Add your country code. Valid country codes include the following
AG, AR, AW, AU, AT, BS, BB, BM, BR, BE, BG, CA, KY, CL, CN, CO, CR, CY, CZ, DK, DO, EC, SV, FI, FR, DE, GR, 
GU, GT, HT, HN, HK, HU, IS, IN, ID, E, IL, IT, JP, JO, LV, LI, LT, LU, MY, MT, MA, MX, NL, NZ, NO, PE, PT, 
PL, RO, RU, SA, CS, SG, SK, SI, ZA, KR, ES, SE, CH, TW, TR, GB, UA, AE, US, VE

My configuration

ConuntryCode=US
  • Edit the ssid to your network's SSID using either characters 0-z or 1~32 ASCII characters

For example

SSID=mywirelessnetwork
  • Change the network type to whatever type of network you are using:
    • Infra (for Infrastructure)
    • Adhoc (for Ad-hoc)

My configuration

NetworkType=Infra
  • Edit the wireless mode using numbers 0 through 10:
    • 0: legacy 11b/g mixed
    • 1: legacy 11b only
    • 2: legacy 11a only
    • 3: legacy 11a/b/g mixed
    • 4: legacy 11g only
    • 5: 11a/b/g/n mixed
    • 6: 11n only
    • 7: 11g/n mixed
    • 8: 11a/n mixed
    • 9: 11b/g/n mixed
    • 10: 11a/g/n mixed

I use 0

WirelessMode=0
  • Edit the channel number. This must correspond to the CountryRegion setting.

My configuration

Channel=10

Authentication

Note: Because I use WPA and have not tested WEP configuration, the WEP configuration type explained is just a guess. If you use a rt2870 device with a WEP-protected network, then please correct the wiki.
  • Set authmode to one of the following options:
    • Open
    • AUTOWEP (for WEP)
    • WPA (WPA with WPA Supplicant)
    • WPA2 (WPA2 with WPA supplicant)
    • WPAPSK
    • WPA2PSK

The WPA and WPA2 options should work with netcfg and NetworkManager. For WPA,

AuthMode=WPA
  • Set the encryption type to one of the following:
    • WEP
    • TKIP
    • AES
    • None

For TKIP,

EncrypType=TKIP

WPA

  • If you are using WPA, set your pre-shared key (PSK):
WPAPSK=mysecretkey

WEP

  • If you are using WEP, first set the key index using numbers 1 through 4

For example,

DefaultKeyID=1
  • Now, set the key type (of your corresponding key index) so it knows what kind of key to look for:
    • 0: hex
    • 1: ASCII string
Key1Type=0
  • Provide your WEP key according to type, for example

For a string key

Key1Str=mysecretwepkey

For a hex key

Key1=01234

Examples

Here are some example options for reference.

RT2870STA.dat

Default
CountryRegion=0
CountryRegionABand=7
CountryCode=US
ChannelGeography=1
SSID=mywirelessnetwork
NetworkType=Infra
WirelessMode=0
Channel=10
BeaconPeriod=100
TxPower=100
BGProtection=0
TxPreamble=1
RTSThreshold=2347
FragThreshold=2346
TxBurst=0
PktAggregate=0
WmmCapable=0
AckPolicy=0;0;0;0
AuthMode=WPA
EncrypType=TKIP
WPAPSK=mysecretkey
DefaultKeyID=1
Key1Type=0
Key1Str=
Key2Type=0
Key2Str=
Key3Type=0
Key3Str=
Key4Type=0
Key4Str=
PSMode=CAM
FastRoaming=0
RoamThreshold=70
APSDCapable=0
APSDAC=0;0;0;0
HT_RDG=1
HT_EXTCHA=0
HT_OpMode=1
HT_MpduDensity=4
HT_BW=1
HT_AutoBA=1
HT_BADecline=0
HT_AMSDU=0
HT_BAWinSize=64
HT_GI=1
HT_MCS=33
HT_MIMOPSMode=3
IEEE80211H=0
TGnWifiTest=0
WirelessEvent=0
CarrierDetect=0


And a netcfg profile:

CONNECTION="wireless"
INTERFACE=ra0
SCAN="no"
SECURITY="wpa"
ESSID=mywirelessnetwork
KEY="mysecretkey"
IP="dhcp"
TIMEOUT=20
DHCP_TIMEOUT=30

There is no need to set the channel in the netcfg profile since the .dat file took care of it.

Troubleshooting

dmesg:Bulk In Failed, CMDTHREAD_RESET_BULK_IN, etc.

Bulk In Failed messages are not so bad, but a problem arises when and if the failed data leads to CMDTHREAD_RESET_BULK_IN which results in the module removing itself (e.g. modprobe -r rt2870sta).

This probably happened because you created your own RT2870STA.dat file. Go into the rt2870 tarball directory, into the source code directory, and replace the RT2870STA.dat in /etc/Wireless/RT2870STA/ with the preconfigured .dat file in the 2008_0718_RT2870_Linux_STA_v1.3.1.0 directory. From there, set the options that correspond to your network without removing any of the options.

rt2870CmdThread is using a lot of CPU

I do not specifically know why this occurs, but it is probably because you connected your device to a hub.

Kernel 2.6.31 module conflicts

The 2.6.31 kernel caused the rt2870 driver to conflict with other wireless modules. The fix in this thread says that you need to blacklist the rt2800usb, rt2x00usb, and rt2x00lib modules. See Kernel modules#Blacklisting for information about blacklisting kernel modules.

What next?

Insert the device and try connecting. See the Wireless Management section of Wireless Setup for details on connection methods.