[英]How to use 3G network when connected to a WiFi network with no internet access?
sometimes I have to connect my Nexus 5 to a WiFi network only to share some files with other devices, but this network does not have Internet access. 有时,我仅需要将Nexus 5连接到WiFi网络即可与其他设备共享某些文件,但是该网络无法访问Internet。 I would like to use 3G for data connection while the phone is connected.
连接手机后,我想使用3G进行数据连接。 Obviously I have root access.
显然,我具有root用户访问权限。 Is there any way to achieve this?
有什么办法可以做到这一点? (Not necessary a simple way)
(没有必要简单的方法)
My phone isn't rooted and I don't have a shell installed on it to test, but off the top of my head maybe this could help? 我的手机没有植根,也没有安装外壳进行测试,但是从我的头顶掉下来也许有帮助吗?
route -n
- determine what routes are available route -n
确定哪些路由可用
route add default gw <<ip address>>
- replace with the gateway's IP address that you want to be the default. route add default gw <<ip address>>
-用您想要成为默认网关的IP地址替换。 Make sure to run this command as root or with sudo. 确保以root或sudo身份运行此命令。
I'm not familiar with Android shell access or the internals of how Android manages its networking. 我不熟悉Android Shell访问或Android如何管理其网络的内部知识。 For all I know, the entire 3G Internet connection may shut down by default when you are on wifi.
据我所知,当您使用wifi时,默认情况下,整个3G Internet连接可能会关闭。 If all else fails, you could also consider a "mobile hotspot" app for your phone, and have the devices connect to you (as a bonus, they would have Internet access too).
如果所有其他方法都失败了,您还可以考虑将“移动热点”应用程序用于手机,并让设备与您连接(作为奖励,它们也可以访问Internet)。
More information on viewing default gateway with route command 有关使用route命令查看默认网关的更多信息
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.