0

does anyone know if it is possible to activate umts/3g and wlan at the same time? On Android, Windows Phone and iOS?

I need to connect the phone to a hotspot via wlan and at the same time to the mobile network via umts/g3. The hotspot has no connection to the internet.

If i create a hotspot from the mobile phone and connect the other network to this hotspot to use tethering both connection are available. but i need to connect the smartphone to the hotspot and not vice versa.

any tips how this can be implemented?

thanks for help :)

baam
  • 1,122
  • 2
  • 14
  • 25
  • Have you tried searching for this information? Google "android simultaneous 3g wifi connection" and you get a lot of useful information about Android. – user1725145 Apr 08 '13 at 08:58
  • Yes i did. i can read the state of mobile data via "TelephonyManager" but can change the state. all the example are outdated cant be used with the new api. change the wifi state with the wifimanager is easy. but mobile data seems to be hidden in the api and i dont know how to get to it :/ – baam Apr 09 '13 at 07:33
  • Hang on, you're now talking about something different. Do you want to edit the question or open a new one? Your original question was about simultaneous connections, but now you are talking about reading the data from each connection simultaneously. – user1725145 Apr 09 '13 at 07:54
  • Just to clarify my question: I need to get some data from the hotspot on the phone and send it per mail or load it into my dropbox. is this even possible to use both interfaces at the same time? otherweise i would separate it in two steps. download data to the phone. disable wlan (know mobile data should automatically be enabled) and send the data – baam Apr 09 '13 at 08:06
  • OK, the question is clear now, thanks! I've never done this myself, hence I'm not posting an answer but...this link suggests that you can do it if you have root access, though not on every platform: http://android.stackexchange.com/questions/29769/how-do-i-connect-to-a-wifi-ap-and-3g-network-simultaneously. 3G and WiFi should use different antennae (I think) and not interfere with each other, so the biggest reason to have only 1 at a time, is to save on the battery, and it's just the OS stopping you from having both on. – user1725145 Apr 09 '13 at 08:26
  • Yep, this link is posted in almost every thread with a question like mine ;) and it must work on phones with no root access. nevertheless thank for your help :) – baam Apr 09 '13 at 08:33
  • Without root access, I must admit, I would probably code your two step algorithm! Especially if you don't have to do this procedure very often. – user1725145 Apr 09 '13 at 08:37
  • Thanks to [http://stackoverflow.com/questions/11555366/enable-disable-data-connection-in-android-programmatically] its possible to enable/disable the mobile network. but wlan is the preferred connection and mobile gets disabled by the system. i think a two step solution will do it ;) – baam Apr 09 '13 at 08:54

2 Answers2

0

If you configure the WiFi hotspot's DHCP to not set a gateway (e.g. by entering dhcp-option=3 under Extra DNSMasq options if the hotspot is using DD-WRT and DNSMasq as DHCP server), then iOS will "understand" it, and enable the 3G/4G connection.

Android unfortunately does not understand this, and will still disable 3G/4G (it will just assume that the hotspot is the gateway).

If Windows Phone will understand I cannot say.

Paul Groke
  • 6,259
  • 2
  • 31
  • 32
0

Its better to connect phone via USB tethering for using Internet, and then share Internet Connect in your system via Wifi.

user1747819
  • 301
  • 1
  • 5
  • 11