个人工具

UbuntuHelp:WifiDocs/RalinkRT2500Old

来自Ubuntu中文

Wikibot讨论 | 贡献2007年12月6日 (四) 15:51的版本

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索

<!> These are old instructions. The new version can be found at WifiDocs/Driver/RalinkRT2500

How to Setup Wireless Cards Based on the RT2500 Chipset

This guide explains how to set up and configure a wireless network card based on the RT2500 chipset, which is manufactured by R'link and incorperated in many wireless network cards. If you are unsure whether your wireless card is based on the RT2500 chipset, visit this page for a list of cards based on the chipset. {i} Since Ubuntu 5.10 (Breezy Badger) the rt2500 driver is installed out of the box, so your wireless card should visible as "ra0" if you open the Networking utility found under the System->Administration->Networking menu. <!> If you run an older version of Ubuntu, or the instruction on this page for setting up WPA or WEP encryptions don't work for you, then you may have to compile the driver and/or one of the R'aConfig or R'utilT utilities as described in /DriverAndRaconfig. <!> The rt2500 driver is for pci/pcmcia cards. If you have a usb device you will need the rt2570 driver.

Configuration for Networks without WPA encryption

If your wireless network is not protected by the WPA encryption method (i.e. if it's open or protected by the WEP encryption method) follow these steps: 1. Plug in your card. 2. Open System->Administration->Networking in the menu. 3. Click "Properties" 4. Enter your wireless access point's ESSID and WEP Key (if appropriate), and click OK. 5. Click the "Activate" button. You should now be connected to your wireless network!

In the future, all you'll need to do is click the Activate button to connect to the wireless network. If you wish Ubuntu to connect to the network on startup, follow these steps: 1. Open a "Terminal" window. 2. Type:

gksudo gedit /etc/network/interfaces

3. In the text editor window that opened search for a stanza beginning with "iface ra0". 4. Add the following line to the beginning of the stanza:

auto ra0

5. Save the file and close the editor.

Anchor(wpa)

WPA configuration

If your wireless network uses the WPA encryption method, follow these steps: 1. Open a "Terminal" window. 2. Type:

gksudo gedit /etc/network/interfaces

3. In the text editor window that opened add the following stanza:

iface ra0 inet dhcp
        pre-up ifconfig ra0 up
        pre-up ifconfig ra0 down
        pre-up ifconfig ra0 up
        pre-up ifconfig ra0 down
        pre-up iwconfig ra0 essid "myssid"
        pre-up iwconfig ra0 mode Managed
        pre-up iwpriv ra0 set AuthMode=WPAPSK
        pre-up iwpriv ra0 set EncrypType=TKIP
        pre-up iwpriv ra0 set WPAPSK="A shared key"
        pre-up ifconfig ra0 up

You should replace "myssid" with the SSID of your network, and "A shared key" with your network's WPA pre shared key. If your network uses the AES encryption type, replace "TKIP" with "AES". If your network operates a mode other than Managed, replace "Managed" with the appropriate mode - but notice that some modes are not supported by the driver, or may not be fully functional. If you wish Ubuntu to connect to the network on startup, add the following line to the beginning of the stanza:

auto ra0

If you want to use a static IP address rather than DHCP, you should replace the first line of the stanza above with something like

iface ra0 inet static
        address 192.168.1.45
        netmask 255.255.255.0

(Use the address and netmask appropriate for your network's settings) 5. In the terminal window, type:

sudo ifup ra0

You should now be connected to your wireless network! {i} If the above did not work for you, try one of the following stanzas instead (the same notes apply to these stanzas as well):

iface ra0 inet dhcp
        pre-up iwpriv ra0 auth 3
        pre-up iwpriv ra0 enc 3
        pre-up iwconfig ra0 essid myssid
        pre-up iwpriv ra0 wpapsk A shared key
        pre-up iwconfig ra0 essid myssid 
auto ra0
iface ra0 inet dhcp
pre-up iwconfig ra0 essid " myssid "
pre-up iwconfig ra0 mode managed
pre-up iwpriv ra0 set Channel=11
pre-up iwpriv ra0 set AuthMode=WPAPSK
pre-up iwpriv ra0 set EncrypType=TKIP
pre-up iwpriv ra0 set WPAPSK="A shared key"
pre-up iwpriv ra0 set TxRate=0

{i} If you need WPA support and the native method described here doesn't work, you may have to download and compile 'RaConfig as described in /DriverAndRaconfig. It's not necessary to compile the driver if that's already working out of the box.

Daily Use for Multiple Networks

Obviously, typing `sudo ifup ra0` everytime you want to connect to the network is less than desirable, and the 'RaConfig2500 utility only connects to the wireless network - it has no options for setting an IP address. Gnome users report that saving a SSID & WEP key pair in the Gnome network manager tool works well. This will add a couple of lines like the following into the `/etc/network/interfaces` file:

iface ra0 inet dhcp
wireless-essid belkin54g
wireless-key abcdef01234567890

{i} The above is also incorrect, wireless-key is either to be given in HEX or it has to be prefixed by s: for a plaintext key. KDE users might wish to have the SSIDs & corresponding WEP keys of several wireless networks managed by kWiFiManager, which can be configured to run at start-up in the panel next to the clock. This only runs if the interface is already up, so you may wish to add these lines to /etc/network/interfaces.

iface ra0 inet static
        address 0.0.0.0
        netmask 255.255.255.255

kWifiManager has an option to "Execute script connect" - if you enter `su - root /sbin/dhclient ra0 up &` it seems to work, but only if you open the Configuration Editor page & click on the "Activate" button. If you find a better way of managing this then please update this wikipage. The most comprehensive way to manage multiple wireless networks may well be - for the time being at least - to abandon all this GUI nonsense and keep all your SSIDs & WEP keys in /etc/network/interfaces. This is not pretty for new users, but may allow a degree of flexibility for those capable of a bit of scripting; man interfaces explains that using a "mapping" stanza in /etc/network/interfaces requires a script to be specified, which when run should specify the mapping (such as "home" or "work") to allocate to the interface. The SSID & WEP key, IP address or dhcp, and any other network parameters can be allocated to the interface based on the mapping, and the script called could probably determine the mapping based on the MAC address of a detected access-point. This forums posting recommends wifi radar.

Resources

Thanks to those in the forums who solved this problem for us!

Reader Comments

From: TheCat Date: Sun, 1 Jan 2006 I couldn't get the native WPA to work - it wouldn't connect. After some playing around with the Gnome network control panel, it started working. As far as I can tell, the only change to the above instructions was to add these lines to the end of the stanza:

gateway 10.0.1.1
wireless-essid "my essid"

From: TrevorNightingale Date: Fri, 21 Oct 2005 I have a Zonet ZEW1601 wireless pci adapter working with Breezy. Followed the above instructions, however I did not compile or use the raconfig utility. The card would appear as active in the Gnome Network Settings dialog but would not connect to my network. To resolve this problem I copied the RT2500STA.dat file to /etc/Wireless/RT2500STA directory (as stated in the README file) and edited to match my configuration:

[Default]
CountryRegion=0
WirelessMode=0
TXBurst=0
TurboRate=0
BGProtection=0
ShortSlot=0
TxRate=0
PSMode=CAM

SSID=YourSSID
NetworkType=Infra
Channel=1
AuthMode=SHARED
EncrypType=WEP
#DefaultKeyID=1
Key1Type=0
Key1Str=YourKeyGoesHere
#Key2Type=0
#Key2Str=
#Key3Type=0
#Key3Str=
#Key4Type=0
#Key4Str=
#WPAPSK=abcdefghijklmnopqrstuvwxyz
#RTSThreshold=2312
#FragThreshold=2312
PSMode=CAM
#RFMON=0