[Tinyos-help] Tiny OS packet format

Chalermphol Thammapalerd t.chalermphol at gmail.com
Mon Sep 19 08:47:04 PDT 2005


Hello Joseph,
I'm not quite sure what the question is, so please echo if the problem 
persists.
 Firstly, the Makefile of the CntToLedsAndRfm includes the components in 
tos/lib/Counters ,
Then, IntToRfm includes IntMsg.h ,and
That's how the message can be structed :)
 In file IntMsg.h
typedef struct IntMsg {
uint16_t val;
uint16_t src;
} IntMsg;
 If the default CntToLedsAndRfm or SenseToRfm(which uses IntToRfm with 
implemented IntMsg) was used,
the data field's length would rather be 4 bytes by it's structure.
In this case,
by the implementation in IntToRfm, the "val" would either be the Counter's 
value or the ADC's value.
 However, the data is sent in little-endian format which MSByte comes later.
 Good Luck,
Chalermphol
 On 9/19/05, Terence Joseph <tjormor at hotmail.com> wrote: 
> 
> Hello All,
> 
> I have been playing around with two tmote sky's. One running TOSbase and
> the
> other running either CntToLedsandRfm or SenseToRfm. I have built my own
> application which basically reads the data from the serial port and I have
> just a quick question about the raw data I am receiving. In both
> applications the data is similar to that given below.
> 
> Hex: 04 01 08 73 FF FF FF FF 04 7D...
> ...5D 73 01 01 00 D9 9E 7E 7E 42
> 
> Dec: 004 001 008 115 255 255 255 255 004 125...
> ...93 115 001 001 000 217 158 126 126 66
> 
> As you can see there are 20 bytes in total. Call them Column 1-20 (Col
> 1-20).
> I have assumed the following (please correct me if I'm wrong):
> 
> Len (Col 1)
> FCF (Col 2-3)
> DSN (Col 4)
> Dest Addr (Col 5-6)
> Dest PAN (Col 7-8)
> AM (Col 9)
> Grp (Col 10)
> Data (Col 11-18) - 8 Bytes in total here.
> FCS(Col 19-20)
> 
> I have assumed this because I have read that the following are the
> lengths for each of the fields (in bytes):
> 
> Len - 1
> FCF - 2
> DSN - 1
> Dest Addr - 2
> Dest PAN - 2
> AM - 1
> Grp - 1
> Data - <= 28 (in this case I have assumed 8 is the correct value as that's
> what is left over when I account for everything else)
> FCS - 2
> 
> The main thing I am interested in is the data field. If it is 8 bytes, how
> are these bytes organised? Which is the actual data from the 12 bit ADC 
> for
> SenseToRfm
> or the Counter values from CntToLedsAndRfm?
> 
> When I use it with CntToLedsandRfm only columns 4, 12, 16 and 17 change
> however when I use it with SenseToRfm only columns 4, 16 and 17 change.
> 
> Best Regards,
> Terence.
> 
> _________________________________________________________________
> Find Irish information fast with MSN Search Ireland! http://search.msn.ie
> 
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20050919/e5230c9b/attachment-0001.html


More information about the Tinyos-help mailing list