[Tinyos-help] Re: CC1000RadioIntM question?

arnold arnold tarzannn2003 at yahoo.com
Thu Mar 17 11:27:02 PST 2005


 
I figured out the basic idea in "CountSleepRadio" application is to start and stop the CommStdControl() or CommControl() at appropriate times, say 2 seconds. And this application works.
 
I have one basic same question and problem, which I was having in implementing the alternate application, mentioned in my last e-mail.
 
I used the idea of "CountSleepRadio" in CntToledsAndRfm application. Where after few counter values I call CommControl.stop( ) and it works well. But further after few more counter values when I try to call CommControl.start() then this function never works. I mean mote remains in sleep mode.
The same happened when I tried to call CC1000RadioIntM.start/stop() in my alternate application.
 
Is there any other commands I have to implement before calling CommControl.start() when I had already called CommControl.stop() ? I couldn't figure out from any application where am wrong and why its a problem when I call CommControl.start() ...once CommControl.stop() had been called.
 
I also tried to call .init() before calling .start() function ONCE I have already called .stop()  but it didn't worked either.
 
Thanks in advance and hope to hear some suggestions from you or anyone from tinyos community soon.
 
Joe Polastre <joe.polastre at gmail.com> wrote:
You should use CountSleepRadio as an example of how to do this. I've
verified that CountSleepRadio works, so you should try modifying by
starting with that code. I'm sorry, I don't have time to go through
your code due to some paper submissions that I'm putting together.

-Joe


On Wed, 16 Mar 2005 16:59:24 -0800 (PST), arnold arnold
wrote:
> 
> Hi Joe, 
> 
> Thankyou very much for your response. 
> 
> I have to make mica2 motes go to sleep and then wakeup for my project. 
> 
> So before I include the features of sleep and wakeup modes in my main
> project source code for mica2 that uses adaptive algorithm to switch modes
> as per the factory environment...I am trying to implement and test it by
> using CC1000RadioIntM on CntToLedsandRfm and RfmToleds applications. 
> 
> The changes I made is only in CntToledsAndRFm.Counter...I am giving you the
> part of the code below so that you can figure out the problem or any changes
> soon: 
> 
> event result_t Timer.fired()
> {
> state++;
> if((state == 40)&&(SleepWakeupflag == 0)){
> SwitchCounter = 6;
> post SleepTask();
> }
> if((state == 40)&&(SleepWakeupflag == 1)){
> SwitchCounter = 9;
> post WakeupTask();
> }
> return call IntOutput.output(state);
> } 
> }
> 
> 
> task void SleepTask(){
> if(SwitchCounter ==6){
> //call SetTransmitmode(CC1k_LPL_States -1); 
> // call SetListeningmode(CC1k_LPL_States -1); 
> call RadioStdControl.stop(); /* It is CC1000RadioIntM.StdControl.stop() */ 
> //call PowerEnable();
> SwitchCounter = 0; /* to help event to switch to Sleep and wakeup tasks */
> SleepWakeupflag = 1; /* to make tasks to judge who has to act */
> state = 0; /* So that counter can be intialised */
> }
> }
> task void WakeupTask(){
> if(SwitchCounter ==9){
> /* call SetTransmitmode(0); */ 
> /* call SetListeningmode(0); */ 
> 
> call RadioStdControl.start(); /* It is CC1000RadioIntM.StdControl.start()
> */ 
> 
> // call PowerDisable(); 
> 
> SwitchCounter = 0;
> SleepWakeupflag = 0;
> state = 0;
> }
> } 
> 
> I appreciate your consideration and looking ahead to hear from you soon. 
> 
> Best Regards, 
> 
> Arnold 
> PS: I used CC1000RadioIntM as per the messages you posted earlier, in
> archives folder of tinyos.net. But in the meantime I'll surely try to see if
> /CountRadio/CountSleepRadio works.
> 
> Joe Polastre wrote: 
> Can you provide a little bit more debugging information?
> 
> Does the application in
> tinyos-1.x/contrib/ucb/apps/CountRadio/CountSleepRadio work?
> 
> -Joe
> 
> 
> On Wed, 16 Mar 2005 14:18:26 -0800 (PST), arnold arnold
> wrote:
> > I am using CC1000RadioIntM.StdControl.start/stop() to switch on/off the
> > radio. 
> > 
> > As per my application once intiated CC1000RadioIntM.StdControl.stop()
> works
> > to stop the mote from transmitting on the radio but after a while when
> > CC1000RadioIntM.StdControl.start() is called then it doesn't work...and
> the
> > mote never sends the data on the radio. i.e it remains in sleep mode. 
> > 
> > I have checked lplpower setting is 0. 
> > 
> > Can anyone please help me to how to wakeup the mote again to transmit on
> the
> > radio ? 
> > 
> > Thanks in advance. 
> > 
> > Arnold 
> > 
> > 
> > ________________________________
> > Do you Yahoo!?
> > Yahoo! Small Business - Try our new resources site! 
> > 
> >
> 
> 
> ________________________________
> Do you Yahoo!?
> Yahoo! Small Business - Try our new resources site! 
> 
>

		
---------------------------------
Do you Yahoo!?
 Yahoo! Small Business - Try our new resources site! 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20050317/e96b67c2/attachment.html


More information about the Tinyos-help mailing list