Android Question OTG cables and Tablets

jag

Member
Licensed User
Longtime User
The short form..: are some OTG cables able to pass power to a tablet (for charging)?

--

I'm working on a temperature monitoring app: the tablet connects to an external serial device to get data. The connection is through a usb-serial cable, in series with an OTG cable. This part is all working fine.

However, this kind of data collection process can run for days/weeks/months, so the tablet needs
external power (can not run just on battery). I have a couple of tablets - one a Proscan (PLT7223G),
the other a Hisense (Sero 7). The Proscan has a separate power jack for the charger, which makes everything easy. The Hisense charges through the usb port, which makes things awkward.

For the Hisense, I had the bright idea to use a powered usb hub. This actually works quite well -- but only if I'm connecting to a windows pc (through the hub), using a standard usb cable... the tablet can be powered/charging while I'm looking at tablet files from the computer. Unfortunately, if I connect to the serial device (through the hub and OTG cable), the tablet indicates it is *not* charging.

I have only the one OTG cable, and I've found very limited info about this online (it appears the usb
spec allows OTG cables to pass power, but doesn't say they "shall" or "must"). So, my question is:
what experience have others had with this kind of thing? Is it possible to pass power through (some)
OTG cables to a tablet?


thanks,
John
 

jag

Member
Licensed User
Longtime User
NJDude -- thanks for the link! I think I read through that whole discussion,
and followed links to many others. That was quite an education. The term
"information overload" seems appropriate here. :)
This is what I've arrived at...
a) As designed/manufactured, OTG cables can not pass power through to the tablet.
Standard Android (as installed by manufacturers to their tablets and phones) does
not recognize an OTG cable plugged in to the usb port as a possible power source.
b) Modifications can be made to cables and Android to make this work.
- jumper a couple of pins at one end of the cable
- root the the device (tablet/phone)
- install a customised Android kernel to the device
There seems to be a whole cottage industry out there, aimed at customization.

Can you confirm my understanding? Have I missed anything?

I know that the Android world is about portability (thus battery-powered hardware),
but I hadn't realized the depths of that design philosophy. One of the side-effects
of portability is compactness. That's what drew me to the idea of using a tablet
as a data collection device (that, and b4a). Most new/newer tablets will use the
usb port for charging and external power, I don't imagine there are many that use
a separate power connection, like the Proscan. If my users were adventurous enough
to customize their tablets, they'd likely be writing their own software, as well.
It looks like I'm going to have to have a hard think about how far I want to go
down this path.

Thanks again,
John
 
Upvote 0

jmuhammad

New Member
Licensed User
Longtime User
Greetings all,

My first post:) I bought B4A a year ago with the intent of using it on my old Epic4G phone (didn't want to buy a new Android device but wanted to learn Android programming). Well, I abandoned that idea and recently bought a Nexus 7 (2013). I really like it a lot.

Currently running stock 4.4.4 (KK) but I updated the kernel so I now can use OTG and Charge simultaneously. My little setup is Nexus7->OTG Cable w/ charge pigtail->powered USB Hub.
That powered USB Hub has: optical mouse and 64GB flash drive; also using BT Keyboard.

Now, my question(s):
1) For B4A development, I think I need a TypeA(M) to TypeA(M) cable from the hub to the PC so the Nexus7 can talk to the PC for programming/downloading program. Is this correct?

2) I want to develop an app that can send data from the tablet to the PC or to an external device (like a uC board with USB). Do I need a USB null modem USB cable or just a regular TypeA(M) to TypeA(M) USB cable?

3) Will there be any problem developing with this setup (basically I am using the mouse as a pointer, the keyboard instead of the Android on-screen keyboard(s) and the OTG+Charging to keep my tablet charged up while I use it)?
 
Upvote 0
Top