在Android上同时启用wifi和3G接口 [英] Enable simultaneously wifi and 3G interface on Android

查看:77
本文介绍了在Android上同时启用wifi和3G接口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以同时建立和运行3G和Wifi连接.我想同时通过两个接口进行传输.

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

但是我注意到,当Wifi上网时,3G会下降.实际上,似乎在打开/关闭接口时更新了路由表.

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)路由表UMTS开启/Wifi开启

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)启用路由表Wifi,启用UMTS

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)打开wifi,我已经运行:

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

当我看到我以为自己已经设法将设备设置为正常运行时.然而,这种情况并非如此.当我在情况1和2中ping一个公共Internet地址(a.b.c.3)时,一切顺利.在情况3)我没有答案.

When I saw that I thought that I have managed to put both device 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.

Android到底在哪里设置一次只能使用一台设备?我如何使两个接口都可以正常使用,就像在普通的linux机器上那样.

Where on earth does Android sets 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 .:我已经尝试过[1]中的解决方案,以在wifi开启时启用数据连接,而没有办法.

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

[1] 如何在Android 2.3上启用数据连接

[2] 如何在android中阻止通话->使用ITelephony获取telephonyService.enableDataConnectivity();但我例外.

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

推荐答案

这是不可能的……除非您将不遗余力地使其工作.本质上,您是在要求设备成为路由器.

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.

要执行此操作,您将需要找到一个程序(抱歉,目前无法记住任何名称),该程序可以在普通的Linux发行版上完成此操作.然后重新编译以适合Android OS,然后将其安装到本机系统中.

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.

此说明可能对您更有意义.如果转到ADB Shell并运行netcfg(或ifconfig进行详细说明),您将看到设备的联网选项.您可以运行ifconfig命令来设置设备或更改其状态-但是您不能让多个设备同时在我想不到的时间内路由数据往返电话.

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...

这篇关于在Android上同时启用wifi和3G接口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆