6

Is it possible to have both 3G and Wifi connections up and running? I want to transmit at the same time through both interfaces.

However, I've noticed that when Wifi is up, 3G is going down. Actually, it seems that the routing table is updated on on/off of the interfaces.

  1. Route table UMTS on / Wifi on

    a.b.c.1 dev rmnet0 a.b.c.0/24 dev rmnet0 src a.b.c.2 default via a.b.c.1 dev rmnet0

  2. Route table Wifi on / UMTS on

    192.168.1.0/24 dev eth0 src 192.168.1.147 default via 192.168.1.1 dev eth0

  3. With wifi on I have run:

    ip link set rmnet0 up

    ip route

    192.168.1.0/24 dev eth0 src 192.168.1.147 a.b.c.0/24 dev rmnet0 src a.b.c.2 default via 192.168.1.1 dev eth0

When I saw that I thought that I have managed to put both devices up and running. However, this is not the case. When I ping a public internet address (a.b.c.3), in case 1) and 2) everything goes well. In case 3) I get no answer.

Where on earth does Android set that only one device can be available at a time? How can I make both interfaces to be up and available, like on an ordinary Linux box?

P.S.: I have tried the solution in [1] to enable the data connection when wifi is on, and no way.

[1] How to enable data connection on Android 2.3

[2] How to block calls in android --> using ITelephony to get the telephonyService.enableDataConnectivity(); but I get an exception.

alkesh Miyani
  • 133
  • 1
  • 5
jlanza
  • 1,208
  • 3
  • 23
  • 43
  • 3
    Its probably not what you want to hear, but I think this is going to be pretty complicated. Every implementation i've seen pretty much uses _the_ active connection to send data (_the_ as in only one, depending on what has higher priority). Is there a high importance reason why you would want to transmit through both at the same time? Could you perhaps choose to transmit through one first and then the other? – blindstuff Feb 13 '12 at 20:57
  • I'm a researcher and for the communication system I'm developing I need to have both interfaces active simultaneously. I have been reading around a it seems that Google have remove the option to work with the ITelephony interface [1](http://code.google.com/p/android/issues/detail?id=15031) which seems to be the way. However I would like to know if it is possible to do it by developing in native C and run it on console. Any help is more than welcome. – jlanza Feb 14 '12 at 11:03
  • Another point. Current android versions support Tethering. At the end in that case both interfaces are up and running. Then, this could be a starting point to customize android for enabling both ifaces to connect to internet. – jlanza Feb 14 '12 at 11:46
  • Have you tried ConnectivityManager.requestRouteToHost? I've always wondered if that solves this type of problem, but so far I've not needed to try... – Philip Pearl Feb 25 '12 at 12:28
  • Read about 'Connectify dispatch'. It is a PC software that is similar to this. For Android, I am guessing you have to create a virtual router on the phone which lies on top of both the Wi-Fi and mobile data interfaces. It would be best to be in core android rather than an APP – GP cyborg Oct 01 '14 at 07:05

1 Answers1

0

This is not going to be possible... unless you are will to go to great lengths to make it work. You are essentially asking for you device to become a router.

To do this you will need to find a program (sorry can't remember any names at the moment) that will accomplish this on a normal linux distro. Then recompile it to fit the Android OS and install is into the native system.

This explanation may make a little more sense to you. If you go to your ADB shell and run netcfg (or ifconfig to verbose this) you will see the devices networking options. You can run an ifconfig command to set the device or change its state - but you cannot have multiple devices route data to and from the phone at the same time I wouldn't think.

This would be my best guess...

jjNford
  • 5,170
  • 7
  • 40
  • 64