[Tinyos-help] Can I use PacketAcknowledgments in TinyOS Testbed ?(It works well in Tossim, but doesn't work in Testbed).

DAE HEE KIM dahkim77 at gmail.com
Mon Feb 4 06:43:39 PST 2008


2008/2/4, DAE HEE KIM <dahkim77 at gmail.com>:
>
> Hello
>
> Thanks for help to everyone.
>
> Right, in case of broadcast, I couldn't get acknowledge. After I changed
> broadcast to peer-to-peer as followings, I got acknowledge.
>
> By the way, Philip, "You need to call PacketAcknowledgements to enable
> acks in the send path" means "call Acks.requestAck(&pkt);" in the
> following codes??
>
> Thanks.
>
>   /***************************
>    * Send Packet
>    **************************/
>   // send data when timer expires
>   event void Timer0.fired()
>   {
>     uint8_t next_hop;
>
>     counter++;
>
>     if (!busy) {
>
>       // create new packet
>       BlinkToRadioMsg *btrpkt = (BlinkToRadioMsg*)(call Packet.getPayload(&pkt,
> NULL));
>
>       // insert data into packet
>       btrpkt->nodeid  = TOS_NODE_ID;
>       btrpkt->counter = counter;
>
>        if (TOS_NODE_ID == 8)
>          next_hop = 0;
>      else if (TOS_NODE_ID == 0)
>          next_hop = 8;
>
>       call Acks.requestAck(&pkt);
>       if (call AMSend.send(next_hop, &pkt, sizeof(BlinkToRadioMsg)) ==
> SUCCESS) {
>         dbg("BlinkToRadioC","Send %d packet\n", counter);
>         busy = TRUE;
>
>         // send success : Blink
>         call Leds.led0Toggle();
>       }
>     }
>   }
>
>   // finish sending
>   event void AMSend.sendDone(message_t *msg, error_t error) {
>     if (&pkt == msg) {
>       if (call Acks.wasAcked(msg)) {
>         call Leds.led2Toggle();    <-- led2 toggles which means acked
>       }
>       else {
>         call Leds.led1Toggle();
>       }
>       busy = FALSE;
>     }
>   }
>
>
> 2008/2/4, Omprakash Gnawali <gnawali at usc.edu>:
> >
> >
> > http://mail.millennium.berkeley.edu/pipermail/tinyos-devel/2007-June/001742.html
> >
> > - om_p
> >
> > On Feb 4, 2008 12:23 AM, Michiel Konstapel <m.konstapel at sownet.nl>
> > wrote:
> > > > if (call AMSend.send(AM_BROADCAST_ADDR, ...
> > >
> > > Acks are only sent for unicast messages, not broadcasts. Maybe TOSSIM
> > > does send acks for broadcasts?
> > > Michiel
> > >
> > > _______________________________________________
> > > Tinyos-help mailing list
> > > Tinyos-help at millennium.berkeley.edu
> > >
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> > >
> >
>
>
>
> --
> DaeHee Kim (Danny)
> Department of Computer Science, State University of NewYork at Binghamton.
> Cell Phone : 1-607-321-9574
> Address : 13-A Andrea Dr, Vestal, NY, 13850
> email-address : dkim11 at binghamton.edu, dahkim77 at gmail.com
>



-- 
DaeHee Kim (Danny)
Department of Computer Science, State University of NewYork at Binghamton.
Cell Phone : 1-607-321-9574
Address : 13-A Andrea Dr, Vestal, NY, 13850
email-address : dkim11 at binghamton.edu, dahkim77 at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20080204/4566f004/attachment.htm


More information about the Tinyos-help mailing list