I am conducting research experiments on Wi-Fi channel selection and would like to restrict the available 5 GHz channels in OpenWRT to only 36, 40, 44, and 48, rather than the complete list (36–173).Mine is ramips/mt7621.
I would appreciate any advice on how this can be implemented.
Thank you.
First you can not use any other channels without setting country code, once you select country code you can limit ACS eg by
option channels '36 40 44 48'
More options https://git.w1.fi/cgit/hostap/tree/hostapd/hostapd.conf#n173
Likely
option background_radar '1'
Works on mt7621 and DFS radar event switches channel in an instant, not minutes.
If you're using 80 MHz bandwidth, selecting any one of those channels has the same result on the air. They are all in the first 80 MHz block. That block is somewhat officially known as "channel 42" but OpenWrt does not recognize that numbering. Instead set OpenWrt to 80 MHz and any one of the 4 channels.
Since the same instance of hostapd now controls both radios in a dual band router, for proper operation set both radios to the same country code even if you are only using one.
Considering what mk24 said - wifi radio auto-selects best 20MHz sub-band automatically, 5 competing APs in same sub-band are certain to expunge your setting and set signalling sub-band to other channels. mt76 reports back the actual selection, some other drivers do nor. So it looks inconsistent that you strictly choose one but then read back other channel. But that is how wifi is expected to work.