Hi! On Sun, May 10, 2009 at 4:38 AM, Lizhao You <[email protected]> wrote: > Hi Miklos, > > I add TOSH_DATA_LENGTH=40 in Makefile, and it indeed work. Thanks for your > help, and then still need for your help. > > Then i test the maxium TOSH_DATA_LENGTH i can set, and find 105 is ok while > 106 does not work. If i set TOSH_DATA_LENGTH 106, nothing displayed in the > screen, just > serial@/dev/ttyUSB1:57600: resynchronising > ... > Then i set to 105, and increase the Payload field in my Telosb application, > and the result is: > 10:25:50 "rx" 5762211 61928 0 35 [ 0x41 0x88 0xb9 0x22 0x00 0xff 0xff 0x02 > 0x00 0x3f 0x06 0x00 0x02 0x00 0x00 ]
Realize, that the IRIS has some packet header, and the packet header + payload cannot be larger than 127 bytes. That is why it does not work at 106. > As you say, 3.5 bytes for "rx", 4.5 for 13817759, 2.5 for 55952, 1.5 for > 0, 1.5 for 17 and 36.5 for the 35 byte payload(Am I right?). That adds up to > 50 > bytes, which is not exceed 105, but it only print 15byte array. Is it > possible to print all the payload? > > And why 2.5 for 55952, 1.5 for 0, can you give me some hint? Read the tos/lib/diagmsg/DiagMsg.txt. I use diag msgs in the sniffer. The diag message stores not only the data but also the type information within the packet so that the java app can display the data properly. There are 15 types: uint8, int8, uint16, int6, hex8, array, etc. This type information is stored in half of a byte and two type infos are apcket into a single byte: this is the extra 0.5 byte per field. Then for the array: the array again has a type and a length, both are 0.5 bytes, so an array can have at most 15 entries. That is why you can display at most 15 bytes of the payload. Miklos _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
