Every then and now, my android cell phone cannot connect to my Wi-Fi and says: unable to obtain IP address. After some time (sometimes minutes, sometimes hours) connection is back to normal.
This is my simplified setup:
Cell phone --(wireless)-- Wi-Fi router --(wire)-- DHCP server --(wire)-- modem
- cell phone: Samsung Galaxy S8, Android 9, Kernel 4.4.111-21427293
- Wi-Fi router: Netgear R6260, Router Firmware Version V188.8.131.52_1.0.1
- DHCP server: Debian 9 (Stretch) running isc-dhcpd-4.3.5
I took network dumps from the DHCP server:
- During such a phase of non-connectivity there are no incoming packets.
- When connectivity is back I see both incoming and outgoing DHCP packets.
I therefore tend to rule out the DHCP server as problem source.
The Wi-Fi Router logs: "WLAN access rejected: incorrect security"
I went through the net but have not found anything useful, yet. The Wi-Fi password has not changed, there is no MAC filter or whatsoever. I now suspect that the router does not forward the DHCP request from cell phone to DHCP server. Therefore, I am trying to tap into to DHCP communication between cell phone and router.
Monitoring Wi-Fi traffic directly on cell phone was without luck: tPacketCapture app does not show DHCP packets, and I have not found anything more useful up to now.
So I use another PC (Ubuntu) sitting in the same Wi-Fi and monitor traffic. What I see is only DHCP requests from the cell phone but no return packets, even if the cell phone is able to connect. I suspect this is because they are no longer broadcast and my Wi-Fi interface filters them because it is not in monitor mode.
Therefore, I would like to switch the Wi-Fi interface of my PC to monitor mode and follow this procedure: https://www.geeksforgeeks.org/how-to-put-wifi-interface-into-monitor-mode-in-linux/
sudo ip link set wlp1s0 down sudo iw wlp1s0 set monitor none sudo ip link set wlp1s0 up
The output of
sudo iw dev shows "type monitor" but reverts to "type managed" after few seconds. Some say this is because of the NetworkManager https://askubuntu.com/questions/1330483/wifi-interface-mode-switches-automatically-back-to-managed-ubuntu-20-04 , but disabling the NetworkManager no longer automatically connects to the Wi-Fi.
The wpa_supplicant should solve that: http://greyfocus.com/2018/01/wifi-without-networkmanager/ and How to setup network without wicd or NetworkManager? but eventually I find that also the wpa_supplicant switches Wi-Fi interface to managed mode and I am not able to sniff the DHCP packets of my cell phone on the Wi-Fi.
This is how far I got. All I want is my cell phone to be able to connect reliably to my Wi-Fi.
I'd be greatful if anyone could help here or point me in the right direction how to track this problem down.
Thanks a lot in advance!