[Tinyos-help] packet loss

Aditya Bhave adityay.bhave at gmail.com
Sun Jul 23 00:14:10 PDT 2006


Yup only the first packet will most likely get through. Another way to do
this is to keep a repeatable timer say every 100 ms (enough for one packet
to get through) and every time the timer fires to send the subsequent
messages


On 7/23/06, Michael Schippling <schip at santafe.edu> wrote:
>
> You can't do that...
>
> send() doesn't have a queue so only the first message will go out.
> The rest, until you get a sendDone(), will be ignored. I beleive the
> return value from send() indicates whether it was successful.
>
> The way to send as fast as possible is to post the subsequent send()s
> from sendDone().
>
> MS
>
> Nilay Chheda wrote:
> > i am trying to broadcast packets back to back. The problem is that most
> > of the packets are either lost or are not sent at all.
> > the following is the code snippet.
> >
> >  result_t  sendData(int dest, uint8_t com)
> > {
> >  if (!pending)
> >       {
> >     pending = TRUE;
> > .
> > .
> > .
> >
> >     atomic {
> >       message->src = TOS_LOCAL_ADDRESS;
> >
> >       message->dest = dest; // for bcast
> >       message->com = com; // for JOIN
> >     }
> >
> >     for(i=0;i<5; i++)
> >          {
> >                      call Send.send(TOS_BCAST_ADDR, sizeof(IntMsg),
> &data);
> >
> >           }
> > .
> > .
> >
> > }
> >
> >
> >  event result_t Send.sendDone(TOS_MsgPtr msg, result_t success)
> >   {
> >
> >    if (pending && msg == &data)
> >       {
> >     pending = FALSE;
> >       }
> >
> >     return SUCCESS;
> >   }
> >
> > Can anybody guide how to avoid packet losses?
> >
> > Thanks
> > Nilay
> >
> >
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Tinyos-help mailing list
> > Tinyos-help at Millennium.Berkeley.EDU
> >
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
regards,
Aditya Bhave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20060723/bc34bb94/attachment.html


More information about the Tinyos-help mailing list