Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,783,129 Members 45,665 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
Eddiesteveee
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 1
Join Date: Jun 2014
Storage [Q] How to hack a single micro usb for charging and data transfer at same time

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 NST
Old
#2  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 794
Posts: 1,971
Join Date: Feb 2012
Location: Boston
(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
Old
#3  
E:V:A's Avatar
Recognized Developer
Thanks Meter 1,764
Posts: 1,334
Join Date: Dec 2011
Location: -∇ϕ
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.
MSM8960 Info, Architecture and Bootloader(s)
El Grande Partition Table Reference
How to talk to the Modem with AT commands

[REF][ServiceMode] How to make your Samsung perform dog tricks
[REF|R&D|RF] RF/Radio properties of Samsung ServiceMode

Want to know when your phone is getting tracked or tapped?

Help us develop the IMSI Catcher / Spy Detector!
(To be part of the EFF & The Guardian Project toolsets.)
_______________________________
If you like what I do, just click THANKS!
Everything I do is free, altruism is the way!
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
I do not answer support related PM's.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes