Hello friends,

I have 2 different questions.

1. I wanted to know how can I receive messages of different payload format
i.e the payload are of different sizes and structures from different motes
to a common mote. I have seen the code for BaseStation. It does a similar
thing. But the doubt which bogs me is the AM type of a message. Can anyone
tell me the meaning of AM type. I understand that different message types
have different AM types. And we can differentiate different message based on
this. Two packets coming from different kinds of motes running different
applications can be distinguished using AM types. Am I right ? If I am then
how can we make sure that the AM types are always distinct.

 And if my concept of AM Type is entirely wrong then please do not curse me
and tell me what it really means. I would be more than thankful if you do
so.

2. When i receive messages from motes to the base station I get a messages
that do not match the tinyos message_t structure. For example I ran a simple
test in which the source mote sends its TOS_NODE_ID and a serial number of
the message over the radio.  The TOS_NODE_ID  of this node was 3. The
structure of the message payload was as shown below.

typedef nx_struct test{
   nx_am_addr_t nodeid;
   nx_uint16_t num;
}test;

I got this as the output displayed on my computer.
00 FF FF 00 03 04 22 06 00 03 00 01
00 FF FF 00 03 04 22 06 00 03 00 02
00 FF FF 00 03 04 22 06 00 03 00 03


The output of the BlinkToRadio application. But why is it that the output
sent by the motes is not according to the message_t structure.

typedef nx_struct cc1000_header {
 nx_am_addr_t addr;
 nx_uint8_t length;
 nx_am_group_t group;
 nx_am_id_t type;
} cc1000_header_t;

Why is it that there is always the TOS_NODE_ID inserted after the
destination ID. In the header the
first field is the destination address right. Then its the length. But
why is it that i always get
the source node ID.

Thanking You
MMA
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to