I have a device which does not support a USB hub, and does not supply power. I need to connect my phone to this device, and unfortunately this means I cannot also charge the phone while using it.

I tried the simple, naive approaches of:

  • Trying a self-powered hub; the host device does not support a hub.
  • Trying to supply power directly by severing the power lead from the device to the phone; the USB-based power negotiation tells the phone no power is available, and it won't charge.
  • Shorting the data pins initially to cause the phone to charge, and then opening them up. As expected, this means it will not talk to the host device.

My thought is I need something that acts almost like a hub, but passes through all USB protocol messages other than those used for power negotiation, and will terminate those to cause power to be supplied.

Is there such a device?

migrated from electronics.stackexchange.com May 25 '17 at 17:23

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

  • I'm not sure this should have been moved; I suspect the outcome will be some custom chip, small uP or something that does this, while superuser is more intended for finished hardware solutions. – Michael Graff May 25 '17 at 17:25
  • The fundamental issue is that this is a problem likely requiring deep engineering-level detail, but asked from a very superficial end-user perspective with none of the required information provided. SE policy is not to migrate unanswerable questions, it should have simply been closed. – Chris Stratton May 25 '17 at 17:28
  • What you want is most probably impossible. The host side of the link has to provide power to the link, and the device side of the link is not allowed to provide power. Therefore when a host-type cable is connected to your smartphone, it changes into host mode, and will not expect to be powered from the link. – Laszlo Valko May 25 '17 at 22:54
  • @LaszloValko, this very well could be what is happening. However, the remote for the drone is either in host or client mode from what I can tell, and it appears to be acting as a host in this case. The phone tries to charge for a brief moment, then stops. – Michael Graff Jun 2 '17 at 21:50

You did solve the first part of problem, by compensating the design deficiency of your "device" USB port, by providing external power (VBUS) to the link. This is a fairly legitimate solution.

The second part (charging while connecting as USB device) is more challenging.

The solution will depend on what kind of port charging signature does your PHONE understand while maintaining data link protocol. Does it ever charge when plugged into any normal USB port of a PC, or working hub?

If it fails to charge from a normal data port (taking 500mA and charging, but maybe slowly), then you need to try a "Battery Charging" (BC1.2) port, if you can find one. If your phone does support/recognize BC1.2 charging signature, you will need to make your own device, a BC1.2 add-on emulator between your phone and your special "device".

  • In this case, it's an iPhone 6s, which will charge (or at least not drain as fast) from a 500 mA capable port. I've not connected it directly to a BC port, but I have built a small test on the bench, and using the proper voltage dividers to tell the phone 2 A is available, I've seen it drawing approximately 1.8 A. – Michael Graff Jun 2 '17 at 21:52
  • @MichaelGraff, so you did provide the static "Apple signature", and the phone starts charging (as it should, it assumes that it is connected to a legitimate charger). However, to be connected to USB data link, you need to switch to normal USB connectivity. In PC space there is so-called "accessory charging mode", when the OTG host is turned to a sink while acting as USB host, all done outside USB protocol. In Apple space I believe it must be done on USB protocol level, MacBooks ask if you want to "sync" after iPhone is connected and is charging. How it is done, I don't know. – Ale..chenski Jun 2 '17 at 23:29
  • @MichaelGraff, ADDITION: it looks like Apple has abandoned the classic USB3.0 ability to charge and sync. Now it must be done over Type-C port, with all bells and whistles of USB Power Delivery protocol. Good luck with implementing that on "your device". – Ale..chenski Jun 2 '17 at 23:36
  • Ali Chen, in this case just applying the external +5 VDC power causes the phone to start charging, but then immediately stop as soon as it is enumerated. I think this is the host port telling it there is no power available for it, the 500 mA non-configured port limit be damned. If I do not connect the data lines, I get 500 mA charge, and until it's enumerated, it does charge. – Michael Graff Jun 8 '17 at 19:47
  • I know the challenges of trying to intercept and replace part of the USB protocol and still allow high data rates to pass over the same lines. I think the best solution here would be to convince the hardware manufacturer to allow a USB hub to be plugged into their device, at which point I can quite easily power a hub from a battery, and the phone will charge normally. – Michael Graff Jun 8 '17 at 19:49

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.