# RT2860 with WPA2 connects but cannot ping [RESOLVED]

## rancid1two

First of all, I am a Linux novice with only a year or two of experience so please bear with me.  I am working on a new install of Gentoo running kernel source linux-2.6.30-gentoo-r5.  I have the basic system up and running but I cannot establish my wireless connection.  My wireless card is a cheap trendnet card running the rt2860 chip.  I compiled the official RT2860 v2.2.0.0 driver from ralink's site.  

My router shows that the card's mac address is associated without any problem.  wpa_supplicant shows that it is connected without any problem.  When I try to ping my router 192.168.10.1 or any other IP address other than the one assigned to my card it times out.

When I change from a static IP address to DHCP it times out waiting for a response.

The card connects fine under ubuntu.

Here is as much information as I could put together:

```

01:0a.0 Network controller: RaLink Device 0601

Subsystem: RaLink Device 2860

Flags: bus master, slow devsel, latency 64, IRQ 18

Memory at fdde0000 (32-bit, non-prefetchable) [size=64K]

Capabilities: [40] Power Management version 3

Kernel driver in use: rt2860

Kernel modules: rt2860sta
```

```
# do not change this line

ctrl_interface=/var/run/wpa_supplicant

# only root can read the config

ctrl_interface_group=0

# let wpa_supplicant scan

ap_scan=1

# reading passphrase from stdin

network={

   ssid="MYSSID"

   proto=RSN

   key_mgmt=WPA-PSK

   pairwise=CCMP

   #psk=""

   psk=MYHEXKEY

}
```

```
Selected interface 'ra0'

bssid=xx:xx:xx:xx:xx:xx

ssid=MYSSID

id=0

pairwise_cipher=CCMP

group_cipher=CCMP

key_mgmt=WPA2-PSK

wpa_state=COMPLETED

ip_address=192.168.10.10
```

```
lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:50 errors:0 dropped:0 overruns:0 frame:0

          TX packets:50 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:4448 (4.3 KiB)  TX bytes:4448 (4.3 KiB)

ra0       Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  

          inet addr:192.168.10.10  Bcast:192.168.10.255  Mask:255.255.255.0

          inet6 addr: fe80::214:d1ff:fec3:5b1a/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:6786 errors:0 dropped:0 overruns:0 frame:0

          TX packets:124 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:1517158 (1.4 MiB)  TX bytes:2722 (2.6 KiB)

          Interrupt:18
```

```
ra0       Ralink STA  ESSID:"MYSSID"  Nickname:"RT2860STA"

          Mode:Managed  Frequency=2.437 GHz  Access Point: xx:xx:xx:xx:xx:xx   

          Bit Rate=130 Mb/s   

          RTS thr:off   Fragment thr=65534 B   

          Encryption key:53DF-7F12-51BD-D699-CA31-6849-05E9-8E0F

          Link Quality=100/100  Signal level:-53 dBm  Noise level:-71 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
```

```
Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

192.168.10.0    *               255.255.255.0   U     0      0        0 ra0

loopback        *               255.0.0.0       U     0      0        0 lo

default         192.168.10.1    0.0.0.0         UG    2000   0        0 ra0
```

Thanks in advance!

----------

## DONAHUE

Try 

```
ping -I ra0 -c 2 192.168.10.1
```

.

results of

```
cat /etc/conf.d

ls -l /etc/init.d/net*
```

could be of interest.

----------

## sera

There is a staging driver for RT2860 in the kernel, you might want to try that one.

Setting your AP to AES only or removing proto and pairwise from wpa_supplicant.conf could also solve your problem.

----------

## DONAHUE

rt2860 PCI support is not yet in the kernel git-sources, some sort of beta is at the rt2x00 website.

The usb twin is rt2870.

I am currently holding at 2.6.30 kernels because coincident with the insertion of rt2x00 usb (rt2870) support in 2.6.31 kernels the ralink 2860sta driver broke for me.

Just to put icing on the cupcake, the rt2800usb driver in the later kernels does not quite work for my rt2870 usb device.

----------

## sera

Taken from a 2.6.30 menuconfig:

```
  │ Symbol: RT2860 [=n]                                                                          │  

  │ Prompt: Ralink 2860 wireless support                                                         │  

  │   Defined at drivers/staging/rt2860/Kconfig:1                                                │  

  │   Depends on: STAGING && !STAGING_EXCLUDE_BUILD && PCI && X86 && WLAN_80211                  │  

  │   Location:                                                                                  │  

  │     -> Device Drivers                                                                        │  

  │       -> Staging drivers (STAGING [=n])                                                      │  

  │         -> Exclude Staging drivers from being built (STAGING_EXCLUDE_BUILD [=n])
```

The rt2860 usb driver becomes available in 2.6.31. I have no idea about the drivers quality.

----------

## DONAHUE

sera:

Thanks. Had no idea staging existed. 

This is a tad discouraging though:

```
CONFIG_STAGING_EXCLUDE_BUILD:  

Are you sure you really want to build the staging drivers?

They taint your kernel, don't live up to the normal Linux

kernel quality standards, are a bit crufty around the edges,

and might go off and kick your dog when you aren't paying 

attention.

Say N here to be able to select and build the Staging drivers. 

This option is primarily here to prevent them from being built

when selecting 'make allyesconfg' and 'make allmodconfig' so

don't be all that put off, your dog will be just fine.

Symbol: STAGING_EXCLUDE_BUILD [=y]

Prompt: Exclude Staging drivers from being built

Defined at drivers/staging/Kconfig:27

Depends on: STAGING [=y]

Location: 

-> Device Drivers 

-> Staging drivers (STAGING [=y]) 
```

Are you using the rt2860 from staging?

----------

## sera

No, I'm not using this driver as I don't owe such a chip, that's why I said I can't say anything about it's quality. I used staging drivers on other occasions. Normally the staging drivers are the best open source drivers currently available.

Ok, there might be one or two hacked Windows driver as well.  :Twisted Evil:  

@OP: While searching for rt2860 I came across:

https://lists.linux-foundation.org/pipermail/bugme-new/2009-April/021768.html

Seems you became a victim of that bug and the combination TKIP+AES & current binary ralink driver won't work.

----------

## DONAHUE

The bug cited clearly does not apply universally. I am running the ralink software 2009_0521_RT2860_Linux_STA_V2.1.2.0 linked to a WPA2 only, TKIP/AES, router; without problems on  2.6.30-gentoo-r4.

The info provided by rancid1two suggests strongly that the ra0 interface is up and connected to the router but is not being accessed by user commands. 

My wpa_supplicant.conf:

 *Quote:*   

> ctrl_interface=/var/run/wpa_supplicant
> 
> ctrl_interface_group=0
> 
> network={
> ...

 

My router security settings

 *Quote:*   

> 
> 
> WPA Mode :  	  WPA2 only
> 
> WPA Encryption : TKIP/AES	
> ...

 

----------

## rancid1two

Okay, thanks for the help guys.

Here is what I have done:

I tested the ping -I ra0 192.168.10.1 and it timed out.  It is really weird because like you said I can see that I am associated with the access point from it's logs and from wpa_supplicant.  

For kicks, I set my AP to open plain text connection.  I was able to connect and obtain an IP address via DHCP and ping to the gateway.  So it is apparently a problem with the encryption.

In the end, I switched to the kernel staging driver and now everything is working as expected.  I set my AP back to WPA2 with AES.  I can now connect using the same configuration files I had originally posted.  The only difference is the staging driver.

Thanks everyone for your help.

----------

