Thread View: softway.general
1 messages
1 total messages
Started by Andrew Gollan
Thu, 16 Apr 1992 23:04
IBM BSC CRC calculation
Author: 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads