[Tinyos-help] AM_INTMSG or TOS_BCAST_ADDR

Urs Hunkeler uhu at gmx.ch
Thu Aug 2 04:04:04 PDT 2007


Hi,

Think of AM_INTMSG as something like a port number. It does not identify
a mote. TOS_BCAST_ADDR is a broadcast address. All nodes that physically
receive the message will forward it to the application layer. You can
find more information in this paper: http://www.tinyos.net/papers/ammote.pdf

Cheers,
Urs


Chen Bleed schrieb:
>  
> Hello, all
>  
> Now I am studying for Lesson 4 of TinyOS 1.x tutorial.I have two tmote sky(s) and I also have a problem.
>  
> The file IntToRfm.nc has the line "IntToRfmM.Send -> Comm.SendMsg[AM_INTMSG];"I consult IntMsg.h and find out the value of AM_INTMSG is 4(by default, you can change).
>  
> The id of One of my tmote is 3. I upload CntToLedsAndRfm program.The other tmote whose id is 4. I upload RfmToLeds program.It works fine.
>  
> When I change the code in IntToRfmM.nc/* code - start */if (call Send.send(TOS_BCAST_ADDR, sizeof(IntMsg), &data))  return SUCCESS;/* code - end */
>  
> to code/* code - start */if (call Send.send(0x000a, sizeof(IntMsg), &data))  return SUCCESS;/* code - end */
>  
> I want to transmit message to mote 10 but mote 4 still receives messages.(I know TOS_BCAST_ADDR is 0xffff).Then I run CntToLedsAndRfm on TinyViz and create 30 motes.I see all motes has shot radio purple line to mote 10(use radio plugin).I am confused!!!
>  
> So, I cannot change this result(mote 4 receives messages) even if I modify the destination address??Indeed, I dont know the relation between AM_INTMSG and TOS_BCAST_ADDR.Does anyone explain it??
> thx all, and sorry for my bad English.Chen, Chien Mao


More information about the Tinyos-help mailing list