Hi Linh,

I do not know the cause of the problem. I took special steps to
correct the time stamps since the interrupts are signaled at different
times, and the delays depend on the payload length. I try to correct
for these, but apparently it does not work. I would like to ask you to
do a few tests for me, to get answers to these questions:

1) does the delay depend on the payload length
2) is it time stamping or time sync related
3) is the problem on the sender or receiver side

I have wrote a new test program (completely untested, it compiles),
which should be much more careful about the measurement. Node 0 sends
full messages at every 100 milliseconds, node 1 receives them. When
sendDone is signaled for node 0, then we start an asynchronous timer
to toggle LED 0 exactly after 30000 microseconds from the time when
the SFD field of the payload was transmitted over the air (as recorded
in the time stamp field of the message). On the receiver side, when
receive is signaled for node 1, then we do the same, we toggle LED 1
exactly after 30000 microseconds from the time stamp recorded in the
received message. These two LEDs should blink exactly at the same
time. Please download the code from:

http://szte-wsn.cvs.sourceforge.net/viewvc/szte-wsn/tinyos/apps/TestTimeSync/

Please do the following tests (I have no IRIS at home and does not
have an oscilloscope)

1) Use software ACK and check that the program works. I am sure that
there is some bias in this case as well, and I would like to know the
exact time stamping error. Please use different payload sizes, but
this should not affect the error value. I would like to know the delay
between the two signals in mirco seconds if possible.

2) Use hardware ACK on both nodes, and run a test with 30 and 100
payload sizes. I would like to know the errors for both.

3) Use software ACK for the sender, and hardware ACK for the receiver,
and do the same tests with the two payload sizes.

4) Use  hardware ACK for the sender and software ACK on the receiver,
and do the same tests with the two payload sizes.

Thanks,
Miklos

On Thu, Feb 11, 2010 at 8:27 AM, HL truong <[email protected]> wrote:
> We have discovered a time-synchronization bug in the TinyOS code. The error
> can be reproduced with the attached code.
>
> Bug description:
>
> On the XBow IRIS platform, when hardware acknowledgements are enabled, the
> node receiving a time synchronization message will in fact receive the time
> stamp with a value corresponding to t - 7ms (so there is a constant -7ms
> time shift). This bug has been observed with the most recent CVS tinyos
> version.
>
> Reproduction:
>
> The attached code will make a mote with NodeID 0 the synchronization master
> node, and a mote with NodeID 1 the slave node. The master node will send
> every 10s a time synchronization code. Both the master and the slave nodes
> will enable PortF6 (Pin 3 on the JTag header of the MIB520, Pin 10 being the
> ground) for about 10ms each cycle. These pins can then be used on an
> oscilloscope or logic analyzer to measure the synchronization error. When
> hardware acks are enabled, the synchronization error is -7ms (plus noise);
> when hardware acks are disabled, the synchronization error is 0ms (plus
> noise).
>
> Any idea on how to fix that bug is very appreciated.
>
> *Linh
>
> _______________________________________________
> 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

Reply via email to