Hello,
You may find useful have a look at:
and get the TB5-01 note listed there for a detailed
explanation of TinyOS serial data packet.
Hope this helps,
Costa
Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Per conto di Gan Siang Hui
Inviato: domenica 25 dicembre 2005 5.42
A: [email protected]
Oggetto: [Tinyos-help] Where is the CRC
I understand from the tinyos tutorial (http://www.tinyos.net/tinyos-1.x/doc/tutorial/lesson6.html) how a tinyos packet looks like.
7e 00 0a 7d 1a 01 00 0a 00 01 00 46 03 8e 03 96 03 96 03 96 03 97 03 97 03 97 03 97 03 37 88>From the structure of TOS_Msg (below) I got from tos/types/AM.h:
typedef struct TOS_Msg
{
/* The following fields are transmitted/received on the radio. */
uint16_t addr;
uint8_t type;
uint8_t group;
uint8_t length;
int8_t data[TOSH_DATA_LENGTH];
uint16_t crc;
/* The following fields are not actually transmitted or received
* on the radio! They are used for internal accounting only.
* The reason they are in this structure is that the AM interface
* requires them to be part of the TOS_Msg that is passed to
* send/receive operations.
*/
uint16_t strength;
uint8_t ack;
uint16_t time;
uint8_t sendSecurityMode;
uint8_t receiveSecurityMode;
} TOS_Msg;
I interpret the raw data as follows:
addr = 7e 00
type = 0a
group = 7d
length = 1a
data = { sourceMoteID, lastSampleNumber, channel, data[BUFFER_SIZE] }
struct OscopeMsg
{
uint16_t sourceMoteID;
uint16_t lastSampleNumber;
uint16_t channel;
uint16_t data[BUFFER_SIZE];
};
where
sourceMoteID = 01 00
lastSampleNumber = 0a 00
channel = 01 00
data[0] = 46 03
data[1] = 8e 03
...
data[8] = 97 03
data[9] = 37 88
My question is where is the uint16_t crc bytes that are supposed to be present as well?
Why are they not shown when the packet is being printed out?
Thanks and merry christmas!
sianghui
_______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
