I don't know about BareSendMsg, but in general
I would use a task to call a normal Send and post that
task from the Timer.fired and sendDone events.

One specific problem in the code you include is that
you shouldn't be busy-waiting for more than a few micro
seconds in any function. I suspect that whatever you are
dong to wait(10 seconds) is blocking the execution of
other tasks which are needed to send messages.

I don't know why your attempt to send from sendDone failed,
but try the task approach to see if it helps.

MS

sofia aparicio wrote:
> Hello,
> 
> I want to send several radio messages using BareSendMsg.send.
> 
> If I write something like that it does not work:
> timer.fired()
> {
>     result= call BareSendMsg.send(msg);
>     wait(10 seconds);
>     result1=BareSendMsg.send(msg);
>     if (result==SUCCESS) leds red on;
>     if (result1== SUCCESS) leds yellow on;
> }
> 
> Only the red led is on, the yellow led is off. Do you know why?
> 
> I tried to send the second message in BareSendMsg.sendDone but I only 
> receive the first message not the second one.
> Could you please tell me how does it work?
> 
> Thank you very much.
> 
> Sofia
> 
> ------------------------------------------------------------------------
> Charlas más divertidas con el nuevo Windows Live Messenger 
> <http://download.live.com>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to