Sounds right... however...
I've not seen an exposition of what happens when the CRC has a 7{e,d}...
Logically your algorithm works, but in practice we'd have to reverse
engineer the TOS code...
The CRC is part of the T_M packet since data[] is encapsulated, and it's
at the end so some(unspecified)one _could_ do a fully serial packet
generation, the execution of which I have never seen.
MS
Ben Buckner wrote:
The way my code calculates it is to concatenate the packet type byte and the
payload (TOS_Msg). Then I CRC that all together, append the CRC (low byte
first), and run the escaper on it all (don't forget to catch both 7Es and
7Ds). Then I prepend and append the 7E synch bytes. Seems to work. I'm not
sure why the CRC is part of TOS_Msg, since it seems like it functionally
belongs to the raw packet layer, but that's the way it is I guess. The
Octavetech doc notes this peculiarity as well.
To test, you can try to CRC the example packet in the Octavetech doc and see
if you get the same result.
Regards,
Ben Buckner
-----Original Message-----
I thing that's in the octavetech page, but I believe it is all bytes
including header, before escapes are applied.
I'm not sure but I think the pre-amble 7E 4x is not included.
MS
jurin dan wrote:
thanks a lot for your reply.
just one more thing. within the raw data packet, which byte do i use to
compute the CRC.
is it all byte or only TOS_MSG byte.
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help