Spam detection software, running on the system "mail.Millennium.Berkeley.EDU", 
has
identified this incoming email as possible spam.  The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email.  If you have any questions, see
the administrator of that system for details.

Content preview:  Quoting Greg Hackmann <g...@cse.wustl.edu>: > On 5/26/10 3:06
   PM, tmi...@recipes4linux.com wrote: >> Quoting Michael Schippling 
<sc...@santafe.edu>:
   >> >>> You need to send messages in the TOS_Msg or message_t format. >>>
  Find the struct definition for the telos platform. >>> For TOS1.x it is in:
   opt/tinyos-1.x/tos/platform/telos/AM.h >>> and probably something similar
   for T2. >>> >>> The tricky parts are: values of 0x7E and 0x7D need to be
  >>> "escaped" because they are frame delimiters, and you >>> need to calculate
   a CRC value correctly. There are some >> >> Thanks for the quick reply on
   this query. This is a side >> project for me so I don't get to spend as much
   time on it >> as I would like. >> >> Do you know if the whole TOS_Msg is
  CRC'ed or just the >> data portion? >> >> The inbound message seems to have
   whole TOS_Msg CRC and >> that's what I'm doing on the outbound message. >>
   >> Another "tricky part" is endianess, my host is big-endian >> and the 
MPS430
   in the radio is little-endian. > > Are the motes running TinyOS 1.x or 2.x?
   The two versions use different > serial packet formats. TinyOS 2.x's packet
   format is documented in TEP > 113 > 
(http://tinyos.cvs.sourceforge.net/*checkout*/tinyos/tinyos-2.x/doc/html/tep113.html).
   > > If you're using TinyOS 2.x, the CRC is computed over the entire packet
   > (excluding the delimiters). Note that the CRC is computed before > escaping
   the packet, which is in turn done before adding the delimiter > bytes. Also
   note that CRC is sent in little endian order, even through > the other fields
   are normally in big endian order. [...]

Content analysis details:   (3.8 points, 3.3 required)

 pts rule name              description
---- ---------------------- --------------------------------------------------
 3.2 FH_DATE_PAST_20XX      The date is grossly in the future.
-2.6 BAYES_00               BODY: Bayesian spam probability is 0 to 1%
                            [score: 0.0000]
 1.4 MIME_QP_LONG_LINE      RAW: Quoted-printable line longer than 76 chars
 1.1 DNS_FROM_OPENWHOIS     RBL: Envelope sender listed in bl.open-whois.org.
 0.7 AWL                    AWL: From: address is in the auto white-list


--- Begin Message ---
Quoting Greg Hackmann <g...@cse.wustl.edu>:

On 5/26/10 3:06 PM, tmi...@recipes4linux.com wrote:
Quoting Michael Schippling <sc...@santafe.edu>:

You need to send messages in the TOS_Msg or message_t format.
Find the struct definition for the telos platform.
For TOS1.x it is in: opt/tinyos-1.x/tos/platform/telos/AM.h
and probably something similar for T2.

The tricky parts are: values of 0x7E and 0x7D need to be
"escaped" because they are frame delimiters, and you
need to calculate a CRC value correctly. There are some

Thanks for the quick reply on this query.  This is a side
project for me so I don't get to spend as much time on it
as I would like.

Do you know if the whole TOS_Msg is CRC'ed or just the
data portion?

The inbound message seems to have whole TOS_Msg CRC and
that's what I'm doing on the outbound message.

Another "tricky part" is endianess, my host is big-endian
and the MPS430 in the radio is little-endian.

Are the motes running TinyOS 1.x or 2.x?  The two versions use different
serial packet formats.  TinyOS 2.x's packet format is documented in TEP
113
(http://tinyos.cvs.sourceforge.net/*checkout*/tinyos/tinyos-2.x/doc/html/tep113.html).

If you're using TinyOS 2.x, the CRC is computed over the entire packet
(excluding the delimiters).  Note that the CRC is computed before
escaping the packet, which is in turn done before adding the delimiter
bytes.  Also note that CRC is sent in little endian order, even through
the other fields are normally in big endian order.

99% certain this is 1.x based.
I think the tipping point was the endian issue you note above.
I was converting the 16 and 32 bit fields and when I don't do
that, things come alive.

I am now reading live temperature sensor data.  Thank you!!!

Greg,
Do you mind if I contact you off list to discuss further your
activity with the NSLU2 and TinyOS?  Without knowing any better
we went down the path of OpenWRT on the NSLU2 for this project.
If TinyOS is a better fit...

Folks on the list, you are the best.  I like to see a healthy
community and the TinyOS group definitely fits that bill.

Thanks again for helping me stop knocking my head against the wall.
:{)>


You may want to take a look at the TinyOS C SDK, which can be found in
$TOSROOT/support/sdk/c/sf.  Documentation is a little sparse, but it
saves you the trouble of writing packet assembly/parsing code.  We've
cross-compiled it for the NSLU2 without any problems.

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




--- End Message ---
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to