My Fairphone 4 keeps dropping WiFi connection in my home network. It connects to the WiFi, gets IPv4 assigned from DHCP, negotiates IPv6, and a second later it disconnects. Then it connects again and the whole cycle repeats. The cycle takes a few seconds.
The network does work during the brief intervals of connectivity. For example IM messages come through even when I disable mobile data.
This only happens on my home WiFi, the phone works just fine on other WiFis. Other WiFi devices work just fine on my home WiFi.
The build I am running FP4.FP3V.A.116.20220414.
The WiFi router is Fritz!Box7582 (although DHCP is served by another device based on Raspberry PI). I also have a WiFi repeater from Fritz, I can repro the issue regardless of whether I am next to the router or next to the repeater.
What I tried already:
to separate 2.4GHz and 5GHz networks. I though maybe it swaps between bands. But once I assigned separate SSIDs to the bands, the issue still happens, regardless if I connect to the 2.4 or 5 network.
to disable random MAC (mostly to get another MAC and IP and so make sure this isn’t some DHCP conflict).
to disable mobile data.
None of these helped.
Here are some log lines that I think might be relevant:
05-29 13:38:56.850 930 930 E android.hardware.wifi@1.0-service: Error occurred while deleting old tombstone files
05-29 13:38:56.850 930 930 E android.hardware.wifi@1.0-service: Error writing files to flash
05-29 13:38:56.884 1351 1351 W wificond: Scan aborted
05-29 13:38:57.121 930 930 E android.hardware.wifi@1.0-service: Failed to open directory: Permission denied
05-29 13:38:57.121 930 930 E android.hardware.wifi@1.0-service: Error occurred while deleting old tombstone files
05-29 13:38:57.121 930 930 E android.hardware.wifi@1.0-service: Error writing files to flash
The issue very much looks like the one discussed in that thread, however the workaround described there (to disable mobile data) doesn’t work for me.
Thanks. This was definitely worth a try. Unfortunately this didn’t help. I disabled auto-connect on both bands. Obviously it doesn’t go into the loop now, but once I connect manually to one of the two networks, it just drops after one second or so.
So it’s the switching between IPv4 and IPv6 as you initially indicated.
No, the issue is still reproducible after I disabled autoconnect for both 2.4 and 5 networks. This is the evidence that it is not the switching between bands.
That only disables IPv6 for the cell network, but not for wifi.
Disabling DHCP on the FP4 and setting a static IPv4 IP for the wifi network doesn’t work either, at least for me the phone still gets served IPv6 addresses.
Enable the M and the O flags in the router advertisement messages of the FRITZ!Box (SLAAC possible)
I only run DHCPv4 on the network, I rely on SLAAC for IPv6 (and manually setting IP addresses for devices where I care about static IPs). So it was incorrect to send the M and the O flags, as they mean that devices should look for DHCPv6 service. Other devices are fine with that, but apparently Fairphone is not.
Once I changed the config on the router to:
Disable DHCPv6 server in the FRITZ!Box:
There are no other DHCPv6 servers in the home network
everything works fine. The IPv6 works (including on the phone), and WiFi is stable now.
Thanks @pawelz . This may be useful for (potentially) lots of Fritzbox users.
I don’t have one, but I’ve been more and more certain over recent months that the problem lies with an incorrect protocol on the FB.
@anon9989719 could you maybe test this on yours?
If this is validated it would be nice to have a little tutorial.