[Voyage-linux] hostapd & ath9k

Frank Parker (spam-protected)
Tue Feb 23 09:57:11 HKT 2010


Punky,
Thanks for the pointers.  Sorry for the dumb questions, I'm trying to
understand this.

On Mon, Feb 22, 2010 at 6:30 PM, Kim-man 'Punky' TSE
<punkytse at punknix.com> wrote:

> For 11n-based atheros card, ath9k is the right module.
> 1) Please read http://wireless.kernel.org/en/users/Drivers/ath9k for
> information on ath9k driver

Ok - I read this and I think this applies to my wireless card.

> 2) You will need to install iw tools, which is available at
> http://www.voyage.hk/dists/0.6/iw/. 3) Then read

I installed iw with "apt-get install iw" since it was the same version 0.9.14-1.

> http://wireless.kernel.org/en/users/Documentation/hostapd for configuration.

I read this but I'm as confused as ever.

>  Probably you only need:
>
> interface=wlan0
> driver=nl80211
> channel=11
> hw_mode=g
>

I replaced my existing hostapd.conf with the lines above.  Now these
are the only lines in hostapd.conf

> in /etc/hostapd/hostapd.conf + the suggested configuration in /README

Which steps of the README are you referring to?

> 4) Of course, don't forget /etc/network/interfaces
> auto wlan0
> iface wlan0 inet static
>       address 10.1.10.1
>       netmask 255.255.255.0
>       broadcast 10.1.10.255
>       up nat.sh wlan0 eth0 "10.1.10.0/24"
>

So, what should I have in my /etc/network/interfaces at this point?
The lines above AND the ath0 lines from the README?  Both?


Here's what I have now:

voyage:~# cat /etc/hostapd/hostapd.conf
interface=wlan0
driver=nl80211
channel=11
hw_mode=g

voyage:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet static
      address 10.1.10.1
      netmask 255.255.255.0
      broadcast 10.1.10.255
      up nat.sh wlan0 eth0 "10.1.10.0/24"

auto ath0
iface ath0 inet static
        address 10.1.20.1
        netmask 255.255.255.0
        broadcast 10.1.20.255
        madwifi-base wifi0
        wireless-mode Master
        up iwpriv ath0 mode 3
        up iwconfig ath0 mode master
        up iwconfig ath0 essid voyage
        up iwconfig ath0 txpower auto
        up iwconfig ath0 enc off
        up iwconfig ath0 rate auto
        up nat.sh ath0 eth0 "10.1.20.0/24"


And here is the error I get:

voyage:~# /etc/init.d/hostapd start
Starting advanced IEEE 802.11 management: hostapdioctl[SIOCGIFFLAGS]:
No such device
 (warning).


Trying to start hostapd manually gives this error:

voyage:~# hostapd -dd -t /etc/hostapd/hostapd.conf
1266890173.877060: Configuration file: /etc/hostapd/hostapd.conf
ioctl[SIOCGIFFLAGS]: No such device
1266890174.003575: Could not read interface flags (wlan0)
1266890174.003615: nl80211 driver initialization failed.
1266890174.003630: wlan0: Unable to setup interface.


Thanks for your patience.




More information about the Voyage-linux mailing list