Hi.. can you please tell me.. how can i switch from one mode to another mode, It's my requirement. I want to switch from Wi-Fi network to 3G network by program.
I know Wi-Fi is first choice for android but in my project user could connect through any of available networks. The choice is purely depends upon user, through list of radio buttons...like Wi-Fi GPRS EDGE etc. please reply me, Many thanx.. On Mar 15, 2:46 pm, Ricardo Silva <[email protected]> wrote: > After the changes. > > Yes, Android switch to 3G if can not obtain a default gateway (from DHCP or > statically configured) in the Wi-Fi network. And then will use 3G for > Internet and Wi-Fi for the local addresses. > > Then, a easy way is to configure the WiFi interface with a static IP (like > 192.168.0.1, same address range as the Wi-Fi network) and a mask > (255.255.255.0), and leave the gateway and DNS fields empty. Then confirm if > the route table has the 3G network as default gateway. Use the command > netcfg in the ADB to see that (in Hex, the default gateway is all zeros) or > use the busybox for Android which have the normal route command from Linux. > > Regards, > Ricardo Silva > > On Mon, Mar 15, 2010 at 7:29 AM, Tanmay <[email protected]> wrote: > > Hey, > > Thanks for the reply. > > You reckon I should have a look at the routing table before making > > these changes or after? Yes, from the forums I have seen that Wi Fi is > > the preferred link. However, I am not sure whether it switches to 3G > > in case it cannot connect to the internet via the Wi-Fi network which > > is connected, but is purely local and cannot take it to any website. > > > Cheers > > Tanmay > > > On Mar 15, 1:38 pm, Ricardo Silva <[email protected]> wrote: > > > Hi, > > > > See the route table, because the default route will be the WLAN, I think. > > > Because is the normally the preferred network (changes to 3G). Otherwise, > > it > > > will work. > > > > Regards, > > > Ricardo Silva > > > > On Sun, Mar 14, 2010 at 11:06 PM, Tanmay <[email protected]> wrote: > > > > Hi, > > > > This seems to be what I am looking for. However, just to confirm, I > > > > will give a short description of what I am trying to do: > > > > I am trying to use Wifi for an internal WLAN connection (which would > > > > not be accessing the internet) , and a 3G network to give me access to > > > > the internet at any time. > > > > > Hope I am going down the right track. I will try doing these changes > > > > and seeing how it goes. > > > > > Please let me know if these are not required/ will not solve the > > > > problem I described. > > > > > Thanks > > > > > 3, 2:35 am, Ricardo Silva <[email protected]> wrote: > > > > > Hello, > > > > > > here is a solution (only for testing and research, not for product) > > to > > > > > have the cellular data andwifiat the same time. > > > > > > Warning: need root > > > > > > 1. pull build.prop from system > > > > > > adb pull /system/build.prop . > > > > > > 2. Change ro.built.type property: > > > > > > from: ro.built.type=userdebug (on ADP1) > > > > > > to: ro.built.type=eng > > > > > > 3. Add property: > > > > > > cm.test.mode=true > > > > > > 4. Remount system: > > > > > > adb root > > > > > adb shell > > > > > mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system > > > > > exit > > > > > > 5. Push build.prop: > > > > > > adb push build.prop /system > > > > > > 6. reboot :) > > > > > > Some one knows if is possible to change the source code of the > > > > > ConnecitivityService.java and push to Android system (without install > > > > > a new image)? I think that is possible compiling a new core.jar > > and/or > > > > > ext.jar, correct? > > > > > > cya > > > > > -- > > > > You received this message because you are subscribed to the Google > > > > Groups "Android Developers" group. > > > > To post to this group, send email to > > [email protected] > > > > To unsubscribe from this group, send email to > > > > [email protected]<android-developers%[email protected]><android-developers%2Bunsubs > > [email protected]> > > > > For more options, visit this group at > > > >http://groups.google.com/group/android-developers?hl=en > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected]<android-developers%[email protected]> > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

