# Atheros AR9285: associated but can't ping



## AngryWolf (Apr 28, 2011)

Hi all,

I have a laptop with an *Atheros AR9285* wireless network adapter, and I tried to set up a WLAN between the laptop and a *TP-LINK TL-WR841ND* (WPA2 enabled, AES encryption). Under Windows 7 it worked with 150 MBit/s speed automatically set up, DHCP worked too, and I could browse the Internet.

Now, under FreeBSD I could find my network, I could also associate with it, but I can't ping my router's IP address:


```
$ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
ping: sendto: Host is down
```

Any ideas?

*Kernel info:*


```
$ uname -a
FreeBSD localhost.localdomain 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC
2010     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
```


```
$ dmesg | grep ath
ath0: <Atheros 9285> mem 0xfeaf0000-0xfeafffff irq 17 at device 0.0 on pci2
ath0: [ITHREAD]
ath0: AR9285 mac 192.2 RF5133 phy 14.0
```

*Configuration:*

/etc/rc.conf:


```
defaultrouter="192.168.1.1"
wlans_ath0="wlan0"
ifconfig_wlan0="WPA inet 192.168.1.32 netmask 255.255.255.0"
```

Using only a random static IP here for simplicity.

/etc/wpa_supplicant.conf:


```
network={
        ssid="MYNET"
        psk="mynetmynet"
}
```

*Verification:*


```
$ ifconfig
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
        ether 1c:4b:d6:71:08:46
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
        status: associated
ale0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=c319a<TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MCAST,WOL_MAGIC,VLAN_HWTSO,LINKSTATE>
        ether 48:5b:39:22:5f:11
        media: Ethernet autoselect (none)
        status: no carrier
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 1c:4b:d6:71:08:46
        inet 192.168.1.32 netmask 0xffffff00 broadcast 192.168.1.255
        media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11g
        status: associated
        ssid MYNET channel 7 (2442 MHz 11g) bssid d8:5d:4c:e5:64:fe
        regdomain 96 indoor ecm authmode WPA2/802.11i privacy ON
        deftxkey UNDEF AES-CCM 2:128-bit txpower 20 bmiss 7 scanvalid 450
        bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 5
        protmode CTS wme burst roaming MANUAL
```

As you can see it uses the 11g mode instead of 11n which is probably not supported by the driver.


```
$ netstat -nr
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            192.168.1.1        UGS         0        0  wlan0
127.0.0.1          link#3             UH          0        0    lo0
192.168.1.0/24     link#4             U           2       29  wlan0
192.168.1.32       link#4             UHS         0        0    lo0

Internet6:
Destination                       Gateway                       Flags      Netif Expire
::1                               ::1                           UH          lo0
fe80::%lo0/64                     link#3                        U           lo0
fe80::1%lo0                       link#3                        UHS         lo0
ff01:3::/32                       fe80::1%lo0                   U           lo0
ff02::%lo0/32                     fe80::1%lo0                   U           lo0
```

This is probably not relevant yet, but showing it anyway.

Boot-time syslog messages:


```
Apr 28 14:36:42 localhost kernel: wlan0: Ethernet address: 1c:4b:d6:71:08:46
Apr 28 14:36:43 localhost wpa_supplicant[357]: CTRL-EVENT-SCAN-RESULTS
Apr 28 14:36:43 localhost wpa_supplicant[357]: Trying to associate with d8:5d:4c:e5:64:fe (SSID='MYNET' freq=2442 MHz)
Apr 28 14:36:43 localhost wpa_supplicant[357]: Associated with d8:5d:4c:e5:64:fe
Apr 28 14:36:43 localhost kernel: wlan0: link state changed to UP
Apr 28 14:36:43 localhost wpa_supplicant[357]: WPA: Key negotiation completed with d8:5d:4c:e5:64:fe [PTK=CCMP GTK=CCMP]
Apr 28 14:36:43 localhost wpa_supplicant[357]: CTRL-EVENT-CONNECTED - Connection to d8:5d:4c:e5:64:fe completed (auth) [id=0 id_str=]
```

Note that I've been able to set up a WLAN with almost the same config on this laptop before: it used an other TP-LINK router model, the number of which I can't remember unfortunately.


----------



## chuvy (Jun 5, 2011)

I have same trouble with Linksys WRT54G and atheros AR9285. Tried to connect just with MAC filtering. Ifconfig status: associated, but no ping, no network. Tried on FreeBSD 8.2 and on 9.0-CURRENT.


----------



## SirDice (Jun 6, 2011)

chuvy said:
			
		

> Tried to connect just with MAC filtering.


Better turn that off completely. It's an utterly useless "security" measure.


----------



## chuvy (Jun 6, 2011)

So sorry.

In wpa_supplicant.conf instead 
	
	



```
wep_key1=xxx
```
 need 
	
	



```
wep_key0=xxx
```

Ifconfig deftxkey was 2, but on Linksys used 1 key.



> Better turn that off completely. It's an utterly useless "security" measure.



Yes, I tried clear and with key. 
FreeBSD is best.
Thank you.


----------



## sashi (Oct 12, 2011)

Had the same problem.
May be this solution (PR 154598) might help you.

sashi


----------



## AngryWolf (Dec 17, 2011)

Hi sashi,

Thank you, finally I had the chance to try the patch you showed, and it works for me too.

Problem solved!


----------

