[Q] How to hack a single micro usb for charging and data transfer at same time

Search This thread

Eddiesteveee

New member
Jun 15, 2014
1
0
Hello guys, I'm trying to interface android tab with peripherals. Problem is, it is having only one micro USB port which is used for charging and otg/host, only one function is possible at a time .But I need to charge the tab and simultaneously transfer data to peripherals, say for example I need to use external mouse and charge the tab at same time.

So, is there any way to do it?
I know usb has 4 pins 5v,d+,d-,gnd. I thought to wire charging input power to tab pin 5v and gnd and pin D+,D-of tab to mouse D+, D- and giving external power supply to 5v and gnd pin of mouse.

Is this a right method? To charge and transfer the data at the same time?
Kindly help me. Suggest a better way to do it.
 

Renate

Recognized Contributor / Inactive Recognized Dev
(mini & micro) USB connectors have 5 pins: Vbus, D-, D+, Id, Gnd.
For OTG, the Id pin is connected to Gnd.

It's like the old adage, "You can lead a horse to water, but you can't make him drink."
You can connect a peripheral to an OTG host and have it work fine.
You can then connect an external power supply across the Vbus and Gnd.
The problem is, how does your host device know that it can "drink"?

There are basically two ways.
If the host detects power on its input before it switches into OTG host mode it may continue to charge.
If the host is in OTG host mode, device-specific commands to the charging circuits may convince it to charge.

There may also be non-standard Id resistor values for signalling host & charge for some devices.
 

E:V:A

Inactive Recognized Developer
Dec 6, 2011
1,447
2,222
-∇ϕ
I think your mileage would vary very much depending on what devices your using. AOS was not meant to deal with people hacking on the USB port, and probably the code to implement those features depend on your HW/FW.
If its a Samsung, you can play with some resistor values like these:
http://xdaforums.com/showpost.php?p=25532839&postcount=2
I think the USB "CarKit" specifications should allow you both to charge and "connect" in some way.

A more easy solution would be to use a BlueTooth mouse and keep charging as usual.