Sean: The default cc2420 radio stack doesn't support TMicro timestamping. There's an alternative implementation, however, which does. Take a look at apps/tests/rfxlink/TestPacketTimeSync. The readme file explains how to compile for the telos. You'll need the latest sources from google code.
For your convenience, here's a direct link to the readme file. http://code.google.com/p/tinyos-main/source/browse/trunk/apps/tests/rfxlink/TestPacketTimeSync/README.txt?spec=svn5544&r=5544 Janos On Sat, May 21, 2011 at 7:14 PM, Xiaowei <[email protected]> wrote: > Hi all, > > I'm doing some experiment to record the exact time when packets start > transmission at the sending mote and being received at the receiving mote > with telosb motes in TinyOS 2.1.0. > These are the components and interface I'm using: > components Msp430CounterMicroC; > App.Counter -> Msp430CounterMicroC > uses interface Counter<TMicro, uint16_t>; > > To get rid of random delay, I also disabled csma by setting: > the default value of "ccaOn = TRUE" to "ccaOn = FALSE" in > tinyos-2.1.0/tos/chips/cc2420/csma/CC2420CsmaP.nc > > At the sending mote, I called Counter.get() in sendDone event handler, and > at the receiving mote I called Counter.get() in receive event handler. It > seems that the time recorded is not the exact time when the packet is sent > over the air. > > So I tried to use interface PacketTimeStamp<TMicro, uint16_t>, but got the > "no match" error for the line App.PacketTimeStamp->ActiveMessageC when > compiling the code, couldn't figure out why. Tried "include message.h in > module file", didn't work. > > There's also another interface RadioTimeStamping that provides event > transmittedSFD and receivedSFD, which satisfies my requirement. But it's > said that RadioTimeStamping is not supported in TinyOS 2.1. I tried to use > it by wire 'App.RadioTimeStamping->CC2420TransmitC.TimeStamp', got compile > error "cannot find TimeStamp". > > I have been stuck in this problem for a while, anyone knows how to do this > (Basically, get the time when packets actually being transmitted to the air > and being received)? > > Any help is greatly appreciated. > > Sean > > > > _______________________________________________ > 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
