Remove All Ads from XDA
Honor View 10

[Q] Regarding ElementalX Kernel

3 posts
Thanks Meter: 0
By wickedmask, Junior Member on 31st March 2014, 11:40 PM
Post Reply Email Thread
I have a custom USB peripheral that I use to communicate through USB OTG of the tablet. The device is wired in such a way, that I don't use a Y-cable. In the USB line, I have wired it so that the device can either be powered by the tablet, or it can be powered by an external power supply.

Scenario A:
When the USB peripheral device is self-powered, it directs power to itself and sends the power to the tablet as well. The tablet is charging while hosting the peripheral device. The USB connection is still intact.

When the power is pulled, the USB peripheral device shuts off completely. What should happen is when the power is pulled, the tablet should detect this and start supplying power to the USB peripheral. This doesn't happen for some reason, until the tablet is rebooted. When the tablet reboots, it detects that there is a USB device plugged in, and starts supplying power.

Scenario B:
When the USB peripheral is bus-powered, (meaning the tablet is currently supplying power to peripheral device and is currently hosting it), plugging in the power to the peripheral SHOULD start charging the tablet. This doesn't happen. Instead, the tablet continues to discharge.

So basically, I would like the tablet to supply power to the USB device when it detects that the power is gone. Alternatively, when the tablet detects power coming into its port, it should start charging.

Because I custom made the USB peripheral device, I am able to manually force the host to re-enumerate the device by pulling down the 1.5K pullup (hopefully you know which one I am talking about). Do you think this will work? In my application, I wouldn't have access to the OTG adapter and therefore I wouldn't be able to pull it out from the tablet. [That's what he said...]

How would I come to realize in my app that the power is lost and I need to re-initialize a new handle for the USB stream? Suppose I am able to do this, re-initializing the USB port will enable the tablet to start charging again?

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