2.4GHz wifi network can only work when 5GHz network wifi is enabled? How can I enable only 2.4GHz wifi?

It's OpenWrt 18.06.4 installed on Asus RT-N56U, which has both 2.4GHz interface and 5GHz interface. I have another wireless router working at 5GHz, so I want to configure OpenWrt to work at 2.4GHz only.

However, I'm not able to make it work. After some troubleshooting, I find:

  1. If I enable both 2.4GHz wifi network & 5GHz wifi network on OpenWrt, both work properly.
  2. If I remove or disable 5GHz wifi network, then reboot the router, although I don't see any errors in LuCi wireless page or status->system log, my iphone/ipad simply cannot detect the 2.4GHz wifi network. In addition, if I manually click "scan" on the 2.4GHz interface, it keeps running but shows no results, so it appears the 2.4GHz wifi is indeed not working properly.

Previously when I was using Asus stock firmware, I was able to disable 5Ghz wifi and enable only 2.4GHz wifi. Can this be supported with Openwrt? If yes, how can I configure it?

Please let me know if any additional info is required to identify the root cause.

/etc/config/wireless (remove sensitive information and use the preformat button </> to paste it in)

This is the config file when both 2.4G and 5G are enabled, which is working fine. ssid & key have been replaced for hide sensitive info.

config wifi-device 'radio0'
        option type 'mac80211'
        option hwmode '11g'
        option path 'pci0000:00/0000:00:01.0/0000:01:00.0'
        option country 'CN'
        option legacy_rates '1'
        option channel '1'
        option htmode 'HT40'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'WIFI24G'
        option encryption 'psk2'
        option key 'password24g'

config wifi-device 'radio1'
        option type 'mac80211'
        option channel '36'
        option hwmode '11a'
        option path 'platform/10180000.wmac'
        option htmode 'HT20'
        option country 'CN'
        option legacy_rates '1'

config wifi-iface
        option device 'radio1'
        option mode 'ap'
        option ssid 'WIFI5G'
        option network 'lan'
        option encryption 'psk2'
        option key 'password5g'

This is the config file after 5G is disabled. After reboot, iphone cannot detect 2.4G wifi.

config wifi-device 'radio0'
        option type 'mac80211'
        option hwmode '11g'
        option path 'pci0000:00/0000:00:01.0/0000:01:00.0'
        option country 'CN'
        option legacy_rates '1'
        option channel '1'
        option htmode 'HT40'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'WIFI24G'
        option encryption 'psk2'
        option key 'password24g'

config wifi-device 'radio1'
        option type 'mac80211'
        option channel '36'
        option hwmode '11a'
        option path 'platform/10180000.wmac'
        option htmode 'HT20'
        option country 'CN'
        option legacy_rates '1'

config wifi-iface
        option device 'radio1'
        option mode 'ap'
        option ssid 'WIFI5G'
        option network 'lan'
        option encryption 'psk2'
        option key 'password5g'
        option disabled '1'

The only difference of the config file is the last line.

        option disabled '1'

Maybe try disabling legacy_rates. It may help in some cases. Otherwise your config looks normal to me, IDK why it's not working. Maybe a bug somewhere?

1 Like

I have tried to disable legacy_rates, but it doesn't help. the situation is still the same.

I capture the "logread |grep hostapd" output. does it help?

Output when only 2.4GHz is enabled (wifi not detectable), mac & ssid hide

Sat Oct 12 17:58:33 2019 daemon.err hostapd: Configuration file: /var/run/hostapd-phy0.conf
Sat Oct 12 17:59:26 2019 daemon.notice hostapd: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Sat Oct 12 17:59:26 2019 daemon.notice hostapd: wlan0: interface state COUNTRY_UPDATE->HT_SCAN
Sat Oct 12 17:59:28 2019 daemon.err hostapd: Using interface wlan0 with hwaddr xx:xx:xx:xx:xx:xx and ssid "xxxxxx"
Sat Oct 12 17:59:28 2019 daemon.notice hostapd: wlan0: interface state HT_SCAN->ENABLED
Sat Oct 12 17:59:28 2019 daemon.notice hostapd: wlan0: AP-ENABLED

Output when both 2.4GHz and 5GHz are enabled (wifi works fine), mac & ssid hide

Sat Oct 12 18:06:10 2019 daemon.err hostapd: Configuration file: /var/run/hostapd-phy0.conf
Sat Oct 12 18:06:10 2019 daemon.err hostapd: Configuration file: /var/run/hostapd-phy1.conf
Sat Oct 12 18:06:11 2019 daemon.notice hostapd: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Sat Oct 12 18:06:11 2019 daemon.notice hostapd: wlan0: interface state COUNTRY_UPDATE->HT_SCAN
Sat Oct 12 18:06:11 2019 daemon.notice hostapd: wlan1: interface state UNINITIALIZED->COUNTRY_UPDATE
Sat Oct 12 18:06:11 2019 daemon.err hostapd: Using interface wlan1 with hwaddr xx:xx:xx:xx:xx:xx and ssid "xxxxxx"
Sat Oct 12 18:06:12 2019 daemon.notice hostapd: wlan1: interface state COUNTRY_UPDATE->ENABLED
Sat Oct 12 18:06:12 2019 daemon.notice hostapd: wlan1: AP-ENABLED
Sat Oct 12 18:06:13 2019 daemon.notice hostapd: 20/40 MHz operation not permitted on channel pri=1 sec=5 based on overlapping BSSes
Sat Oct 12 18:06:13 2019 daemon.err hostapd: Using interface wlan0 with hwaddr xx:xx:xx:xx:xx:xx and ssid "xxxxxx"
Sat Oct 12 18:06:13 2019 daemon.notice hostapd: wlan0: interface state HT_SCAN->ENABLED
Sat Oct 12 18:06:13 2019 daemon.notice hostapd: wlan0: AP-ENABLED

You might also try changing htmode to HT20 on radio0 -

option htmode 'HT20'

Yes I'd suggest HT20 as well. When it does come up there is a message showing HT40 not possible due to other networks on channel 5. So it ends up operating at 20 anyway.