• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help OTG connection disable mobile data

rubazig

Lurker
Jan 18, 2023
9
7
Hello there!! I´m working on a project with samsung S7 tablets that requires ipcameras connected via otg cable .What happens is when i connect the cameras via otg andoid automatically disables the mobile data from the tablet, but i need it to keep working, because i have to use the internet to run my app. It´s an app that runs in vehicles, so i don´t have wi-fi available,..Any suggestions on how i can connect the camera via otg cable and still use my 4g connection?? Thanks a lot!!!
 
Hello there!! I´m working on a project with samsung S7 tablets that requires ipcameras connected via otg cable .What happens is when i connect the cameras via otg andoid automatically disables the mobile data from the tablet, but i need it to keep working, because i have to use the internet to run my app. It´s an app that runs in vehicles, so i don´t have wi-fi available,..Any suggestions on how i can connect the camera via otg cable and still use my 4g connection?? Thanks a lot!!!

It should work like that. Is it actually turning off the tablet's cellular 4G data, like it's switching the tablet into flight mode or something?
 
Upvote 0
OK but you're dealing with two different ways for your Tab 7's online connectivity. One is WiFi and the other mobile data (cellular) -- WiFi is sourced from your router, with is itself getting its online connection from your ISP's modem so it's a local network; conversely mobile data is sourced from your carrier's cellular network, all provided by various cell towers/access points when you're traveling elsewhere. Your home network, managed and maintained by your router is essentially isolated from online connectivity or in other words, online access is all going through that single connection between the router and the modem. Presumably your IP cameras are connected to that same local network so they're not directly connected to a cellular service. Or do your own IP cameras that do include cellular connectivity?
The issue being when you're at home, all the interactions being done between your Tab 7 and your IP cameras are through your home, local network. When you're not at home however, that leaves your IP cameras still just connected to your home network, but your Tab is now using a different, cellular connection for its online access. So again it depends on if your IP cameras include support for cellular connectivity (often requires setting up an user account to use their online storage services) or just WiFi
 
Upvote 0
Thank you for your reply. Actually it is a lot more simple than that. These tablets are installed inside law enforcement vehicles, i don't have two sources of internet, only the 4g sim card from the tablet. All i have is a PoE injector that provides power to a ip camera and a router ( withouy modem or 4g ). I connect the camera to the router and than to the tablet via a otg adapter . It works just fine, i can get the video feom the camera, but at this point android disables the only internet i have, the 4 g from the tablet. What i am trying to figure out is a way to avoid that to happen. Since the otg cable comes from the router, Android "understands" there is a internet source and disables the mobile data.
 
Upvote 0
Is the router supplying power for the PoE injector, so it can power the camera? or is the PoE injector powered by external wiring to a power supply?

Have you tried a camera with an external 12v power supply?

Your OTG cable just goes from USB A to USB C? or something like that?

I'm pretty sure I understand how you have this wired, but could you draw a simple schematic?

Thanks!
 
  • Like
Reactions: ocnbrze
Upvote 0
Thank you! Yes, the PoE injector is powered by a external power supply, and the PoE injector powers the camera. In this scenario i don't even need a router, It works perfectly. The other PoE injector end, also a RJ45, connects straight to the tablet. I can access the camera easily, but when i do that the android itself disables the mobile data on the tablet and i can't use the internet to run my app. So i can access and get images from the camera, but without the tablet 4g connection...thank you again..
 
  • Like
Reactions: ocnbrze
Upvote 0
Okay, I'm a little confused now. This is why a simple schematic helps

The RJ45 connection off the PoE injector plugged directly into the tablet RJ45 slot kills the 4G in the tablet? correct? That makes sense. The tablet see the RJ45 connection as a network connection

You added a router between the camera and the tablet so you could use a USB otg cable from the router to the tablet? correct? and that still kills the tablet 4G internet?
 
  • Like
Reactions: ocnbrze
Upvote 0
The RJ45 connection off the PoE injector plugged directly into the tablet RJ45 slot kills the 4G in the tablet? correct? That makes sense. The tablet see the RJ45 connection as a network connection..
Thats exactly what is happening...i don't have a router and don't want to have one. It works just fine the way you described above, but it kills the 4 g. I'm trying to find out if there is a option on android that allow me to plug the RJ 45 and keep the 4g working....thank you!!
 
  • Like
Reactions: ocnbrze
Upvote 0
Yes, the tablet has bluetooth, but these are very specific lpr cameras, i can't substitute for other kind. I still believe there is a way to avoid android from killing 4g when a network cable is connected.

Understood. Maybe a script can be written so the RJ45 connection doesn't kill the tablet 4G

The only other thing I can think of that may help you is the adapters that Verizon and T-Mobile sell that gives your car internet. It plugs into the cars onboard diagnostic reader and makes the car a WiFi hotspot. Then you wouldn't need the 4G off the tablet. Just a thought

https://www.t-mobile.com/iot-devices/syncup-drive-connected-car

Good Luck!
 
  • Like
Reactions: ocnbrze
Upvote 0
Thank you for your reply. Actually it is a lot more simple than that. These tablets are installed inside law enforcement vehicles, i don't have two sources of internet, only the 4g sim card from the tablet. All i have is a PoE injector that provides power to a ip camera and a router ( withouy modem or 4g ). I connect the camera to the router and than to the tablet via a otg adapter . It works just fine, i can get the video feom the camera, but at this point android disables the only internet i have, the 4 g from the tablet. What i am trying to figure out is a way to avoid that to happen. Since the otg cable comes from the router, Android "understands" there is a internet source and disables the mobile data.

OK, that does clarify things quite a bit. I was misinterpreting how you were connecting your tablets to your webcams. So yeah, you just need to keep your cellular access enabled whether you are or aren't using that USB-OTG-PoE router setup.

There is a 'Mobile data always active' option that might be buried in your tablet's Developers Options menu. Developers Options is an integral feature in Android, it's just typically hidden so users need to intentional reveal it so it will be on your Samsung tablets, it's more a matter of if Samsung did or did not include that particular 'Mobile data always active' option on your tablets. (Different manufacturers opt to include or leave out some of those options so don't be surprised if you don't see it at all. On a OnePlus phone I just checked it's named 'Mobile data always active' on a Moto phone it's 'Cellular always active' so be flexible as to its wording.)
https://www.blogtechtips.com/2015/01/07/enable-developer-options-android/
https://www.blogtechtips.com/2018/01/07/enable-or-disable-keep-mobile-data-turned-on/
Try it and see if makes any difference.
Also, since these tablets apparently don't need WiFi connectivity you should check that WiFi is just disabled. That might also help -- the thing is by default Android is set up to prefer WiFi connectivity over cellular connectivity. It's an automatic function with the purpose becoming less relevant. Back when mobile data was a more expensive, charge-for-usage matter it was cheaper to use WiFi whenever possible. Now that unlimited, or here in the real world where data caps are actually implemented but with relatively generous upper limits, it's not a big a priority. But anyway, by disabling WiFi that could possibly affect that USB-OTG networking aspect as far as routing functionality and IP address allocation. Also, since you don't need that background process always running in the background you might as well be sure that it's disabled, and you can always just enable it again if there's some need when the tablets are getting serviced or whatever.
 
  • Like
Reactions: ocnbrze
Upvote 0
Hello!! Just to let you know that unfortunatelly choosing to keep mobile data always active didn't solve the problem. It works only for wi-fi / 4g, but not in my case. When i connect the camera via rj45/otg adapter it kills mobile data (4g ) instantly..too bad, i can't use the correct camera with my app because i really need internet ...
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones