Hi Kevin and Daniel,

The problem is fixed. Your suggestions are very helpful. I really appreciated for your generous help.

Best regards,

Ruoshui
Message: 1
Date: Mon, 26 Nov 2007 05:46:46 +0100
From: "Alban Hessler" <[EMAIL PROTECTED]>
Subject: Re: [Tinyos-help] It's about the Timer!
To: "Kevin Klues" <[EMAIL PROTECTED]>
Cc: [email protected]
Message-ID:
        <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"

I guess since she/he is disabling the ack, Liu does not expect the timer to
be resetted at every send done.

Alban

2007/11/26, Kevin Klues <[EMAIL PROTECTED]>:
Daniel is right.  Everytime you receive a sendDone, you are resetting
Timer1, so it basically never has the chance to fire before you reset
it again.  What you probably want to do instead of keeping a second
timer is change the frequency whenever you have received the 1200th
sendDone event.  This is the same as having two timers, one that runs
with frequency 0.25s and one with 5s.

Kevin

On Nov 25, 2007 6:19 PM, daniel widyanto <[EMAIL PROTECTED]>
wrote:
Hi,

Just suggestion, I think when you call Timer1.start( TIMER_REPEAT,
period_Timer1 ) before Timer1.fired() called, the Timer1 counter value
will be reset back to period_Timer1 (I'm not very sure about this, take
a look at the TimerM implementation in your TinyOS source code).

Anyway, just to remind you, none of us is being payed as customer
service here. So, if your questions are not answered, be patient or try
to debug it yourself (and tell the group how you solve it, if you like).

Regards,

-daniel



On Sun, 2007-11-25 at 23:42 +0000, Ruoshui Liu wrote:
Hi Cory and Michael,

I have been stuck with the Timer problem for a long time, I hope I
could
get any suggestions from you. Currently, I implemented an application
which sets up a single radio link between one transmitter and one
receiver. I want to implement the frequency change at  both the
transmitter and the receiver ends. The transmitter is switched on
first,
and keeps transmitting the messages (the message content is the
counter
value) on one particular frequency (Let's say on channel 11). It won't
change its frequency until the receiver is switched on as well and
send
back an acknowledgement to the transmitter. At the time when the
transmitter receives the ack from the receiver, both ends change the
transmission frequency at the same rate and keep synchronisation all
the
time.

I used Timer0 to control the rate (fire every 0.25s) to fire the timer
and send the counter value, and used Timer1 to control the rate (5s)
of
frequency change (from channel 11 to channel 26). I can get the
acknowledgement back from the receiver when it is switched on, but I
can't get the transmissin frequency changed even I did call
Timer1.start( ) within the Send.sendDone( ).  I suspected that it
nevet
gets a chance to set a new transmission frequency before sending out
the
messages due to the not precise timing, since the Timer0 and Timer1
are
the instances of Timer. However, I am not sure if I am right to this,
and I can't find a solution to the problem.


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

Reply via email to