Will network stack wake up device in deep sleep on incoming packet?

Showing 1-11 of 11 messages
Will network stack wake up device in deep sleep on incoming packet? Jin Chiu 2/15/11 10:14 AM
Say that the device is in deep sleep and the network stack receives an
incoming packet. Will that wake the device up?
Re: Will network stack wake up device in deep sleep on incoming packet? Dianne Hackborn 2/15/11 12:55 PM
It should.

On Tue, Feb 15, 2011 at 10:14 AM, Jin Chiu <live2d...@gmail.com> wrote:
Say that the device is in deep sleep and the network stack receives an
incoming packet. Will that wake the device up?

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.




--
Dianne Hackborn
Android framework engineer
hac...@android.com

Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.

Re: Will network stack wake up device in deep sleep on incoming packet? erdal 3/19/11 10:46 PM
thank you for your answer! I have a couple more detailed questions:

how long will the device stay awake? how much of the code will execute
after the incoming packet arrives? when should we aquire a partial cpu
lock to make sure we execute everything we wanted to?

I have a tcp socket open in a background service. I am asking these
questions because I am not sure when I should aquire a cpu wake lock.


On Feb 15, 1:55 pm, Dianne Hackborn <hack...@android.com> wrote:
> It should.
>
> On Tue, Feb 15, 2011 at 10:14 AM, Jin Chiu <live2drea...@gmail.com> wrote:
> > Say that the device is in deep sleep and the network stack receives an
> > incoming packet. Will that wake the device up?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "android-platform" group.
> > To post to this group, send email to android-...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > android-platfo...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/android-platform?hl=en.
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
Re: Will network stack wake up device in deep sleep on incoming packet? Paul Gardner-Stephen 3/22/11 10:05 AM
What if the packet is a broadcast ethernet frame?
My quick empirical tests here suggest that they (at least in my case)
fail to wake the device.

Paul.

On Feb 16, 6:55 am, Dianne Hackborn <hack...@android.com> wrote:
> It should.
>
> On Tue, Feb 15, 2011 at 10:14 AM, Jin Chiu <live2drea...@gmail.com> wrote:
> > Say that the device is in deep sleep and the network stack receives an
> > incoming packet. Will that wake the device up?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "android-platform" group.
> > To post to this group, send email to android-...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > android-platfo...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/android-platform?hl=en.
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
Re: Will network stack wake up device in deep sleep on incoming packet? Dianne Hackborn 3/22/11 11:16 AM
On Tue, Mar 22, 2011 at 10:05 AM, Paul Gardner-Stephen <paul.gardn...@gmail.com> wrote:
What if the packet is a broadcast ethernet frame?
My quick empirical tests here suggest that they (at least in my case)
fail to wake the device.

Sorry, I can't help you with that.

--
Dianne Hackborn
Android framework engineer
hac...@android.com
Re: Will network stack wake up device in deep sleep on incoming packet? Dianne Hackborn 3/22/11 11:16 AM
You should acquire a wake lock to ensure the device stays awake while you are processing the data.hac...@android.com
Re: Will network stack wake up device in deep sleep on incoming packet? John Michelau 3/23/11 8:05 PM
Perhaps this could be better answered over in the kernel forum?  My
understanding is that you must chain your wakelocks together from the
hardware interrupt all the way up to the app layer to ensure the
device does not go to sleep.  Basically at each point the lower layer
is holding one as it hands off the data, and then it's up to the upper
layer to grab one.  In some cases I think timeouts are used instead,
though, which can be risky.  If you want to figure out why it's not
waking up, the best way may be to start at the hardware/kernel and
work your way up; including verifying that the bus your device is on
is capable of waking the host from deep sleep in the first place.
Re: Will network stack wake up device in deep sleep on incoming packet? Horace 3/25/11 3:06 AM
Hello,

For broadcast packets, Wifi chip should wake CPU up.
But in my background, the default of filtering broadcast is disabed,
so WiFi chip won't wake CPU.

Horace.

On 3월23일, 오전2시05분, Paul Gardner-Stephen
Re: Will network stack wake up device in deep sleep on incoming packet? Horace 3/25/11 3:10 AM
Hello,

I think you don't need to acquire a wake lock to process the data
after incoming packets from the sleep state.
Because we can have enough time to process the packets.
If CPU wakes up from incoming packet, its state becomes idle state.
At least CPU have 15 seconds until going to sleep state again. But it
depends on the Android device.
Re: Will network stack wake up device in deep sleep on incoming packet? Paul Gardner-Stephen 3/26/11 2:45 AM
Hello,

On Mar 25, 8:06 pm, Horace <nice...@gmail.com> wrote:
> Hello,
>
> For broadcast packets, Wifi chip should wake CPU up.
> But in my background, the default of filtering broadcast is disabed,
> so WiFi chip won't wake CPU.

Okay, this agrees with my experience so far.
I will find out how to enable wake-on-lan for broadcast packets.

Paul.
Re: Will network stack wake up device in deep sleep on incoming packet? Dianne Hackborn 3/26/11 12:11 PM
You should acquire a wake lock while you are doing work during which you don't want the CPU to sleep.

2011/3/25 Horace <nic...@gmail.com>
hac...@android.com