Android won't connect to wifi

Hey guys I've been without electricity for couple of hours and got DNS problems on my BPI R4 open wrt. Fixed it by reinstalling DNS over HTTPS proxy and syncing time with NTP.

Now everything works fine except my android phones won't connect to wifi. Laptopts and dongles connecting without problem, but phones not. I'm getting 'Failed to connect to network' on the phone and nothing in open wrt logs. It is just issue with OpenWRT wifi - tried on other access point and it works normally.

Any suggestion how to troubleshoot this? Thank you

Modifying the DNS behaviors (relative to the default OpenWrt config) can sometimes have some side effects. Usually they can be addressed with a few minor tweaks. But, it makes sense to start by reviewing the configs...

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button (red circle; this works best in the 'Markdown' composer view in the blue oval):

Screenshot 2025-10-20 at 8.14.14 PM

Remember to redact passwords, VPN keys, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall
ubus call system board
{
        "kernel": "6.18.35",
        "hostname": "myrouter",
        "system": "ARMv8 Processor rev 0",
        "model": "Banana Pi BPI-R4 (2x SFP+)",
        "board_name": "bananapi,bpi-r4",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "SNAPSHOT",
                "firmware_url": "https://downloads.openwrt.org/",
                "revision": "r34878-b25d90b7e4",
                "target": "mediatek/filogic",
                "description": "OpenWrt SNAPSHOT r34878-b25d90b7e4",
                "builddate": "1781307263"
cat /etc/config/network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        list ipaddr '127.0.0.1/8'

config globals 'globals'
        option ula_prefix 'some string not sure if I should make it public'
        option packet_steering '1'
        option dhcp_default_duid 'some string not sure if I should make it public'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'sfp-lan'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ip6assign '60'
        list ipaddr '10.0.0.1/24'
        list dns '1.1.1.1'
        list dns '1.0.0.1'
        option ipv6 '0'
        option delegate '0'
        option gateway '192.168.0.1'

config device
        option name 'br-wan'
        option type 'bridge'
        list ports 'wan'
        list ports 'sfp-wan'

config device
        option name 'wan'
        option macaddr 'my mac'

config device
        option name 'sfp-wan'
        option macaddr 'same my mac'

config interface 'wan'
        option device 'br-wan'
        option proto 'dhcp'
        option ipv6 '0'

config interface 'wan6'
        option device 'br-wan'
        option proto 'dhcpv6'

config interface 'gst'
        option proto 'static'
        option ipaddr '10.0.3.1'
        option netmask '255.255.255.0'
        option gateway '192.168.0.1'
        list dns '1.1.1.1'
        list dns '1.0.0.1'
        option device 'br-guest'

config device
        option type 'bridge'
        option name 'br-guest'
cat /etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'soc/11300000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
        option radio '0'
        option band '2g'
        option channel '6'
        option htmode 'HE20'
        option txpower '6'
        option country 'US'
        option cell_density '0'

config wifi-device 'radio1'
        option type 'mac80211'
        option path 'soc/11300000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
        option radio '1'
        option band '2g'
        option channel '3'
        option htmode 'HE20'
        option country 'US'
        option cell_density '0'
        option txpower '6'

config wifi-device 'radio2'
        option type 'mac80211'
        option path 'soc/11300000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
        option radio '2'
        option band '6g'
        option channel 'auto'
        option htmode 'EHT80'
        option disabled '1'

config wifi-iface 'wifinet3'
        option device 'radio0'
        option mode 'ap'
        option ssid 'MY GUEST WIFI'
        option encryption 'psk2'
        option hidden '1'
        option isolate '1'
        option key 'MY PASS'
        option network 'gst'
        option wpa_disable_eapol_key_retries '1' 
/etc/config/dhcp

config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option cachesize '1000'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option localservice '1'
        option ednspacket_max '1232'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/odhcpd.leases'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'
        option piodir '/tmp/odhcpd-piodir'
        option hostsdir '/tmp/hosts'

config dhcp 'gst'
        option interface 'gst'
/etc/config/firewall

config defaults
        option input 'REJECT'
        option output 'REJECT'
        option forward 'REJECT'
        option synflood_protect '1'
        option drop_invalid '1'
        option flow_offloading '1'

config zone
        option name 'lan'
        list network 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'

config zone
        option name 'wan'
        list network 'wan'
        list network 'wan6'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'DROP'
        option masq '1'
        option mtu_fix '1'

config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'

config rule
        option name 'Allow-Ping'
        option src 'wan'
        option proto 'icmp'
        option icmp_type 'echo-request'
        option family 'ipv4'
        option target 'ACCEPT'
        option enabled '0'

config rule
        option name 'Allow-IGMP'
        option src 'wan'
        option proto 'igmp'
        option family 'ipv4'
        option target 'ACCEPT'
        option enabled '0'

config rule
        option name 'Allow-DHCPv6'
        option src 'wan'
        option proto 'udp'
        option dest_port '546'
        option family 'ipv6'
        option target 'ACCEPT'
        option enabled '0'

config rule
        option name 'Allow-MLD'
        option src 'wan'
        option proto 'icmp'
        option src_ip 'fe80::/10'
        list icmp_type '130/0'
        list icmp_type '131/0'
        list icmp_type '132/0'
        list icmp_type '143/0'
        option family 'ipv6'
        option target 'ACCEPT'
        option enabled '0'

config rule
        option name 'Allow-ICMPv6-Input'
        option src 'wan'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        list icmp_type 'router-solicitation'
        list icmp_type 'neighbour-solicitation'
        list icmp_type 'router-advertisement'
        list icmp_type 'neighbour-advertisement'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'
        option enabled '0'

config rule
        option name 'Allow-ICMPv6-Forward'
        option src 'wan'
        option dest '*'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'
        option enabled '0'

config rule
        option name 'Allow-IPSec-ESP'
        option src 'wan'
        option dest 'lan'
        option proto 'esp'
        option target 'ACCEPT'
        option enabled '0'

config rule
        option name 'Allow-ISAKMP'
        option src 'wan'
        option dest 'lan'
        option dest_port '500'
        option proto 'udp'
        option target 'ACCEPT'
        option enabled '0'

config zone
        option name 'guest'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        list network 'gst'

config rule
        option src 'guest'
        option name 'GTS DNS'
        option dest_port '53'
        option target 'ACCEPT'

config rule
        option src 'guest'
        option name 'GST DHCP'
        option dest_port '67-68'
        option target 'ACCEPT'

config forwarding
        option src 'guest'
        option dest 'wan'

config forwarding
        option src 'lan'
        option dest 'wan'

Please let me know if I shared something sensitive. I will reinstall it from scratch haha

NOTE: I disabled https over dns for troubleshooting, but nothing changed

Remove this from interface lan and interface gst

Reboot and check again

Done - issue still present. Laptops working, phones won't connect.

I only see a guest network via WiFi on this device. Is that what you are connecting to??

I've done it from Luci, don't know why it won't include the rest..I'll edit it manually

I'm not messing with config files usually, mostly doing stuff through GUI

Your guest network does not have a dhcp server.

It is missing the rest of the config. (Unless this was just a copy paste error).

Also, remove the gateway form here, too.

Hm, I just enabled it and removed gateway - config looks like this:

config dhcp 'gst'
        option interface 'gst'
        option dhcpv4 'server'

should I also include 'gst' here along the 'lan'?

config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'

Also I managed to connect with older android phone (4th phone) even before these changes. So maybe phones got bugged out.

I am not familiar with BPI, but it seems strange to me, that you supposedly have identical PCI paths for three radios.

Usually they should be different, so that they can be separately controlled.

(My first guess would be copy-paste error at some manual editing.)

This is still not complete.

It should look more like this:

Let’s see the latest complete configs.

Make sure to use psk2 + ccmp (AES) and not SHA256

This got me unable to ssh back to router. So I installed fresh OpenWRT, restored working backup and everything is normal haha. Thank you guys! Dunno what was the issue but this one is solved.