Hi!

On Tue, 13 Jan 2009, Yu (Jason) Gu wrote:

> Hi,
>
>
>
> I have several questions about Acks for CC2420 in Tinyos 2.1.0.
>
>
>
> 1.       In the CC2420ControlP.nc, it seems that autoAck is enabled by
> default, but why I cannot get ack at all by calling
> PacketAcknowledgements.wasAcked(message_t* p_msg)?
>

If the packet did not asked for an ack using requestAck then the wasAcked 
will always return FALSE.

>
> 2.       Then I tried to call CC2420Config.setAutoAck(TRUE, TRUE) and
> CC2420Config.sync() to enable autoAck by hand, but still not successful by
> calling PacketAcknowledgements.wasAcked(message_t* p_msg).
>

The setAutoAck selects how the acking is done for the received packets 
that asked for and ack. The options are: no-acking, software-acking and 
hardware-acking.

>
> 3.       Finally, I have to add PacketAcknowledgements.requestAck(&pkt)
> before calling send, then I can have Acks from
> PacketAcknowledgements.wasAcked(message_t* p_msg).
>
>
>
>
>
> Is there anything wrong in my first two steps? Do I have to call
> Acks.requestAck(&pkt) in order to have my Acks?
>

Yup, you have to ask for acks for each packet in order to get one. :-) 
Acks (as sending power for example), is a per-packet property.

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

Reply via email to