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
for the framing bytes, 0x7E, which come at the beginning and the end of the
packet.

For details, see the often-referenced

http://www.octavetech.com/pubs/TB5-01%20Deciphering%20TinyOS%20Serial%20Pack
ets.pdf

Regards,
Ben Buckner
-----Original Message-----

Date: Wed, 18 Oct 2006 14:47:59 -0600
From: "Ian Welch" <[EMAIL PROTECTED]>
Subject: [Tinyos-help] Serial Forwarder and Listen
To: tinyos-help@millennium.berkeley.edu
Message-ID:
        <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"

When serial forwarder forwards the packets to a designated are the each
terminate by a "Carage Return Line Feed"?

The reason I ask is because I'm writing a program to listen to the SF port
to save Mote data packets. Every now and again the data on the port comes
out a different size and throws my program. If there is a termination
character at the end of each packet I could resolve this problem.

Also, I don't know Java so looking through the tools source code doesn't
really help.

Thanks,
   Ian


_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to