# ath5k and hostapd@2.6.31

## Paczesiowa

now that 2.6.31 has been released with unlocked master mode for ath5k driver, we should be able to use free software access points. so, anyone got it working?

config files need some adjustment (hostapd driver is nl80211 instead of madwifi, interface is wlan0 instead of ath0), master mode and channel settings are set by hostapd (so iwconfig settings from /etc/conf.d/net like in madwifi, fail to set up card). if I get it up (that's what sh., screw that) without any errors and iwconfig shows encryption key set up on wlan0, other machines can see the access point but fail to connect, so looks like I have to stick with madwifi until 2.6.32 (I hope so). what about you?

----------

## SamuliSuominen

Also using ath5k, 2.6.31 and also needed madwifi to be able to use this card. I couldn't get it to scan AP's without.

01:07.0 Ethernet controller: Atheros Communications Inc. Atheros AR5001X+ Wireless Network Adapter (rev 01)

----------

## Paczesiowa

so what about 2.6.32? I don't have the time to update the server now (and if it's still not working it's not worth it)

----------

## Paczesiowa

ok, I finally got it working with 2.6.33. it seems stable after one day. it's slow and/or has weak range - when laptop is next to the ap, I get 700-800 kb/s (instead of 2.5mb with madwifi), when laptop is on the other side of the house, I get 30-50 kb/s (I had 400 with madwifi), but it's enough for simple web browsing. it will probably work better with every release.

here's my configuration ( http://en.gentoo-wiki.com/wiki/Atheros_Ath5k_Wireless_Access_Point is incorrect! whoever wrote that hadn't tested it at all):

basically, there is no configuration at all in /etc/conf.d/net for wlan0, even setting config_wlan0="null'' results in openrc putting wlan0 in managed mode and scanning for any network. this doesn't put wlan0 in promisc mode, but somehow it works anyway (perhaps promisc for eth0 is enough for working bridge). you also cannot put wlan0 into bridge from service, it won't work until wlan0 is configured, but hostapd will add it later.

all settings have to be set in hostapd.conf (ssid, channel, mode).

```
server ~ # uname -ar

Linux server 2.6.33-gentoo-r1 #1 PREEMPT Mon Apr 12 17:19:09 CEST 2010 i686 Pentium III (Coppermine) GenuineIntel GNU/Linux

server ~ # eix hostapd

[I] net-wireless/hostapd

     Available versions:  0.6.8 0.6.9 (~)0.6.10 (~)0.7.1 {debug ipv6 logwatch madwifi (+)ssl (+)wps}

     Installed versions:  0.7.1(17:38:15 12.04.2010)(-debug -ipv6 -logwatch -madwifi -ssl -wps)

     Homepage:            http://hostap.epitest.fi

     Description:         IEEE 802.11 wireless LAN Host AP daemon

server ~ # eix openrc

[I] sys-apps/openrc

     Available versions:  (~)0.6.0-r1 (~)0.6.1-r1 **9999 {debug elibc_glibc kernel_FreeBSD kernel_linux ncurses pam unicode}

     Installed versions:  0.6.1-r1(17:04:39 27.03.2010)(elibc_glibc kernel_linux unicode -debug -kernel_FreeBSD -ncurses -pam)

     Homepage:            http://roy.marples.name/openrc

     Description:         OpenRC manages the services, startup and shutdown of a host

server ~ # grep -Ev "(^#.*)|(^\s*$)" /etc/hostapd/hostapd.conf 

interface=wlan0

bridge=br0

driver=nl80211

logger_syslog=-1

logger_syslog_level=2

logger_stdout=-1

logger_stdout_level=2

dump_file=/tmp/hostapd.dump

ctrl_interface=/var/run/hostapd

ctrl_interface_group=0

ssid=DOM

hw_mode=g

channel=6

beacon_int=100

dtim_period=2

max_num_sta=255

rts_threshold=2347

fragm_threshold=2346

macaddr_acl=0

auth_algs=1

ignore_broadcast_ssid=0

wmm_ac_bk_cwmin=4

wmm_ac_bk_cwmax=10

wmm_ac_bk_aifs=7

wmm_ac_bk_txop_limit=0

wmm_ac_bk_acm=0

wmm_ac_be_aifs=3

wmm_ac_be_cwmin=4

wmm_ac_be_cwmax=10

wmm_ac_be_txop_limit=0

wmm_ac_be_acm=0

wmm_ac_vi_aifs=2

wmm_ac_vi_cwmin=3

wmm_ac_vi_cwmax=4

wmm_ac_vi_txop_limit=94

wmm_ac_vi_acm=0

wmm_ac_vo_aifs=2

wmm_ac_vo_cwmin=2

wmm_ac_vo_cwmax=3

wmm_ac_vo_txop_limit=47

wmm_ac_vo_acm=0

eapol_key_index_workaround=0

eap_server=0

own_ip_addr=127.0.0.1

wpa=2

wpa_passphrase=secret passphrase

wpa_key_mgmt=WPA-PSK

wpa_pairwise=CCMP

server ~ # grep -Ev "(^#.*)|(^\s*$)|(.*ppp0.*)" /etc/conf.d/net

config_eth0="null"

bridge_br0="eth0" # wlan0 is added by hostapd

rc_need_br0="net.eth0"

config_br0="192.168.0.1/24"
```

edit:

ok, it stopped working, after a while it dies (laptops cannot connect), the only log is something about unsupported jumbo frames, the only solution is to reload ath5k module. I'll wait for 2.6.34 and stick with madwifi for now.

----------

## Paczesiowa

with 2.6.35 I switched to ath5k. speeds aren't great, but it's stable (currently it has been running for a week). if you have some questions regarding config, ask away.

----------

## JC99

 *Paczesiowa wrote:*   

> here's my configuration ( http://en.gentoo-wiki.com/wiki/Atheros_Ath5k_Wireless_Access_Point is incorrect! whoever wrote that hadn't tested it at all):

 

I initially wrote that guide but there have been a few modifications since. What exactly was your problem. That guide is exactly how I have my wireless access point configured and so far it works fine.

What kernel version are you using and what baselayout are you using. If we can figured out what went wrong we could add it to the wiki to improve it.

----------

## Paczesiowa

maybe there was no configuration for 2.6.33 when I wrote that (4.2010), now it seems pretty similar to my config.

----------

