Test the feedback flag SP_FLAG_F_RELIABLE, *not* the control flag
SP_FLAG_C_RELIABLE.  See the documentation for more information in
/opt/moteiv/doc/nesdoc.

Acks will only be used for unicast destinations (ie, 1, 2, 3...)

-Joe

On 11/23/06, Ee Foong Lee <[EMAIL PROTECTED]> wrote:


Hi,

When i used sendAdv to send packets to receiver and i set the flag in
sendAdv to SP_FLAG_C_RELIABLE to acknowledge each packet.
Then, during each sendDone, i tested the flag in the sendDone to see if it
equal to SP_FLAG_C_RELIABLE. But the flag depends on
how you specify the destination address in sendAdv. If i use some specific
address (eg. 1, 2, ...), then the flag will not be set,
but if i use TOS_BCAST_ADDR as the destination address, then the flag is
set. How come?How can I send to a specific address with
the flag get set?

Thank you.

Andre


On 11/3/06, Joe Polastre <[EMAIL PROTECTED]> wrote:
> Using SP, you want to request reliability.
>
> See the SPSend.sendAdv() function definition in /opt/moteiv/doc/nesdoc
> (start by opening index.html and navigating in the left frame).  An
> example using reliability is in /opt/moteiv/tos/lib/MultiHopLQI
>
> -Joe
>
> On 11/2/06, Lee Ee Foong < [EMAIL PROTECTED]> wrote:
> > I'm trying to test the ack in the sendDone( ) but the ack field always
set
> > to zero. I call MacControl.enableACK( ) in the StdControl.start( ).  Is
> > there something that I did wrong or missing?
> >
> > I wired the components as following:
> >
> >  Main.StdControl -> CC2420RadioC;
> >  MultiHopEngineM.MacControl -> CC2420RadioC;
> >
> >  command result_t StdControl.start()
> >   {
> >      call MacControl.enableAck();
> >      return SUCCESS;
> >   }
> >
> >
> >  event result_t SendMsg.sendDone[uint8_t id](TOS_MsgPtr pMsg, result_t
> > success)
> >  {
> >     dbg(DBG_TEMP, "ack is %d \n", pMsg->ack);
> >
> >     if (pMsg->ack == 1)
> >       call Leds.redToggle();
> >     else
> >       call Leds.greenToggle();
> >
> >     return SUCCESS;
> >   }
> >
> >
> >
> >  Thank you.
> >
> > Andre
> >
> >  ________________________________
> > We have the perfect Group for you. Check out the handy changes to Yahoo!
> > Groups.
> >
> >
> > _______________________________________________
> > Tinyos-help mailing list
> > [email protected]
> >
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> >
> >
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
>
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>


_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to