Keep 3G Connection online while Wifi Connected (Custom Android System)

1000 views Asked by At

I'm developing a platform using ODROID U3 with Android for a custom application. I merged the MPTCP Kernel Source with Android Kernel Source to get a MPTCP Enabled Kernel for Android.

The only thing is that Android by default disables the 3G Connection when a Wireless is available, and I want it to be both available to MPTCP work by share-loading it.

I can manually manage all stuff, but I didnt find what disables the 3G Connection and how to bypass it. I also have BSP if needed to bypass it.

Anyone knows where I can bypass or where it does the 3G Disconnection?

PS: I already saw Android High Priority Connection, and this doesnt apply to me. I need both connections working for I make the MPTCP routes transparently for the Network Access. Also I'm aware that this is not something I can do in non-rooted devices. I have root, and I can also recompile entire Android System from the BSPs. I searched all over the internet and I didnt find anything about that (only the High Priority Connection)

What I already have tryed:

1 - High Priority Connection: Works fine, but the application needs to be open. And I want the MPTCP system-aware not application-aware.

2 - Turn on Wifi, connect. And them manually bring up the Mobile Connection Interface via terminal: Doesn't work. For some reason the Mobile Connection doesn't get IP from DHCP.

3 - Search on Android BSP anything and anywhere it could switch off/on the Mobile Connection: Didn't find anything specific.

Thanks!

1

There are 1 answers

0
Lucas Teske On BEST ANSWER

I found the solution here: https://sites.google.com/site/lotuseaterarpit/news/3g4gwififorandroidconcurrently

So basicly you need to disable wifi service from android (using svc wifi disable and them manually configure the Wireless Network as so:

Lets supose we have the wireless internet at wlan0, we will do:

Disable the Wifi Interface Service

svc wifi disable

Bring up Wifi Interface

busybox ifconfig wlan0 up

Configure wlan interface

iwconfig wlan0 mode managed essid YOUR_SSID 
iwconfig wlan0 key s:WIRELESS_KEY
iwconfig wlan0 commit

DHCP interface to get IP

dhcpcd eth0

So with this, you can have your 3G Connection online together with Wireless Network. You need to configure the routes by yourself, but this will make you able to do that.

Hope it helps!