Article View: softway.general
Article #1IBM BSC CRC calculation
From: Andrew Gollan
Date: Thu, 16 Apr 1992 23:04
Date: Thu, 16 Apr 1992 23:04
47 lines
2669 bytes
2669 bytes
I have an application talking IBM 2780 BSC using a Zilog Z8530 SCC chip, and I can't seem to work out which bytes to include in the CRC calculation. I am using transparent mode so a packet looks like: <SYN><SYN><DLE><STX>[ data ... ]<DLE><ETX><BCC1><BCC2> where data has any actual <DLE> characters escaped as <DLE><DLE> and may also contain some <DLE><SYN> time spacing characters which drop out. My problem is that I can't find any references on exactly which of these bytes contribute to the CRC. On the Z8530 CRC calculation can be enabled or disabled on a character by character basis and my reading of what documentation I have indicates that CRC calculation should start after the <STX> is seen (but not including it) and should not include any <DLE> characters and should finish after the <ETX> (inclusive). Using an ARC Interview 7500 Protocol Analyzer I can interact with my target system and both agree on the CRC value, but I can't seem to make my system generate (or recognise as valid) packets from either. I constructed a minimal packet <SYN><SYN><DLE><STX><SOH><DLE><ETX> which in hex is <32321002011003> for which the correct CRC-16 (as generated by the Interview) is <4191> or 0x9141. Try as I might including and excluding bytes from the above message I can't generate this CRC manually or via the z8530 chip! This is despite the fact that the remote end is using exactly the same chip (but I can't read the software). What am I missing? I have tried both CRC-16 and the CCITT CRC (CRC-SDLC) (even though the Interview stolidly claims it is using CRC-16). I have tried presetting the CRC value to all ones (even though the Interview is certain it is using all zeroes). Nothing seems to work. I am going out of my mind! Has anyone got a clear idea of how this ought to work? Which message bytes to include? Reference material with this kind of detail? Anything? -- Q.C. (Queen's Counsellor): A |Andrew Gollan - "Anti-Family and proud of it" learned associate of a gay man. |Phone: +61 2 698 2322 Fax: +61 2 699 9174 Handbag: A male fashion __ |Softway, GPO Box 305, accessory of a gay woman. \/ |Strawberry Hills NSW 2012, Australia
Technical Details
Message-ID:
<adjg.703379063@suite.sw.oz.au>Path:
arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!mel.dit.csiro.au!mineng.dmpe.CSIRO.AU!dmssyd.syd.dms.CSIRO.AU!metro!cluster!swift!suite.sw.oz.au!adjgShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!mel.dit.csiro.au!mineng.dmpe.CSIRO.AU!dmssyd.syd.dms.CSIRO.AU!metro!cluster!swift!suite.sw.oz.au!adjg From: adjg@suite.sw.oz.au (Andrew Gollan) Newsgroups: softway.general,comp.protocols.ibm Subject: IBM BSC CRC calculation Summary: I can't work it out. Message-ID: <adjg.703379063@suite.sw.oz.au> Date: 16 Apr 92 23:04:23 GMT Sender: news@softway.sw.oz.au (Usenet) Organization: Softway Pty Ltd Lines: 47