# RT2860 and wpa_supplicant problem

## naviathan

I have an ASUS EEE 901 with the Ralink 2860 wireless card.  The driver I'm using was built using the source code from Ralink's website with all the WPA options selected in the config.mk as per the walk throughs I've been able to find on this card.  The module works when connecting to an unencrypted network using dhcpcd, but doesn't work when using wpa_supplicant to connect to a WPA-PSK encrypted network.  Here's the output I'm getting:

```

>wpa_supplicant -c/etc/wpa_supplicant.conf -Dwext -ira0 -d

Initializing interface 'ra0' conf '/etc/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'

Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'

Reading configuration file '/etc/wpa_supplicant.conf'

ap_scan=2

Priority group 0

   id=0 ssid='GD'

Initializing interface (2) 'ra0'

EAPOL: SUPP_PAE entering state DISCONNECTED

EAPOL: KEY_RX entering state NO_KEY_RECEIVE

EAPOL: SUPP_BE entering state INITIALIZE

EAP: EAP entering state DISABLED

EAPOL: External notification - portEnabled=0

EAPOL: External notification - portValid=0

Could not configure driver to use managed mode

SIOCGIWRANGE: WE(compiled)=22 WE(source)=14 enc_capa=0xf

  capabilities: key_mgmt 0xf enc 0xf

WEXT: Operstate: linkmode=1, operstate=5

Own MAC address: 00:15:af:cb:04:2f

wpa_driver_wext_set_wpa

wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0

wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0

wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0

wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0

wpa_driver_wext_set_countermeasures

wpa_driver_wext_set_drop_unencrypted

Setting scan request: 0 sec 100000 usec

Added interface ra0

RTM_NEWLINK: operstate=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'ra0' added

RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'ra0' added

State: DISCONNECTED -> SCANNING

Trying to associate with SSID 'GD'

Cancelling scan request

WPA: clearing own WPA/RSN IE

Automatic auth_alg selection: 0x1

WPA: No WPA/RSN IE available from association info

WPA: Set cipher suites based on configuration

WPA: Selected cipher suites: group 30 pairwise 24 key_mgmt 3 proto 2

WPA: clearing AP WPA IE

WPA: clearing AP RSN IE

WPA: using GTK CCMP

WPA: using PTK CCMP

WPA: using KEY_MGMT 802.1X

WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 01 00 00

No keys have been configured - skip key clearing

wpa_driver_wext_set_drop_unencrypted

State: SCANNING -> ASSOCIATING

wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)

WEXT: Operstate: linkmode=-1, operstate=5

wpa_driver_wext_associate

Setting authentication timeout: 60 sec 0 usec

EAPOL: External notification - portControl=Auto

RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])

Wireless event: cmd=0x8b06 len=8

RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])

Wireless event: cmd=0x8b1a len=10

```

Once wpa_supplicant is started I attempt to do a "dhcpcd ra0" but it times out without finding a host.  Anyone have any ideas?  Suggestions?

----------

## d2_racing

Hi, can you post this :

```

# cat /etc/conf.d/net

# cat /etc/wpa/wpa_supplicant.conf

```

----------

## naviathan

/etc/conf.d/net doesn't contain much because I'm not loading anything on boot except lo.  I'm planning to use NetworkManager so I won't need to bother with loading anything on startup.

```

dns_domain_lo="SubNet"

```

```

ap_scan=2

network{

             ssid="GD"

             scan_ssid=1

             proto=RSN

#           key_mgmt=WPA-PSK

#           pairwise=CCMP TKIP

#           group=TKIP

             psk="I'm Not Telling"

}

```

The # lines are just from some testing I've been doing.  The network is WPA2, hence the proto=RSN.  With the proto line in there if I remove the # from the key_mgmt line it goes into a weird loop and won't associate.  With the # in it associates, but I don't get anything else.  In all scenarios I get no leases from my work router.

----------

## naviathan

I figured out what the problem was.  There's a config file in the driver source that has setting you must change for whether you are using NetworkManager or not.  To get it working until I brought NetworkManager up I had to change one of the settings and recompile the driver.  Once NetworkManager was up I had to recompile again with that setting changed back before knetworkmanager would acknowledge the wireless card.  What a pain.

----------

## d2_racing

What config file ?

----------

## naviathan

It's under the source root as ./os/linux/config.mk

There's several options in there to go through.

----------

## d2_racing

Thanks for the info  :Razz: 

----------

