You are right. The reason seems to be sequence numbers. The problem occurs on sending only a single packet. I mean if the sender transmits at least two packets before its restart, all the packets that are transmitted after the restart are successfully received.
This is because say last sequence number noted at the receiver before the sender's restart is X (where X>=2), the first packet after the restart will have the sequence number 1 which is NOT EQUAL to the last sequence number X noted at the receiver. Receiver does not drop a new packet if its sequence number is less than that of the last received. Thanking you, Manjunath D ################################################################################################################ *************************************************************************************************************** On Fri, 6 Aug 2010, Urs Hunkeler wrote: > Hi Manjunath, > > Just a guess, I think I have seen a sequence number somewhere in the header > of the message. Maybe when you restart the sending node, it will also restart > the sequence number, and the receiving node thinks the second message is a > retransmission. Do you have a sniffer to see the exact messages exchanged > between the nodes? What kind of motes do you use (this sequence number thing > probably depends on the type of radio you use)? > > Cheers, > Urs > > > On 8/6/10 12:55 PM, Manjunath Doddavenkatappa wrote: >> >> I apologize if I have missed something very basic. >> >> The problem is when sending a packet directly from the >> SplitControl.startDone (SplitControl wired to ActiveMessageC). If the >> PERIODIC Timer is used in SplitControl.startDone() and the packet is sent >> from the corresponding fired() routine, everything works fine. However, >> with the Timer.oneShot(), the problem persists. >> >> The program is simple, the sender node (TOS_NODE_ID=1) sends a single >> packet and the receiver (TOS_NODE_ID=2) receives the packet and toggles >> green LED. Once the program is loaded onto the sender and receiver motes, >> the problem can be reproduced as follows. >> >> 1) Power-up the receiver node. >> >> 2) Power-up the sender node. On the Power-up, the sender transmits a >> packet and it is successfully received by the receiver. >> >> 3) PROBLEM arises once you restart the sender or power-down and power it >> up again (please do not power-down/restart the receiver). The packet that >> the sender transmits now on the restart is not received by the application >> handler at the receiver (green LED does not toggle). However, if you use >> PacketAcknowledgemnts at the sender, the second packet is actually >> acknowledged (wasAcked() returns SUCCESS). >> >> I am using latest checkout from the CVS. I also tested the code in older >> versions too but without luck. >> >> FOLLOWING is the CODE: to test with the Timer, please uncomment the line >> "Timer.startPeriodic" and comment "AMSend.send" below this line (in the >> event SplitControl.startDone()). >> >> >> [..] >> >> >> Manjunath D > _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
