I am trying to forward a packet received by my mica2 mote - to implement controlled flooding. In order to accomplish this I call the SendMsg.send() fuction within the event  ReceiveMsg.receive() and wired it appropriately with the same handler id. I use the same TOS_MsgPtr that was passed as a parameter in the receive event, in the send fuction as well.
 
event result_t ReceiveMsg.receive(TOSMsgPtr msg)
{
.....
if(SendMsg.send(TOS_UART_ADDR, length, msg))  //same 'msg' that is passed in receive
.....
return msg;
}
 
I was using tinyos-1.x and ths worked fine. But whn I changed to tinyos-1.1.x I encounter a problem.
 
The problem is at the base station I use the TOS_UART_ADDR instead of the TOS_BCAST_ADDR to forward the packet to the PC. When I use Listen to view the packet at the PC I get to see only the header and the length of the data payload is 00.
Could someone tell me what is the cause of this problem?
I suspect that the new tinyos implements send as a non blocking fuction which is creating this problem. Can someone clarify this please?
 
Also, is there a better way to implement this controlled flooding mechanism?
 
Thanks
mikhail.


Play Trivia with MSN Messenger for a chance to win an XBOX™ 360 prize pack! 
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to