CRC-CCITT in Tcllib
From: Patrick Moore (Patrick_Moore300_at_yahoo.com)
Date: 03/31/04
- Next message: Wolf Grossi: "Re: Issues with installing oratcl on Linux"
- Previous message: Thomas Dickey: "Re: Expect, telnet, frozen console."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 31 Mar 2004 08:59:52 -0800
Hello,
I'm having trouble using the CRC package in Tcllib, which in large
part may be my lack of understanding with CRCs.
I'm receiving binary data (Async HDLC) from a mobile phone and want to
check the frames for errors. I thought I would start by verifying that
I can generate a known CRC (checkword) that is sent in a frame to
verify my method is correct. From some documents I have the CRC used
is CRC-CCITT-16, poly X^16+X^12+X^5+1, first initialized to all ones
and once calculated the one's complement of the CRC is transmitted.
Big Endian type is used for 16 and 32 bit words.
The known frame I have is: 1d 1c 3b 7e
So I'm trying to come up with 0x3b1c (post 1's complement) as the CRC
of 0x1d (request code 29) using the crc::crc-ccitt proc. I can't seem
to get close and I'm confused as to use 29, 1d, 0x1d, etc... as my
"message".
crc::crc-ccitt -format 0x%X "message"
I'm been looking through the CRC package code and reading info
(overwhelming) on CRCs and now I'm really lost.
Any help would be much appreciated.
-PM
- Next message: Wolf Grossi: "Re: Issues with installing oratcl on Linux"
- Previous message: Thomas Dickey: "Re: Expect, telnet, frozen console."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]