[Tinyos-devel] Patches to FTSP and CC2420 for 32kHz sync and LPL functionality

Razvan Musaloiu-E. razvanm at cs.jhu.edu
Fri Jun 26 18:35:16 PDT 2009


Hi!

>> Why does this wire directly to the CC2420? Shouldn't it wire to 
>> ActiveMessageC? More than one radio chip provides the LowPowerListening 
>> interface[1].
>
> Good point. I'll fix that.

Going over the code I noticed that I was wired to ActiveMessageC and not 
CC2420ActiveMessageC. Perhaps I'm missing some places. Can you show it to 
me?

>> I think that a command call in the top-level application Boot event might 
>> be simpler than having to shadow a component.
>
> I use the shadowing to allow the user app to be unchanged.
>
>> I was assuming it would look like this:
>> 
>> event Boot.booted() {
>>   call SystemLowPowerListening.setInterval(xyz);
>> }
>> 
>> This call does two things: it sets the receiver LPL check interval, and 
>> makes it so that all packets are sent with this check interval. If we 
>> wanted to be super fancy, we could also have separate RX and TX interval 
>> calls; the former is just a call through to the LowPowerListening set check 
>> interval, while the latter stores the value for a call to 
>> LowPowerListening.setRxSleepInterval.
>> 
>> Does that make sense?
>
> Yes. I'm implementing this right now. :-)
>

I update the default-lpl-new branch to use a SystemLowPowerListeningC 
instead of DefaultLplSettingsC. The new interface is like this:

interface SystemLowPowerListening
{
   command void setLocalSleepInterval(uint16_t interval);
   command void setRxSleepInterval(uint16_t interval);
   command void setDelayAfterReceive(uint16_t interval);

   command uint16_t getRxSleepInterval();
   command uint16_t getDelayAfterReceive();
}

The setX calls are used by the user application while the getX are used by 
LplAMSenderP and DefaulLplP. One drawback of this is the fact that it 
doesn't prevent the user from calling the setX at the wrong time. :|

The gitweb of the default-lpl-new can be here:
 	http://hinrg.cs.jhu.edu/git/?p=razvanm/tinyos-2.x.git;a=shortlog;h=default-lpl-new

--
Razvan ME


More information about the Tinyos-devel mailing list