Take a look at how to use the LowPowerListening interface as detailed
in tutorial lesson 16.

http://www.tinyos.net/tinyos-2.x/doc/html/tutorial/lesson16.html

The short answer to your question is that low power listening is
enabled (or the radio is turned on directly) by calling start() on
ActiveMessageC not on AMReceiverC itself.  Basically by calling start
()on ActiveMessageC you enable whatever sleep scheduling policy has
been set up for you to use.   By default there is no sleep schedulign
policy defined, and you have to explicitly tell the application to use
low power listening as detailed in the tutorial.

Kevin

On Mon, Mar 3, 2008 at 6:45 AM, David <[EMAIL PROTECTED]> wrote:
> Hi list.
>
>  I've looked through the TEPs and nesdocs, but can't find a clear
>  answer to this problem. Also I've had a look at the .nc source, but I
>  don't understand 100% how the virtualization and arbitration/power
>  management works.
>
>  How do you 'turn off' a AMReceiverC component when you don't want to
>  use up power listening? I don't see a stop/start interface to
>  AMReceiverC.
>
>  My assumption is that tinyos automatically manages turning the radio
>  on (for reception) when needed. ie, if you declare an AMReceiverC,
>  then tinyos will run it's low power listening logic continuously, but
>  if you don't declare any AMReceiverC in your app, then tinyos won't
>  spend any time using low power (I'm using tmote sky, cc2420 btw, and
>  the latest tinyos-2.x CVS)
>
>  Basically, to conserve power, I want the mote to listen as little as
>  possible. eg, only once every minute for a few seconds. Also, the mote
>  needs to send (in broadcast mode) data every few seconds. I assume
>  that when sending to the broadcast address that motes don't wait for
>  other motes to acknowledge reception (and retry a few times, etc) (as
>  described in the low power listening docs).
>
>  The best logic I can think of offhand is:
>
>  1) Init doesn't start up AMControl
>  2) When we want to receive or send we first run AMControl.start() (split 
> phase)
>  3) Do our receiving/sending, wait for it to finish
>  4) Then run AMControl.stop()
>
>  However, the above seems very awkward, and we need to be careful the
>  timing. Is there a better way to achieve what I'm trying?
>
>  David.
>  _______________________________________________
>  Tinyos-help mailing list
>  [email protected]
>  https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
~Kevin
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to