On Thu, 2006-06-29 at 11:29, Ben Kelley wrote:
> MateRoute to the MultiHop
> format?
> 
> I can't help but wonder if this also has something to do with the
> AM_BUFFERMSG that my makefile keeps trying to mig.

It doesn't have much to do with AM_BUFFERMSG. This is just how the Mate'
build system gets mig to generate a Java class for the actual buffer
data structure.

It has to do with the packet format. The mig-generated packet formats
are not the same as those the node is using. What you need to do is get
them to agree. My intention was to get you to correct the MateRoute to
match the MultiHop format. 

You want to put this in mhop.h:

typedef struct MateRouteMsg {
  uint16_t sourceaddr;
  uint16_t originaddr;
  int16_t seqno;
  int16_t originseqno;
  uint16_t hopcount;
  uint8_t data[(TOSH_DATA_LENGTH - 10)];
} MateRouteMsg;

You then need to go into your VM app directory and

make clean

To remove all of the generated packet files. Then do the standard make,
make install.

Here are the basic issues you might run into and their causes:

type UNKNOWN, type NONE: the packet format TinyOS is generating and the
packet format the Java side is expecting do not agree. The Java side is
looking for a type field in the buffer, and because the formats do not
agree, it is looking in the wrong place, seeing a different byte, and
then complaining it is not valid.

too short: The packet formats do not agree. TinyOS is sending a shorter
packet than what the Java side expects. This happens if the Java side
has been compiled to think that the header is larger than the one TinyOS
expects.

Apologies that I can't look into the code right now: trying to get the
2.0 beta2 release out.

Phil

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

Reply via email to