1

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?

2
  • What channel is SSID2 on?
    – Daniel B
    Apr 29, 2021 at 16:16
  • Oof. SSID2 is actually XXXXXXX in my paste above. So it is on channel 1 also. I think I know where this is going now ... Apr 29, 2021 at 16:26

1 Answer 1

2

You have a client interface and an access point on the same radio. The radio can only be tuned to one channel. (This is also why scanning for networks takes some time.) It has to be the channel of the existing network it is connecting to.

Your access point interface will use the same channel. There is no way to change that except more radios.

There’ll be some interference, but you need not worry about that. The overhead of talking to the upstream network (or downstream station) is much bigger. In the worst case (traffic directed upstream) the throughput hit can be more than 50%.

4
  • It's a great analysis, and it answers the question OP wanted, but it would be nice to answer the title question as well: how to change the channel? (in my case, I cannot find it in luci) Mar 4, 2022 at 22:26
  • @VictorSergienko Which channel do you mean? On the client interface or on the AP interface?
    – Daniel B
    Mar 5, 2022 at 8:31
  • AP. Typically OpenWRT is a home router, where a client is wired. Mar 5, 2022 at 8:59
  • That's not what this question as about. You may want to ask a new question.
    – Daniel B
    Mar 5, 2022 at 9:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .