[Tinyos-help] question about timesyn in MultiHopLQI.nc

Janos Sallai sallai at isis.vanderbilt.edu
Thu Sep 15 13:05:11 PDT 2005


Regarding the necessity of timesync in a multihop network: obviously, it
depends on the actual application. Whether it is necessary to have
timesync in a multihop routing service (I guess this is what you're
asking): the answer is certainly no. Usually you don't need timesync to
do routing.

However, integrating the time synchronization service with multihop
routing has some advantages. In many applications, we want to route
timestamped information (event detections, etc.) from multiple sources
to a designated sink node. The sink node expects that there is a
reference time in which the event timestamps are given. A timesync
capable multihop router achieves this the following way:
- When a node detects an event, it timestamps it with its
(unsychronized) local clock, then passes it to the routing component,
which will deliver it to the sink node.
- When the packet is passed from node to node, the routing+timesyc
service converts the event timestamp to the clock of the receiver node.
- Eventually, when the packet reaches the sink, the packet timestamp is
converted to the sink's local clock.

This has been done, the sources are in
http://cvs.sourceforge.net/viewcvs.py/tinyos/tinyos-1.x/contrib/vu/tos/l
ib/FloodRoutingSync. It works the best with the CC1000 radio (the error
should be less than 80us over 10 hops), and it has been ported to CC2420
as well (the error is under 1.5ms over 10 hops).

Some papers on the subject:
Roemer, K.: Time synchronization in ad hoc networks. In: Proceedings of
MobiHoc 2001, ACM (2001)
Ledeczi A., Volgyesi P., Maroti M., Simon G., Balogh G., Nadas A., Kusy
B., Dora S., Pap G.: Multiple Simultaneous Acoustic Source Localization
in Urban Terrain, IPSN 05, CD-Rom, Los Angeles, CA, April 25, 2005

Janos Sallai

-----Original Message-----
From: tinyos-help-bounces at Millennium.Berkeley.EDU
[mailto:tinyos-help-bounces at Millennium.Berkeley.EDU] On Behalf Of
yicheng
Sent: Thursday, September 15, 2005 1:44 PM
To: 'Joe Polastre'
Cc: tinyos-help at Millennium.Berkeley.EDU
Subject: RE: [Tinyos-help] question about timesyn in MultiHopLQI.nc

Hi Joe,

Thanks! Then I'm wondering if it's necessary to implement TimeSync
function
in Multi Hop network, or it is already implemented in other multi hop
network except MultiHopLQI in TinyOS.

B.R.
Yicheng

-----Original Message-----
From: joe.polastre at gmail.com [mailto:joe.polastre at gmail.com] On Behalf
Of
Joe Polastre
Sent: Thursday, September 15, 2005 1:29 PM
To: yicheng
Cc: tinyos-help at millennium.berkeley.edu
Subject: Re: [Tinyos-help] question about timesyn in MultiHopLQI.nc

Yes, and it doesn't work or do anything :)  In fact, it should just be
removed from the code.

-Joe

On 9/15/05, yicheng <y-jie at northwestern.edu> wrote:
> Hi Joe,
> 
> It does have, actually it is compiled by conditional 'TIMESYNC', here
it
is:
> 
> In event TOS_MsgPtr ReceiveMsg.receive(TOS_MsgPtr Msg):
> #ifdef TIMESYNC
>       call TimeSet.set(call TimeUtil.create(0, pRP->timestamp));
>       dbg(DBG_ROUTE,"TimeSync: Setting Time To: %d\n",
pRP->timestamp);
> #endif
> 
> #ifdef TIMESYNC
>   async event void RadioCoordinator.startSymbol(uint8_t bitsPerBlock,
>                                                 uint8_t offset,
>                                                 TOS_MsgPtr msgBuff) {
>     tos_time_t endTime;
>     TOS_MHopMsg *pMHMsg = (TOS_MHopMsg *) &msgBuff->data[0];
>     BeaconMsg *pRP = (BeaconMsg *) &pMHMsg->data[0];
> 
>     atomic {
>       if (msgBufBusy == TRUE) {
>         endTime = call Time.get();
>         pRP->timestamp = endTime.low32;
>         dbg(DBG_ROUTE,"TimeSync: End Send RoutePacket Time %d\n",
> endTime.low32);
>       }
>     }
>   }
> 
>   async event void RadioCoordinator.byte(TOS_MsgPtr msg, uint8_t
byteCount)
> {
>       /* XXX: do nothing */
>   }
> 
>   async event void RadioCoordinator.blockTimer() {
>       /* XXX: do nothing */
>   }
> #endif
> 
> -----Original Message-----
> From: joe.polastre at gmail.com [mailto:joe.polastre at gmail.com] On Behalf
Of
> Joe Polastre
> Sent: Thursday, September 15, 2005 12:43 PM
> To: yicheng
> Cc: tinyos-help at millennium.berkeley.edu
> Subject: Re: [Tinyos-help] question about timesyn in MultiHopLQI.nc
> 
> There is no time sync in MultiHopLQI.
> 
> -Joe
> 
> On 9/15/05, yicheng <y-jie at northwestern.edu> wrote:
> > Hi All,
> >
> > I have a question about using TimeSyn in MultiHopLQI.nc component.
When
> > every node in the network is tuned to a unified time with the base
node
> > through TimeSync, does route message need to be sent at a fixed
interval
> > between each node? Say there's 6 nodes, no.6 is the source node and
no.0
> is
> > the base node, after TimeSync, no.6 node sends route message at time
tick
> n,
> > no.5 node sends route message at time tick n + 10, no.4 at n + 20,
no.3
at
> n
> > + 30...is this necessary?
> >
> > Thanks!
> > Yicheng
> >
> > _______________________________________________
> > Tinyos-help mailing list
> > Tinyos-help at Millennium.Berkeley.EDU
> >
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-hel
p
> >
>

_______________________________________________
Tinyos-help mailing list
Tinyos-help at Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-hel
p



More information about the Tinyos-help mailing list