8

I'm developing a remote control app that will use wifi to communicate with my car stereo. The car stereo has ethernet, and I have the ethernet wired to a wireless AP in my trunk. This works great, but since the phone has a wifi connection, it wants to use it to reach the internet, which it can't do when my car is away from home.

What I'd like to do is develop a script that I can run to route LAN traffic through wifi, but WAN (internet) traffic through the cell data connection. I dug a bit into this issue, and found this, but it doesn't seem to work, even after adjusting the routing table with a default route through the rmnet0 interface and bringing up the rmnet0 interface with ifconfig.

It kinda seems like something in the OS is disabling the 3G hardware when wifi is active. Is that a known behavior, and if so, does anyone have any pointers on how I can circumvent it? I found this post where someone got working on a different phone. Can this be done on the Nexus S?

3
  • Hmm, interesting. I know I've heard of phones that can use both the cell network and WiFi at the same time but I don't know about the Nexus S. Aug 2, 2011 at 15:01
  • what is the output of the route command after you bring up rmnet0?
    – devnul3
    Sep 2, 2011 at 17:17
  • I do believe it is default behavior to turn off data when connected to wifi.
    – Shawn
    Dec 19, 2011 at 15:42

1 Answer 1

1

by default, 3g/4g cannot coexist with wifi, 3g/4g will be disabled whenever wifi comes up, if you need this so badly you can use some custom rom's source and modify the below code to enable 3g during wifi, also you need to route like u already do.

http://gitorious.org/0xdroid/frameworks_base/blobs/234551c44102003c1fb2de5c16f60f9f0cefe71d/services/java/com/android/server/ConnectivityService.java#line224

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .