I have a wireless router running OpenWrt 19.07.7 r11306-c4a6851c72. It is both an access point and a client (station). /etc/config/wireless
looks like this (sensitive values redacted):
config wifi-device 'radio0'
option type 'mac80211'
option hwmode '11g'
option path 'platform/ahb/18100000.wmac'
option htmode 'HT40'
option channel '3'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'SSID1'
option key 'KEY'
option encryption 'psk2'
config wifi-device 'radio1'
option type 'mac80211'
option hwmode '11a'
option path 'pci0000:00/0000:00:00.0'
option htmode 'HT40'
option channel '64'
config wifi-iface 'wifinet2'
option ssid 'SSID2'
option device 'radio0'
option mode 'sta'
option key 'KEY'
option network 'wwan'
option encryption 'psk2'
config wifi-iface 'wifinet3'
option encryption 'psk2'
option device 'radio1'
option network 'lan'
option key 'KEY'
option mode 'ap'
option ssid 'SSID1'
Notably (I think), radio0
is set to channel 3 (radio1 is not actually enabled for anything but I wanted to present the config file with as few changes as possible). The hostapd (hostapd-phy0.conf) configuration that OpenWrt generates from this is:
driver=nl80211
logger_syslog=127
logger_syslog_level=2
logger_stdout=127
logger_stdout_level=2
hw_mode=g
beacon_int=100
channel=3
noscan=1
ieee80211n=1
ht_coex=0
ht_capab=[HT40+][LDPC][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][DSSS_CCK-40]
interface=wlan0-1
ctrl_interface=/var/run/hostapd
ap_isolate=1
bss_load_update_period=60
chan_util_avg_period=600
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
utf8_ssid=1
multi_ap=0
wpa_passphrase=KEY
auth_algs=1
wpa=2
wpa_pairwise=CCMP
ssid=SSID1
bridge=br-lan
wpa_disable_eapol_key_retries=0
wpa_key_mgmt=WPA-PSK
okc=0
disable_pmksa_caching=1
start_disabled=1
bssid=ZZ:ZZ:ZZ:ZZ:ZZ:d7
I have saved & and applied these configuration changes. I've also rebooted the router. The configuration given here definitely on the system. hostapd is running and pointed at hostapd-phy0.conf as its configuration. The wireless access point is active but it remains on channel 1:
$ nmcli d wifi
IN-USE BSSID SSID MODE CHAN RATE SIGNAL BARS SECURITY
XX:XX:XX:XX:XX:XX XXXXXXXX Infra 1 130 Mbit/s 100 ▂▄▆█ WPA2
* YY:YY:YY:YY:YY:YY YYYYYYYY Infra 36 270 Mbit/s 75 ▂▄▆_ WPA2
ZZ:ZZ:ZZ:ZZ:ZZ:D7 SSID1 Infra 1 270 Mbit/s 30 ▂___ WPA2
What do I do to actually change the channel?
SSID2
on?