[Tinyos-help] How to Send Msgs fromTOSBase to a Mote Using
GenricComm
antonio gonga
ask25019fe at hotmail.com
Thu Aug 2 05:39:19 PDT 2007
Hey all,I'm trying to send messages from the TOSBase to a Mote... I receive the packet correctly in TOSBase.. but the Mote is not receiving...I need your suggestions...configuration Receiver {}implementation { components Main, ReceiverM; components GenericComm as Comm; components IntToLeds; Main.StdControl -> ReceiverM.StdControl; Main.StdControl ->IntToLeds.StdControl; Main.StdControl -> Comm; ReceiverM.RadioControl ->Comm.Control; ReceiverM.RadioReceive ->Comm.ReceiveMsg[0xa]; //ReceiverM.RadioSend ->Comm; IntToLeds.IntOutput <-ReceiverM.IntOutput;}___________________________includes AM;includes queryMsg;module ReceiverM { provides { interface StdControl; }uses{ interface StdControl as RadioControl; interface IntOutput; //interface Receive as Bcast; interface ReceiveMsg as RadioReceive; //interface BareSendMsg as RadioSend; }}implementation { command result_t StdControl.init() { call RadioControl.init(); return SUCCESS; } command result_t StdControl.start() { call RadioControl.start(); return SUCCESS; } command result_t StdControl.stop() { call RadioControl.stop(); return SUCCESS; } event TOS_MsgPtr RadioReceive.receive(TOS_MsgPtr Msg) { TOS_MsgPtr pBuf = Msg; queryMsg *p =(queryMsg*)Msg->data; call IntOutput.output(0x7); return pBuf; } event result_t IntOutput.outputComplete(result_t success){ return SUCCESS; }}I think that the code is OK..
_________________________________________________________________
Missed the show? Watch videos of the Live Earth Concert on MSN.
http://liveearth.msn.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20070802/5943624d/attachment-0001.htm
More information about the Tinyos-help
mailing list