Getting hostapd to work with twin Atheros 5212 boards

Dermot Tynan <[email protected]>
Newsgroups gmane.os.netbsd.devel.network
Organization Kalopa Robotics
Message-ID <[email protected]>
I stuck this on Reddit, but was correctly advised that this is probably 
a better location. I'm pretty au fait with networking, but mostly on 
FreeBSD.

I'm running NetBSD 10.0 on a PC Engines APU board, having switched from 
FreeBSD due to a lack of support for 32-bit and other things.

This board has two Atheros radios in there, appearing as 5212 devices. 
I'm using one to connect to the local WiFi using wpa_supplicant and that 
works great. However, I'm trying to use the other as a hotspot and 
hostapd just doesn't want to play ball:

      Configuration file: /etc/hostapd.conf
      ctrl_interface_group=0 (from group name 'wheel')
      BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
      ath0: interface state UNINITIALIZED->COUNTRY_UPDATE
      Previous country code , new country code IE
      Continue interface setup after channel list update
      ctrl_iface not configured!
      Channel list update timeout - try to continue anyway
      Completing interface initialization
      Mode: (null)  Channel: 44  Frequency: -1 MHz
      Could not set channel for kernel driver
      Interface initialization failed
      ath0: interface state COUNTRY_UPDATE->DISABLED
      ath0: AP-DISABLED
      hostapd_interface_deinit_free(0xae7c7000)
      hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
      hostapd_interface_deinit(0xae7c7000)
      ath0: interface state DISABLED->DISABLED
      hostapd_bss_deinit: deinit bss ath0
      ath0: Flushing old station entries
      bsd_send_mlme_param: op=3 reason=3 addr=ff:ff:ff:ff:ff:ff
      ath0: Deauthenticate all stations
      bsd_send_mlme_param: op=3 reason=3 addr=ff:ff:ff:ff:ff:ff
      bsd_set_privacy: enabled=0
      bsd_set_key: alg=0 addr=0x0 key_idx=0 set_tx=0 seq_len=0 key_len=0
      bsd_del_key: key_idx=0
      bsd_set_key: alg=0 addr=0x0 key_idx=1 set_tx=0 seq_len=0 key_len=0
      bsd_del_key: key_idx=1
      bsd_set_key: alg=0 addr=0x0 key_idx=2 set_tx=0 seq_len=0 key_len=0
      bsd_del_key: key_idx=2
      bsd_set_key: alg=0 addr=0x0 key_idx=3 set_tx=0 seq_len=0 key_len=0
      bsd_del_key: key_idx=3
      ath0: AP-DISABLED
      hostapd_cleanup(hapd=0xae79c000 (ath0))
      ath0: CTRL-EVENT-TERMINATING
      hostapd_free_hapd_data: Interface ath0 wasn't started
      hostapd_interface_deinit_free: driver=0xbfd340 drv_priv=0xae792000 
-> hapd_deinit
      hostapd_interface_free(0xae7c7000)
      hostapd_interface_free: free hapd 0xae79c000
      hostapd_cleanup_iface(0xae7c7000)
      hostapd_cleanup_iface_partial(0xae7c7000)
      hostapd_cleanup_iface: free iface=0xae7c7000

To my untrained eye, it looks like it is having difficulties talking to 
the kernel driver for the radio. I tried downloading the hostapd source, 
but it won't compile because it needs /usr/include/netpacket. I assume 
there's a NetBSD-specific version which has been ported. But I went 
looking for hostapd in the NetBSD source tree (on Github) and couldn't 
find it there, either.

I know these Atheros radios are pretty ancient, as is the APU board, but 
they run nicely on 12 volts and it's nice not to have to dump this stuff 
just because the release train has left the station.

Anyone have any thoughts? Pointers to the appropriate source tree? Etc.
				- Der
-- 
Dermot Tynan
Kalopa Robotics
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.