Wi-Fi Channel Auto-Selection - Network and Wireless Configuration - OpenWrt Forum
Wi-Fi Channel Auto-Selection - Network and Wireless Configuration - OpenWrt Forum
Hello !
https://openwrt.org/docs/guide-user/network/wifi/basic
Name: channel
Type: "auto"
Thank
A few more words would help massively to understand your actual question.
That said, ACS/ auto should never be used. There is no smart algorithm behind auto, it just sets the first legal channel
for your environment (so effectively ch1 or ch36) - regardless of your environment or if other channels would be
better or completely free. Always select a channel manually, based on your surrounding.
EDIT: As this post seems to be referred to quite regularly.
Modern drivers (ath10k, ath11k, mt76) have gotten a little smarter in the mean time and can use ACS in a smarter
way, but it's still preferred (and can avoid real problems) to choose a channel manually (especially with DFS in mind).
5 Likes
That is, Auto is not the choice of the most free channel according to, for example, the algorithm CCA (Clear Channel
Assessment) ?
1 Like
Thank, slh !
In OpenWRT there is no CCA or other algorithm of the periodic auto-selection of the free channel yet ?
I only have 1 other Wifi on channel 36 here (from neighbors) and with auto channel selection turned on my device
chooses a channel different than 36.
1 Like
https://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf
You can verify the ACS algorithm in the log output from hostapd.
logread | grep hostapd | grep ACS
daemon.notice hostapd: ACS: Automatic channel selection started, this may take a bit
daemon.notice hostapd: wlan0: interface state COUNTRY_UPDATE->ACS
daemon.notice hostapd: wlan0: ACS-STARTED
daemon.notice hostapd: ACS: Automatic channel selection started, this may take a bit
daemon.notice hostapd: wlan1: interface state COUNTRY_UPDATE->ACS
daemon.notice hostapd: wlan1: ACS-STARTED
daemon.notice hostapd: wlan1: ACS-COMPLETED freq=2437 channel=6
daemon.notice hostapd: wlan1: interface state ACS->ENABLED
daemon.notice hostapd: wlan0: ACS-COMPLETED freq=5260 channel=52
daemon.notice hostapd: wlan0: interface state ACS->HT_SCAN
# Channel list restriction. This option allows hostapd to select one of the
# provided channels when a channel should be automatically selected.
# Channel list can be provided as range using hyphen ('-') or individual
# channels can be specified by space (' ') separated values
# Default: all channels allowed in selected hw_mode
#chanlist=100 104 108 112 116
#chanlist=1 6 11-13
acs_exclude_dfs doesn't work on my device because the driver doesn't report DFS channels (correctly), I guess.
I think, its also better to use chanlist/channels because acs_chan_bias allows hostapd to choose channels other
channels then 1,6,11/1,5,9,13.
So maybe your wifi radio ends up using channel 3, which will cause (side-channel) interference for channels 1-6.
See this graphic here from cisco (3 channels plan):
4 Channels plan:
But most likely you will end up using the 3 channels plan because most devices are defaulting to it, even in Europe.
If you are setting up a wifi on large area where no other rogue WiFis are around you can of course deploy a 4 channels
plan.
5 Likes
I can't find any commit log for acs_survey but for acs_chan_bias.
During auto channel selection we may wish to prefer certain channels over
others. e.g. we can just squeeze 4 channels into europe so...
openwrt/openwrt/blob/master/package/network/services/hostapd/files/hostapd-basic.config
#CONFIG_ACS=y
1 Like
eduperez 11 November 5, 2019, 11:13am
shm0:
When you post a "this works for me" answer, I think it would be nice to disclose that you are using a snapshot, to
avoid confusing users that are running a stable release.
1 Like
The mac80211.sh script in 18.06 has support for acs_survey, so it should work?
Short precise questions make one tick. I did my best to collect answers in the same manner.
Those can not be compared. Supposed the acronyms mean what they are written to above, ie. Automatic Channel
Selection (ACS) and Clear Channel Assessment (CCA).
CCA explained here (one source from many, the definitive being IEEE 802.11-2016 Standard):
https://www.extremenetworks.com/extreme-networks-blog/what-is-a-clear-channel-assessment-cca/
Dynamic Frequency Selection (DFS) in channels on 5GHz is one more acronym affecting channel selection,
description 1: https://forum.openwrt.org/t/wireless-config-channel-auto/1015/2 and description 2
https://en.wikipedia.org/wiki/Dynamic_frequency_selection.
A note: CCA and DFS are defined in 802.11 ammendments and standards, ACS seems not.
Disclaimer: I'm not an expert in 802.11 radios or standards, just a nerd trying to understand the pieces the 802.11 is
made of and who's controlling what.
3 Likes
I got tired of having to change the channels due the surrounding AP's continuously moving over onto the same
channel that I use, so I decided to try the auto channel. Despite everyone saying that that doesn't work and the first
channel is always selected, that does not seem to be so. It is selecting channels and while I do not quite agree with the
2.4Ghz selection, the channels chosen for 5GHz are empty, so a good choice.
So, is this feature working or not? This is the latest 19.07 with non-ct firmware.
R7800 performance
shm0:
#CONFIG_ACS=y
Seems like all makefiles have this line commented.
Idk why this feature is enabled.
./package/network/services/hostapd/Makefile
DRIVER_MAKEOPTS= \
CONFIG_ACS=$(CONFIG_PACKAGE_kmod-cfg80211) \
CONFIG_DRIVER_NL80211=$(CONFIG_PACKAGE_kmod-cfg80211) \
CONFIG_IEEE80211N=$(HOSTAPD_IEEE80211N) \
CONFIG_IEEE80211AC=$(HOSTAPD_IEEE80211AC) \
CONFIG_DRIVER_WEXT=$(CONFIG_DRIVER_WEXT_SUPPORT) \
2 Likes
I'm new to OpenWrt and have been running it for a couple of months on my R7800. Wifi auto channel selection seems
to work when I reboot or restart a radio in Network->Wireless. Do any other events trigger channel auto selection?
Not really, channels are only chosen when the interface goes up or when a DFS event requires a change.
3 Likes
shm0:
Is there a way to add "random" time to activation or scan ? If there is a power cycle or if i reboot many Aps they will
all start to scan with chan 5 as the first one.....
1 Like
shm0:
I just spent an hour reading @shm0 post 8 w/link and have concluded that the answer to your question is you don't
configure this via any uci command.
the parameter and value you question; are meant to be carefully adjusted in the /var/run/hostapd-phy1.conf
file of supporting acs devices on older OpenWrt builds.
I can not say confidently that all this has be deprecated by newer algorithms, yet the thread you necroed is quite old
and the person you've quoted has been recently active.
2 Likes
Problem that i have is that even if i set "channels '1 5 9 13' most of APs in that area seem to "avoid" channel 5 and
use either 1 , 9 or 13.
Also it's not that some would use 1 and some 13, but it seems that the majority "decides" to use 9 or 13...
and there you are looking at chann 5 and it's empty. And you see some 10+ aps using chan 9....
What could cause this ? Should i make wifi reload once a day or .... ?
zagi-tng 27 May 2, 2023, 6:48am
Adding
acs_chan_bias=5:0.5
Anything, but 5
Any clues?
wireless.radio1.channel='auto'
wireless.radio1.channels='5 13 9 1'
wireless.radio1.hostapd_options='vendor_elements=DD080050F21101000000' 'acs_num_scans=