Post Reply

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

15th June 2014, 06:19 AM   |  #1  
OP Junior Member
Thanks Meter: 0
 
1 posts
Join Date:Joined: Jun 2014
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, 12:05 PM   |  #2  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Boston
Thanks Meter: 807
 
1,995 posts
Join Date:Joined: Feb 2012
(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, 02:45 PM   |  #3  
E:V:A's Avatar
Recognized Developer
Flag -∇ϕ
Thanks Meter: 1,801
 
1,347 posts
Join Date:Joined: Dec 2011
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://forum.xda-developers.com/show...39&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.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes