[Tinyos-help] Trouble with modifying BaseStation

Romain Thouvenin romain.thouvenin at gmail.com
Wed May 2 03:32:27 PDT 2007


Hi,

I'd like to use BaseStation with my Multi-hop Protocol and read the
packets in a Java application.

So I "migged" the multi-hop packet, wired BaseStationP to the
multi-hop component (which provide AM interfaces), and modifyed
BaseStationP so that it always use the multi-hop AM type and compute
the proper length of the packet.

Problem : the multi-hop packet is declared like that :
   typedef nx_struct mhpacket {
     mhpacket_header_t header;
     nx_uint8_t data[TOSH_DATA_LENGTH-sizeof(mhpacket_header_t)];
   } mhpacket_t;

As a result, the Receiver class thinks the packet length is always
TOSH_DATA_LENGTH, and reports that received messages are too short.

Isn't it possible to use variable-length packets ?


Thanks for your help,

Romain


More information about the Tinyos-help mailing list