I'm running Raspbian 9 (strech) on a Pi-3 modem B ver 2.
Following guides found online, I have had it working with hostapd as an access point once. But after reboot that stopped working. In the process of trying to getting that to work again, I removed the "wpasupplicant" package. Now I can't seem to get hostapd to work at all. Running it on the command line, these are the messages and errors that seem relevant:
1526085017.011832: Completing interface initialization
1526085017.011851: Mode: IEEE 802.11g Channel: 6 Frequency: 2437 MHz
1526085017.011876: DFS 0 channels required radar detection
1526085017.011899: nl80211: Set freq 2437 (ht_enabled=1, vht_enabled=0, bandwidth=20 MHz, cf1=2437 MHz, cf2=0 MHz)
1526085017.011936: * freq=2437
1526085017.011956: * vht_enabled=0
1526085017.011974: * ht_enabled=1
1526085017.011991: * sec_channel_offset=0
1526085017.012009: * channel_type=1
1526085017.012095: nl80211: Failed to set channel (freq=2437): -16 (Device or resource busy)
1526085017.012123: Could not set channel for kernel driver
1526085017.012143: Interface initialization failed
1526085017.012163: wlan0: interface state UNINITIALIZED->DISABLED
1526085017.012191: wlan0: AP-DISABLED
I suspect that I messed up a configuration somewhere, so now I am missing a kernel driver module or something. Here is an output of lsmod:
Module Size Used by
cmac 16384 1
bnep 20480 2
hci_uart 36864 1
btbcm 16384 1 hci_uart
serdev 20480 1 hci_uart
bluetooth 368640 24 hci_uart,bnep,btbcm
ecdh_generic 28672 1 bluetooth
brcmfmac 307200 0
brcmutil 16384 1 brcmfmac
cfg80211 573440 1 brcmfmac
rfkill 28672 4 bluetooth,cfg80211
snd_bcm2835 32768 0
snd_pcm 98304 1 snd_bcm2835
snd_timer 32768 1 snd_pcm
snd 69632 3 snd_timer,snd_bcm2835,snd_pcm
uio_pdrv_genirq 16384 0
fixed 16384 0
uio 20480 1 uio_pdrv_genirq
ip_tables 24576 0
x_tables 32768 1 ip_tables
ipv6 434176 46
Would appreciate much if someone has hostapd working please post the output of "lsmod", or any other insights.
Thanks a million!
Here are my configs:
/etc/default/hostapd
DAEMON_CONF="/etc/hostapd/hostapd.conf"
DAEMON_OPTS="-dd -t"
/etc/network/interfaces.d/wlan0
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.89.1
netmask 255.255.255.0
network 192.168.89.0
broadcast 192.168.89.255
/etc/hostapd/hostapd.conf
interface=wlan0
driver=nl80211
ssid=Pi3AP
hw_mode=g
channel=6
ieee80211n=1
wmm_enabled=1
ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]
macaddr_acl=0
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_passphrase=Pi3APPassphrase
rsn_pairwise=CCMP
wpa_pairwise=CCMP
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
logger_stdout=-1
logger_stdout_level=2
logger_syslog=-1
logger_syslog_level=0
max_num_sta=5
preamble=1