[Tinyos-help] sendDone() called before receive

Bibudh Lahiri bibudh at gmail.com
Mon Apr 2 12:04:34 PDT 2007


Hi Faisal,
     As an idea, it sounds OK, but I'd like to mention a thing or two:

1) I'm not sure how close this would be to the transmission delay that u'd
obtain on real motes
2) If the problem of receive() being called in the receiver before
sendDone() being called in the sender persists (as u reported), then u'll
have a problem.


On 4/2/07, Faisal Karim <shaikh_fk at yahoo.com> wrote:
>
>  Hi Bibudh n all
>
> Im using at the moment TOSSIM for delay calculations and not using real
> motes.
> Therefore for delay calculation, truly i didnt think of time
> synchronization coz i was considering the global times ie tos_state.tos_time
> so i was assuming that subtracting the time of sendDone() from time of
> receive will give me some approximated form of delay time at the global
> simulator time.
>
> Second option can be to use -b=0 option of simulator to boot all nodes at
> same time to have some sort of sync.
> Any comments on this
>
>  Regards
> Faisal
>
>
>
>  ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 2 Apr 2007 10:52:34 -0500
> From: "Bibudh Lahiri" <bibudh at gmail.com>
> Subject: Re: [Tinyos-help] sendDone() called before receive
> To: tinyos-help at millennium.berkeley.edu
> Message-ID:
>     <e522914f0704020852y30336124r6c90719cdee15047 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi Faisal,
>    If u want to measure the transmission delay, how can u do it by noting
> the time of transmission and reception from the sender and the receiver
> respectively, until their clocks are synchronised to each other? Have u
> already taken care of this synchronisation?
>
>   One scheme I can suggest for measuring the end-to-end delay (round-trip)
> is, once the message reaches the destination from the src by the multi-hop
> path, send some kind of reply/ACK message all the way back to the sender,
> following the same route. Notice the time when this reply/ACK reaches the
> original src, and take the time difference with the time the message was
> sent out from this sender, divide it by 2.
>
>    My approach may sound too naive, let's see if someone else comes up
> with
> some better idea.
>
>         Bibudh
>
> Bibudh Lahiri
> Graduate Research Assistant
> Department of Electrical and Computer Engineering
> Iowa State University
> http://www.ece.iastate.edu/~bibudh/
>
>
>
> On 4/2/07, Faisal Karim <shaikh_fk at yahoo.com> wrote:
> >
> >  Thanks for replies.
> > I got the idea, but still at one hop the behavior should be like once
> the
> > source send one packet sendDone shd be called after that receiver's
> > recieve() method.
> >
> > Actually im trying to calculate the delay between transmission and
> > reception. I have put DBG statement in src's sendDone() and DBG
> statement in
> > receiver's recieve() method. When i try simulation of two nodes always
> DBG
> > of receiver invokes first than src's DBG. if someone knows some method
> to
> > calculate delay than it will be more than good.
> >
> > Regards
> > Shaikh, Faisal Karim
> >
> >
> >
> >
> >  ------------------------------
> >
> > Message: 5
> > Date: Sun, 1 Apr 2007 20:58:56 -0700
> > From: Philip Levis <pal at cs.stanford.edu>
> > Subject: Re: [Tinyos-help] sendDone() called before receive
> > To: Thang Le <nt7272 at yahoo.com>
> > Cc: tinyos-help at millennium.berkeley.edu
> > Message-ID: <0A42FB18-EDC8-46C3-9CAD-FE83BCD4B65A at cs.stanford.edu>
> > Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
> >
> > On Apr 1, 2007, at 7:02 PM, Thang Le wrote:
> >
> > >   From my understanding, in TinyOS 1.1.15, SendDone is invoked when
> > > the package is successfully queued at the sender. Even without any
> > > receiver, SendDone is still called.
> > >
> >
> > sendDone is signaled when the packet is transmitted. The error code
> > denotes whether or not the transmission succeeded. Reasons for
> > failure can include the radio being turned off mid-transmission,
> > hardware failure, etc.
> >
> > You will never receive a sendDone before the packet is transmitted.
> > That would release the packet buffer to the application, which is
> > problematic.
> >
> > Note that since sendDone denotes a data-link (single-hop)
> > transmission, it is signaled when the packet goes one hop, not the
> > multihop frame within arrives at its destination.
> >
> > Phil
> >
> > ------------------------------
> > Now that's room service! Choose from over 150,000 hotels
> > in 45,000 destinations on Yahoo! Travel<
> http://travel.yahoo.com/hotelsearchpage;_ylc=X3oDMTFtaTIzNXVjBF9TAzk3NDA3NTg5BF9zAzI3MTk0ODEEcG9zAzIEc2VjA21haWx0YWdsaW5lBHNsawNxMS0wNw--%0A>to<http://travel.yahoo.com/hotelsearchpage;_ylc=X3oDMTFtaTIzNXVjBF9TAzk3NDA3NTg5BF9zAzI3MTk0ODEEcG9zAzIEc2VjA21haWx0YWdsaW5lBHNsawNxMS0wNw--%0A%3Eto>find your fit.
> >
> > _______________________________________________
> > Tinyos-help mailing list
> > Tinyos-help at Millennium.Berkeley.EDU
> >
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20070402/177bc06f/attachment-0001.htm
>
> ------------------------------
>
> Message: 2
> Date: Mon, 2 Apr 2007 12:21:14 -0400 (EDT)
> From: "Benjamin Madore" <bcmadore at cs.pitt.edu>
> Subject: Re: [Tinyos-help] sendDone() called before receive
> To: "Bibudh Lahiri" <bibudh at gmail.com>
> Cc: tinyos-help at millennium.berkeley.edu
> Message-ID:
>     <33462.130.49.222.185.1175530874.squirrel at webmail.cs.pitt.edu>
> Content-Type: text/plain;charset=iso-8859-1
>
>
> On Mon, April 2, 2007 11:52 am, Bibudh Lahiri said:
> >   One scheme I can suggest for measuring the end-to-end delay
> (round-trip)
> > is, once the message reaches the destination from the src by the
> multi-hop
> > path, send some kind of reply/ACK message all the way back to the
> sender,
> > following the same route. Notice the time when this reply/ACK reaches
> the
> > original src, and take the time difference with the time the message was
> > sent out from this sender, divide it by 2.
> >
> >    My approach may sound too naive, let's see if someone else comes up
> with
> > some better idea.
> >
> >         Bibudh
> >
>
> I would agree calculating on the ACK (by setting auto-ACK) and dividing by
> 2
> is your best bet short of lots of hardware monitoring equipment.
>
> BTW-Round-trip would be the full time from send to ACK. End-to-end would
> be
> approximately round-trip/2. There may be some computing time in between on
> round-trip, but it is likely trivial, and in the "real world" the amount
> of
> time it takes the MAC to signal receive or to transmit is part of the
> delay.
> Pure signal timing assumes infinitely fast code in all parts of the MAC,
> which will never happen.
>
> Draw your lines appropriately.
>
> --
> The difference between the right word and the almost right word is really
> a
> large matter- it's the difference between a lightning bug and the
> lightning.
> -Twain
>
>
>
>
>
> ------------------------------
> Finding fabulous fares is fun.
> Let Yahoo! FareChase search your favorite travel sites<http://farechase.yahoo.com/promo-generic-14795097;_ylc=X3oDMTFtNW45amVpBF9TAzk3NDA3NTg5BF9zAzI3MTk0ODEEcG9zAzEEc2VjA21haWx0YWdsaW5lBHNsawNxMS0wNw--%0A>to find flight and hotel bargains.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20070402/d8e2a210/attachment.html


More information about the Tinyos-help mailing list