Setup: MM6108 module over SDIO, version 0-rel_1_11_2_2024_Feb_26, hostapd_s1g v2.11-devel, kernel 5.15.71 , country US. enable_survey module param is Y.
Do i need morse_cli to do this or is there another way?
One more data point that might be relevant to whether this is config or version-related: separately from the ACS issue, morse_cli -i wlan1 version and morse_cli -i wlan1 hw_version both fail identically with NL80211, code -28: Failed to rcvmsgs, reproducible whether the AP is running or fully stopped. Wanted to flag that pattern in case it points at the same root cause as the ACS issue rather than a separate one.
Unfortunately it is not possible for me to update at this time.
So from what you’ve shown, the CHANNEL field in the config you template from maps to the op_class of the hostap config?
BANDWIDTH appears to be mapping to the hostap channel config instead.
A bit confusing.
Can you confirm what the generated hostap config looked like when you set CHANNEL=0 in your template config? I suspect it will have made op_class=0 which is an invalid configuration.
For ACS, try CHANNEL=70 and BANDWIDTH=0 . Though it might make sense to modify the script doing the mapping if you are able to.
As you noted and we did too…when I set CHANNEL=0 in our template, the generated ap_halow.conf came out with op_class=0, and hostapd_s1g failed exactly as you’d expect:
Unknown S1G operating class 0
invalid 802.11ah S1G configuration of operating class, country code and channel
2 errors found in configuration file '/etc/morsemicro-mm610x/conf/ap_halow.conf'
Failed to set up interface with /etc/morsemicro-mm610x/conf/ap_halow.conf
Also when we tried your suggested fix (CHANNEL=70, BANDWIDTH=0 → generates op_class=70, channel=0) before your reply, since we’d worked out the same mapping. That one gets past the op_class validation, but fails differently with no ACS survey appearing to start (no ACS-STARTED or related log lines at all), and instead it fails immediately at the driver level:
Starting HaLow AP: SSID=..., Channel=70, BW=0 MHz
Failed to set channel: error(-1)
morse: Failed to execute morse_cli to set channel parameters on ifname wlan1 (2)
Failed to set the channel (2)
It looks like channel=0 is being handed straight to morse_cli’s literal channel-set call rather than being recognized as the ACS trigger. We also tried the string form (channel=acs_survey) in place of 0 , same identical failure.
For reference, software versions here: morse_cli/morse.ko both report rel_1_11_2_2024_Feb_26, hostapd_s1g v2.11-devel. Separately (may or may not be related) — morse_cli -i wlan1 version and hw_version both fail with NL80211, code -28: Failed to rcvmsgs, reproducible with the AP both running and stopped, while every channel-set call works fine. Wasn’t sure if that’s expected on 1.11 or points at the same underlying gap.
Sorry for the delay here, I wanted to dig up some old hardware running close to the same version (1.11.3) to validate ACS for myself. The following hostap config worked for me,which isn’t too dissimilar from what you have..
Thanks a lot for your help, below is the output from the grep:
pi@:~$ strings /usr/bin/hostapd_s1g | grep ACS
Interface initialization will be completed in a callback (ACS)
NO_IR: Could not start ACS
setup interface in ACS mode
ACS: Channel was already set to %d
ACS: Could not determine primary channel number from pri_freq %u
ACS: Possibly channel configuration is invalid
ACS/CSA: Cannot decide mode
ACS-COMPLETED freq=%d channel=%d
ACS error - reported complete, but no result available
ACS-FAILED
ACS picked unusable channels
Using offloaded hw_mode=any ACS
Using internal ACS for hw_mode=any
ACS_CHANNEL_SELECTED
ACS_OFFLOAD
ACS: Survey for freq %d is missing noise floor
ACS: Survey for freq %d is missing channel time
ACS: Survey for freq %d is missing RX and busy time (at least one is required)
ACS: Channel %d has insufficient survey data
ACS: No available channels found
ACS: Scanning %d / %d
ACS: Failed to request initial scan
ACS: Using survey based algorithm (acs_num_scans=%d)
ACS: Failed to get survey data
ACS: Failed to request scan
ACS: Trying survey-based ACS
ACS: Unable to collect survey data
ACS: Surveys have insufficient data
ACS: Survey analysis for channel %d (%d MHz)
ACS: %d: insufficient data
ACS: Survey data missing
ACS: %d: min_nf=%d interference_factor=%Lg nf=%d time=%lu busy=%lu rx=%lu
ACS: * interference factor average: %Lg
ACS: All study options have failed
ACS: Survey analysis for selected S1G bandwidth %d MHz
ACS: selected channel %d (%d MHz) S1G ch %d (%d kHz)
ACS: HT40- is not supported yet. Please try HT40+
ACS: Survey analysis for selected bandwidth %d MHz
ACS: Channel %d: BW %u is not supported
ACS: PRI Channel %d: secondary channel %d BW %u is not supported
ACS: Channel %d: not enough bandwidth
ACS: promoting channel %d over %d (less interference %Lg/%Lg)
ACS: * channel %d: total interference = %Lg (%f bias)
ACS: * channel %d: total interference = %Lg
ACS: Ideal channel is %d (%d MHz) with total interference factor of %Lg
ACS: Failed to compute ideal channel
ACS: Adjusting VHT center frequency
ACS: Adjusting HT/VHT/HE secondary frequency
ACS: Only VHT20/40/80/160 is supported now
ACS: Could not (err: %d) select hw_mode for freq=%d channel=%d
ACS: Possibly channel configuration is invalid, please report this along with your config file.
ACS: Failed to start
ACS: Channel %d: not allowed as primary channel for 80 MHz bandwidth
ACS: Channel %d: not allowed as primary channel for 160 MHz bandwidth
ACS: Channel %d: not allowed as primary channel for 40 MHz bandwidth
ACS: Automatic channel selection started, this may take a bit
ACS: Offloading to driver
ACS-STARTED
pi@:~$
I hope this is helpful, let me know if you need anything else.
Thanks for your help. It does turn out that “BANDWIDTH” needed to be set to “0” to turn ACS on - so the mapping was a little askew.
pi@xxxx:~$ cat /etc/morsemicro-mm610x/conf/ap_halow.conf
ctrl_interface=/var/run/hostapd_s1g
interface=wlan1
driver=nl80211
hw_mode=a
ieee80211ah=1
channel=0
op_class=70
country_code=US
ssid=MorseMicro
dtim_period=40
s1g_prim_chwidth=0
s1g_prim_1mhz_chan_index=0
ap_max_inactivity=65536
wpa=2
wpa_key_mgmt=SAE
sae_password=<redacted>
rsn_pairwise=CCMP
ieee80211w=2
sae_pwe=2
pi@xxxx:~$ sudo morse_cli -i wlan1 channel -a
NL80211, code -100: Error callback called
NL80211, code -1: Failed to rcvmsgs
Failed to get channel frequency: error(-1)
pi@xxxx:~$
It seems ACS only selects 1 MHz Channels and i have been encountering the driver crashing quite often with ACS enabled:
Is there a hostapd_s1g configuration parameter to restrict ACS to 4MHz BW channels only?