[Tinyos-devel] Re: [Tinyos Core WG] time sync interfaces

John Griessen john at ecosensory.com
Thu Dec 13 11:41:04 PST 2007


David Gay wrote:
> On Dec 13, 2007 5:20 AM, Miklos Maroti <mmaroti at math.u-szeged.hu> wrote:

>> interface PacketLastTouch
>

>> It is important that this call is called AFTER the packet is time
>> stamped, otherwise we cannot guarantee precise timing.

> An alternate proposal would be:
> 
> interface PacketTimeSync
> {
>     async event int8_t isTimeSyncPacket();
> }
> 
> which would be:
> - offered as a parameterized-by-amid interface (like PacketLastTouch)
> - called from the radio stack at the "last possible moment"
> - if isTimeSyncPacket returns -1, nothing happens
> - if isTimeSyncPacket returns X (>= 0), a time stamp is stuffed in the
> packet at offset X

These are about putting the local time into an outgoing packet...  precise
time comes from comparing to one source that is a master clock... by way of round trips
with time counting along as you go, being different when returned to the master, after which you issue a difference correction 
command.  So stamping a packet
just received with a local time helps do that, not a packet going out...

A sync packet going out can simply be a standard preamble and data
with no stamped information.  The info is that it is sent at 1 ms intervals.
If collisions happen with timesync packets, you choose a new time slot for them -- a single system
would use many time slots for gathering the round trip time between two nodes,
so as to avoid the slots the other nodes in listening distance use.

If you base time on stamped transmissions, you _could_ get a one way
non-round-trip sync by comparing all to a master clock, then the master would be the only one that
timestamps received sync packets.  but you would not measure the delay of sending,
and that would vary from platform to platform, and think of a non-homogenous
network with Atmel, TI, Freescale radios all communicating...

John Griessen
who likes PTP (IEEE 1588)

-- 
Ecosensory   Austin TX
tinyOS devel on:  ubuntu Linux;   tinyOS v2.0.2;   telosb ecosens1


More information about the Tinyos-devel mailing list