How to Fix the Nexus Available Storage Bug – XDA TV

Is your Nexus device only showing half of the available storage as it should? Many … more

Don’t Forget About Birthdays with Birthday Reminder

A person’s birthday is, without a doubt,one of the most important days in his … more

Don’t Fear Flashing with I Don’t Want You!

The XDA message boards are full of various modifications, with many of these helping … more

Quo Vadis, Open {Source, Standards, World}? w/ Jan Wildeboer – XDA:DevCon 2014

Open Source was a big topic at this years XDA:DevCon … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[how to] usb otg + charging

OP FuzzyMeep Two

19th August 2014, 07:47 PM   |  #1  
OP Senior Member
Flag Southern NH
Thanks Meter: 223
 
108 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, 197 views)
Last edited by FuzzyMeep Two; 22nd August 2014 at 04:49 PM.
The Following 2 Users Say Thank You to FuzzyMeep Two For This Useful Post: [ View ]
22nd August 2014, 12:44 AM   |  #2  
Junior Member
Thanks Meter: 4
 
25 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, 02:21 PM   |  #3  
OP Senior Member
Flag Southern NH
Thanks Meter: 223
 
108 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, 04:06 PM   |  #4  
OP Senior Member
Flag Southern NH
Thanks Meter: 223
 
108 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 04:12 PM.
22nd August 2014, 04:48 PM   |  #5  
OP Senior Member
Flag Southern NH
Thanks Meter: 223
 
108 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
23rd August 2014, 12:29 AM   |  #6  
Junior Member
Thanks Meter: 4
 
25 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; 23rd August 2014 at 12:38 AM.
23rd August 2014, 02:39 AM   |  #7  
USBhost's Avatar
Senior Member
Flag u:r:usbhost:s0
Thanks Meter: 1,241
 
2,670 posts
Join Date:Joined: Oct 2013
More
can you give me the xml file
3rd November 2014, 09:10 PM   |  #8  
OP Senior Member
Flag Southern NH
Thanks Meter: 223
 
108 posts
Join Date:Joined: Feb 2012
Donate to Me
More
Update.
just a quick update. Some USB devices will activate OTG charge, while others will not. Every mouse i have tried does, but some others, like thumb drives do not. I am pretty sure this has to do with the resistance between the data lines upon connecting the device, but am not positive.

Also, on occasion, when unpluggung, replugging, and playing with the OTG charge on/off, my device will reboot.
13th December 2014, 12:56 PM   |  #9  
Junior Member
Thanks Meter: 0
 
2 posts
Join Date:Joined: Dec 2014
alternative way
http://forum.xda-developers.com/show....php?t=2558717

Found this kernel when timurs became unavailable. Hope this saves someone else time hunting.

Works with nexus 7 2012 on 4.3 and cyanogen. I used the basic version.

Charge and use usb devices (lan cable too with bobjgear adapter!) simultaneously via Y cable.

Post Reply Subscribe to Thread

Tags
charge, otg, otg + charging, otg charging usb, usb otg
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes