Is there a way to force a network connection over 4G, even when WiFi is enabled and connected?
Asked Answered
M

1

6

I have an app that controls the Sony RX10 camera over WiFi. I need to offload the photos to the server after they're taken, and I feel like I read somewhere that this is possible, but now I can't find it anywhere... The problem is that the camera acts as a router, but it has no access to the Internet. So, the tablet/phone that's connected to it is attempting to transmit the media over that channel but what I need it to do is to use its 4G antenna instead and transmit that way.

Is it possible to force the device to connect to the server (HTTP) over the cellular network even when it's connected via WiFi to something that has no access to the Internet?

Maggee answered 27/6, 2014 at 23:27 Comment(4)
What does offload mean?Hardcore
@fonZ, upload image via HTTP, or in general make an HTTP call to the serverMaggee
Alright, anyway you have to send over a socket. That socket connects to an ip address. Your wifi has an ip and your 4G has another ip. It's up to the one creating the socket to choose the ip correctly.Hardcore
See this answer. requestRouteToHost() seems to be what you are looking for.Unaccountedfor
P
1

Definitely yes. You should use a C code. You should periodically enumerate network interfaces. You should bind a socket per IP address. I have an exaple for iOS, but I shure on Android all things work same. https://gist.github.com/avesus/fdb465b60a4f5204845c

Progress answered 21/4, 2015 at 23:1 Comment(1)
Meanwhile, Android definitely couldn't do the trick. Maybe latest versions only, haven't check that.Progress

© 2022 - 2024 — McMap. All rights reserved.