Sean:

Look at how the wiring is done in the test app in
apps/tests/rfxlink/TestPacketTimeSync. TimeSyncMessageC and
ActiveMessageC provide multiple PacketTimeStamp interfaces,
PacketTimeStampRadio (TMicro precision on the telos/micaz) and
PacketTimeStampMilli (TMilli precision). You'll need to wire the
former.

Janos

On Tue, May 24, 2011 at 12:37 AM, Xiaowei <seanwill...@gmail.com> wrote:
> Dear Janos,
>
> Thank you very much for your reply! By the way, if you remember, you
> actually gave me the same clue several weeks ago! It's so frustrating that I
> still haven't figured it out.
>
> I looked into TestPacketTimeSync, you are using PacketTimeStamp.timestamp to
> get the time when packets are sent and received, is that right?
> So I tried to use interface PacketTimeStamp in my app just like you  did in
> TestPacketTimeSync by:
>
> adding "App.PacketTimeStamp->ActiveMessageC;" in my configuration file,
> adding "uses interface PacketTimeStamp<TMicro, uint16_t>;" in module file,
> and call the timestamp command like this
>             if (call PacketTimeStamp.isValid(msg)==TRUE){
>                 sendtime = call PacketTimeStamp.timestamp(msg);
> When I compile the code, it says "no match" for the wiring
> App.PacketTimeStamp->ActiveMessageC.
> In your Packet timestamping TEP written with Miklos, you mentioned it does
> not prescribe how packet timestamping should be implemented: it only
> describes the interfaces and the required functionality. Feel like I'm not
> using PacketTimeStamp interface in the correct way.
>
> Then I tried to use your CC2420XActiveMessageC by downloading the
> trunk/cc2420x folder, put it under my tos/chips folder, and in the
> configuration wire App.PacketTimeStamp->CC2420XActiveMessageC. Got the
> compile error "cannot find `CC2420XActiveMessageC'".
>
> I'm using Counter<TMicro, uint16_t> to record time of microsecond presicion,
> and disabled csma  by setting the default value of "ccaOn = TRUE" to "ccaOn
> = FALSE" in tinyos-2.1.0/tos/chips/cc2420/csma/CC2420CsmaP.nc. The rest I'm
> trying to do is to record the actual time when packets are transmitted(when
> the first bit hits the air, or at least as close to the moment as possible)
> and received. Can this be achieved in tinyos 2.1.0 with telosb mote in an
> easy, light-weighted way?
>
> Really appreciate your time of looking into this!
>
> Sean
>
> On Sun, May 22, 2011 at 12:11 AM, Janos Sallai <sal...@isis.vanderbilt.edu>
> wrote:
>>
>> 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 <seanwill...@gmail.com> 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
>> > Tinyos-help@millennium.berkeley.edu
>> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>> >
>
>

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

Reply via email to