Hi Jan I asked about switching off periodically the radio transceiver in order to plan a duty cycle. Then, you told me I should use the MLME_RX_ENABLE interface provided by the Ieee802154NonBeaconEnabledC component. Well, I've done that, I mean, I've set a timer which represents a wakeup interval that when it expires, it should activate the radio transceiver during a time interval equal to RxOnDuration. My problem is that I'm not really sure if this really works. The reason is that a mote acting as a receiver node receives data when it should be sleeping! Here a brief explanation of my test with pseudocode: start() // the app starts{ initialize Rx_enable component (call Init.init();); start periodic wakeup interval wiTimer; call MLM_RX_ENABLE(RxOnDuration);} MLME_RX_Enable.confirm() {} // It confirms that the radio is enabled wiTimer.fired () // the witimer expires{ /* * Here I should call again MHME_RX_ENABLE with RxOnDuration. * call MLME_RX_ENABLE(RxOnDuration); * However, to this test, I do not make the call. As a result, the * radio should be disabled and the node cannot receive anything */ return;} recv() // receive data (MCPS_DATA.indication()){ // Here I have another node that periodically broadcasts a message. // When this message is received, it activates one of the receiver node'leds.} What am I considering that it's wrong? Does MHME_RX_ENABLE really work and after RxOnDuration, the radio goes to sleep mode? Thanks, David
> Date: Wed, 14 Nov 2012 12:45:25 +0100 > Subject: Re: [Tinyos-help] Sleeping in TKN154 > From: ha...@tkn.tu-berlin.de > To: drod...@outlook.com > CC: tinyos-help@millennium.berkeley.edu > > 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 <drod...@outlook.com> 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 > > Tinyos-help@millennium.berkeley.edu > > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help