[Tinyos-help] No Acknowledgements for buffered messages

David Piotrowski tinyos at zeroflag.eu
Thu Apr 22 14:54:19 PDT 2010

I noticed now that when i turn the destination node off and on for two or three times then packet sending starts to behave as expected. The buffered packets and the unbuffered ones are then acknowledged by the destination node. Even if I turn the destination node off and on again after sending once became "normal" the sending node does not fall back into complaining about unacknowledged packets again. But sometimes when the destination node is turned on again the sender reports two acknowledgements for every sent packet until I turn the destination node off once more.

I am wondering if this could be some kind of timing problem. Is it possible that if a node sends every other packet with requested acks to a specific node and the other half without acks as broadcast they get somehow mixed up when executing the sendDone event? At the moment my sendDone routine looks like this:

event void AMSend.sendDone(message_t* msg, error_t err) {
    isRadioBusy=FALSE;                                                                // Signal that the radio can be used again

     * If the packet was not broadcasted we expect an acknowledgement                *
    if(call AMPacket.destination(msg) != AM_BROADCAST_ADDR) {
         * If we got no acknowledgement from the next hop node                       *
        if(call PacketAcknowledgements.wasAcked(msg) == FALSE) {
            printf("\tNo Ack from node %d...\n", call AMPacket.destination(msg));     // Link to destination broken...update Routing information
             * We cannot reach the node so update the route cache                    *
            call dsrRouteCache.notifyLostConnectivity(call AMPacket.destination(msg));// Tell the cache about the broken link

             * Send a Route Error Message to the originator of the packet            *

        else {
            printf("\tReceived an Ack from node %d\n", call AMPacket.destination(msg));printfflush();
    signal dsrSend.sendDone(msg, err);

As I said before although the sent messages are not acknowledged in the beginning they are all received by the destination node.
Any ideas or suggestions would be very welcome.

Thanks again, David

Am 22.04.2010 um 20:37 schrieb David Piotrowski:

> Hi there,
> I'm having difficulties with acknowledgements for message_t structures that have been buffered. For all my normal message_t structures I am getting an acknowledgement as expected but if I store my message_t structures in a buffer, read them out again and try to send them I am not getting acknowledgements for these message_t structures anymore. The messages though are received correctly by the destination node. I do not think this is the buffer's fault since I am only copying the structs and not changing them inside the buffer. Before sending the structs I am manipulating the payload and adjusting the length of the message to send but I am doing the same for unbuffered messages and not having problems there. Any suggestions or ideas would be welcome.
> Thanks, David.
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20100422/7b043fa4/attachment.htm 

More information about the Tinyos-help mailing list