Simplest adapter resistors to charge a phone while the phone is an OTG host

chargingusbusb-c

I tried to make a micro USB to USB-C adapter by making the connections shown with red lines below (so 11 of the 24 USB-C pins are used and other pins float). This is the view looking into the USB-C plug (as if you are the matched USB-C receptacle) and the 4 connections at the top connect to the GND, VBUS, D-, and D+ on the micro-USB receptacle (ID floats).

My USB-C phone then charges, but unfortunately does not notice when a keyboard gets connected to the micro USB (through a normal OTG hub with charging). For me, the spec isn't clear about data because it focuses more on power delivery…should I really not get data with this setup? If not, can I add an "Ra" resistor on VCONN (or some other pin) to get data? Sorry if I'm the only one who can't read the spec well, but I'm just trying to find the cheapest way to charge and use a keyboard simultaneously.

(For the record, adding a 5kohm resistor from CC1 to GND makes the micro USB keyboard work, but then I cannot simultaneously charge the phone.)

enter image description here

Best Answer

What you need is called "accessory charging device".

When making "initial connection", by default of CC pins pulls the power role as source is associated with host function, and sink is associated with device function. When a dual-role device flips it advertising from source to sink and back, the data role switches accordingly.

There is no way to keep the data role and reverse it the sink/source role by means of resistors alone. If a device supports host mode but needs charging, the only way is to use Power Delivery communication. Both link partners must re-negotiate the power contract by exchanging "Structured VDM" messages, DR_Swap in particular. Sorry for the inconvenience :-)

Related Topic