My Android (Samsung Note 4) keeps disconnected after a while from a sign-in required wi-fi I've a Galaxy Note 4 (udpated to latest OTA) device and I'm trying to setup a reliable wifi/vpn connection to my dormitory network. The procedure to connect to internet is to connect the wi-fi network and then enable a PPTP vpn. 

It connect to wi-fi network, then I see a notification which says "Sign into Wifi Network". I enable the vpn and I get connected but after a few minutes it get disconnected (bcz the wi-fi get disconnected).

I've tried to turn on/off smart switch, power saving mode and different developer options but nothing has changed. I also tried 3 other router in the dormitory and nothing has changed. I've an old android 4.0 phone (Sony WT910) which is able to connect to the network and provide reliable connection, there are other android phone (such as Galaxy Note 5) which have no such problems. Also, the problem is with this particular vpn enabled network and I can connect to other wi-fi network such as my home wi-fi which doesn't require the user to sign-in through vpn and directly connects to the internet.

I suspect that the problem is with that "Sign into Wi-Fi network" which tries to open up my browser as well for a url. I can connect and enable the VPN but since the wi-fi get disconnected after a while I don't have reliable connection (I have to re sign-in each couple of minutes). It seems that there is a stupid mechanism (I'm not sure) in the software which thinks that the wi-fi can't access the internet (bcz of no sign-in) and hence disconnects the wi-fi. This is independent of vpn, with/without enabling the vpn, the wifi get disconnected. 


Galaxy Note 4 (SM-N910C)
Android Version: 6.0.1
Android security patch level: April 1, 2017
Kernel Version: 3.10.9-9197253


p.s. I've tried lolipop DHCP (legacy) as well but nothing has changed

Update:

here are exactly the same problem:


Android device disconnects automatically from a sign in required WiFi
WiFi Disconnecting (Special Issue)


This seems a Bug/Capability which check the connectivity of a WiFi connection using client3.google.com (Spying?) and when see it is not connected (in most cases sign-in required and you should enable a vpn) the android decide to drop the WiFi!
I've searched and it seems this problem is not related to VPN. It's a capabilyty/Bug [at least] in some android devices (esp Samsung) which turn off the wifi when it found it not connected (without considering the simple fact that it might have connected through a vpn!). So this is a Bug. It seems this helps somehow.

In a nutshell current solutions are these:


Block client3.google.com in your router
Fool your device by setting up face proxy (then the sign-in required message goes away) and then modify it to none proxy again
disable wifi assisted location