Topic: Atheros AR5213 802.11a/b/g Wireless Issues

I'm in the process of building a OpenBSD 4.3 based wireless access point for my home network.  I am using an Atheros AR5213 card which is supported by the ath driver.  I am having some issues configuring it properly.  I cannot get it to run in 11g mode or enable WEP.  Ideally I'd like to do both.  Currently I have it configured in 11b mode with no encryption and clients can connect just fine.

ath0: flags=8963<UP,BROADCAST,NOTRAILERS,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:0b:6b:37:a4:20
        groups: wlan
        media: IEEE802.11 autoselect mode 11b hostap
        status: active
        ieee80211: nwid soekris chan 6 bssid 00:0b:6b:37:a4:20
        inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255
        inet6 fe80::20b:6bff:fe37:a420%ath0 prefixlen 64 scopeid 0x1

So the card is at least working as a unsecured 802.11b access point.  If I try to force it into 802.11g with a 'ifconfig ath0 mode 11g' nothing changes.  ifconfig returns the exact same results.  I can turn on WEP with ' ifconfig ath0 nwkey secret_key' and ifconfig does indeed show that nwkey secret_key is there but my client (an Ubuntu 8.04 machine) cannot authenticate when providing the key as a WEP passphrase in both open system and shared key modes.  I will try to test WEP support with another client to see it's solely a client related problem.  Does anyone happen to know why I can't force 11g mode or why WEP support is failing?

Thanks in advance.

Re: Atheros AR5213 802.11a/b/g Wireless Issues

Just a quick update:

I was able to get WEP support correctly enabled.  The ASCII key I was using was not 13 characters (104 bytes, correct?) long.  Also noteworthy, by default the AR5213 chipset when set to autoselect will use 802.11a mode which makes it's impossible to be detected by 802.11b/g clients.  At this point it is happily bridging 802.11b clients to my network with WEP.

That being said: I still can not force the driver to use 802.11g mode using 'ifconfig ath0 mode 11g' with the settings shown in the previous post.  As far as I can tell, this is not a configuration or syntax problem and is isolated to this driver (although I have no way of testing it otherwise).  I am hoping someone can confirm this before I contact the developer and/or post to the mailing lists.

# cat /etc/hostname.ath0                                                       
inet 10.0.0.1 255.255.255.0 NONE media autoselect mediaopt hostap mode 11b \ 
nwid soekris nwkey speakmyfriend chan 6
# sh /etc/netstart ath0  
# ifconfig ath0
ath0: flags=8963<UP,BROADCAST,NOTRAILERS,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:0b:6b:37:a4:20
        groups: wlan
        media: IEEE802.11 autoselect mode 11b hostap
        status: active
        ieee80211: nwid soekris chan 6 bssid 00:0b:6b:37:a4:20 nwkey *************
        inet6 fe80::20b:6bff:fe37:a420%ath0 prefixlen 64 scopeid 0x1
        inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255

     ***these are the default settings which have been tested and are working with two separate clients,
         modifying the 11b to 11g in hostname.ath0 leads to the following error,  and as noted earlier specifying 
         11g manually with ifconfig doesn't work etiher.

# cat /etc/hostname.ath0
inet 10.0.0.1 255.255.255.0 NONE media autoselect mediaopt hostap mode 11g \ 
nwid soekris nwkey speakmyfriend chan 6
# sh /etc/netstart ath0
ifconfig: SIOCSIFMEDIA: Invalid argument

Anyone's advice on either a configuration error I've made or on the best channels to send this question upstream would be gratefully received.  Thanks.

Re: Atheros AR5213 802.11a/b/g Wireless Issues

I've had similar issues with the card not wanting to do 11g, but I think I was able to solve it like this.

run the command ifconfig -m ath0 and post the output here. there should be something in that list that will look familiar to me and if you pass it with the media or mediaopt parameter it will give you 11g speeds smile. it's something like DSC54, but I forget the exact name at the moment.

Re: Atheros AR5213 802.11a/b/g Wireless Issues

asemisldkfj:  Here's the output of ifconfig -m ath0.

ifconfig -m ath0
ath0: flags=8963<UP,BROADCAST,NOTRAILERS,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:0b:6b:37:a4:20
        groups: wlan
        media: IEEE802.11 autoselect mode 11b hostap
        status: active
        ieee80211: nwid soekris chan 6 bssid 00:0b:6b:37:a4:20 nwkey speakmyfriend
        supported media:
                media autoselect
                media autoselect mediaopt ibss
                media autoselect mediaopt hostap
                media autoselect mediaopt monitor
                media autoselect mode 11a
                media autoselect mode 11a mediaopt ibss
                media autoselect mode 11a mediaopt hostap
                media autoselect mode 11a mediaopt monitor
                media OFDM6 mode 11a
                media OFDM6 mode 11a mediaopt ibss
                media OFDM6 mode 11a mediaopt hostap
                media OFDM6 mode 11a mediaopt monitor
                media OFDM9 mode 11a
                media OFDM9 mode 11a mediaopt ibss
                media OFDM9 mode 11a mediaopt hostap
                media OFDM9 mode 11a mediaopt monitor
                media OFDM12 mode 11a
                media OFDM12 mode 11a mediaopt ibss
                media OFDM12 mode 11a mediaopt hostap
                media OFDM12 mode 11a mediaopt monitor
                media OFDM18 mode 11a
                media OFDM18 mode 11a mediaopt ibss
                media OFDM18 mode 11a mediaopt hostap
                media OFDM18 mode 11a mediaopt monitor
                media OFDM24 mode 11a
                media OFDM24 mode 11a mediaopt ibss
                media OFDM24 mode 11a mediaopt hostap
                media OFDM24 mode 11a mediaopt monitor
                media OFDM36 mode 11a
                media OFDM36 mode 11a mediaopt ibss
                media OFDM36 mode 11a mediaopt hostap
                media OFDM36 mode 11a mediaopt monitor
                media OFDM48 mode 11a
                media OFDM48 mode 11a mediaopt ibss
                media OFDM48 mode 11a mediaopt hostap
                media OFDM48 mode 11a mediaopt monitor
                media OFDM54 mode 11a
                media OFDM54 mode 11a mediaopt ibss
                media OFDM54 mode 11a mediaopt hostap
                media OFDM54 mode 11a mediaopt monitor
                media autoselect mode 11b
                media autoselect mode 11b mediaopt ibss
                media autoselect mode 11b mediaopt hostap
                media autoselect mode 11b mediaopt monitor
                media DS1 mode 11b
                media DS1 mode 11b mediaopt ibss
                media DS1 mode 11b mediaopt hostap
                media DS1 mode 11b mediaopt monitor
                media DS2 mode 11b
                media DS2 mode 11b mediaopt ibss
                media DS2 mode 11b mediaopt hostap
                media DS2 mode 11b mediaopt monitor
                media DS5 mode 11b
                media DS5 mode 11b mediaopt ibss
                media DS5 mode 11b mediaopt hostap
                media DS5 mode 11b mediaopt monitor
                media DS11 mode 11b
                media DS11 mode 11b mediaopt ibss
                media DS11 mode 11b mediaopt hostap
                media DS11 mode 11b mediaopt monitor
                media OFDM6
                media OFDM6 mediaopt ibss
                media OFDM6 mediaopt hostap
                media OFDM6 mediaopt monitor
                media OFDM9
                media OFDM9 mediaopt ibss
                media OFDM9 mediaopt hostap
                media OFDM9 mediaopt monitor
                media OFDM12
                media OFDM12 mediaopt ibss
                media OFDM12 mediaopt hostap
                media OFDM12 mediaopt monitor
                media OFDM18
                media OFDM18 mediaopt ibss
                media OFDM18 mediaopt hostap
                media OFDM18 mediaopt monitor
                media OFDM24
                media OFDM24 mediaopt ibss
                media OFDM24 mediaopt hostap
                media OFDM24 mediaopt monitor
                media OFDM36
                media OFDM36 mediaopt ibss
                media OFDM36 mediaopt hostap
                media OFDM36 mediaopt monitor
                media OFDM48
                media OFDM48 mediaopt ibss
                media OFDM48 mediaopt hostap
                media OFDM48 mediaopt monitor
                media OFDM54
                media OFDM54 mediaopt ibss
                media OFDM54 mediaopt hostap
                media OFDM54 mediaopt monitor
                media DS1
                media DS1 mediaopt ibss
                media DS1 mediaopt hostap
                media DS1 mediaopt monitor
                media DS2
                media DS2 mediaopt ibss
                media DS2 mediaopt hostap
                media DS2 mediaopt monitor
                media DS5
                media DS5 mediaopt ibss
                media DS5 mediaopt hostap
                media DS5 mediaopt monitor
                media DS11
                media DS11 mediaopt ibss
                media DS11 mediaopt hostap
                media DS11 mediaopt monitor
        inet6 fe80::20b:6bff:fe37:a420%ath0 prefixlen 64 scopeid 0x1
        inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255

Thanks!

Re: Atheros AR5213 802.11a/b/g Wireless Issues

ok, try this as your hostname.ath0:

inet 10.0.0.1 255.255.255.0 NONE media OFDM54 mediaopt hostap \ 
nwid soekris nwkey speakmyfriend chan 6

and see if that works. I'm pretty sure OFDM54 is the one that I used. you can read about OFDM on Wikipedia if you're curious; that's what I did smile.

Re: Atheros AR5213 802.11a/b/g Wireless Issues

Using OFDM54 in my hostname.ath0 I get the following.

#cat /etc/hostname.ath0
inet 10.0.0.1 255.255.255.0 NONE media OFDM54 mediaopt hostap \
nwid stupid_wireless nwkey secret_key123 chan 6
# ifconfig ath0
ath0: flags=8963<UP,BROADCAST,NOTRAILERS,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:0b:6b:37:a4:20
        groups: wlan
        media: IEEE802.11 OFDM54 hostap (autoselect mode 11a hostap)
        status: active
        ieee80211: nwid stupid_wireless chan 6 bssid 00:0b:6b:37:a4:20 nwkey secret_key123
        inet6 fe80::20b:6bff:fe37:a420%ath0 prefixlen 64 scopeid 0x1
        inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255

...which is good news... I'm getting the card to use 802.11a/g and WEP.  The bad news is it defaults to 11a mode which is useless to my network of 802.11g clients.  As expected forcing the card to run in 802.11g doesn't work if I manually issue a 'ifconfig ath0 mode 11g'.  I get no error back to the console or /var/log/messages and another 'ifconfig ath0' repeats the above settings(meaning as far as I can tell nothing has changed).  On closer examination of the output of 'ifconfig -m ath0' I cannot find any listing specifying the much needed: media OFDM54 mediaopt hostap mode 11g.  All I can find is mode 11a entries.   There appears to be no mention of 11g at all in the output of available media information.  This leads me to believe that 802.11g support does not exist for the AR5213 chipset with the ath driver.  The card is a Winstron CM9 which is listed as supported in 802.11a/b/g modes in the manfile BUT that's with the AR5212 chipset.  dmesg reports I'm using the AR5213 chipset (I haven't physically confirmed this yet).  It appears that I've been duped by wireless card revision numbers yet again and this time with a rather expensive card.  At this point, to my inexperienced eyes, it looks like 802.11b is going to be the best I can get out of this card unless someone sees some obvious newbie error I'm making.

Thanks, for your help asemisldkfj, it is graciously appreciated.

Last edited by kce (2008-09-06 05:07:06)

Re: Atheros AR5213 802.11a/b/g Wireless Issues

what if you change hostname.ath0 to

inet 10.0.0.1 255.255.255.0 NONE media OFDM54 mode 11g mediaopt hostap \
nwid stupid_wireless nwkey secret_key123 chan 6

?

also, is there anything about ath0 in /var/log/messages?

Re: Atheros AR5213 802.11a/b/g Wireless Issues

I'm having the exact minipci wireless hardware but on alix geode 2c3 architecture.
Unfortunately I too am facing the same problem.

here is my ath dmesg.

ath0 at pci0 dev 12 function 0 "Atheros AR5212" rev 0x01: irq 9
ath0: AR5213 5.9 phy 4.3 rf5112a 3.6, FCC2A*, address 00:0b:6b:da:94:6b

Re: Atheros AR5213 802.11a/b/g Wireless Issues

asemisldkfj: Adding the 'mode 11g' specifications to my hostname.ath0 gets these settings.  Both

inet 10.0.0.1 255.255.255.0 NONE media OFDM54 mediaopt mode 11g hostap  \
nwid stupid_wireless nwkey secret_key123 chan 6

and

inet 10.0.0.1 255.255.255.0 NONE media OFDM54 mediaopt hostap mode 11g  \
nwid stupid_wireless nwkey secret_key123 chan 6
 
give the same error and produce the same settings.

# sh /etc/netstart ath0
ifconfig: SIOCSIFMEDIA: Invalid argument
# ifconfig ath0
ath0: flags=8922<BROADCAST,NOTRAILERS,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:0b:6b:37:a4:20
        groups: wlan
        media: IEEE802.11 autoselect (DS1)
        status: no network
        ieee80211: nwid stupid_wireless chan 6 nwkey secret_key123

andreig: I'm using OpenBSD 4.3 on a Soekris 4501.  Here's the relevant lines from dmesg:

ath0 at pci0 dev 16 function 0 "Atheros AR5212" rev 0x01: irq 10
ath0: AR5213 5.9 phy 4.3 rf5112a 3.6, FCC2A*, address 00:0b:6b:37:a4:20

It looks like we have identical cards.

Last edited by kce (2008-09-06 22:37:09)

Re: Atheros AR5213 802.11a/b/g Wireless Issues

what happens if you take out "mode 11g" and leave in "hostap"?

edit: I mean, what does ifconfig output look like?

Last edited by asemisldkfj (2008-09-07 08:35:50)

11

Re: Atheros AR5213 802.11a/b/g Wireless Issues

With this as my /etc/hostname.ath0:

inet 10.0.0.1 255.255.255.0 NONE media OFDM54 mediaopt hostap \
nwid stupid_wireless nwkey secret_key123 chan 6

I get these media options from ifconfig.

ath0: flags=8963<UP,BROADCAST,NOTRAILERS,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:0b:6b:37:a4:20
        groups: wlan
        media: IEEE802.11 OFDM54 hostap (autoselect mode 11a hostap)
        status: active
        ieee80211: nwid stupid_wireless chan 6 bssid 00:0b:6b:37:a4:20 nwkey secret_key123
        inet6 fe80::20b:6bff:fe37:a420%ath0 prefixlen 64 scopeid 0x1
        inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255

The card defaults to mode 11a.  Immediately after this if I manually issue a 'ifconfig ath0 mode 11g'  none of the media options as reported by ifconfig change and no errors are returned to the terminal or to /var/log/messages.

Re: Atheros AR5213 802.11a/b/g Wireless Issues

Maybe you should post this to misc@ list.
This is what I found, quite a lot of post material on the misc list.
http://marc.info/?l=openbsd-misc&w= … 13&q=b
especially this : http://marc.info/?l=openbsd-misc&m= … 17&w=2

Last edited by andreig (2008-09-08 19:08:28)

13

Re: Atheros AR5213 802.11a/b/g Wireless Issues

I sent a message out to misc this morning.  Apparently a significant amount of work is being done on the ath driver so maybe we'll see support with 4.4.  Stay tuned.  Hopefully I'll be back with good news.

Re: Atheros AR5213 802.11a/b/g Wireless Issues

I switched to :

ral0 at pci0 dev 12 function 0 "Ralink RT2560" rev 0x01: irq 9, address 00:11:09:af:64:08
ral0: MAC/BBP RT2560 (rev 0x04), RF RT2525

(from my laptop, and the ath is now in my laptop)

And the ath is working in 11g mode just fine under Win XP.

15

Re: Atheros AR5213 802.11a/b/g Wireless Issues

I sent emails to both user-misc and directly to the driver developer about a week and a half ago with no replies.  Since this thread is about the fifth hit for a google search for 'Atheros AR5213 openbsd' I figured I'd better finish it off. The AR5213, as far as I can tell, is NOT supported under the Ath(4) driver as of OpenBSD 4.3.  I can get it to work under 802.11b but that seems to be a fluke of luck and even then it's buggy (I've had a few hard locks).  If you have a choice in the matter I can not recommend the AR5213 chip and would advise people to avoid all the Atheros chipsets  because only a few are actually supported by the ath driver.

This might change in the near future (indeed I hope it does) so if you are stuck with an atheros chipset try current before moving on to a different device.  The difficult part is that the chipsets are different on the same model number for wireless cards.  For example: The Wistron CM9 IS supported with the AR5212 (at least according to ath man file) but the CM9 is NOT supported with the AR5213 chipset.  Even while using decent resellers like netgate I'd recommend you cross-reference the chipset to the model number of the card to make sure you are getting a supported chipset (of which there are currently relatively few).

EDIT:  I understand the AR5213 chipset is supported under Linux and FreeBSD through the madwifi drivers but I haven't tested it so I can't confirm.

Last edited by kce (2008-09-17 21:33:36)

16

Re: Atheros AR5213 802.11a/b/g Wireless Issues

I can also confirm that.  Although the hard locks seem to unreproducible.  Sometimes I get it when using WEP, sometimes when trying to force the card into 802.11g mode and occasionally just on an 'up'.  In all cases it's inconsistent.  I tried a snapshot about two weeks ago which generated a kernel panic on an 'up'.  Hopefully support gets better with 4.4 release.

Re: Atheros AR5213 802.11a/b/g Wireless Issues

Well, since openbsd goes into a softlock around 10 weeks before the release let's hope that someone does a last minute commit to the ath driver.

Re: Atheros AR5213 802.11a/b/g Wireless Issues

andreig wrote:

Well, since openbsd goes into a softlock around 10 weeks before the release let's hope that someone does a last minute commit to the ath driver.

Because of the lead time needed to manufacture the CD sets, OpenBSD 4.4 was tagged in CVS early August.  There will be no "last minute commits" at this point to the OPENBSD_4_4_BASE branch.

To track changes to the ath(4) driver, check the CVS log:

PCI:  http://www.openbsd.org/cgi-bin/cvsweb/s … _ath_pci.c

USB:  http://www.openbsd.org/cgi-bin/cvsweb/s … /if_uath.c