Sunday, June 03, 2007

RT2500 WPA Ubuntu Feisty & Gutsy Howto

I spent most of the weekend configuring my wireless card to use WPA wireless lan encryption.

Why? Because WEP encryption takes less than 2 minutes to crack. It's like leaving all your personal documents lying out on the side of the road for passersby to peak at.

Hopefully this saves someone's weekend :)

[Update: after upgrading to Gutsy I realised I forgot to mention that you should also remove the "network-manager" package - hopefully that'll help most to get things up and running.]

1) The "/etc/network/interfaces" file should look like this:
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0

auto ra0
iface ra0 inet dhcp

auto lo
2)

[Update2: I have the "rt2500-source" package installed, suspect it may provide this file that some people said they were missing -- I haven't compiled the rt2500 module from source in about a year, so the stock Ubuntu module should work, there should be no need to compile it by hand]

The "/etc/Wireless/RT2500STA/RT2500STA.dat" file should like like this:
CountryRegion=0
WirelessMode=0
TXBurst=0
TurboRate=0
BGProtection=0
ShortSlot=0
TxRate=0
PSMode=CAM
SSID=ITypedMyASCIISSIDNameOutHereLikeThis
NetworkType=Infra
Channel=1
AuthMode=WPAPSK
EncrypType=TKIP
WPAPSK=ITypedMyASCIIPasswordOutHereLikeThis
3) Reload your network:
/etc/init.d/networking restart
You may have to reboot to reload the RT2500 module - not quite sure about that point...

The full documentation for the "/etc/Wireless/RT2500STA/RT2500STA.dat" file is below. I found the documentation in the README file of the original RT2500 driver source code bundle.
Syntax is 'Param'='Value' and described below.

1. CountryRegion=value
value
0: for use channel 1-11
1: for use channel 1-11
2: for use channel 1-13
3: for use channel 10-11
4: for use channel 10-13
5: for use channel 14
6: for use channel 1-14
7: for use channel 3-9
2. WirelessMode=value
value
0: 802.11 B/G mixed
1: 802.11 B only
3. SSID=value
value
1~32 ascii characters.
4. NetworkType=Infra
value
Infra : infrastructure mode
Adhoc : adhoc mode
5. Channel=value
value
1~14 depends on CountryRegion
6. AuthMode=value
value
OPEN For Open System
SHARED For Shared key system
AUTO
WPANONE For pre-shared key in adhoc mode
WPAPSK For pre-shared key in infrastructure mode
7. EncrypType=value
value
NONE :For AuthMode=OPEN
WEP :For AuthMode=OPEN or AuthMode=SHARED
TKIP :For AuthMode=WPAPSK or AuthMode=WPANONE
AES :For AuthMode=WPAPSK or AuthMode=WPANONE
8. DefaultKeyID=value
value
1 ~ 4
9. Key1=value
value
10 or 26 hexadecimal characters eg: 012345678
5 or 13 ascii characters eg: passd
10. Key2=value
value
10 or 26 hexadecimal characters eg: 012345678
5 or 13 ascii characters eg: passd
11. Key3=value
value
10 or 26 hexadecimal characters eg: 012345678
5 or 13 ascii characters eg: passd
12. Key4=value
value
10 or 26 hexadecimal characters eg: 012345678
5 or 13 ascii characters eg: passd
13. WPANONE=value - use for adhoc mode
value
8 ~ 63 characters
or
64 hexadecimal characters
13. WPAPSK=value - use for infrastructure mode
value
8 ~ 63 characters
or
64 hexadecimal characters
14. TxBurst=value
value
0: Disable
1: Enable
15. TurboRate=value
value
0: Disable
1: Enable
16. BGProtection=value
value
0: Auto
1: Always On
2: Always Off
17. ShortSlot=value
value
0: Disable
1: Enable
18. TxPreamble=value
value
0: Long
1: Short
2: Auto
19. TxRate=value
value
0: Auto
1: 1 Mbps
2: 2 Mbps
3: 5.5 Mbps
4: 11 Mbps
5: 6 Mbps //WirelessMode must be 0
6: 9 Mbps //WirelessMode must be 0
7: 12 Mbps //WirelessMode must be 0
8: 18 Mbps //WirelessMode must be 0
9: 24 Mbps //WirelessMode must be 0
10: 36 Mbps //WirelessMode must be 0
11: 48 Mbps //WirelessMode must be 0
12: 54 Mbps //WirelessMode must be 0
20. RTSThreshold=value
value
1 ~ 2312
21. FragThreshold=value
value
256 ~ 2312
22. PSMode=value
value
MAX_PSP Power Saving Mode

23. AdhocOfdm=value
value
0: Tx MAX rate will be 11Mbps in Adhoc mode.
1: Tx MAX rate will be 54Mbps in Adhoc mode.

24. StaWithEtherBridge=value
value
0: Disable sta with ethernet to wireless bridge.
1: Enable sta with ethernet to wireless bridge.

8 comments:

Denica said...

cant believe u understand this language :p

Jakarta Casual said...

thank god for copy n paste

The Bushmeister said...

Assuming you're using Gnome desktop, did you have to uninstall the Network Manager applet?

johnorford said...

hey bushmeister,

no i actually use kubuntu, but afaik it also uses the same underlying network manager code.

i would say try my solution with the applet, if it doesn't work remove the applet.

btw, network manager uses the wpa supplicant library, whereas rt2500 goes its own way -- that's why network manager messes things up.

if you have any more questions i'll be happy to have a go at answering them.

The Bushmeister said...

Hi John,

I've been tinkering with this for a good while now, and still haven't got my card to do WPA.

I followed your instructions but I think you must have missed out some preliminary information. I didn't have a "/etc/Wireless/RT2500STA/RT2500STA.dat" file at all, so I made one and copied yours (with obvious changes for SSID and passphrase). In fact I didn't have a /etc/Wireless directory at all. So, I'm wondering whether you first did something like install and compile the RT2500 driver from source?
Or did you use the newer RT2x00 driver?

johnorford said...

hey bushmeister,

well although at once stage i did compile my drivers from source, that was well over a year ago and i've done mutliple kernel updates sine then.

i'm on hols at the mo, i know how frustrating it is -- once i get back i'll check up on my setup again, and see if i forgot to mention something.

hopefully, u'll eventually figure it out!

Casey Watson said...

Hi John,

Do you remember if you had to do anything special to get the card working initially? My card used to work in edgy, but it looks like it broke with feisty.

Thanks,
Casey

johnorford said...

hi casey, not as far as i know - i basically just did what i described...

i am really worrying about the upgrade to gutsy - linux shouldn't be like this, should it!!???