Re: [Tinyos-help] Serial Forwarder and Listen

2006-10-18 Thread Michael Schippling
The messages are not in ASCII format, which I think you are hoping for by inference from your question. They are in the same TOS_Msg format as received from the TOSBase Mote. They are fixed length binary, but if you use the Java Packetizer class or the C equiv in the tools directory (in T1) you s

Re: [Tinyos-help] Serial Forwarder and Listen

2006-10-19 Thread Fabrizio Stefani
Michael Schippling wrote: The messages are not in ASCII format, which I think you are hoping for by inference from your question. They are in the same TOS_Msg format as received from the TOSBase Mote. They are fixed length binary, but if you use the Java Packetizer class or the C equiv in the t

RE: [Tinyos-help] Serial Forwarder and Listen

2006-10-19 Thread Ben Buckner
The short answer is no, there's no CR/LF. However, the packets do come with a frame, and the frame has an escape rule that can result in escape characters being inserted. That's probably why you unexpectedly get changing packet lengths. The "right" way to pick packets out of the stream is to look f

Re: [Tinyos-help] Serial Forwarder and Listen

2006-10-19 Thread Michael Schippling
Looks like your prayers may be answered in the message thread: "[Tinyos-help] C program for Listern" Otherwise reading the correct number of bytes from the port into a buffer and casting it to the TOS_Msg struct should do the trick. Oh, yeah, if you do that on a big-endian machine you'll have to

Re: [Tinyos-help] Serial Forwarder and Listen

2006-10-19 Thread Michael Schippling
oops...as bbuckner just pointed out, I forgot about the danged escape chars, So the cast-the-buffer thing doesn't work reliably...have to parse the stream. sorry MS Michael Schippling wrote: Looks like your prayers may be answered in the message thread: "[Tinyos-help] C program for Listern" Oth

Re: [Tinyos-help] Serial Forwarder and Listen

2006-10-19 Thread Ian Welch
Thanks all for the help,   I ended up reading the message header first and then reading the number of data bytes represented by the Length field in the header.Thanks again,   Ian On 10/19/06, Michael Schippling <[EMAIL PROTECTED]> wrote: oops...as bbuckner just pointed out, I forgot about the dange