[Tinyos-help] TOSBase question

Raghu Ganti raghukiran at gmail.com
Thu Sep 22 09:03:56 PDT 2005

Hi Terence,
 In reply to your question, as far as I know, TOS_LOCAL_ADDRESS
is not the id of the node's packets you are receiving, it is the id of the
local node. I would suggest you to send the local address of the
sending node in the data packet you are sending to the base, let us
say it is called data[i], where i'th byte of data has the local
address of the sender. On the base, modify the code so that you can
check for this particular byte's value and do accordingly.


Below is your originial question!

Hi All,

I have three nodes running.  Two are transmitting one value each and the
third is connected to my pc and running TOSbase.  What I would like is to be
able to pick up one node and ignore the other however I want the two
transmitting nodes to be able to hear each other.  I tried modifying a line
in event TOS_MsgPtr RadioReceive.receive(TOS_MsgPtr Msg) in TOSBase from

if ((!Msg->crc) || (Msg->group != TOS_AM_GROUP))
     return Msg;


if ((!Msg->crc) || (Msg->group != TOS_AM_GROUP) || (TOS_LOCAL_ADDRESS == 1))
     return Msg;

I have set the TOS_LOCAL_ADDRESS parameter to 1 and 2 respectively on the
two transmitting nodes.  When the if statement contains (TOS_LOCAL_ADDRESS
== 1) as above it won't pick up either nodes. However when it contains
(TOS_LOCAL_ADDRESS == 2), it picks up both??  This is rather strange and if
anyone can explain it that would be great (or give me a better way of doing
this).  Thanks.

Best Regards,


More information about the Tinyos-help mailing list