I assume that you already proved that everything works correctly
using some of the demo apps...say...MicaHWVerify and Oscilloscope.
The TOS_Msg format is pretty simple but not very forgiving.
The first place to look is to make sure you are calculating
the CRC correctly, and the second is that you have escaped
the special chars (0x7d...I think), and the third is that
you have done those things in the right order (I believe
you do the CRC before the escaping, but I could be wrong),
and lastly that the length field is correct.
I'm not familiar with the C demo code so I don't know how
good an example it is (a long time ago in a far distant
millennium, I was a C programmer...). If you can read java
(the parts of interest are pretty much C anyway) see:
tools\java\net\tinyos\packet\Packetizer.java
tools\java\net\tinyos\util\Crc.java
for examples that I know work.
Also see this doc for a detailed description of the messages:
http://www.octavetech.com/pubs/TB5-01%20Deciphering%20TinyOS%20Serial%20Packets.pdf
MS
Atanu Roy Chowdhury wrote:
HI
I have just received my micaz kit and am really a novice with
all the hardware. The problem is that i have written a C code
(which is basically a modified version of xlisten ) to output a
string in the TOS_Msg format to the serial port. I also have
TOSBase installed on the mote attached to the MIB510. However the
UARTReceive.receive event is not detecting the packet. Can somebody
help me out with not reinventing this wheel? Any help would be
welcome.
Thanks and Regards
Atanu.
Send instant messages to your online friends http://uk.messenger.yahoo.com
------------------------------------------------------------------------
_______________________________________________
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