I wrote a simple program (based on Blink, Oscilloscope & OscilloscopeRF) in 
which the timer fires every 1000ms. On each timer event, the mote (micaz) sends 
a packet to both the UART and the wireless link (one after another). 
   
    It seems like a simple program, but I don't know why I can only send the 
packet to one of them. I copied the code snippet below:
   
  TOS_Msg msg;
   
  task void SendMsgToUART()
  {
    call DataMsgUart.send(TOS_UART_ADDR, sizeof(struct OscopeMsg), &msg);
  }
  
  
   
  task void SendMsgToWirelessChannel()
  {
    call DataMsg.send(TOS_BCAST_ADDR , sizeof(struct OscopeMsg), &msg);
  }
   
  event result_t timer.fired()
  {
    post SendMsgToWirelessChannel();
    post SendMsgToUART();
  
    return SUCCESS;
  }
   
  The components are wired as follows:
   
  MyModuleM.communication -> GenericComm;
  MyModuleM.DataMsg -> GenericComm.SendMsg[AM_OSCOPEMSG];
   
  
  MyModuleM.communicationUART -> UARTComm;
  MyModuleM.DataMsgUart -> UARTComm.SendMsg[AM_OSCOPEMSG];
   
  The one I can send the packet to is the first one I call in timer.fired(). In 
my example, I can only send to the Wireless channel. All packets to the UART 
port are not received.
   
  If anyone can give me a hint, I would really apppreciate it.
   
  Thanks
  Heo
   

 
---------------------------------
Sucker-punch spam with award-winning protection.
 Try the free Yahoo! Mail Beta.
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to