Assuming you are using TOS 1.x, the TOS_Msg.ack field will be != 0
in sendDone() if an ACK is received from the destination mote. When ACKS
are enabled the transmitter waits until an ACK reception times out before
calling sendDone(). Search back on this list with my name and "ACK" to see
massive amounts of (questionable) advice...
A good search starting point is:
http://www.moteiv.com/community/TinyOS_Information
MS
Heo Heo wrote:
Hui,
Thanks for your answer.
So I call the MacControl.enableAck() to enable ACK mode. But from the
sending mode, how do I check if the packet has been sent successfully ?
Like you said, sendDone is called after the packet is placed in the
queue, not after ACK is received.
I am sorry but I am completely new to TinyOS. I would appreciate it if
you could give me detailed instructions.
Thanks again,
Heo
*/Hui KANG <[EMAIL PROTECTED]>/* wrote:
The sendDone function only indicates that the message is put into the
send stack, which done not necessarily mean that the message is received
by the other node.
I think you should use MacControl.enableAck to receive the
acknowledgement.
Regards,
Hui
On 1/9/2007, "Heo Heo" wrote:
> I was trying to use interface SendMsg of GenericComm to send a
message (based on the Oscilloscope example). This interface provides
2 functions:
>
> - send(Destination, Size, Msg);
> - sendDone(TOS_MsgPtr sent, result_t success)
>
> I thought I would be able to check if the packet has been sent
successfully by looking at the "success" field of sendDone. However,
when I test it by having a mote UNICAST to a different one (which I
intentionally turned OFF), it surprises me that sendDone always
provides me a success that equals SUCCESS. By saying UNICAST, I
meant I put the address of the other mote as destination address,
instead of using TOS_BCAST_ADDR.
>
> So, what is wrong with this, and what is the best way to check if
a message has been successfully sent or not.
>
> Thanks a lot for any help.
> Heo
>
>
> __________________________________________________
>Do You Yahoo!?
>Tired of spam? Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com )
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
------------------------------------------------------------------------
_______________________________________________
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