without even looking at the code I'd say you have some combination
of int16/int8 and byte ordering confusions. From the results you
may be sending int16s and reading int8s, since an int16 value 3 would
look like 03 00 in the TOS little-endian byte stream...

Try dumping the whole message as a string of bytes, or use Listen,
to see exactly what order things are coming in.

MS

YIP Chi Chung wrote:
Hi,

I am implementing a test program which nodes will send a message with node
address, a number(will increment by 1 and send every second) and hop count
in it. However, when I try to use java application to get the message
content. The result is like this.
e.g.
2    2    0
2    2    1
2    2    2
2    2    3
2    2    4

The first column is node address, second column is number, third column is
hop count

my expected result should be:
2    0    0
2    1    0
2    2    0
2    3    0
2    4    0

I am using tmote. Here is my code. I really have no idea on how to solve it.
Thank you very much

Chung


------------------------------------------------------------------------

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

Reply via email to