[aprssig] Trying to Specify the CRC-16-CCITT FCS
kennethfinnegan2007 at gmail.com
Thu Jun 26 19:39:37 CDT 2014
Thanks. It looks like I'm doing one extra byte swap, which might
explain why most of our documentation says we send low byte first. Was
someone clever at some point and canceled out the final byte swap when
calculating the CRC via this inverted method and then converting to
network order? That would explain why we contradict V.42 and pretty
much every other network protocol ever!
I've got plenty of examples of long hand calculations of the CRC, but
want a concise presentation of what an implementor would need for my
thesis. I've managed to find plenty of conflicting examples that end
up with different byte orders, bit inversions, etc.
I'll remove line 16 and call mine good. Should probably collect some
unit tests and actually code it up, but it's a lot of work for a
single figure in my thesis... I'm not convinced either of our
algorithms properly handle empty frames, but then empty layer 1 frames
with a FCS would be kind of silly...
On Thu, Jun 26, 2014 at 4:56 PM, John Hansen <john at coastalchip.com> wrote:
> The source code for TNC-X (including the CRC) calculation is available on my
> documentation page:
> The code is pretty thoroughly commented. Note the starting value and the
> xor manipulation that occurs at the end.
> John W2FS
> On Thu, Jun 26, 2014 at 4:34 PM, Kenneth Finnegan
> <kennethfinnegan2007 at gmail.com> wrote:
>> I've been working on trying to specify the frame check sum we use for
>> Bell 202/HDLC for my thesis. Do we really not have some kind of spec
>> document like for AX.25 or APRS for layer 1? I've been able to find a
>> few disjoint articles on the topic, and have been working out of ITU
>> V.23 and V.42, but the checksum calculation has really got me stumped.
>> Does anyone have a known-good code snippet that generates the correct
>> CRC given a complete frame? Attached is what I have working off of a
>> few examples online but they all seem to generate different results,
>> particularly for empty sets... The endianess is a total mess, so which
>> byte gets sent first?
>> Attached: http://i.imgur.com/vfojzUB.png
>> Kenneth Finnegan
>> aprssig mailing list
>> aprssig at tapr.org
> aprssig mailing list
> aprssig at tapr.org
More information about the aprssig