Hi Andrea,

I didn't actually run the code but looked into ReceiverM.nc
And something immediately jumped at me:
You are calling your loop in StdControl.start()

I guess that this causes the problem.
Try this and see if it solves your mistery *g*:

task void executing(){
uint32_t i; call Leds.redOn(); for (i=0;i<5000000;i++) ; call Leds.redOff(); }

command result_t StdControl.start()
{
post executing();
}

Now your loop is running inside a task and can be interrupted by the interrupt that calls your receive function. I guess that StdControl.start() is maybe even called before any interrupts can be handled.

Hope this helps.

Martin



Andrea Pacini schrieb:

I need a confirm from somebody about a doubt on sending/receiving message in Tmote Sky. I wrote a simple Sender that sends a message and a Receiver that receive that message. All works only if the receiver is not running anything when the message arrives; in such case message is lost.

I have uploaded the Sender and the Receiver here : http://rapidshare.de/files/11648414/SendReceive.zip.html
for who wants to run the code (thanks ..)

If you run the code on two tmote sky (the motes should be started about at the same time) you see that if the receiver is doing a FOR cycle (comment/uncomment code in the receiver) it doesn't receive the message ; otherwise it receives the message.


Thanks for your help
Andrea

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



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

Reply via email to