Search:  
Gentoo Wiki

Rt2870

Kernel configuration

Here's how I edited my kernel for wireless support. The GCC version that I'm using to compile is 3.4.1-r1 with an AMD 64bit kernel (x86_64). You may want other options, however, my Belkin N1 USB adapter is working perfectly with these settings:

Linux Kernel Configuration: Kernel 2.6.26
Networking --->
  Wireless --->
    -*- Improved wireless configuration API
    [*]   nl80211 new netlink interface support
    -*- Wireless extensions
    <*> Generic IEEE 802.11 Networking Stack (mac80211)
          Rate control algorithm selection  --->
    [ ]   Enable mac80211 mesh networking (pre-802.11s) support
    [ ]   Enable LED triggers
    [ ]   Export mac80211 internals in DebugFS
    [ ]   Enable packet alignment debugging
    [ ]   Enable debugging output
    < > Generic IEEE 802.11 Networking Stack (DEPRECATED)
Device Drivers --->
  [*] Network device support  --->
        Wireless LAN  --->
          [ ] Wireless LAN (pre-802.11)
          [ ] Wireless LAN (IEEE 802.11)

Installing the rt2870 driver

Create a folder for holding the downloaded driver from the Ralink site.

mkdir -p /usr/src/rt2870

Now download the driver and unpack it (version may have changed, visit [1] to determine the latest version):

cd /usr/src/rt2870
wget http://www.ralinktech.com.tw/data/drivers/2008_0718_RT2870_Linux_STA_v1.3.1.0.tar.bz2
tar xjf *bz2

Some adjustments are required to the supplied source before we compile, the following file supplied with the driver contains some details: README_STA

I edited two lines of the config file as follows:

File: .../os/linux/config.mk
 HAS_WPA_SUPPLICANT=y
 HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y

The Belkin N1 F5D8051 (3100uk) adapter is not listed as one of the supported devices for the driver in its header file. Compiling the driver 'as is' does not result in the ra0 ethernet device being created. The driver header file must be edited to include the F5D8051. For me lsusb listed the belkin USB adapter as follows:

Bus 001 Device 002: ID 050d:805c Belkin Compents

I therefore edited the header file to include a new line for my USB adapter:

File: .../include/rt2870.h
{USB_DEVICE(0x050D,0x805C)}, /* Belkin */             \

I added this after the other Belkin line:

File: .../include/rt2870.h
 {USB_DEVICE(0x050D,0x8053)}, /* Belkin */             \

Once this is done, make sure you are in the appropriate directory and compile and install the driver:

make && make install

Now copy the DAT file to the /etc/Wireless folder:

cp RT2870STA.dat /etc/Wireless/RT2870STA.dat

At this point you should have the rt2870sta module available, modprobe it to get the card up and running:

modprobe rt2870sta

You can get this to load automatically on boot by adding the following to your modules configuration file:

File: /etc/conf.d/modules
 # Ralink Wireless Driver for Belkin N1 USB adapter.
 modules="rt2870sta"

We now need to add a link for the adapater in /etc/init.d/:

ln -s /etc/init.d/net.lo /etc/init.d/net.ra0

Please see Wireless/Configuration for notes on configuring the device for your access point.

Finally, we can bring up the adapter for network access:

/etc/init.d/net.ra0 restart

If you want the adapter to be started at boot time add it to your default runlevel as follows:

rc-update add net.ra0 default

You should now have the Belkin N1 USB adapter working on a 64bit Gentoo build in full 300Mb/s mode!

See also

Retrieved from "http://www.gentoo-wiki.info/Rt2870"

Last modified: Tue, 19 Aug 2008 04:53:00 +0000 Hits: 1,050