Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: zokl on March 07, 2014, 03:13:44 PM

Title: Olimex A20 USB suspend disable
Post by: zokl on March 07, 2014, 03:13:44 PM
I would like to ask you. How can I disable the atosuspend function on my Olimex A20 board with Android 4.2.2? I am using USB video camera and during the record I have a problem with autosuspend function of USB devices.

Thank you, Zbynek Kocur
Title: Re: Olimex A20 USB suspend disable
Post by: codifies on March 07, 2014, 05:00:21 PM
http://developer.android.com/reference/android/os/PowerManager.WakeLock.html

although depending on situation you may need other strategies...

Even if you're not compiling your own app and just using existing apps, you should be able to spin up a quick app to do this, there may even be prewritten apps out there that will get a wakelock for you...
Title: Re: Olimex A20 USB suspend disable
Post by: zokl on March 07, 2014, 10:39:59 PM
Quote from: codifies on March 07, 2014, 05:00:21 PM
http://developer.android.com/reference/android/os/PowerManager.WakeLock.html

although depending on situation you may need other strategies...

Even if you're not compiling your own app and just using existing apps, you should be able to spin up a quick app to do this, there may even be prewritten apps out there that will get a wakelock for you...

Thank you very much for your answer.

Is possible to control the suspend in android shell?
Title: Re: Olimex A20 USB suspend disable
Post by: codifies on March 08, 2014, 01:18:05 AM
yes I've done it through adb as well, but for the life of me can't remember how... but I bet if you google it... (which if I'm honest is what I probably did anyhow ;) )
Title: Re: Olimex A20 USB suspend disable
Post by: codifies on March 08, 2014, 03:21:57 AM
https://play.google.com/store/apps/details?id=bdjnk.android.wakeydroid

run the adb command every min or so and it should do what you want...
Title: Re: Olimex A20 USB suspend disable
Post by: zokl on March 08, 2014, 09:51:15 PM
Quote from: codifies on March 08, 2014, 03:21:57 AM
https://play.google.com/store/apps/details?id=bdjnk.android.wakeydroid

run the adb command every min or so and it should do what you want...

Thank you.
Title: Re: Olimex A20 USB suspend disable
Post by: codifies on March 09, 2014, 12:12:06 PM
actually there's a one off adb command you can issue, see the end of the thread I linked to...