Hi,
   Can anyone please tell me when the posting of sendTask can fail in 
AMStandard? I'm trying to send a series of packets from a MICA2 mote to 
another, and it seems that after the first message in the series is 
successfully received by the receiver, and the acknowledgement reaches the 
sender, but from the second message onwards, the sender fails to send the 
packets over the radio. For debugging, I've actually called some display() 
function in the following part of code in the implementation of SendMsg.send 
in AMStandard.nc:

  command result_t SendMsg.send[uint8_t id](uint16_t addr, uint8_t length, 
TOS_MsgPtr data) {
    long j;
    if (!state) {
      state = TRUE;
      if (length > DATA_LENGTH) {
        dbg(DBG_AM, "AM: Send length too long: %i. Fail.\n", (int)length);
      state = FALSE;
        return FAIL;
      }
      if (!(post sendTask())) {
        dbg(DBG_AM, "AM: post sendTask failed.\n");
      call Display.display(0);
        for (j=0; j< 50000000;j++);
        call Display.display(7);
        for (j=0; j< 50000000;j++);
        call Display.display(0);
        for (j=0; j< 50000000;j++);
        state = FALSE;
        return FAIL;
      }
      else {
        buffer = data;
        data->length = length;
        data->addr = addr;
        data->type = id;
        buffer->group = TOS_AM_GROUP;
        dbg(DBG_AM, "Sending message: %hx, %hhx\n\t", addr, id);
        dbgPacket(data);
      }
      return SUCCESS;
    }
    
    return FAIL;
  }


   What is the actual physical interpretation of this?
   Thanks in advance
                    Bibudh Lahiri


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

Reply via email to