Urgent.News

the world's headlines, one feed

Editions

Tech

How the IO-Link IODD checksum works

Every IODD (IO Device Description) file carries a checksum near the end: <Stamp crc= "1462814215" > <Checker name= "IODD-Checker V1.1.1" version= "V1.1.1.0" /> </Stamp> It is mandatory. Change one byte anywhere in the file and the stamp no longer matches, and the file will be rejected by engineering tools, by masters, and by the IODDfinder upload process. Despite the IO-Link ecosystem being…

Every IODD file concludes with a block containing a 32-bit checksum, referred to as the stamp crc. Altering any single byte in the file changes the checksum, causing it to fail validation by engineering tools, masters, and IODDfinder upload processes. The IO-Link ecosystem, nearly two decades old, lacked an open-source implementation of this algorithm. This article presents the methodology for generating and verifying the checksum of IO-Link IODD files.

The checksum computation follows the CRC-32 standard outlined in ITU-T V.42 §8.1.1.6.2 / ISO/IEC 13239:2002, implemented as zlib CRC-32. This technique involves reading the file in binary mode, excluding the numeric values following 'Stamp crc=' from the computation, and ending at the concluding 'Stamp' tag. If the root element is 'ExternalTextDocument', the decimal digits of the main IODD's CRC value are appended to the hash.

The checksum calculation relies on the zlib CRC-32 algorithm, which uses the polynomial 0x04C11DB7 (reflected: 0xEDB88320), an initial value of 0xFFFFFFFF, and a final XOR of 0xFFFFFFFF. This process ensures that the checksum is an unsigned 32-bit integer, written in decimal.

It's crucial to remember that the checksum calculation is based on an opaque byte array, not an XML document. Thus, any tool working with IODDs should perform byte-preserving modifications instead of parsing and rewriting the file. Additionally, files containing non-ASCII text do not require special handling, as all content is treated as bytes.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — it may contain errors, so check the original before relying on it.

Read the original at dev.to →

More in Tech

Third macOS Golden Gate Public Beta Now Available

Third macOS Golden Gate Public Beta Now Available

Apple today released the third public beta of macOS Golden Gate , allowing non-developers to test the software ahead of its fall release. You can sign up to test the update on Apple's beta website , and then download it by going to System Settings > General > Software Update and toggling on the macOS 27 beta.