Question How can I enable charging while using usb otg / host mode? - OnePlus 9

Anyone know of a solution or maybe a custom rom that has this feature support?

Or wireless charging maby

datder said:
Anyone know of a solution or maybe a custom rom that has this feature support?
Click to expand...
Click to collapse
Technically it does not make any sense. your device switches to host mode when you plug in an usb stick or sth else. such devices won't deliver any power to your device. but on the contrary such devices need a power source or won't do anything. if your device don't deliver power to a USB stick you won't be able to read/write any data of/to it.

WoKoschekk said:
Technically it does not make any sense. your device switches to host mode when you plug in an usb stick or sth else. such devices won't deliver any power to your device. but on the contrary such devices need a power source or won't do anything. if your device don't deliver power to a USB stick you won't be able to read/write any data of/to it.
Click to expand...
Click to collapse
That doesn't make any sense. So no power in USB host? What about the hundreds of devices that do it, like a cheap fire tv? Many devices would be rendered useless without this ability.
Reason phones dont have the feature is due to having a battery afaik.

TimmyP said:
That doesn't make any sense. So no power in USB host? What about the hundreds of devices that do it, like a cheap fire tv? Many devices would be rendered useless without this ability.
Reason phones dont have the feature is due to having a battery afaik.
Click to expand...
Click to collapse
You know what host mode means? Your phone enters the host mode when plugging in an USB stick or sth else that gets connected by an OTG adapter. Should the USB stick charge my phone??
If you connect two phones then the used cable/the order they get connected will decide which one enters the host mode and powers the other device.

...and if you connect your phone with a PC/laptop/TV/Bluray/Hifi then your phone gets charged because your phone isn't in host mode then.

WoKoschekk said:
You know what host mode means? Your phone enters the host mode when plugging in an USB stick or sth else that gets connected by an OTG adapter. Should the USB stick charge my phone??
If you connect two phones then the used cable/the order they get connected will decide which one enters the host mode and powers the other device.
Click to expand...
Click to collapse
Do you know what a charging OTG cable is? USB stick and charging... What are you talking about?

TimmyP said:
Do you know what a charging OTG cable is? USB stick and charging... What are you talking about?
Click to expand...
Click to collapse
What are you talking about? idk...

Using OTG and charging can work simutaneously, technically... But generally devices don't support that... When you connect OTG, phone goes to host mode and provides power to external device... When a charger is connected, it goes to client mode and can receive power... There are hubs out there that have USB ports, as well as charging port that claim to charge your phone while using devices connected... But they don't work on all devices... I had a tablet long time ago, and it did not support that... It would either charge, or go to OTG mode, but not both....But some folks with different tablets claimed to have that hub working both as OTG as well as charger simultaneously... As far as tablets are concerned, my guess is that this feature could be available more frequently since the need to use keyboard/mouse/other external devices is more for tablets than it is for cellphones... So I think it would not be possible with OnePlus 9's kernel...

Related

[Q] How to enable UMS/Mass storage mode??

Yesterday I made a custom usb Y cable and connected it to a USB OTG adapter to our phone and supplied a external +5v power then connected USB keyboard and mouse both worked.
But when i tried connecting my pen drive it did not shown any sign of life.
I searched and narrowed these methods:
http://www.chinadigitalcomm.com/how-to-mount-usb-flash-drives-t1865.html
http://forum.xda-developers.com/showthread.php?t=1334444
http://forum.xda-developers.com/showthread.php?t=997187
According to these two methods I should get sda1 and sda 2 in dev/block after connecting a USB pen drive but that is not happening.
Then I searched and found out that our kernel should have UMS enabled to mount any usb storage device as stated here:
http://forum.xda-developers.com/showpost.php?p=22597744&postcount=3
I am really confused now, I know I have enabled USB Host mode as usb mouse and keyboard are working but dont know how to modify our kernel to get usb pen drive work.
prasannapmv said:
Yesterday I made a custom usb Y cable and connected it to a USB OTG adapter to our phone and supplied a external +5v power then connected USB keyboard and mouse both worked.
But when i tried connecting my pen drive it did not shown any sign of life.
I searched and narrowed these methods:
http://www.chinadigitalcomm.com/how-to-mount-usb-flash-drives-t1865.html
http://forum.xda-developers.com/showthread.php?t=1334444
http://forum.xda-developers.com/showthread.php?t=997187
According to these two methods I should get sda1 and sda 2 in dev/block after connecting a USB pen drive but that is not happening.
Then I searched and found out that our kernel should have UMS enabled to mount any usb storage device as stated here:
http://forum.xda-developers.com/showpost.php?p=22597744&postcount=3
I am really confused now, I know I have enabled USB Host mode as usb mouse and keyboard are working but dont know how to modify our kernel to get usb pen drive work.
Click to expand...
Click to collapse
you won't be able to modify our kernel with our locked bootloader, but your problem could be elsewhere. the drive requires more power than a mouse or keyboard, so it just may not be getting enough. will your power supply give a full 500mA that is what a normal usb port gives, and is probably overkill for a flash drive, but it would prove whether that is the problem or not.
Does the drive have a light on it that usually turns on when you plug it in? if so, does it come on when you plug it in with your splitter into the phone.
It may be that it is just not supported on our phone, but I think a power problem is much more likely.
EDIT: once you think it is getting power, check for it in /dev/block by running this in terminal emulator. you can check before and after to see what changes, if anything in case it is not named /sdxx
Code:
ls /dev/block
lkrasner said:
you won't be able to modify our kernel with our locked bootloader, but your problem could be elsewhere. the drive requires more power than a mouse or keyboard, so it just may not be getting enough. will your power supply give a full 500mA that is what a normal usb port gives, and is probably overkill for a flash drive, but it would prove whether that is the problem or not.
Does the drive have a light on it that usually turns on when you plug it in? if so, does it come on when you plug it in with your splitter into the phone.
It may be that it is just not supported on our phone, but I think a power problem is much more likely.
EDIT: once you think it is getting power, check for it in /dev/block by running this in terminal emulator. you can check before and after to see what changes, if anything in case it is not named /sdxx
Code:
ls /dev/block
Click to expand...
Click to collapse
That is right, our phone does not provide power on the usb connection, it is a one way charge only, no matter which cable you use, it is an issue with moto's implementation of the USB protocol.
---EDIT---
I do think that I read that someone was able to get it working by using a powered usb hub attached in between the A2 and the usb device. WARNING some assembly/dis-assembly was required!
jimbridgman said:
That is right, our phone does not provide power on the usb connection, it is a one way charge only, no matter which cable you use, it is an issue with moto's implementation of the USB protocol.
Click to expand...
Click to collapse
devices do work as long as you provide external power, which is what he has done. basically you cut the power wires out of the cable and hook them up to a power supply, thus givng the power and giving the data to the phone. Since it supports host mode, it SHOULD work with a flash drive as well as mice, I have heard of people doing it.
lkrasner said:
devices do work as long as you provide external power, which is what he has done. basically you cut the power wires out of the cable and hook them up to a power supply, thus givng the power and giving the data to the phone. Since it supports host mode, it SHOULD work with a flash drive as well as mice, I have heard of people doing it.
Click to expand...
Click to collapse
I know this does not explain it, but it is mentioned that a powered hub is needed.... This person was thinking of making basically a DIY HD doc, and there was someone else on here that has done it too, but I can't find that post and I can't remember the users name.
http://forum.xda-developers.com/showthread.php?t=1462541
A cheap hub will do the job much better, and I have heard of other users having trouble with the otg cable and usb storage.
Just more information to think about and look into.
Try this
https://play.google.com/store/apps/details?id=eu.chainfire.stickmount&hl=en
Motorola lied and I'm still locked mb865
I've tried every single thing that I can to make Usb flash drive work but its something in our software that is restricting it detect any of my storage devices.
I saw one more thread yesterday it was for XOOM which says kernel has to be modified in order to get usb Drives work:
http://forum.xda-developers.com/showthread.php?t=1068999
I now understand that with locked bootloader it will not be possible to modify the kernel so i am abandoning this project and hope we find a way to unlock bootloader soon in the future.
You can try by using a self powered hub which provide power to devices, If it works do post the results as I am also looking forward to use USB HOST feature
john1989 said:
You can try by using a self powered hub which provide power to devices, If it works do post the results as I am also looking forward to use USB HOST feature
Click to expand...
Click to collapse
Ive done this. I have a powerd usb hub, otg cable hooked up and it does not recognize drives or mice. None of it is working. Beginning to think there is not a way to make this work.
It does work when you connect pen drive to lapdock so its not software/firmware/kernel issue.
Easy solution: buy a lapdock or a media dock with usb ports and connect your drive there.
Sent from my MB865 using Tapatalk 2
I did finally get this to work.
One caveat, you have to connect the power directly from the cable to the otg cable. Basically power the hub and the otg cable from one line even though they are connected. This is what did the trick for me.
Ill post pictures when i can if its still foggy.
Sent from my MB865 using xda premium
Rebelj12a said:
I did finally get this to work.
One caveat, you have to connect the power directly from the cable to the otg cable. Basically power the hub and the otg cable from one line even though they are connected. This is what did the trick for me.
Ill post pictures when i can if its still foggy.
Sent from my MB865 using xda premium
Click to expand...
Click to collapse
Update and edit. No automounting at all. Have to use an external program to mount. Been trying to debug this for a while but the OS is not seeing the usb device.
Using USB host diagnostics Android api does not detect the device. Although the claims and classes were found. Kernel is in the green here too. Unfortunitely this makes it so that the USB device cannot be used by 3rd party programs. Still working on figuring this out. I saw a post about shorting out the 4 and 5 line of the microusb cable. Going to try that see where it goes.

[Q] USB: Charge + Use OTG Simultaneously?

Has anyone pulled off using getting USB OTG+Charge mode working on the SHIELD?
I tried to splice in the 5VDC line from the SHIELD charger to a regular OTG cable, and while the charging light on the back of the device lights up orange and the data port works (a connected mouse works fine), Android does not report the device is charging :S Sometimes some devices have needed a resistor across certain pins, but I'm not sure what to try out on the SHIELD yet.
Would be nice to enable this under the TV in console mode, would get GRID streaming, PC streaming over my wired network rather than wireless, as well as all my emulators etc.
I stumbled upon a similar issue but with nexus 7, and there laid the answer. The micro-controller that is capable of switching usb port to OTG mode and backwards in nexus 7 is capable of powering one device at a time. Battery or the one connected through OTG.
Theoretically in nexus 7 it's possible to modify kernel to power it's battery instead instead in OTG mode, and through some powered USB hub, provide power to the external device.
Or to re-solder pins, but its not worth imho.
We can assume that the issue with Shield is similiar.
But we won't be sure until s1 finds Shiled's USB OTG micro-controller tech specs.
Subscribing in the hopes that this will be possible in future
I think If you had something similar to http://www.amazon.com/OEM-UTStarcom...&qid=1392490266&sr=8-1&keywords=usb+y+adapter you could use the charger to power both you usb device and the shield. It will just need to connect power to all 3 ends.
chevyowner said:
I think If you had something similar to (...) you could use the charger to power both you usb device and the shield. It will just need to connect power to all 3 ends.
Click to expand...
Click to collapse
If i am not mistaken in how shield is built - not possible.
Gamperuss said:
If i am not mistaken in how shield is built - not possible.
Click to expand...
Click to collapse
Unless there are diodes on the usb connector on the shield that will prevent power going into the shield while in usb host mode, I do not see why it wont.
I already tried something like this: putting 5V on the power pins when the shield was in OTG mode. Didn't work, the SHIELD didn't recognize the charge in software.
vostok4 said:
I already tried something like this: putting 5V on the power pins when the shield was in OTG mode. Didn't work, the SHIELD didn't recognize the charge in software.
Click to expand...
Click to collapse
Another idea I have for this would not allow charging but it would slow down the rate of battery drain.
I doubt you would find this cable premade, but instead of applying power to the usb otg circuit it would only connect the 2 data wires to the shield, and the 2 power wires to the wall charger. That should allow your usb device to be powered by the wall charger and no the shield allowing the battery to last longer.
Yet another possibility is to add a diode in to circuit to only allow power to flow into the shield on the 5v+ line.
Just an update, support for charging while in OTG is announced with the April update! http://www.geforce.com/whats-new/articles/gtc-2014-nvidia-shield-software-update-announcement
So no hacks needed
Damn,... all the good stuff happens after I've sold my Shield
Can anyone verify this works out of the box now? USB-OTG host mode while the tablet is fast-charging?
I'm looking at doing this for my in-car installation, I posted this over on the geforce forums:
https://forums.geforce.com/default/topic/812455/shield-tablet/shield-in-car-installation-/

USB OTG Host and Charging simultaneously

Considering to use a Huawei Mediapad X2 7.0 for my 2DIN car install, since the dimensions of the tablet are nearly identical to 2DIN,
Therefore I would like to know if the device supports USB OTG Host mode and charging the battery of the mediapad simultaneously using a certain Y cable?
Thanks, much appreciated if you can give it a try!
FrankZZ said:
Considering to use a Huawei Mediapad X2 7.0 for my 2DIN car install, since the dimensions of the tablet are nearly identical to 2DIN,
Therefore I would like to know if the device supports USB OTG Host mode and charging the battery of the mediapad simultaneously using a certain Y cable?
Thanks, much appreciated if you can give it a try!
Click to expand...
Click to collapse
Not sure about OTG Host cum charging combination because my understanding if you use OTG Host mode very likely you plug in a USB OTG thumb drive meaning you cannot charge at the same time.
However connecting the X2 micro USB port via standard USB cable to my laptop, I noticed I could use it as an USB device and it charges at the same time albeit not as as fast as a dedicated charging.
kpcheang2 said:
Not sure about OTG Host cum charging combination because my understanding if you use OTG Host mode very likely you plug in a USB OTG thumb drive meaning you cannot charge at the same time.
However connecting the X2 micro USB port via standard USB cable to my laptop, I noticed I could use it as an USB device and it charges at the same time albeit not as as fast as a dedicated charging.
Click to expand...
Click to collapse
Yes, but not OTG.
I can confirm that, on my side, using an OTG hub with a external power plug, no way to have the device charged by external power when in OTG mode.
It is OTG or Normal charge and functions via USB.
Seems Logical because the Phone is supposed to provide the power to its USB accessories in OTG. Just my HUB has a switch that provide power to those accessories instead of the phone Itself. May-I add that switching this power button on the HUB does not function until you had unplugged & replugged the Hub in the phone after switching between the two modes. I'm afraid of the survival of the Micro USB plug of my phone, on the long run, with all those plugin, unplugin actions !!!
It's possible but with anothere Device the Nexus 7 (2012/2013) with Timurs Kernel. What's the difference of this kernel to the normal kernel, so OTG with charging is working for this device,too.

Root without PC (USB not working)

Hey guys,
Bit of an odd one... My mix 2s wont recognise to my PC, no matter what i do and due to a bug in miui, i dont have quick charge. It's a pretty common bug and theres supposedly a fix, but it requires root.
Im currently running MIUI 10 global 10.0.2.1.0 .
Given i cant unlock my bootloader without my PC connecting, am i stuck, or is there a workaround?
Thank you if you can help
leighaus said:
Hey guys,
Bit of an odd one... My mix 2s wont recognise to my PC, no matter what i do and due to a bug in miui, i dont have quick charge. It's a pretty common bug and theres supposedly a fix, but it requires root.
Im currently running MIUI 10 global 10.0.2.1.0 .
Given i cant unlock my bootloader without my PC connecting, am i stuck, or is there a workaround?
Thank you if you can help
Click to expand...
Click to collapse
Is your cable perhaps broken?
USB accessories commonly use 4 pins/wires: V+ and V- for power supply; D+ and D- for data transferring
Probably your cable, PC or phone port has D+ or D- broken.
Check them out.
I'm pretty secure to say root won't fix it.
I have multiple genuine and aftermarket quality cables.
I know my USB issue sounds hardware, but im quite certain its software based.
Reason is : my mi6 still quick charged and had MTP via pc before i updated it to miui10 as well .
Now i can only quick charge the mi6 when the phone is off.
Thanks for your help all the same
leighaus said:
still quick charged and had MTP via pc before i updated it to miui10 as well .
Now i can only quick charge the mi6 when the phone is off.
Click to expand...
Click to collapse
I'll bite, what type of USB port are you plugging into on your PC?
Usb 2, usb 3, front panel, rear panel... Same result.
Trickle charge. No usb options. Usb debug etc all set
leighaus said:
Usb 2, usb 3, front panel, rear panel... Same result.
Trickle charge. No usb options. Usb debug etc all set
Click to expand...
Click to collapse
If you update yo miui developer update app in the system, do you think that it would solve your issue?
Since your pc does not detect your phone, I don't think that it will fast chare even with the root fix you mentioned. The charger communicates with the phone over the usb data lines, if there is a fault, they can not communicate, therefore no fast charging.. it might be a faulty usb socket or something
I have the same problem. quick charge + OTG not work. please help..
*hard reset + change to antoher cable not solved

otg access to usb and charge tablet at same time

hI everyone in regard to otg using Usb and charging tablet at same time, I have a fusion5 tablet and a usb hub the kind with 3 usb hubs and a power in with a micro usb male plug. and a switch for otg or charge. Ive tried using a potentiometer to find the magic resistor value between pin 4 (the id ) and pin 5 ground of the micro plug.
(thought i had it at one point but not sure) as could play a avi file while charging) However now most of the timee either accesses the usb or charges, I can get it to do both , but stops charging after 8 seconds.
Anybody happen to know if a specific resistance value works for both charging and otg.
I have seen another schematic but havent tried it.
It doesn't sound like the micro usb otg cable to me. I built one without a resistor and mine works just fine. Have a look at your usb settings. Some devices require you select your choice: usb otg or charging.
nastiero said:
It doesn't sound like the micro usb otg cable to me. I built one without a resistor and mine works just fine. Have a look at your usb settings. Some devices require you select your choice: usb otg or charging.
Click to expand...
Click to collapse
Thanks How do I look at my usb settings?. I think I may not have the proper resistor setting as will currently provide power to usb and charge at same time for a few seconds then stops charging.. I turn resistance up it will charge , turn it down and will allow access to usb.. i think have to find that magic number inbetween.
jmxda21 said:
Thanks How do I look at my usb settings?. I think I may not have the proper resistor setting as will currently provide power to usb and charge at same time for a few seconds then stops charging.. I turn resistance up it will charge , turn it down and will allow access to usb.. i think have to find that magic number inbetween.
Click to expand...
Click to collapse
Depending on which phone and version of Android you have, the most recent versions of Android have the USB settings under Developers Options.
The USB OTG charging works differently from phone to phone. Sometimes you must plug your charger cable and the USB device you want to connect to into the OTG cable prior to plugging the OTG cable into your phone. This way the phone detects charging and device.
nastiero said:
Depending on which phone and version of Android you have, the most recent versions of Android have the USB settings under Developers Options.
The USB OTG charging works differently from phone to phone. Sometimes you must plug your charger cable and the USB device you want to connect to into the OTG cable prior to plugging the OTG cable into your phone. This way the phone detects charging and device.
Click to expand...
Click to collapse
Yes that is what I have been doing . In developer options under Usb default , no charge option there, only file transfer, USB tEThering, MID, PTP ,and o data transfer
I thanks. However i believe the default USB option is charge as thats what it is when i plug in USB to a powered cable.
. As I said jt works for A short time using USB and charging at same time with resistor between 45K and 68k
then either stops charging and continues usb or keeps charging but gives usb errrors or cant access usb but continues charging.
Fusion5 tablet android 9
Update this works fine with unmodified USB hub or charge power and USB on my LG k32 phone but not on the fusion ta blet.

Categories

Resources