[Tinyos-help] GenericComm receive msg

Farzad H. Eskafi feskafi at gmail.com
Mon Mar 28 13:02:13 PST 2005


Hi Taylan,

Both Send and receive need to have the same AM id, something like the
example below.

MyAppM.ReceiveCmdMsg -> Comm.ReceiveMsg[AM_PERIODICMSG];
MyAppM.SendMsg -> Comm.SendMsg[AM_PERIODICMSG];
where Comm is wired to GenericComm.

Also, there are more examples of Send/Recieve messages in
contrib/ucb/apps/CountRadio.

I have one question, how are you planning to calculate the distance
between two motes?

Thanks,

-Farzad


On Sun, 27 Mar 2005 16:56:06 +0300, Resat Taylan Aydinli
<taydinli at su.sabanciuniv.edu> wrote:
> 
> I've been trying to write an application to calculate the distance between two
> motes. One sends packets, and the other one is supposed to receive them and
> process them. I use the GenericComm component in the receiver application like:
> 
>   MyAppM.CommControl -> Comm;
>   MyAppM.ReceiveCmdMsg -> Comm.ReceiveMsg[AM_PERIODICMSG];
> 
> i tried to make it look like the BCast application in the tutorials, but
> apparently i'm missing something since one mote sends packets successfully,
> but the receiver cannot receive the packets. the ReceiveMsg event is never
> triggered, and so the mote cannot do any processing. i just can't figure out
> why i have this problem.
> 
> I'd really appreciate it if any of you could give me advice and/or some
> resources about the messaging interfaces of TinyOS.
> 
> Also, i would appreciate information about the two types of wiring the
> messaging components:
> i.e.
> BcastM.SendCmdMsg -> Comm.ReceiveMsg[uint8_t id];
> BcastM.SendCmdMsg -> Comm.SendMsg[AM_SIMPLECMDMSG];
> 
> i don't know the difference between these two different implementations..
> 
> Thanks
> 
> Taylan
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-help
>


More information about the Tinyos-help mailing list