[Tinyos-help] Help regarding usage of PacketLink for Software Acks
Nithin Kumar Dara
nithinkumary2k at gmail.com
Sun Jan 18 09:40:48 PST 2009
Hi,
Iam trying to use software ACKs to achieve some degree of guaranteed
delivery. This is my understanding. Can you please correct me if iam wrong?
First we need to set the auto acks for CC2420 radio.
by calling CC2420.setAutoAck(TRUE,FALSE)
and then call CC2420.sync()
(both at the sender side and receiver side)
before each message_t msg is sent. i have to call
PacketLink.setRetries(&msg,10); (for 10 attempts)
PacketLink.setRetryDelay(&msg,1000); (the delay before which another
attempt is made if ACK is not delivered.)
PacketAcknowledgement.requestACK(&msg);
and then i call AMSend.send to send the packet to a destination node.
Is there anything more i have to do at the receiving side?
I have defined the macro PACKET_LINK in the makefile to additionally
compile the optional PacketLink layer into the CC2420 stack.
Where in the code should i call PacketLink.wasDelivered(&buffer) to
ensure whether the packet is delivered or not?
--
nithind
More information about the Tinyos-help
mailing list