There's a wireless network I'm connecting to using my iOS device. In order to access the internet, a captive portal page is displayed prompting for a username and password. I would like my device to ignore that page and remain connected to the wireless lan. I don't mind if I can't get on to the internet - I just want to connect to another device on the wifi network. I can do this on other devices (android, laptops etc), it's just iOS devices that seem to enforce a "use captive portal or be disconnected" policy.
So, is there a way for my iOS device to remain connected to a wifi lan that has a captive portal?
This is a well-known problem with iOS. Apple assumes, incorrectly in my view, that any iOS Wi-Fi connected device must access the Internet and must be able to reach Apple's servers (of which there are dozens, only one of which is apple.com).
The device chooses a server apparently randomly from a list and attempts to load a specific HTML file in a random file path from the chosen server.
If the device is connected to the Wi-Fi access point but can't reach Apple, iOS assumes that the user has not logged into the access point and thus must be shown the captive portal login page.
This has caused grief to developers who want the user device only to access web resources on the local network, where no Internet access is provided or needed; and when the access point is open with no login required. The captive portal page just confuses the user.
The solution is to spoof the Apple servers. The only way I know of is to configure a web server to note certain nonrandom content in the HTTP attempts from the user device, and to supply the file the device is looking for. This is how the LibraryBox and PirateBox do it. Check LibraryBox.us.
Related
I did a lot of brain-storming about this, and couldn't reach a solution.
I am posting this as i can get some ideas.
I have developed a WiFi-IoT based device with sensor, which shows up in AP mode. A mobile phone connects to this AP and then the device starts sending sensor data to the mobile phone. A mobile application plots and displays this data.
Now, i want to send this data from mobile to internet. Connecting my mobile to another AP with internet is not an option, as i don't want to break the continuous data transmission.
Using internet of data provider is one option, but that brings constraint of have mobile data.
What other options do i have to send my data from mobile to internet ??
Edit:-
I worked on the suggestions, and came to this point:-
1) WiFi-IoT device (in station mode) and mobile phone connect to same Internet-enabled WiFi access point. WiFi-IoT device has the IP address of the mobile phone for current network, and sends data to a TCP port (eg. 9801) of this IP address. The application in mobile phone reads the data from the port no. 9801 and stores it and hosts it on the internet.
This works fine.
2)WiFi-IoT device comes up in Access Point mode, and the mobile phone connects to this Access Point. Now there is one-to-one connection between WiFi-IoT device and mobile phone.
My question is, in the second scenario, without breaking this one-to-one connection, is there way to host data to internet:-
1) without using mobile internet provided by mobile data service provider ?
2) without using a second mobile phone ?
I may be wrong, but i am just asking this to make be sure whether my requirement can be achieved or not !!
I don't think you can connect to two APs at the same time.
Maybe use Bluetooth as device to phone link?
Or have the device connect directly to internet after some config done in AP mode and then send a copy of the data to your phone app (either via WAN or locally to the private IP your phone gets from the Internet gateway AP)?
--Edit--
Let me explain about the second one:
What I mean is basically have your IoT device directly connect to Internet and send data to a server (your phone has also to be connected to Internet). Then make the server send a data copy back to your phone. It's two step process: 1) while the IoT device is in AP mode, use your phone to login and configure which Internet-connected AP it should be connected to. This serves as UI for your IoT device. 2) start sending data.
Or a bit ugly, just let the IoT device talk to your phone in the same WiFi network via private IP.
I brought up this way because you mentioned anyway your device has to send data to Internet(I assume it's a server) and have phone talk to a known location server is more portable and scalable once you have more than one IoT device.
--Further Edit--
I don't think there is a way to do what you described. At least from my experience:
1) on the link layer, the wireless NIC has to be able to connect to two APs at the same time. This is not a feature currently available.
2) on the network layer, there has to be two IP address attached to the same NIC, which I don't think is available in current OS for wireless NICs. Though there is a way to do this for Ethernet card, I.e. via Aliasing.
I want to be able to open a captive screen on an IOS device, when the user enters my DNS number in his network settings.
From what I've seen the iOS device, calls the URL : captive.apple.com . If it received a response, it doesn't open the captive window as it believes the network is working without any limit. However if it isn't able to pull open this URL, it opens the captive portal window.
Remember I don't want a local regular WiFi network with a login . I want to spoof devices when they try to reach my DNS, by blocking all packets.
I just want to open my captive portal splash screen automatically when my DNS is entered.
How can this be done with PHP.
Can a website help a user communicate with nearby devices via bluetooth/WLAN without downloading software?
User requests that something be done on their device (which could be, for example a wirelessly connected printer or a bluetooth keyboard).
The site, which contains a repository of relevant actions, sends specific instructions for that device to the user's own machine.
Those instructions are then relayed to the correct device (with the user's permission) via the user's device's WLAN or existing bluetooth connection.
Part 3 is what I'm not sure of - is there a mechanism by which a website can contribute to a wireless/bluetooth connection held locally?
It is not possible. User browser can't interact with hardware for wireless networking.
You should force user to install some custom software to do this.
You would have to submit the "commands" first, then have the device make requests to the website server, i.e., check for any pending "commands" for the device, and then process them locally. A website is not "thing" that can directly interface with a hardware device.
I have to iphone applications that they use two different networks. Changing network setting for each application is not user friendly. I want to do such thing as follows,
When application starts, it checks the availability of particular network (SSID) and popup a message to the user to permit to connect. Once user click on "OK" they it connect to that particular network.
Anybody has similar experience ?
How can I connect to given SSID using objectiveC ?
I've been reading for a solution to achieve app controlled networking, but it seems impossible without the use of Apple80211 private API.
The best i think you can do is with CaptiveNetwork.
With this you can register a list of SSID's for your device and it will suppress web sheet.
From the doc:
By calling the CNSetSupportedSSIDs function, an application can register a list of wireless network SSIDs with Captive Network Support, thereby assuming responsibility for authenticating with those networks. Typically when a user joins a captive network, Captive Network Support provides a web sheet that allows the user to authenticate with the network. If an application has registered the SSID of the captive network, however, the web sheet is suppressed, and the user can complete authentication in the appropriate application.
I have to build an App that connects to a special Wi-Fi network and the opens an Ip address that is only available withing the network.
Is it possible to connect to a special wi-fi network (say "Network XYZ") via iPhone App. If so, please let know, so that I have an idea how to solve this.
Sadly no. Not from within the app.
All you can do is instruct user to go to settings and connect to that network.
If iPhone was not registered to any WiFi network before entering your app and your app has usesWiFi key set to YES then user will get a list of available networks to choose from.
One more big problem is: there are no AdHoc networks on this list - only infrastructure networks. AdHoc networks are available only trough settings.
What you could do is to instruct your user to set the auto-join feature on for desired network.
I'm afraid the only way to change the network is via the Settings application. Otherwise, rogue apps might be able to move users to their own proxies without the user's knowing.
It may be possible on jailbroken devices, however, as you would no longer be confined to working within the usual app restrictions on accessing system-level settings.
You can have your app launch once the user connects to the SSID you specify using the CaptiveNetwork API.