Force application for an iOS device to communicate over a local WIFI network

I’m creating an application that will run in a museum with a local Wi-Fi network without Internet access, for some strange reason I can’t completely "join" this network using an iOS device. Enabling Internet access on this network solves the problem ...

The network should provide only a web server and a DNS server, the access point has a DHCP server, Android devices can connect to the network without problems.

When I try to join the network with the device, it remains in the spinning wheel status, the DHCP server log on the debian server says that it assigned the address to the iOS device and if I check the wifi address with the application (for example, iSys o SBSettings) I see the assigned WIPI DHCP address.

But when my application (or safari) tries to connect to the web server, the request is sent via a 3G connection and does not end.

In my application, I use Apple’s standard “Reachability” platform to check the availability of the provided hostname via the wifi connection, and I get 0 in the SCNetworkReachabilityFlags mask ....

I am sure that the problem is related to the fact that iOS (5.1 in my case) is trying to check the availability of some "standard" host on the network before routing traffic through a WIFI connection.

Does anyone know what an iOS device does to “test” a WIFI network? I can add host names or simple dummy services to the server machine if this can help me connect the device to the local network.

+4
source share
1 answer

It seems that iOS does not like to join networks without a gateway, also if the network is local, you need to set the correct gateway address.

Setting up the gateway, because the server itself did the trick, and the device began to route TCP / IP through my local wifi network.

+1
source

Source: https://habr.com/ru/post/1432746/


All Articles