Nexus 7 2013 Timur's Kernel USB OTG + Charging is here

Status
Not open for further replies.
Search This thread

ChocoboX

Senior Member
Sep 6, 2010
65
5
Mod edit: Op removed, see the last post of the thread.
 
Last edited by a moderator:

TabletNoob

Member
Jan 3, 2012
18
1
Guys, its really great ROM for car, its better (and cheaper) than any double din on market!

The new nexus 7 has better performance and screenn so its should be Significant upgrade.

Please, feel free to supports this campaign :)
 
  • Like
Reactions: ChocoboX

kingston73

Senior Member
Feb 8, 2011
2,256
516
I read the links and I guess I'm just slow. Could you explain what this is exactly?
 

flar2

Recognized Developer
Jun 11, 2012
18,856
87,857
Southwestern Ontario
elementalx.org
Timur's ROM USB OTG + Charging, allows USB devices to be connected while charging the tablet at the same time. Basically, his rom is meant for Nexus 7 in-car installation. It manages USB devices, deep sleep, etc.
http://mehrvarz.github.io/nexus-7-usbrom/

Timur has started an Indiegogo campaign to raise funds to start working on his rom for Nexus 7 2013 model

If anyone would like to pledge their support to create the ROM please use the following link:
http://www.indiegogo.com/projects/usb-rom-nexus-7-2013

I'll hold off buying the new Nexus 7 till I see USB OTG + Charging done. If not I may just go ahead and get 2012.

You can do OTG + charging with version 1.6 of ElementalX kernel: http://forum.xda-developers.com/showthread.php?t=2389022
 

flar2

Recognized Developer
Jun 11, 2012
18,856
87,857
Southwestern Ontario
elementalx.org

hagensieker

Senior Member
Oct 7, 2013
54
9
I use this the USBROM and Timur Kernel on two Nexus 7 2012's. It is fantastic (for me) as I use my tablets hooked to a DAC and charge at the same time.

The latest Cyanogen Mods for Nexus 7 2013 support the installation of a USB Dac however you can't charge. I solved the problem by using the Qi wireless charging system and bought a Nexus 4 wireless charging orb. Works perfect for the Nexus 7.

I'm a big fan of this guys work. Looking forward to it.

John
 

flar2

Recognized Developer
Jun 11, 2012
18,856
87,857
Southwestern Ontario
elementalx.org
Good news! But the ROM can keep connections to USB devices after the tablet goes to deep sleep so when the tablet comes back from deep sleep there are no problem with USB devices plugged-in. Do you happen to know if that's supported?

So I take it the problem is that power is removed from the usb peripheral when it goes to sleep and the state is lost when it wakes up?

I tested with stock and that's what happens.

When it's in usb host charge mode, the usb peripheral will resume normally as long as power is maintained. So, if I connect a power source and a usb stick to a y-cable, then plug it into the tablet with the OTG adapter, charging starts and the usb stick is automatically mounted by Stickmount. I start a movie that's on the usb stick, then I press power to put the tablet to sleep. Wait for a minute. It's still charging, so not in deep sleep. Turn it back on and the movie starts back up no problem. But like with stock, if power is removed, the usb stick no longer works.

I'll have to take a look at this with debugging turned on.

From what I remember, the shorted 4-5 pin on the OTG cable triggers host mode, then the otg driver uses vbus to sense when another usb device is connected. As soon as it senses 5V, it tries to connect with the peripheral device. I'm guessing when the 5V is taken away, it disconnects the device immediately and it loses state.

I might be able to do something about this.
 

hagensieker

Senior Member
Oct 7, 2013
54
9

FauxDreams

Senior Member
Sep 9, 2013
81
42
35
Melbourne
So I take it the problem is that power is removed from the usb peripheral when it goes to sleep and the state is lost when it wakes up?

I tested with stock and that's what happens.

When it's in usb host charge mode, the usb peripheral will resume normally as long as power is maintained. So, if I connect a power source and a usb stick to a y-cable, then plug it into the tablet with the OTG adapter, charging starts and the usb stick is automatically mounted by Stickmount. I start a movie that's on the usb stick, then I press power to put the tablet to sleep. Wait for a minute. It's still charging, so not in deep sleep. Turn it back on and the movie starts back up no problem. But like with stock, if power is removed, the usb stick no longer works.

I'll have to take a look at this with debugging turned on.

From what I remember, the shorted 4-5 pin on the OTG cable triggers host mode, then the otg driver uses vbus to sense when another usb device is connected. As soon as it senses 5V, it tries to connect with the peripheral device. I'm guessing when the 5V is taken away, it disconnects the device immediately and it loses state.

I might be able to do something about this.

Does your Kernel support a USB DAC/AUdio?
If so, It means this weekend I can finally put my N7 2013 into my car.
I've been holding off as I've been waiting for USB DAC + OTG Charging so it can be permanently mounted in the car.

Cheers
Mat
 

TabletNoob

Member
Jan 3, 2012
18
1
Does your Kernel support a USB DAC/AUdio?
If so, It means this weekend I can finally put my N7 2013 into my car.
I've been holding off as I've been waiting for USB DAC + OTG Charging so it can be permanently mounted in the car.

Cheers
Mat

Hi,
USBROM has powerevent manager that "care" to disconnect\reconnect the devices when no voltage on usb line,
i think you will have to restart the device each drive.

in addition, take a look at N7 2012 rom features.
the most of features are really necessary for car install.
 

goofball2k

Senior Member
Oct 5, 2010
1,571
459
Ottawa
That is great news. I'm a guy who would use that feature. Just tried to install ElementalX on top of CM10.2 latest nightly and it doesn't work but I can confirm this works on top of AOKP ROM

In his directions it must be manually enabled though. But it works like a champ!

flar2 (another ottawan! hi!) has stated in his thread that with the latest CM nightlies, his kernel no longer works

Note: as of October 2, ROMs based on Cyanogenmod nightlies are broken and no longer work with this kernel.

Using his kernel with carbon rom and it rocks. I haven't acquired a USB OTG + charging cable but now i'm on the hunt!
 

flar2

Recognized Developer
Jun 11, 2012
18,856
87,857
Southwestern Ontario
elementalx.org
Does your Kernel support a USB DAC/AUdio?
If so, It means this weekend I can finally put my N7 2013 into my car.
I've been holding off as I've been waiting for USB DAC + OTG Charging so it can be permanently mounted in the car.

Cheers
Mat

Actually, it might be enabled on 1.6. I check my config and I think everything necessary is enabled.

Please let me know if it works, I don't have any usb audio stuff to test with.


flar2 (another ottawan! hi!) has stated in his thread that with the latest CM nightlies, his kernel no longer works



Using his kernel with carbon rom and it rocks. I haven't acquired a USB OTG + charging cable but now i'm on the hunt!

Good luck finding any of that stuff in Ottawa :D I had to order my otg adapter and y cable on ebay

@TabletNoob
I will try to get most of this stuff working on the kernel side, thanks for the PM.
 
  • Like
Reactions: TabletNoob

FauxDreams

Senior Member
Sep 9, 2013
81
42
35
Melbourne
son fartcw

Actually, it might be enabled on 1.6. I check my config and I think everything necessary is enabled.

Please let me know if it works, I don't have any usb audio stuff to test with.
.

Ok, I noticed in sys/modules there is a "snd_usb_audio"

I have OTG charging enabled, that works. But I can't get a USB DAC to work like it did with my CM10.2

Currently running stock rom + elementalX 1.6

First time I installed elementalX 1.6 I had the CM10.2 ROM and had major graphical issues lol Whoops

thanks
 

hagensieker

Senior Member
Oct 7, 2013
54
9
Actually, it might be enabled on 1.6. I check my config and I think everything necessary is enabled.

Please let me know if it works, I don't have any usb audio stuff to test with.




Good luck finding any of that stuff in Ottawa :D I had to order my otg adapter and y cable on ebay


@TabletNoob
I will try to get most of this stuff working on the kernel side, thanks for the PM.

I can confirm that an older AOKP build with the OTG charging works with a Nuforce UDAC USB Dac with elementalx 1.6 installed.

I tried to flash the latest AOKP over the top and then reinstalled elementalx and all I got was a blue pixelated screen. Same thing that happens over new CM 10.2 nightlies after Oct 2 (as stated).

John
 
  • Like
Reactions: flar2

FauxDreams

Senior Member
Sep 9, 2013
81
42
35
Melbourne
Ok, So now running Cleanrom & ElementalX.

OTG charging working but USB DAC still not working unlike with Cyanogenmod10.2 Nightly.

:(

I am using a Muse-Audio USB DAC

Thanks
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    More good news!

    By fixing a shortcoming in the default kernel, I was able to further reduce battery discharge in suspend mode.

    With this modification in place, discharge in suspend mode will not be "around 4% to 7% in 10 hours", like mentioned above, but more like 1% - 2% in 24 hours. This is with the OTG adapter plugged and all USB devices connected.

    It means, that you only need to charge your tablet for 6 minutes a day (or 45 minutes per week), to keep it at 100% charge level. And that your battery can stay operational through 50 days / 7 weeks of deep sleep. (Not yet tested in practice.)

    The screenshot below was taken after waking my device after nearly 22 hours of deep sleep:

    Screenshot_2014-04-03-14-19-30x.jpg


    This modification is implemented in FI-kernel 04-02 (or newer). Note: you need to have services 03-28b (or newer) installed as well. Both installers are immediately available for download.

    Thank you Kevin, for pointing me in the right direction.

    Mod edit: Link removed.
    4
    I am looking for a small number of users, ready to test Timur's Kernel v2.0 alpha on 4.4.3 (flo + deb).
    To begin with, you should have a rooted stock 4.4.3 on your tablet already.
    If things go well, I will do a v2.0 beta soft launch starting next week.
    By soft launch I mean a slowly widening user base for the v2.0 / 4.4.3 kernel.
    When the v2.0 kernel is confirmed to be as stable as the v1.0 kernel, the beta period will end - and the v1.0 release will be eol'd.
    If you are interested in participating, please drop me a line.
    4
    Thread closed.

    Xda is not the place to sell your work, if you don't want to share the fun for free with everyone then you are in the wrong place.


    11. Don’t post with the intention of selling something.

    Don’t use XDA to advertise your product or service. Proprietors of for-pay products or services, may use XDA to get feedback, provide beta access, or a free version of their product for XDA users and to offer support, but not to post with the intention of selling. This includes promoting sites similar / substantially similar to XDA-Developers.com.
    Do not post press releases, announcements, links to trial software or commercial services, unless you’re posting an exclusive release for XDA-Developers.com.
    Encouraging members to participate in forum activities on other phone related sites is prohibited.
    Off-site downloads are permitted if the site is non-commercial and does not require registration.
    Off-site downloads from sites requiring registration are NOT encouraged but may be permitted if both of the following conditions are met:
    A) The site belongs to a member of XDA-Developers with at least 1500 posts and 2 years membership, who actively maintains an XDA-Developers support thread(s) / posts, related to the download.
    B) The site is a relatively small, personal website without commercial advertising / links (i.e. not a competitor forum-based site with purposes and aims similar to those of XDA-Developers.com.)
    4
    Sounds cool, cant wait to see the stable release.

    Release v1.0 (May 06th and newer) has been made available to all my sponsors. After three month in beta, I am very confident with this release. Thank you very much for your support. If you cannot find the new installer, please contact me. I am still missing flo/deb info for a few users.

    Release notes: https://timur.mobi/timurs-kernel-n7-2013/updates

    Sorry, there will be no free-to-download version this time. My free-to-download solution for Nexus 7 2012 can be found here: http://rootzwiki.com/forum/513-nexus-7-development

    To get access to Timur's Kernel for Nexus 7 2013, you need to become a sponsor. Please check this page on May 12th: https://timur.mobi/timurs-kernel-n7-2013

    I will also make my kernel sources available to sponsors soon. Most likely starting the week after (May 19-25). If you like to get access to my kernel sources, please drop me a line.

    Timur
    4
    Quick update on the state of the project.

    I have spent the last couple of weeks fixing two specific issues related to suspend mode:

    Issue 1: On removal of external power, the screen was turning off, but the tablet did NOT transition into deep sleep. In this situation, the device would appear to be OFF, but the CPU was continuing to work and the tablet was discharging at a rate of about 4% per hour. In all cases this happened due to 3rd party "wake locks", preventing the device from entering suspend mode properly. All wake lock related issues should be fixed now.

    Issue 2: Device has transitioned to deep sleep, but would wake up randomly, due to 3rd party "alarm events". The modified "Firm Sleep" functionality will now take care of all of these issues.

    I added the following new info to PowerEventMgr, in order to make it possible for a user to verify proper suspend mode operations:

    PEM-screen-off-suspend-duration-2.jpg


    After waking a device from sleep (here: after ~10 hours), both duration values "Screen off" and "Last suspend" should be close to identical. It is OK for the two values to be roughly 60 seconds apart, like in the image above. This means that the tablet went into suspend mode ~60 seconds *after* the screen was switched off. And that the tablet did not wake up once during suspend mode. In full suspend mode, the battery will discharge 0.4% to 0.7% per hour (4% to 7% in 10 hours). Recharging back to 100% should be possible in about 20 - 25 minutes.

    None of the core "charging while in host mode" code has been touched in the last couple of weeks.