Hello,
for what i know there is no problem sending over uart and radio at the 
same time. But be aware of the task sheduling. You do not send at the 
same time, the tasks are processed one after another ...

I can not help you here, please provide a minimal example that compiles.
Maybe you are using the same locks (sending_packet) but you have to use 
two (lock_radio lock_uart).



Xavi Colomer schrieb:
> Hello,
> 
> I need to send to UART and Radio at a time, but only one of SendMsg 
> calls works... What is the problem? Parameterized interfaces solves the 
> problem? 
> *
> *
> *MyApp.nc*
> [...]
> MyAppM.SendMsg -> Comm.SendMsg[AM_XSXMSG]; //AM_XSXMSG=0
> MyAppM.UARTMsg -> Comm.SendMsg[AM_XSYMSG];//AM_XSYMSG=1
> [...]
> *MyAppM.nc*
> [...]
> uses {
>     interface Timer;
>     interface Leds;
>     interface ReceiveMsg;
>     interface SendMsg; 
>     interface SendMsg as UARTMsg;
> }
> [...]
> void task SendFlag()
>   {
>     atomic sending_packet = TRUE;
>     
> if (call SendMsg[AM_XSXMSG].send(port,sizeof(XDataMsg),&msg_buffer) != 
> SUCCESS)
>    sending_packet = FALSE;
> return;
>   }
>   void task SendData()
>   {
>   atomic sending_packet = TRUE;
> 
>   if (call UARTMsg.send(TOS_UART_ADDR,sizeof(YDataMsg),&msg_buffer2) != 
> SUCCESS)
>     sending_packet = FALSE;
>  return;
> }
> 
> Sorry for my bad english, and thanks in advance.
> 
> Xavi
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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