call LocalTime.get()  gives you the local time on the node. If you want to
access the global time on the node then you need to use the
call GlobalTime.local2Global(&mylocaltime) command. Here mylocaltime is
the return parameter of call LocalTime.get(). I think what you need to do
is compare global times at sender and receiver. Also conversion from local
time to global time requires an offset as well as a skew.

- TinyOS MAC does an initial backoff and CCA before a packet is sent out.
- Regarding acks... by default acks are activated, if you want to disable
them, include CFLAGS += -DCC2420_NO_ACKNOWLEDGEMENTS in your MAKEFILE.

Regards
Akhila


>
> Hi everybody,
> I'm working on implementing Schedule-based MAC protocol and I apply FTSP
> for
> time synchronization (use telosb mote).
> I use AMSend/ActiveMessageC interface to send and receive messages.
> Timestamp is made before sending message (or after receiving message as
> well) by using the command 'call LocalTime.get()'.
> And then, the receiver can calculate timeOffset = Global time - Local time
> However, the value of timeOffset is changed very much with each message,
> so
> the estimated global time is not correct. This error can be the timestamp
> problem. Please help me if you have any experience on this. It's very
> urgent.
> Some more questions:
> 1. How can I make timestamp at the moment before the message is sent to
> environment (close to physical layer as possible to reduce delay)?
> 2. Whether the AMSend interface performs RTS/CTS or senses the channel
> before sending the message
> Because each node is assigned slot for sending DATA message, so there is
> no
> need to use RTS/CTS.
> But for other type of message, it needs RTS/CTS to compete the channel.
> How
> can I do this?
> 3. Because it can use software/hardware Acknowlegment by default. How can
> I
> add some information into ACK message or disable both software and
> hardware
> ACK to use my own ACK?
>
> Thank you very much!
> Best regards,
> Bin
> --
> View this message in context:
> http://old.nabble.com/Timestamp-problem-tp33544786p33544786.html
> Sent from the TinyOS - Help mailing list archive at Nabble.com.
>
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to