[Tinyos-help] send - sendDone delay (MICAz, T2)?
Philip Levis
pal at cs.stanford.edu
Thu Jan 3 08:55:46 PST 2008
On Jan 3, 2008, at 5:58 AM, Murray, Ben wrote:
> Hi
>
> I did some tests a while ago with a couple of MICAz nodes when
> putting some
> time sync into my code and came across a 10ms randomness in the delay
> between my code calling .Send() and the .sendDone() event being
> signalled.
> The delay seemed to vary pretty randomly between 3ms and 13ms. Is
> there some
> reason for this (large?) delay? I based the timing on the
> difference in
> value of a millisecond timer for matched send and senddone pairings
> and used
> that to achieve decent enough (hopefully about +-1ms) sync for some
> small-scale controlled tests but it was a bit of a rushed (and rather
> roundabout) way to achieve accurate sync and not really practical in a
> proper deployment.
>
It's because of the MAC layer. The default CC2420 layer in T2 has an
initial backoff of approximately 1-10ms. So after you call send(),
the MAC layer waits 1-10ms before trying to send the packet.
> I saw the discussion on time sync in the devel forum and people
> seem to
> indicate rather better sync in the order of (micro seconds) us or
> better and
> I was wondering where the option to stick a timestamp in the outgoing
> messages at the actual time of transmission rather than the time of
> calling
> the send event as the latter is not very accurate requiring a more
> complex
> sync proceedure? the TEP I read indicated that the timestamp in the
> message_t is not transmitted but is local to the node?
The core WG is talking about this right now. The actual embedment of
a timestamp is not a big deal; the question is what the API should
be. We're also trying to wrestle with network interoperability
questions. Take a look at Miklos' mail to -devel in November. It has
two interfaces; one is for receiver-only timestamps, the other is for
transmitter-receiver timestamps.
Phil
More information about the Tinyos-help
mailing list