I have a Nexus 5 with Marshmallow and another device with a built-in 5.8Ghz WiFi which is used for transfering videos from it. When I connect to this WiFi it keeps telling me, that it has no internet connection and thus obviously disconnecting automatically to find a better one. How do I keep the connection?

Some things I already tried:

  • set the freq to 5Ghz only
  • delete all the other known Wifis
  • manually add the wifi

Unless the connection is stable, I cannot connect to the device with its corresponding app. Are there any apps which could achieve that?


Logcat prints the following when the device disconnects:

12-23 20:29:09.368: D/IpReachabilityMonitor(777): clear: iface{wlan0/21}, v{4}, ntable=[]
12-23 20:29:09.377: I/wpa_supplicant(4270): wlan0: CTRL-EVENT-DISCONNECTED bssid=00:e0:5d:91:1b:ec reason=3 locally_generated=1
12-23 20:29:09.381: D/WifiStateMachine(777): WifiStateMachine: Leaving Connected state

What I found out so far, is that this might be a kernel problem. However, I have not found any references to android in this case.

  • 1
  • Thanks for the hints. The adb shell removed the exclamation mark and I do not get any notifications about the missing internet connection anymore. However, the connection is still being dropped after a short period. It stays connected approx. 10 to 30 seconds and then disconnects. It reconnects, however the video transfer is interrupted. Any ideas?
    – Denis Loh
    Commented Nov 30, 2015 at 19:17
  • 1
    Hey Denis, this is annoying as hell. When I tell my device to stay on one connection, I expect it to respect my wishes, not play the "Me thinks me smarter than U dumb user" card. Commented Dec 23, 2015 at 18:27
  • I now also checked the wifi with a Samsung Galaxy S5 device and it is working like charme there. I have no idea whats wrong with the stock android.
    – Denis Loh
    Commented Dec 23, 2015 at 18:33

2 Answers 2


I found a possible solution for my problem.

I simply set the DHCP settings to static, give the devices an appropriate IP and Gateway, and left the DNS preset as it is ( by following these instructions: Is it possible to assign a static IP address without a DNS?

Afterwards it still complains about the missing internet connection, but this time it keeps the connection.

I tested it on both my Nexus 5 and Nexus 9, and it seems to work.

  • finally found this, I was about to put internet in the router, then only allow ICMP ping requests and block all other internet requests so that the client devices keep connected, I assumed if the clients have access to ICMP ping they won't show internet missing Commented Jul 13, 2019 at 21:07

Android is preset in SU global settings to drop a WIFI that has no internet connection. Even if you select to 'stay connected', it is fickle and may still drop the connection; and each time the cycle repeats, the connection will be lost. But the command to drop Wifi with no internet can be changed in the SU global settings (a bit like Bios on a computer).

Why is this set to disconnect now there are so many WIFI devices that are not internet connected, cameras, drones, alarms, clean networks etc., and the phone owner has no control of the connection because of a background command in the android OS.

If you are competent to use ADB and fast boot this shell command works on marshmallow: type su to enter super user mode (likely needs a rooted device). Then type the following command:

settings put global captive_portal_detection_enabled 0

It disables the "drop wifi if no internet connection" function.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .