Hi David, there are two places where you can implement such duty-cycling: (a) on top of the MAC: your component would wire to MLME_RX_ENABLE interface provided by Ieee802154NonBeaconEnabledC and you would have a periodic timer that fires at the desired ON-Time. In the event-handler you would call MLME_RX_ENABLE with a "RxOnDuration" parameter matching your ON-time interval. If timers are not accurate enough for you (because they fire in task context), you (b) could use Alarms instead. Then you would have to modify the MAC. You could extend RxEnableP with your own async duty-cycle configuration interface and also modify its interface towards DispatchUnslottedCsmaP (which you would also have to extend / make async). Unless you need such accurate timing, you'd probably go for option (a) -> you can make some tests to find out when the radio actually changed state (to see if it satisfies your timing requirements): just set the "tkn154debug" flag and you will get statistics via printf (see apps/tests/tkn154/README.txt for details).
Jan On Wed, Nov 14, 2012 at 11:32 AM, David Rodenas <[email protected]> wrote: > Hi all > > I am interseted in programming a duty-cycling scheme by making use of the > TKN154 libraries. In particular, I want to induce the motes to periods of > activity (ON) and inactivity (OFF) over the IEEE 802.15.4 non-beacon mode. > As example: > > ||+------------+---------------------+------------+---------------------+------------+------------------- > ||+ ON | OFF | ON | OFF > | ON | OFF ... > ||+------------+---------------------+------------+---------------------+------------+------------------- > ||+ IEEE 802.15.4 NON-BEACON MODE > ... > ||+--------------------------------------------------------------------------------------------------------- > > My problem is not how to sinchronize nodes for transmission and reception; > it's knowing which components or libraries can I use to control de CC2420, > and switch the radio ON/OFF periodocally. I've been trying to figure out how > to do it through the LowPowerListening component (but I cannot use it > because my protocol does not requires the transmission of preambles), or > taking shots in the dark with the TKN files at /tos/lib/mac/tkn154, but I am > completely lost. > > Please, any help possible would be appreciated. > > Thanks > > David > > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
