Cannot connect to Nikon D5300 via WiFi from Android 7.1.2+ I have a Nikon 5300 DSLR and an Android 7.1.2 device (LineageOS).

I want to use Nikon's official WirelessMobileUtility app to browse/transfer pictures and take pictures without touching the camera.

Problem: The connection never works, even after trying dozens of times. In the manual (and YouTube tutorials) the steps are so easy (enable WiFi on the camera, connect to that WiFi from the phone, start app) yet the app never manages to connect. Many recent Play Store reviews mention this problem.

How to make the connection succeed?

Important: This question is only for Android 7.1.2 and above
This procedure requires root access.


Install a terminal such as ConnectBot (F-Droid, Play Store)
Type su
Type this command: settings put global captive_portal_mode 0
Press Enter
That's all, the connection should work immediately.




 Screenshot (click image for a larger variant)

Explanation: Since 7.1.2 Android has changed the way captive portals are handled, and the camera's WiFi, which does not give access to the Internet, is considered a captive portal and since it does not reply as expected the connection is gets dropped. Setting the captive_portal_mode variable to 0 prevents Android from doing that.

Details: https://github.com/LineageOS/android_frameworks_base/blob/cm-14.1/core/java/android/provider/Settings.java#L8268

(By the way, for devices with an Android version earlier than 7.1.2 the command is settings put global captive_portal_detection_enabled 0)