Simultaneous wifi and 3G connection on mobile - iphone

I am developing a peripheral that uses WiFi and Embedded browser, the peripheral looks like an access point to iPhone (and android) but it is not connected to internet. When I connect my phone to this peripheral via Wifi, I loose internet connection on the phone using 3G.
Is there a way to avoid this? I have control over the software of the peripheral so I can change the IP addresses, gateways etc.

Are you going to connect your peripheral to the internet via iPhone's 3G network? If so, why don't you use iphone's Personal hotspot feature?
I believe you can't have both wifi & 3G connection without using Personal hotspot mode.

You can only simulate 3g on your device. In iOS 6 or higher open Settings->Developer->Network Link Conditioner-Status-Choose what you want.

Related

Share iPhone's internet connection with a non apple device. Tethering

I have a non Apple device used to process some data. It has bluetooth support.
It can be paired with the iPhone via bluetooth.
The device must use iPhone's internet connection to access a remote server.
See the flow:
I pair the device with the iPhone in Settings->Bluetooth.
I use ExternalAccessory framework to send data to the paired device.
The device processes the data and uses iPhone's internet connection to send the data to a remote server.
There is no problem in pairing the device to iPhone ( no jailbreak, by the way ).
Also, the firmware of the device is to be modelled in order to sent https requests via a valid internet connection.
The problem is the tethering, that will allow the iPhone to share it's WIFI or 3G connection with the device.
All I have found so far is tethering the iPhone with a computer, but no word about other non apple devices.
Any idea/link?
Take into account:
The device has bluetooth hardware and can be legally paired with the iPhone, no jailbreak needed.
The data processed by the device MUST avoid the application, and go directly to the remote server: I am not allowed to get the data from the device and use NSURLConnection to pass it to the remote server.
Please suggest a way to share iPhone's internet connection with non apple device.

find peers on wifi network ios

I'm trying to figure out how to search for other devices logged into a wifi network that are hosting the application on a specific port.
How can I detect the presence of these other devices without knowing their address or even necessarily the port they are hosting on?
Once discovered, I should be able to contact the device and establish a connection with it.
The most standard "iOS way" would be to use Bonjour to announce and listen for announcements for the application.
EDIT:
As of iOS7 GKSession is deprecated..
Why don't you use a GameKit Session
Apple GKSession Docs:
A GKSession object provides the ability to discover and connect to nearby iOS devices using Bluetooth or Wi-fi.
Just because it's called GameKit, doesn't mean it can only be used in games :)

Can I use Bonjour to connect two iOS devices one in 3G network and one with WiFi

I am developing an iPhone app in which I need to connect my iPhone with any of the available iPhones around it using 3G and WiFi network. One of the iPhone should be in 3G network and the other should have only WiFi connection. I cant use Bluetooth as the range of connection should be >10 m.
I am wondering if it is possible to use Bonjour protocol to achieve the connection between two iPhones when one is on 3G connection and other is on WiFi, and there is no other network present around.
If not how can I connect two ios devices with one on 3G and one on WiFi, without using Bluetooth.
Thanks for your help.
Here's Apple's example how to transfer data between two devices via Wi-Fi that uses Bonjour protocol: WiTap.
hope this helps......

Why iphone Bluetooth chat application working without activating bluetooth or wifi?

I have created iphone bluetooth chat application using following tutorial:http://www.devx.com/wireless/Article/43502/1954.
It works well.But when i turn off wifi and bluetooth both in my pc and test with
iphone simulator with another pc which has also turned off its bluetooth and wifi.
It still works fine and both peer discovers each other.both pcs are conneted through LAN.
Can anyone tell why this happens?
I guess the simulator just performs discovery using any available network connection. I very much doubt that the simulator was using the Bluetooth of your PC for peer discovery.
As you say, "Both PCs are connected through LAN". Well, I guess that is your answer. Discovery is being done via LAN.
If you want to test actual bluetooth usage scenarios, I guess you have to use an actual device.

Detecting wifi network change in iPad

I have an iPad application which requires me to stream a video to a user only if he is connected to a particular wifi network. If his wifi network changes, I need to stop streaming.
Is there any way to know that the wifi network that the user is connected to has changed?
Are there any public APIs that can give me the SSID of the wifi network I am connected to or the VSS ID or the MAC address of the router?
Thanks and Rgrds,
Hetal
There is no supported way to do this, but it is possible.
See this question for more details:
Accessing iPhone WiFi Information via SDK