When simulating my program under tossim I note the following fact: The AMsend () return success however sometimes AMsend. SendDone() event is not triggered.
And sometimes sendone () event triggered but receiver does not receive the message (the receive event is not triggered) Can you explain me possible problem or why the output is that?? My code is as follows: ... res=call AMSend.send(nid, &pkt, sizeof(riseg_msg_t)); //signaler que le canal is busy if(res==SUCCESS) radioBusy=TRUE; printf("EndDevice (GC:%i): call AMSend.send(%i, &msg, len) return %d at Time:%i\n", TOS_NODE_ID, nid, res, call TimeStamp.get()); printf("EndDevice %i: JOIN_KEY message sent to NODE %i : group=%i, GC=%i, nextHop=%i \n", TOS_NODE_ID, nid, gid, GCAddress[gid], joinKeyMsg->next); ... In senddone() { ... printf("%s %i: AMSend.sendDone err:%i \n", (TOS_NODE_ID>1)? "EndDevice":"BaseStation", TOS_NODE_ID, err); //test if the message is sent if(err==SUCCESS) { uint8_t gid=0; radioBusy = FALSE; if (&pkt == msg) { printf("%s %i: AMSend.sendDone to Node src:%i dest:%i \n", (TOS_NODE_ID>1)? "EndDevice":"BaseStation", TOS_NODE_ID, call AMPacket.source(msg), call AMPacket.destination(msg)); //,radioBusy ? "TRUE":"FALSE" } .. The output is as follows: EndDevice (GC:3): call AMSend.send(6, &msg, len) return 0 at Time:34 EndDevice 3: JOIN_KEY message sent to NODE 6 : group=1, GC=3, nextHop=5 //this means that node 3 send message to node 6 with res=SUCCESS However node 6 does not receive the message? Thx for any clarification or explication
_______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help