Hi, I have written a very simple test app to verify the proper operation of the acknowledgment mechanism in TinyOS (see below). The program running on a mote with an ID > 0 sends every second a packet to the mote 0 and toggles LED 0. If it receives an Ack, it also toggles LED 1. It appears that:
TelosB -> TelosB: ack received TelosB -> Iris : ack received Iris -> Iris : ack received But: Iris -> TelosB: NO ack Is there an incompatibility between the two chips? Any other known issues? Ideas on how to solve this problem? Cheers, Urs ------------------------------------- #include "test.h" module TestC { uses interface Leds; uses interface Boot; uses interface SplitControl as RadioControl; uses interface AMSend as Send; uses interface Timer<TMilli> as Timer; uses interface PacketAcknowledgements as Ack; } implementation { message_t rpacket; event void Boot.booted() { call RadioControl.start(); } event void Timer.fired() { error_t error; TestMsg* msg; call Leds.led0Toggle(); msg = (TestMsg*)call Send.getPayload(&rpacket, sizeof(TestMsg)); if(msg == NULL) { call Leds.led2On(); return; } msg->data = TOS_NODE_ID; error = call Ack.requestAck(&rpacket); if(error != SUCCESS) { call Leds.led2On(); return; } error = call Send.send(0, &rpacket, sizeof(TestMsg)); if(error != SUCCESS) { call Leds.led2On(); } } event void RadioControl.startDone(error_t error) { if(error == SUCCESS) { if(TOS_NODE_ID > 0) { call Timer.startPeriodic(1024); } } else { call Leds.led2On(); } } event void Send.sendDone(message_t* msg, error_t error) { if(error != SUCCESS) { call Leds.led2On(); } if(call Ack.wasAcked(msg)) { call Leds.led1Toggle(); } } event void RadioControl.stopDone(error_t error) { if(error != SUCCESS) { call Leds.led2On(); } } } ------------------------------------- _______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help