# How to enable ACS (automatic channel selection) on start

**URL:** <https://community.morsemicro.com/t/how-to-enable-acs-automatic-channel-selection-on-start/1847>\
**Category:** Linux\
**Created:** [July 19, 2026, 10:48pm UTC](https://community.morsemicro.com/t/how-to-enable-acs-automatic-channel-selection-on-start/1847 "2026-07-19T22:48:26Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![halow\_darkness](https://avatars.discourse-cdn.com/v4/letter/h/839c29/32.png) [@halow\_darkness](https://community.morsemicro.com/u/halow_darkness)\
**Post date:** [July 19, 2026, 10:48pm UTC](https://community.morsemicro.com/t/how-to-enable-acs-automatic-channel-selection-on-start/1847/1 "2026-07-19T22:48:26Z")

</div>

Hi Morse,

Trying to enable ACS at every reboot.

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?

Many thanks!

---

<div class="post-metadata">

**Author:** ![swadsworth](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@swadsworth](https://community.morsemicro.com/u/swadsworth)\
**Post date:** [July 20, 2026, 10:14pm UTC](https://community.morsemicro.com/t/how-to-enable-acs-automatic-channel-selection-on-start/1847/2 "2026-07-20T22:14:33Z")

</div>

@halow_darkness setting `channel=0` in your hostapd.conf file should enable ACS on start of hostapd.

---

<div class="post-metadata">

**Author:** ![halow\_darkness](https://avatars.discourse-cdn.com/v4/letter/h/839c29/32.png) [@halow\_darkness](https://community.morsemicro.com/u/halow_darkness)\
**Post date:** [July 20, 2026, 10:50pm UTC](https://community.morsemicro.com/t/how-to-enable-acs-automatic-channel-selection-on-start/1847/3 "2026-07-20T22:50:13Z")

</div>

Thanks very much for getting back to me.

Here is the result of setting channel = 0. ☹

`pi@raspberrypi:~$ sudo cp /home/pi/wifi-halow-ap.conf /home/pi/wifi-halow-ap.conf.bak`  
`sudo sed -i 's/^CHANNEL=.*/CHANNEL=0/' /home/pi/wifi-halow-ap.conf`  
`sudo systemctl restart wifi-halow-ap.service`  
`journalctl -u wifi-halow-ap.service -n 30 --no-pager`  
`cat /etc/morsemicro-mm610x/conf/ap_halow.conf | grep channel`  
`Job for wifi-halow-ap.service failed because the control process exited with error code.`  
`See "systemctl status wifi-halow-ap.service" and "journalctl -xeu wifi-halow-ap.service" for details.`  
`Jul 20 13:10:10 hostapd_s1g[359213]: wlan1: STA associated (aid 1)`  
`Jul 20 13:10:10 hostapd_s1g[359213]: wlan1: STA RADIUS: starting accounting session`  
`Jul 20 13:10:10 hostapd_s1g[359213]: wlan1: STA WPA: pairwise key handshake completed (RSN)`  
`Jul 20 13:10:19 hostapd_s1g[359213]: wlan1: STA associated (aid 2)`  
`Jul 20 13:10:19 hostapd_s1g[359213]: wlan1: STA RADIUS: starting accounting session`  
`Jul 20 13:10:19 hostapd_s1g[359213]: wlan1: STA WPA: pairwise key handshake completed (RSN)`  
`Jul 20 22:44:40 systemd[1]: Stopping wifi-halow-ap.service - WiFi HaLow Access Point...`  
`Jul 20 22:44:41 systemd[1]: wifi-halow-ap.service: Deactivated successfully.`  
`Jul 20 22:44:41 systemd[1]: Stopped wifi-halow-ap.service - WiFi HaLow Access Point.`  
`Jul 20 22:44:41 systemd[1]: Starting wifi-halow-ap.service - WiFi HaLow Access Point...`  
`Jul 20 22:44:41 wifi-halow-ap-start.sh[504851]: [wifi-halow-ap] Starting WiFi HaLow AP configuration...`  
`Jul 20 22:44:41 wifi-halow-ap[504852]: Starting WiFi HaLow AP configuration...`  
`Jul 20 22:44:41 wifi-halow-ap-start.sh[504851]: [wifi-halow-ap] Waiting for wlan1 interface...`  
`Jul 20 22:44:41 wifi-halow-ap-start.sh[504851]: [wifi-halow-ap] Interface wlan1 is available`  
`Jul 20 22:44:41 wifi-halow-ap[504855]: Interface wlan1 is available`  
`Jul 20 22:44:41 wifi-halow-ap-start.sh[504851]: [wifi-halow-ap] Stopping any existing AP processes...`  
`Jul 20 22:44:41 wifi-halow-ap[504856]: Stopping any existing AP processes...`  
`Jul 20 22:44:42 wifi-halow-ap-start.sh[504851]: [wifi-halow-ap] Starting HaLow AP: SSID=MorseMicro, Channel=0, BW=16 MHz`  
`Jul 20 22:44:42 wifi-halow-ap[504864]: Starting HaLow AP: SSID=MorseMicro, Channel=0, BW=16 MHz`  
`Jul 20 22:44:42 wifi-halow-ap-start.sh[504869]: Unknown S1G operating class 0`  
`Jul 20 22:44:42 wifi-halow-ap-start.sh[504869]: invalid 802.11ah S1G configuration of operating class, country code and channel`  
`Jul 20 22:44:42 wifi-halow-ap-start.sh[504869]: s1g mapped ht channel 58`  
`Jul 20 22:44:42 wifi-halow-ap-start.sh[504869]: 2 errors found in configuration file '/etc/morsemicro-mm610x/conf/ap_halow.conf'`  
`Jul 20 22:44:42 wifi-halow-ap-start.sh[504869]: Failed to set up interface with /etc/morsemicro-mm610x/conf/ap_halow.conf`  
`Jul 20 22:44:42 wifi-halow-ap-start.sh[504869]: Failed to initialize interface`  
`Jul 20 22:44:42 wifi-halow-ap-start.sh[504851]: [wifi-halow-ap] Error: wifi-halow.sh failed with exit code 1`  
`Jul 20 22:44:42 wifi-halow-ap[504870]: Error: wifi-halow.sh failed with exit code 1`  
`Jul 20 22:44:42 systemd[1]: wifi-halow-ap.service: Main process exited, code=exited, status=2/INVALIDARGUMENT`  
`Jul 20 22:44:42 systemd[1]: wifi-halow-ap.service: Failed with result 'exit-code'.`  
`Jul 20 22:44:42 systemd[1]: Failed to start wifi-halow-ap.service - WiFi HaLow Access Point.`  
`channel=16`  
`pi@raspberrypi:~$`

---

<div class="post-metadata">

**Author:** ![ajudge](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@ajudge](https://community.morsemicro.com/u/ajudge)\
**Post date:** [July 21, 2026, 1:41am UTC](https://community.morsemicro.com/t/how-to-enable-acs-automatic-channel-selection-on-start/1847/4 "2026-07-21T01:41:25Z")

</div>

Errors appear to show a configuration problem. Can you share  
`/etc/morsemicro-mm610x/conf/ap_halow.conf`?

Also, 1.11 is quite an old version. Are you able to update?

---

<div class="post-metadata">

**Author:** ![halow\_darkness](https://avatars.discourse-cdn.com/v4/letter/h/839c29/32.png) [@halow\_darkness](https://community.morsemicro.com/u/halow_darkness)\
**Post date:** [July 21, 2026, 2:11am UTC](https://community.morsemicro.com/t/how-to-enable-acs-automatic-channel-selection-on-start/1847/5 "2026-07-21T02:11:36Z")

</div>

Thanks for the quick response.

Config below pasted directly from the gateway, both the source we template from and the generated file hostapd actually runs on:

**`/home/pi/wifi-halow-ap.conf`** (source):

```auto
# /home/pi/wifi-halow-ap.conf
SSID="MorseMicro"
CHANNEL=70
BANDWIDTH=16
SECURITY="wpa3-sae"
PASSWORD="<redacted>"
INTERFACE="wlan1"
IP_ADDRESS="192.168.200.1/24"

```

**`/etc/morsemicro-mm610x/conf/ap_halow.conf`** (generated, what hostapd\_s1g actually loads):

```auto
# /etc/morsemicro-mm610x/conf/ap_halow.conf (generated)
ctrl_interface=/var/run/hostapd_s1g
interface=wlan1
driver=nl80211
hw_mode=a
ieee80211ah=1
channel=16
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

```

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.

Thanks again for the fast turnaround.

---

<div class="post-metadata">

**Author:** ![ajudge](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@ajudge](https://community.morsemicro.com/u/ajudge)\
**Post date:** [July 21, 2026, 2:31am UTC](https://community.morsemicro.com/t/how-to-enable-acs-automatic-channel-selection-on-start/1847/6 "2026-07-21T02:31:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![halow\_darkness](https://avatars.discourse-cdn.com/v4/letter/h/839c29/32.png) [@halow\_darkness](https://community.morsemicro.com/u/halow_darkness)\
**Post date:** [July 21, 2026, 4:57am UTC](https://community.morsemicro.com/t/how-to-enable-acs-automatic-channel-selection-on-start/1847/7 "2026-07-21T04:57:51Z")

</div>

Thanks for getting back to me so quickly.

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:

```auto
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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![ajudge](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@ajudge](https://community.morsemicro.com/u/ajudge)\
**Post date:** [July 23, 2026, 5:06pm UTC](https://community.morsemicro.com/t/how-to-enable-acs-automatic-channel-selection-on-start/1847/8 "2026-07-23T17:06:50Z")

</div>

Hi @halow_darkness

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..

```auto
ctrl_interface=/var/run/hostapd_s1g
interface=wlan0
driver=nl80211
hw_mode=a
ieee80211ah=1
channel=0
op_class=70
country_code=AU
ssid=MorseMicro
dtim_period=40
s1g_capab=[SHORT-GI-ALL]
s1g_prim_chwidth=0
s1g_prim_1mhz_chan_index=0
ap_max_inactivity=65536
wpa=2
wpa_key_mgmt=SAE
sae_require_mfp=1
wpa_passphrase=12345678
wpa_pairwise=CCMP
ieee80211w=2
sae_pwe=1

```

what does `strings /sbin/hostapd_s1g | grep ACS` show on your system?

---

<div class="post-metadata">

**Author:** ![halow\_darkness](https://avatars.discourse-cdn.com/v4/letter/h/839c29/32.png) [@halow\_darkness](https://community.morsemicro.com/u/halow_darkness)\
**Post date:** [July 23, 2026, 10:02pm UTC](https://community.morsemicro.com/t/how-to-enable-acs-automatic-channel-selection-on-start/1847/9 "2026-07-23T22:02:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ajudge](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@ajudge](https://community.morsemicro.com/u/ajudge)\
**Post date:** [July 25, 2026, 5:55pm UTC](https://community.morsemicro.com/t/how-to-enable-acs-automatic-channel-selection-on-start/1847/10 "2026-07-25T17:55:57Z")

</div>

That’s good. Confirms hostapd\_s1g was compiled with ACS enabled.

What is the hostapd\_s1g configuration that is generated with bandwidth=0 and channel=70? Does it match closely with the configuration I have shared?

---

<div class="post-metadata">

**Author:** ![halow\_darkness](https://avatars.discourse-cdn.com/v4/letter/h/839c29/32.png) [@halow\_darkness](https://community.morsemicro.com/u/halow_darkness)\
**Post date:** [July 30, 2026, 12:56pm UTC](https://community.morsemicro.com/t/how-to-enable-acs-automatic-channel-selection-on-start/1847/11 "2026-07-30T12:56:08Z")

</div>

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.

```auto
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?

---

<div class="post-metadata">

**Author:** ![halow\_darkness](https://avatars.discourse-cdn.com/v4/letter/h/839c29/32.png) [@halow\_darkness](https://community.morsemicro.com/u/halow_darkness)\
**Post date:** [August 17, 2026, 1:54pm UTC](https://community.morsemicro.com/t/how-to-enable-acs-automatic-channel-selection-on-start/1847/12 "2026-08-17T13:54:04Z")

</div>

Hi @ajudge

I enabled `debug_mask=0xf` and captured the dmesg output with -dd appended to hostapd Here is what it returned.

Could it be the country code is transitioning to `ZZ` during the ACS flow?

[debug\_morse\_acs.txt](https://community.morsemicro.com/uploads/short-url/nUenM5CVTEbTR3IGHseHZt5mDhv.txt) (12.0 KB)

Thanks very much for your help.

---

<div class="post-metadata">

**Author:** ![ajudge](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@ajudge](https://community.morsemicro.com/u/ajudge)\
**Post date:** [August 20, 2026, 4:50am UTC](https://community.morsemicro.com/t/how-to-enable-acs-automatic-channel-selection-on-start/1847/13 "2026-08-20T04:50:01Z")

</div>

Yes it might be. Not sure why it is doing that - it appears to be coming from the wifi-halow-ap-start.sh script 🤔

Alternatively it could be that the BCF has disabled the channel that ACS is trying to use. I believe this was a bug that existed at this old version.  
Are you able to share the BCF so I can inspect it?

---

<div class="post-metadata">

**Author:** ![halow\_darkness](https://avatars.discourse-cdn.com/v4/letter/h/839c29/32.png) [@halow\_darkness](https://community.morsemicro.com/u/halow_darkness)\
**Post date:** [August 20, 2026, 11:39am UTC](https://community.morsemicro.com/t/how-to-enable-acs-automatic-channel-selection-on-start/1847/14 "2026-08-20T11:39:07Z")

</div>

I am unable to share the BCF file, is there a tool i can use to inspect it myself?

---

<div class="post-metadata">

**Author:** ![ajudge](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@ajudge](https://community.morsemicro.com/u/ajudge)\
**Post date:** [August 27, 2026, 4:13am UTC](https://community.morsemicro.com/t/how-to-enable-acs-automatic-channel-selection-on-start/1847/15 "2026-08-27T04:13:14Z")

</div>

Unfortunately there is no tool available to the general public.

Assuming this is a channel disabled by the BCF problem. Your best bet would be to limit the channel list used by hostap to select the channels. Here’s a snippet of some config.

```auto
channel=0
op_class=70
chanlist=16 24 40

```

Consult your module manufacturer or FCC test diagrams for the list of available channels.
