Remove All Ads from XDA

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

1 posts
Thanks Meter: 0
By Eddiesteveee, Junior Member on 15th June 2014, 07:19 AM
Post Reply Email Thread
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.
15th June 2014, 01:05 PM |#2  
Renate NST's Avatar
Inactive Recognized Developer / Recognized Contributor
Thanks Meter: 1,014
(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.
16th June 2014, 03:45 PM |#3  
E:V:A's Avatar
Recognized Developer
Flag -∇ϕ
Thanks Meter: 2,170
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:
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.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes