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:
If I enable both 2.4GHz wifi network & 5GHz wifi network on OpenWrt, both work properly.
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.
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?
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
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.