Michael Schippling wrote:
> I don't think that your header (from Seq# thru Message length) matches
> any of the TOS_msg or message_t structs that I know. Unfortunately they
> are different for various platforms and versions so you need to find
> the right struct to imitate.  IIRC multi-byte fields are little-ended.
> And of course the framing and protocol stuff is not included in any C
> struct definition so it's pretty much go-reverse-engineer-something-
> that-works. Looking at Packetizer.java, and perhaps using ListenRaw
> to see the whole byte stream from a working system may help.
> 
> MS

TinyOS 2.x uses a uniform serial packet format for all platforms (IIRC 
this is a definite and deliberate change from TinyOS 1.x).  Part of TEP 
113 covers the TinyOS 2.x serial packet format, but I've found there are 
small details missing: e.g., it mentions that there's a two-byte CRC at 
the end of the packet but doesn't give the polynomial used to compute 
that CRC.

I have some Python code that parses TinyOS 2.x serial packets -- it's 
probably not directly helpful to Aleksandar since he's using C#, but it 
might be useful as a reference since it's fairly well-documented and 
gathers all of the details into one place.

Because questions about the raw serial packet format pop up from time to 
time on tinyos-help, I wonder if it would be helpful to write up a page 
on the TinyOS Wiki that gives a verbose description of the format.

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

Reply via email to