Hi all,

I’d like to measure the round-trip time between two motes. The sender has a periodic timer. When the timer fires, the sender sends a packet recording the SFD transmitted time to the receiver. As soon as the receiver receives that packet, then it sends back the packet to the sender. And the sender records the SFD received time when it receives the original packet.

Specifically, the interface RadioTimeStamping was used, and the two async events transmittedSFD and receivedSFD were implemented in the sender code.

uint16_t transmittedTime;
uint16_t ack_receivedTime;
message_t pkt;

async event void RadioTimeStamping.transmittedSFD(uint16_t time, message_t* p_msg) {
        if(&pkt == p_msg)
                transmittedTime = time;
}

async event void RadioTimeStamping.receivedSFD( uint16_t time ) {
        ack_receivedTime = time;
}

Provided if all the packets received correctly, the round-trip time should be the difference between ack_receivedTime and transmittedTime.

But when the period of the timer changes, the round-trip time changed a lot. How to explain this? And does anyone have some idea about how to measure the round-trip time?
Thanks a lot.

Shuo

_________________________________________________________________
Join the millions of Australians using Live Search. Try live.com.au http://ninemsn.com.au/share/redir/adTrack.asp?mode=click&clientID=740&referral=million&URL=http://live.com.au

_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to