Yes this is the same problem , I think, that I have met some time ago.
The problem is that when a node sends a message the other node receives
this message ONLY IF it is not running any code.
(only in this case the receive event is triggered). It seems that the
node cannot buffer the RECEIVE event if it is running something.
So , if you want that a node receives surely a message you must write
your code so that when it should receive a message it has run
all the previous code.
It is a strange behaviour in my opinion, I don't know if it is only for
Tmote Sky (TelosB) or for all platforms.
To highlight this behaviour try these situation:
NODE A:
NODE B:
[...]
event Receive (){ call Leds.redOn(); }
call Send(); // sends something
StdControl.start () { }
[....]
Node B does nothing; it only waits for A message. Clearly, it receives
the message from A.
Now try these:
NODE A:
NODE B:
[...]
event Receive (){ call Leds.redOn(); }
call Send(); // sends something
StdControl.start () {
[....]
for (i=0;i<5000000;i++) ;
}
Now A sends a message while B is running a FOR cycle (make sure that A
sends its message while B is running the for cycle)
You should see that red Led doesn't turn on, because the Receive event
seems to be "LOST".
Andrea
Terence Joseph wrote:
Hi All,
I am using the Tmote Sky. Assume Node A is sending a value to Node B
who upon receipt of this message resends some other value back to node
A straight away. Is there any problems that might occur in this
scenario? For example is it possible that node A may not have time to
switch to receive mode after it has sent its message and therefore
miss the message from Node B? The reason I ask is I have a similar
setup and Node A doesn't appear to be receiving anything at all but is
sending. Any ideas on a solution?
Best Regards,
Terence
_________________________________________________________________
Search and browse smarter - get MSN Search Toolbar with Desktop
Search! http://toolbar.msn.ie
_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help