Hi,

definition of TOS_MSG in tinyos1.x is as below:

typedef struct TOS_Msg
{
  /* The following fields are transmitted/received on the radio. */
  uint16_t addr;
  uint8_t type;
  uint8_t group;
  uint8_t length;
  int8_t data[TOSH_DATA_LENGTH];
  uint16_t crc;

  /* The following fields are not actually transmitted or received 
   * on the radio! They are used for internal accounting only.
   * The reason they are in this structure is that the AM interface
   * requires them to be part of the TOS_Msg that is passed to
   * send/receive operations.
   */
  uint16_t strength;
  uint8_t ack;
  uint16_t time;
  uint8_t sendSecurityMode;
  uint8_t receiveSecurityMode;  
} TOS_Msg;

there is a length filed before data filed indicate payload length.When i read  
from serial port ,the data is something like:

7E 42 FF FF 16 11 03 0B 21 05 B1 9F 7E

03 is the lenght field and indicate lenght of following data and 0B 21 05  is 
data format we defined in our application.

but when i directly receive data with 802.15.4,the data is like:

01 08 01 FF FF FF FF 16 11 0B 21 05 6D 3C FF

01 08 01 FF FF FF FF is the Mac header of 802.15.4,and the length filed is 
missing!


so my question is: is the data lenght filed really in the 802.15.4 frame?if not 
,what's it used for?

any help would be appreciated!



2008-11-03 



Oden
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to