[Tinyos-devel] packet timestamping and packet-level timesynchronization

Miklos Maroti mmaroti at math.u-szeged.hu
Tue May 13 09:23:33 PDT 2008


Hi Robert and Janos,

> > On the timesync protocol side of
> > thing, slow interrupt handling time forced us to changing the original
> > flooding timesync protocol so that tx timestamps were sent out on the
> > next outgoing packet instead of on the current outgoing packet since
> the
> > write to the outgoing tx fifo as it was going out over the air was
> > something that didn't always work.  At least IMHO, it would be good
> for
> > the timesync interface to be able to support such an operating mode as
> > it will eliminate the race condition on the packet write (arguably a
> > better coding practice) while also making fewer assumptions about the
> > processor's interrupt handling turn around time.  The current
> interface
> > might be made to support such a mode, but it's not clear if this is
> > something that was intentionally supported or not.
>
> This is a very good point. Such implementation would definitely work
> with the interfaces, but I had not thought of this. It is, in fact,
> equivalent to using the PacketTimestamp interface to implement the
> PacketTimeSync functionality. I guess that it makes sense to change the
> implementation guidelines section to describe this approach, too.

This could be implemented as follows. The TimeSyncSend implementation
could send a short message to the destination address which is
timestamped on both side, but the stamp is not embedded. Then the
actual payload is transmitted together with the proper embedded time
stamp. The receiver has to remember the last time sync message arrival
time so it can use and return that value. This would be a very nice
generic implementation that requires only the PacketTimeStamp
interface to work.

Miklos


More information about the Tinyos-devel mailing list