I'm on a jessie on an embedded device, trying to set the WLAN into AP mode. When I try
# /usr/sbin/hostapd -P /run/hostapd.wlan0.pid /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
ACS: Automatic channel selection started, this may take a bit
wlan0: interface state UNINITIALIZED->ACS
wlan0: ACS-STARTED
ACS: Unable to collect survey data
ACS: All study options have failed
Interface initialization failed
wlan0: interface state ACS->DISABLED
wlan0: AP-DISABLED
ACS: Possibly channel configuration is invalid, please report this along with your config file.
ACS: Failed to start
wlan0: AP-DISABLED
hostapd_free_hapd_data: Interface wlan0 wasn't started
wlan0: interface state DISABLED->DISABLED
hostapd_free_hapd_data: Interface wlan0 wasn't started
My config file is:
# cat /etc/hostapd/hostapd.conf
interface=wlan0
driver=nl80211
channel=acs
hw_mode=g
wmm_enabled=0
max_num_sta=1
ssid=foobarfoo
The error message can be found in a web search, but the solutions don't fit for me: I don't use ǹetwork-manager
and the nl80211
driver works on a different device (handmade buildroot system) and hostapd
version is v2.3
(not the buggy v2.1
)
Any idea how to narrow the problem further?
Edit: With channel=1
it runs, so it's definitely an ACS problem, but what can I try to find out the root of the problem?
Best Answer
FWIW I'm currently troubleshooting what I believe is a similar problem. I am using the built-in wireless interface on a RPi4 (2GB RAM) with hostapd + dnsmasq. It seems to work fine when I specify a channel manually, but when I try to auto-select an optimal channel it fails (somewhat silently). If I enable lots of debug logging I can see the following output, which suggests to me that there's something broken between the code that's measuring the survey data and the part that connects it to hostapd.
In lieu of a better solution, I wrote a NodeJS script to select a channel number and posted it here.
Config synopsis OutputI'm able to use
iwlist wlan0 scanning
orwavemon
to see other APs, etc.See also: