[Tinyos-help] motetest.c - stargate - tinyos 2.x

KURT PETERS peterskurt at msn.com
Sat Nov 3 07:31:00 PDT 2007


I'm trying to rewrite motetest.c for the stargate so it works with tinyos 
2.x.  I guess my first question is:
Has anyone done this yet? Or does someone have something with similar 
functionality?

I'm using the BaseStationx.nc included with TinyOS 2.x.  That being said, 
when the message forwarded is sent from serial AM to radio AM, does the 
header change?  This seems to be very difficult to figure out by tracing the 
source code.  I noticed the header format for serial is:
typedef nx_struct serial_header {
  nx_am_addr_t dest;
  nx_am_addr_t src;
  nx_uint8_t length;
  nx_am_group_t group;
  nx_am_id_t type;
} serial_header_t;
while the radio header should be:
typedef nx_struct cc2420_header_t {
  nxle_uint8_t length;
  nxle_uint16_t fcf;
  nxle_uint8_t dsn;
  nxle_uint16_t destpan;
  nxle_uint16_t dest;
  nxle_uint16_t src;

  /** I-Frame 6LowPAN interoperability byte */
#ifdef CC2420_IFRAME_TYPE
  nxle_uint8_t network;
#endif

  nxle_uint8_t type;
} cc2420_header_t;

which one should I expect to deal with at the stargate side?
Regards,
Kurt




More information about the Tinyos-help mailing list