Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

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?

share|improve this question
    
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. –  Matthew Read Aug 2 '11 at 15:01
    
what is the output of the route command after you bring up rmnet0? –  devnul3 Sep 2 '11 at 17:17
    
I do believe it is default behavior to turn off data when connected to wifi. –  Shawn Dec 19 '11 at 15:42

1 Answer 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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.