Build an Impractical But Awesome Lego Mindstorm Dock

The vast majority of what we cover here on the XDA-Developers News Portal relates to … more

MultiROM Makes its Way Over to the HTC One (M8)

While browsing our forum, you will undoubtedly find more than a few enticing ROMs available … more

Welcome to the New XDA-Developers Portal!

You may recall that a few weeks ago, we opened up the XDA-2015 forum themesto intrepid users … more

An Android Enthusiast’s Apple iPhone 6 Challenge

The media has gone batty again over Apple “revolutionizing” smartphones. … more
Post Reply

[how to] usb otg + charging

19th August 2014, 06:47 PM   |  #1  
OP Senior Member
Flag Southern NH
Thanks Meter: 212
 
104 posts
Join Date:Joined: Feb 2012
Donate to Me
More
EDIT!! MADE APK USING TASKER TO WRITE TO FILE FOR YOU. CAN TURN OTG CHARGE ON AND OFF.
APK HERE root required

I was trying for a while to set up my Nexus 7 to charge while using an OTG device. This is what worked for me.

HARDWARE
I made the cable entirely.

I used two USB male ends, a female-to-female USB mating adapter and one micro USB male end.

I converted the micro usb into an OTG enabled micro usb using the instructions below.
http://tech.firstpost.com/news-analy...one-29503.html

I used shrink-wrap to permanently affix a female-to-female adaptor to one of the usb male ends, making it female.

So I ended up with a regular male plug "POWER" plug a female outlet "OTG PLUG" and a "MICRO USB" end, which plugs in to the tablet
You could use a Y adapter and an OTG cable. You would need to cut a couple wires inside

I don’t feel like writing up a step by step, so in the simplest terms, You take an OTG cable, and splice in the POWER (BLACK, and RED) wires. You leave the data, and shield wires disconnected.

SPLICE WIRES AS FOLLOWS;
MICRO_USB_->___OTG_PLUG_END->POWER_END
RED________->RED______________->RED
BLACK______->BLACK____________->BLACK
WHITE______->WHITE____________->DISCONNECTED
GREEN______->GREEN___________->DISCONNECTED
UNSHIELDED_->UNSHIELDED______->DISCONNECTED




Software
I am using a custom 4.4 rom (I do not believe this is necessary)
I am using M-Kernel a69 (I do not know if this is necessary either)

Using ES File Explorer, with "root Explorer" set to "YES" navigate to "sys/module/tegra_otg/parameters"
Find the file "tegra_otg_on_charging"
Open it using your preferred text editor, or use the built in one provided by ES File Explorer
Change the "N" to a "Y"
Save the file, (It will not save correctly if you did not turn on "root explorer" option in ES File Explorer)
Now it works for me, the OTG device will be powered by the charger, not tablet.

I have to plug the OTG device, and power in first, then hook it up to the tablet.

Sorry for the sloppy write up, usually I am very detailed and thorough... I am just not in the mood today. Maybe I will come back later, after working with this for a but with updates, and a more thorough write up.
Attached Files
File Type: apk OTG_Charge_For_TEGRA.5.apk - [Click for QR Code] (1.02 MB, 32 views)
Last edited by FuzzyMeep Two; 22nd August 2014 at 03:49 PM.
The Following 2 Users Say Thank You to FuzzyMeep Two For This Useful Post: [ View ]
21st August 2014, 11:44 PM   |  #2  
Junior Member
Thanks Meter: 3
 
21 posts
Join Date:Joined: Dec 2012
Quote:
Originally Posted by FuzzyMeep Two

I was trying for a while to set up my Nexus 7 to charge while using an OTG device. This is what worked for me.

HARDWARE
I made the cable entirely.

I used two USB male ends, a female-to-female USB mating adapter and one micro USB male end.

I converted the micro usb into an OTG enabled micro usb using the instructions below.
http://tech.firstpost.com/news-analy...one-29503.html

I used shrink-wrap to permanently affix a female-to-female adaptor to one of the usb male ends, making it female.

So I ended up with a regular male plug "POWER" plug a female outlet "OTG PLUG" and a "MICRO USB" end, which plugs in to the tablet
You could use a Y adapter and an OTG cable. You would need to cut a couple wires inside

I donít feel like writing up a step by step, so in the simplest terms, You take an OTG cable, and splice in the POWER (BLACK, and RED) wires. You leave the data, and shield wires disconnected.

SPLICE WIRES AS FOLLOWS;
MICRO_USB_->___OTG_PLUG_END->POWER_END
RED________->RED______________->RED
BLACK______->BLACK____________->BLACK
WHITE______->WHITE____________->DISCONNECTED
GREEN______->GREEN___________->DISCONNECTED
UNSHIELDED_->UNSHIELDED______->DISCONNECTED




Software
I am using a custom 4.4 rom (I do not believe this is necessary)
I am using M-Kernel a69 (I do not know if this is necessary either)

Using ES File Explorer, with "root Explorer" set to "YES" navigate to "sys/module/tegra_otg/parameters"
Find the file "tegra_otg_on_charging"
Open it using your preferred text editor, or use the built in one provided by ES File Explorer
Change the "N" to a "Y"
Save the file, (It will not save correctly if you did not turn on "root explorer" option in ES File Explorer)
Now it works for me, the OTG device will be powered by the charger, not tablet.

I have to plug the OTG device, and power in first, then hook it up to the tablet.

Sorry for the sloppy write up, usually I am very detailed and thorough... I am just not in the mood today. Maybe I will come back later, after working with this for a but with updates, and a more thorough write up.





I would like to try this, but I have no file tegra_otg/parameters in the sys/module folder. I used ES file explorer and have root explorer turned on.
I am on kitkat 4.4 rooted. Any idea?
22nd August 2014, 01:21 PM   |  #3  
OP Senior Member
Flag Southern NH
Thanks Meter: 212
 
104 posts
Join Date:Joined: Feb 2012
Donate to Me
More
Quote:
Originally Posted by Old Guy

I would like to try this, but I have no file tegra_otg/parameters in the sys/module folder. I used ES file explorer and have root explorer turned on.
I am on kitkat 4.4 rooted. Any idea?

Try installing m kernel.

The file may have been created by an app I tried beforehand. You could try making the folders and file, and see if that does anything.

This is still preliminary right now, and has a few bugs. One big one is, the file resets on reboot. Another is that if I unplug my USB mouse, while leaving the otg plugged in to the wall and tablet, then replug it in quickly, the tablet will freeze and reboot.

I am working on a tasked script to prompt you for otg or otg charge when you plug the cable in right now.
22nd August 2014, 03:06 PM   |  #4  
OP Senior Member
Flag Southern NH
Thanks Meter: 212
 
104 posts
Join Date:Joined: Feb 2012
Donate to Me
More
update
Update.

So I have learned a few things

1. If you plug in a device in regular otg mode it will stay in that mode until you reboot.
2. You need to switch to otg plus charge before plugging in your tablet
3. If you remove the device while the tablet is still plugged in and power is provided, then replug the device the tablet will some times freeze.
4. If you hold the . button on the soft keyboard the tablet it writes "Ö" (not relevant, but I didn't know that)
5. You can switch from charge plus otg to regular otg, but need to reboot to switch back.
6. It only charges at about 2/3 regular speed, so depending on what you're doing your battery may still drain, but slower than it would otherwise.
7. You can plug in the device to power first then plug in the tablet BUT!!!! if this is not working,plug the device in,then the tablet, then connect power.


So, I made a tasker script to prompt me for regular or otg plus charge when the device boots. You pick the option you want then plug in atccordingly.

This still needs work, but I will keep at it, and hopefully some of you will help as well.
Last edited by FuzzyMeep Two; 22nd August 2014 at 03:12 PM.
22nd August 2014, 03:48 PM   |  #5  
OP Senior Member
Flag Southern NH
Thanks Meter: 212
 
104 posts
Join Date:Joined: Feb 2012
Donate to Me
More
Quote:
Originally Posted by Old Guy

I would like to try this, but I have no file tegra_otg/parameters in the sys/module folder. I used ES file explorer and have root explorer turned on.
I am on kitkat 4.4 rooted. Any idea?

made an apk to write to the file for you.. needs superuser
22nd August 2014, 11:29 PM   |  #6  
Junior Member
Thanks Meter: 3
 
21 posts
Join Date:Joined: Dec 2012
Quote:
Originally Posted by FuzzyMeep Two

made an apk to write to the file for you.. needs superuser


Thanks for writing the apk. Think I will wait until you get the bugs worked out in your script.
Looking forward to progress on this .
One question, when you say it is rewriting the file on reboot. is it just changing the Y back to N?

Thanks again
Dennis
Last edited by Old Guy; 22nd August 2014 at 11:38 PM.
23rd August 2014, 01:39 AM   |  #7  
USBhost's Avatar
Senior Member
Flag In your Phone / SBNF
Thanks Meter: 702
 
1,389 posts
Join Date:Joined: Oct 2013
More
can you give me the xml file

Post Reply Subscribe to Thread

Tags
charge, otg, otg + charging, otg charging usb, usb otg
Previous Thread Next Thread
Thread Tools
Display Modes


Top Threads in Nexus 7 Q&A, Help & Troubleshooting by ThreadRank