Dear Paul, I am sorry, I didn't get it. What do you mean exactly? Could you or anybody else suggest a mechanism to keep the Tx and the Rx in synchronization when doing the frequency hopping please? Thanks a lot!
Shui > ---------------------------------------------------------------------- > > Message: 1 > Date: Sat, 28 Jun 2008 20:36:15 -0700 > From: "Paul Stickney" <[EMAIL PROTECTED]> > Subject: Re: [Tinyos-help] How to keep the time at Tx end and the > other timer at Rx synchronised > To: [email protected] > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=UTF-8 > > Share a frequency changing pattern based off of time vs. packet received? > > On Fri, Jun 27, 2008 at 9:09 AM, Ruoshui Liu <[EMAIL PROTECTED]> wrote: > >> Dear all, >> >> I have been stuck with a synchronisation problem for a long time. Here >> is my problem: I am implementing frequency hopping on both Tx and Rx >> ends. At the Tx end, Tx starts changing its transmission frequency from >> channel 11 to channel 26 after the its first packet is sent and then >> keeps sending all the time. At the Rx end, Rx is probably switched on >> later on at the different time. We need the Rx to listen to the incoming >> packets and then lock itself to the transmission frequency of the Tx by >> hopping its receiving frequency. >> >> Currently, the Tx frequency is changed every 1 second with transmission >> interval of 0.25 s, and the Rx frequency is changed every 1 second >> immediately after it receives first packet. Somehow, I can't have the Rx >> has the exactly same frequency change rate as the Tx since some packets >> have been lost. The program on the Tx is written based on the >> **CountDual* *and that running on Rx is written based on the >> **TOSBase*B*, and I am using TinyOS 1.1.15. >> * >> *The core code is listed below for *TOSBase: >> >> *event TOS_MsgPtr RadioReceive.receive(TOS_MsgPtr Msg) { >> >> dbg(DBG_USR1, "TOSBase received radio packet.\n"); >> >> if ((!Msg->crc) || (Msg->group != TOS_AM_GROUP)) >> return Msg; >> >> /* >> * The frequency is changed at predefined >> * time interval. >> * >> */ >> if(( (Msg->data[0]) == 4 ) && >> enableStart){ // The loop for changing >> frequency will not start until the Rx receives some specific packets. >> freq_int++; >> call CC2420Control.TunePreset(freq_channel[freq_int]); >> // set the Rx frequency to channel 12. >> if(enableChange){ >> call Timer1.start(TIMER_REPEAT, period_Timer1); >> enableChange = FALSE; >> } >> enableStart = FALSE; >> } >> >> ... >> } >> >> The reason why I manually set the Rx frequency to channel 12 is because >> I don't know how to keep the Rx synchronised with the Tx in the very >> beginning. The Rx quite easily lose the synchronisation with the Tx, but >> I really dont know any reasons for this. Could any one give me some >> hints please? >> >> Thank you! >> >> Shui >> _______________________________________________ >> 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
