In order to comunicate tos1 with tos2 via radio we had modifyed the TOS_Msg
structure adding an extra field we called src and moving the fields type and
group like:

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

  /* 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.
   */
  uint8_t strength;
  uint8_t lqi;
  bool crc;
  bool ack;
  uint16_t time;
} __attribute((packed)) TOS_Msg;

Following the 802.15.4 standard you also have to modify the values of de fcf
fields, for example, in the .../tos/lib/cc2420Radio/cc2420Const.h file:

define CC2420_DEF_FCF_LO          0x88
#define CC2420_DEF_FCF_HI          0x41
#define CC2420_DEF_FCF_HI_ACK      0x61

I wonder if these tips will we helpful.

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

Reply via email to