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 = "">
      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
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to