[Tinyos-help] GenericComm receive msg

Resat Taylan Aydinli taydinli at su.sabanciuniv.edu
Sun Mar 27 05:56:06 PST 2005

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:
BcastM.SendCmdMsg -> Comm.ReceiveMsg[uint8_t id];
BcastM.SendCmdMsg -> Comm.SendMsg[AM_SIMPLECMDMSG];

i don't know the difference between these two different implementations..



More information about the Tinyos-help mailing list