Hi there, You don't mention which routing protocol, but if you're using the BLIP stack, one way to achieve time synchronization would be to use regular (S)NTP. Assuming you can route from the motes to the PC (e.g. via mote running PppRouter app), you can then run a standard NTP server on the PC and use the TinyOS SNTP client we wrote. You'll find the patch for it over here: http://code.google.com/p/tinyos-main/issues/detail?id=95 Whether this would be precise or not for your purposes I cannot attest to - it depends on many variables (radio link quality/reliability, NTP resync frequency, internal clock stability, etc).
If you prefer to go down the serial path, I believe there are a number of tutorials over at http://docs.tinyos.net covering serial communications between mote and PC. It should be quite easy to write a simple request/response protocol to provide time on request if that's all you need the serial for. Good luck! Regards, /Johny P.S. & unrelated: /wave @ KTH - do you guys still have the VR-cube running? And did you ever get to claim the old nuclear reactor halls as computer lab space? It always seemed like it would bring a new meaning to "core dump"... :) On 7 February 2012 05:02, Muhammad Altamash Khan <[email protected]> wrote: > ** > Hi, > > I am new to TinyOS and i intend to work with the routing protocol. Right > now, i want to calculate the link and end to end delay in a multihop net. > > I am assuming that all the node are connected (via long USB cables) to PC. > One idea i was contemplating was that, the message from a originator node > could be time stamped with the PC clock time. > > At the receiver, the motes can get the PC clock time (OS is Ubuntu 10.04) > at initialization (say booting) and then calculate the PC time, at any > moment , by adding the mote time elapsed since booting. Finally, the time > it took for the single hop transmission can be calculated by at the > receiver by subtracting this time, with the one in the in-coming packet. > > I have looked up for the ways for accessing the PC time from the mote but > could not find the right way. Can anybody please help me in it matter. > > > Regards, > *Altamash Ahmed, * > > > > > > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > -- Johny Mattsson Senior Software Engineer DiUS Computing Pty. Ltd. *where ideas are engineered *
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
