Android Question Wifi Without internet issues

techknight

Well-Known Member
Licensed User
So, Is there a way to keep devices connected to a WiFi network that does not have internet?

I have closed WiFi networks that are designed only to control other hardware/devices via web interfaces, or Apps. For Example, I have ABMaterial on a closed network that operates a specific thing, and I have MQTT stuff on a closed network as well.

I am noticing that some devices really dont like to be connected to WiFi networks that do not have internet, and they love to just "disconnect" And that is even with phones with no SIM cards dedicated for this particular task.

Maybe there is a way to "spoof" the device to think it has internet, but it does not. Not sure how phones determine how they have internet. Maybe a PING somewhere, but I honestly dont know.

any ideas?
 

Didier9

Active Member
Licensed User
I have had much problems of that nature.
I have posted several times about it.

I have used various phones and tablets with Android 4.4 through 9 and the behavior is much the same.

I have done extensive testing with a few units as follows:
The access point is actually a small WiFi module from China, model USR-C215 and USR-WIFI-232T. They behave essentially the same. https://www.usriot.com/products/iot-wifi-module.html
They can be configured to be an access point or to join a network. I typically use them as access point and connect the phone or tablet to it. Then I can easily run TCP or UDP packets between the two reliably as long as I am at home or within range of an Internet connected access point.
This is the weird part: as long as the Android device sees another access point in range that has internet access, it will stay connected to the wifi module (even though it is not connected to the internet).

I actually control my home lights like this and have been for several months. I use two older phones (Motorola Droid Razr, Android 4.4) as control units and the USR-C215 module is connected to an 8051 microcontroller which controls the lights (I had an old low voltage lighting system made by Touch-Plate that was not working right). No internet access and the phones stay connected for ever and even reconnect automatically when power goes down. The phones are NOT configured to access my home router, so they have no internet access, but the router is in range of the phones.
I use the same modules to remotely control training systems I sell. Similar configuration, an Android tablet and the WiFi module connected to an 8051.
However, if I take a phone and one of my WiFi equipped training system in the car and drive out of town, the phone will disconnect from the WiFi module after a few seconds and will not reconnect unless I reboot the phone. Then it will reconnect for a few seconds again and disconnect.
When I drive back in town, as soon as I am in range of any WiFi access point (like the local college or anywhere in my street), I can reconnect and stay connected to my WiFi module. Of course, these access points are protected and I do not have password, so there is no way the phone can actually get any internet traffic through it.

I have tried all types of keep-alive methods I could think of, nothing seems to fix it. Obviously, the fact that I need to drive out of town to try any fix does not help.

So for now, the fix has been to use Bluetooth for these systems that have to operate in the country. I started with the HC-05 modules and now I am switching to the JDY-30/JDY-31 which are easier to configure and seem to work even better than the HC-05. I have a review and a translation of the Chinese datasheet and command set here.

The range is quite good (not as good as WiFi but sufficient for most of my needs) and solving the disconnect problem has been a godsend. Being able to stay connected to the internet through WiFi at the same time I am controlling my modules through Bluetooth is also a convenience for me when I test these systems at home.

My lights controller still uses WiFi because I need the range (the WiFi module is in the attic of a 2 story house, out of range for Bluetooth) and it works (I have no interest in controlling my lights through the Internet per se, just eliminating the old Touch-Plate system was my goal)

The last test I need to do is with the iPhone. I do have the B4I license and paid my Apple developer's tax and I need to try that before it expires... Of course, with the iPhone, there is no Bluetooth option (except for BLE but I have not gotten that working to my satisfaction yet).
 
Last edited:

Didier9

Active Member
Licensed User
To be specific, here are the devices I have used that show the behavior described above. They cover Android versions from 4.4 to 9.0 and they all do basically the same thing.

I want to point out that as long as there is another internet-enabled router in range, even if this router has never been used with the particular device, those devices will stay connected permanently to a non-internet enabled router, and reconnect by themselves when disconnected.

Most devices will initially refuse to connect and issue a warning or disconnect but after reconnecting a couple of times, the device will reconnect to the non-internet enabled access point.

Moto Droid Razr (Android 4.4)
Moto-X 2014 (Android 5.1)
Moto-X 4 (Android 9)
Samsung Galaxy S9 (Android 9 I believe, even though it may have been 8 when we tested the first time)
Alcatel 5044R phone (Android 7.0)
Lenovo Yoga tablet (Android 7)
Panasonic Toughbook tablet (see note) (not sure which Android version, I no longer have those tablets)
Nexus 7 tablet (Android 5.0)
Hisense Hero8 tablet (android 5.0)
Aceson A7 tablet (Android 4.4)

None of these devices have been rooted.

Note: the Toughbook is a rugged tablet that is well made and quite expensive. In one of my applications, the tablet connects to a device through WiFi (one of my devices with an 8051 microcontroller, a WiFi module and another radio module). The device is used as a relay to bridge the traffic from/to WiFi to a DiGi radio (900MHz or 2.4GHz) in order to reach other devices that may be a mile away, out of range of WiFi signals even under the best of circumstances. The 2.4GHz radio modules share the WiFi frequency band, so I expected some problems. Interestingly, of 3 or 4 Android devices tested, only the Toughbook had issue while the 2.4GHz DiGi radio was running (severely corrupted traffic followed by disconnection from the access point). Even the cheapest Android tablets had no such issue. In order to use the Toughbooks, I had to switch to Bluetooth, which also uses the 2.4GHz spectrum. Apparently the WiFi subsystem in the Toughbook is extremely sensitive to non-WiFi 2.4GHz traffic but the Bluetooth system is not.

I believe it is an Android feature in order to provide location data but save battery when possible. As long as there is an Internet enabled router in range, Android will keep the WiFi radio turned on in order to track the device's location because all it needs is the SSID, it does not need to actually connect to it. Once there is no internet enabled device in range, the WiFi radio is turned off, regardless of any open connection. Access points do broadcast their capability to connect to the Internet even before you connect to them.
 
Last edited:
Top