WPA on rt73 legacy

Live forum: http://rt2x00.serialmonkey.com/viewtopic.php?t=6113

pedro7x

10-01-2011 17:03:08

Hi,

I'm using the legacy version of rt73, after some changes, i got it running on linux-2.4.20. It's working fine for no password or WEP password networks, but not for WPA networks. I'm using wpa_supplicant and i got this error mensages

[code2sfmklvc]
$ ifconfig wlan0 up
$ iwlist wlan0 scan
Warning : Device wlan0 has been compiled with version 15
of Wireless Extension, while we are using version 14.
Some things may be broken...

wlan0 Scan completed :
Cell 01 - Address: 00:90:D0:4A:4A:51
ESSID:"SpeedTouch5064C6"
Mode:Managed
Channel:1
Encryption key:on
Bit Rate:0kb/s
Cell 02 - Address: 00:26:5A:53:F4:20
ESSID:"Grill Sul"
Mode:Managed
Channel:6
Encryption key:on
Bit Rate:0kb/s
Cell 03 - Address: 00:1C:F0:58:45:97
ESSID:"AIGUAL"
Mode:Managed
Channel:8
Encryption key:on
Bit Rate:0kb/s
Cell 04 - Address: 00:18:39:BA:58:8A
ESSID:"wisenet"
Mode:Managed
Channel:11
Encryption key:on
Bit Rate:1Mb/s
$ iwconfig wlan0 essid wisenet
$ iwconfig wlan0 mode Managed
$ wpa_passphrase wisenet 12345678 > /abc.conf
$ cat /abc.conf
network={
ssid="wisenet"
#psk="12345678"
psk=bf1334f57165cc60977e090216bee4eb74fe4fcbc5acb6b31c52ad8fb46830fa
}
$ wpa_supplicant -d -Dralink -i wlan0 -c /abc.conf
Initializing interface 'wlan0' conf '/abc.conf' driver 'ralink' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/abc.conf' -> '/abc.conf'
Reading configuration file '/abc.conf'
Priority group 0
id=0 ssid='wisenet'
wpa_driver_ralink_init
wpa_driver_ralink_flush_pmkid
Own MAC address: 00:0e:e8:ef:a1:b5
wpa_driver_ralink_set_key
wpa_driver_ralink_get_bssid
ioctl[SIOCGIWAP]: Transport endpoint is not connected
wpa_driver_ralink_remove_key
wpa_driver_ralink_set_key
wpa_driver_ralink_get_bssid
ioctl[SIOCGIWAP]: Transport endpoint is not connected
wpa_driver_ralink_remove_key
wpa_driver_ralink_set_key
wpa_driver_ralink_get_bssid
ioctl[SIOCGIWAP]: Transport endpoint is not connected
wpa_driver_ralink_remove_key
wpa_driver_ralink_set_key
wpa_driver_ralink_get_bssid
ioctl[SIOCGIWAP]: Transport endpoint is not connected
wpa_driver_ralink_remove_key
wpa_driver_ralink_set_countermeasures: enabled=0
RSN: flushing PMKID list in the driver
wpa_driver_ralink_flush_pmkid
Setting scan request: 0 sec 100000 usec
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: Supplicant port status: Unauthorized
EAPOL: Supplicant port status: Unauthorized
Added interface wlan0
State: DISCONNECTED -> SCANNING
Starting AP scan for wildcard SSID
wpa_driver_ralink_scan
ralink_set_oid: oid=0x625 len (0) failed
RALINK: Failed to set RT_OID_WPS_PROBE_REQ_IE
EAPOL: disable timer tick
EAPOL: Supplicant port status: Unauthorized
wpa_driver_ralink_scan_timeout
Scan timeout - try to get results
wpa_driver_ralink_get_scan_results
SSID - SpeedTouch5064C6
RALINK: AP IEs - hexdump(len=20): 8a 41 98 fd 01 00 00 00 64 dd 06 00 10 18 02 00 f0 a1 00 00
SSID - Grill Sul
RALINK: AP IEs - hexdump(len=45): 83 a1 92 f3 e2 00 00 00 64 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00 dd 09 00 10 18 02 00 f0 00 00 00 00 00 00
SSID - wisenet
RALINK: AP IEs - hexdump(len=139): 88 71 d9 08 4e 00 00 00 64 30 18 01 00 00 0f ac 02 02 00 00 0f ac 04 00 0f ac 02 01 00 00 0f ac 02 0c 00 dd 09 00 10 18 02 08 f4 01 00 00 dd 1c 0
BSS: Start scan result update 1
BSS: Add new id 0 BSSID 00:26:5a:53:f4:20 SSID 'Grill Sul'
BSS: Add new id 1 BSSID 00:18:39:ba:58:8a SSID 'wisenet'
BSS: Add new id 2 BSSID 00:90:d0:4a:4a:51 SSID 'SpeedTouch5064C6'
New scan results available
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:26:5a:53:f4:20 ssid='Grill Sul' wpa_ie_len=0 rsn_ie_len=0 caps=0x114
skip - no WPA/RSN IE
1: 00:18:39:ba:58:8a ssid='wisenet' wpa_ie_len=0 rsn_ie_len=0 caps=0x118
skip - no WPA/RSN IE
2: 00:90:d0:4a:4a:51 ssid='SpeedTouch5064C6' wpa_ie_len=0 rsn_ie_len=0 caps=0x6
skip - no WPA/RSN IE
Try to find non-WPA AP
0: 00:26:5a:53:f4:20 ssid='Grill Sul' wpa_ie_len=0 rsn_ie_len=0 caps=0x114
skip - SSID mismatch
1: 00:18:39:ba:58:8a ssid='wisenet' wpa_ie_len=0 rsn_ie_len=0 caps=0x118
skip - non-WPA network not allowed
2: 00:90:d0:4a:4a:51 ssid='SpeedTouch5064C6' wpa_ie_len=0 rsn_ie_len=0 caps=0x6
skip - SSID mismatch
No suitable network found
Setting scan request: 5 sec 0 usec
[/code2sfmklvc]

Now i'm trying to "merge" 2.6 in kernel version on legacy version. It's possible?

I know that legacy support was discontinued but, unfortunately i have to use this linux version.

Any help or tips will be much appreciated!

Best regards,
Pedro

pedro7x

27-01-2011 18:37:27

Hi again!

After many searchs and changes attemps, i discovered that the problem is Wireless Extension version (14). I tried update Wireless Extension version using patchs that i find in "Wireless Tools for Linux" site. But i had no luck with this update.

Anyone already done this? Any tips?

I'm also trying to port linux 2.6 to my machine, but it's a harder task.

Best regards,
Pedro

pedro7x

28-01-2011 16:48:19

Hi again,

After some modifications on driver defines, kernel modification to support Wireless Extensions 15 and change the way to configure WPA (change to iwpriv from wpa_suplicant), i got it working! D

Iwpriv commands i have used

[code1b0q1nde]
iwpriv wlan0 set Channel=11
iwpriv wlan0 set AuthMode=WPAPSK
iwpriv wlan0 set EncrypType=TKIP
iwpriv wlan0 set WPAPSK="mypassword"
iwpriv wlan0 set TxRate=0
[/code1b0q1nde]

I also modified the driver to get the quality in "iwlist wlan0 scan", my iwlist wlan0 scan now show something like this

[code1b0q1nde]
wlan0 Scan completed :
Cell 01 - Address: 00:18:39:BA:58:8A
ESSID:"wisenet"
Mode:Managed
Channel:11
Encryption key:on
Bit Rate:0kb/s
Quality:79/100 Signal level:-60 dBm Noise level:-99 dBm
[/code1b0q1nde]

Now my last chalenge is, modify something to show the encryption type.

Any help or tips will be much appreciated!

Best regards,
Pedro

maubat63

31-01-2011 22:16:48

Hi Pedro7x,

I tried the original driver from Ralink corporation at http//www.ralinktech.com/support.php?s=2

For the chipset rt73 usb the driver is the RT2501USB(RT73RT2571W/RT2573/RT2671).

It compiles on kernel 2.6.31 found on Ubuntu 9.10 without problem! (just read the instruction).

from readme file
This driver support linux kernel 2.4 and 2.6 series.
This driver implements basic IEEE802.11. Infrastructure and adhoc mode,
with open or shared or WPA-PSK or WPA2-PSK authentication method,
NONE, WEP, TKIP and AES encryption.

It use legacy ralink method but this driver also includes a patch for wpa-assistant to work with rt73.

Take a look at my last last post [b3rmejmlt](rt2x00 After a random time the wifi connction breaks)[/b3rmejmlt]
for manual and automatic connection set up.[/color3rmejmlt]

Good connection! wink

pedro7x

01-02-2011 12:34:22

Hi maubat,

I Already got connection with all protocols. My problem now is identify the encryption type using iwlist or another method.

My iwlist now show this informations

[code590okcjb]
wlan0 Scan completed :
Cell 01 - Address: 00:18:39:BA:58:8A
ESSID:"wisenet"
Mode:Managed
Channel:11
Encryption key:on
Bit Rate:0kb/s
Quality:79/100 Signal level:-60 dBm Noise level:-99 dBm
[/code590okcjb]

The field quality wasn't informed, after some modifications on the driver I got this information available. Now i want some information to differ encryption type, if is WEP, WPA/PSK or WPA/AES.

You know what i can do to get this?

Thanks for the answer.

maubat63

02-02-2011 15:48:06

Hi pedro7x,
I am not a programmer so I can't help you to modify the driver.
If this can help you some way you can try the command iwpriv rausb0 get_site_survey.
It works on legacy driver for rt73 you can found at http//www.ralinktech.com/support.php?s=2
Here is my output.

[code25cv7k7n]

[root@localhost mauro]# iwlist rausb0 scan
rausb0 Scan completed :
Cell 01 - Address: xx:xx:xx:xx:xx:xx
Mode:Managed
ESSID:"First_AP"
Channel:1
Encryption key:on
Bit Rates:0 kb/s
Cell 02 - Address: xx:xx:xx:xx:xx:xx
Mode:Managed
ESSID:"Second_AP"
Channel:6
Encryption key:on
Bit Rates:0 kb/s

[root@localhost mauro]# iwpriv rausb0 get_site_survey
rausb0 get_site_survey:
Channel RSSI SSID BSSID Enc Auth NetworkType
1 -66 First_AP xx:xx:xx:xx:xx:xx TKIP WPA(2)-PSK Infra
6 -86 Second_AP xx:xx:xx:xx:xx:xx TKIP WPA-PSK Infra

[/code25cv7k7n]

With this command you can see the signal strenght the encryption and the Authentication mode.
Hope this can help you.
By.