title: 4 byte checksum, sum32 algorithm for Epson printers
body: <p>I'm programming a low level communication with an Epson tm-t88iv thermal printer on a Linux device, which receives only hexadecimal packages. I have read the manual trying to understand how the checksum is built but i can't manage to recreate it.</p>
  <p>the manual says that the checksum are 4 bytes representing the 2 bytes sum of all the data in the package sent.</p>
  <p>I have currently four working examples I found by listening to a port on a windows computer with a different program. the last 4 hexadecimals are the checksum (03 marks the end of the data and is included in the checksum calculation, according to the manual).</p>
  <pre><code>02 AC 00 01 1C 00 00 03 30 30 43 45
  02 AC 00 00 1C 80 80 1C 00 00 1C 00 00 1C 03 30 32 32 31
  02 AD 07 01 1C 00 00 1C 31 30 03 30 31 35 33
  02 AD 00 00 1C 80 80 1C 00 00 1C 00 00 1C 03 30 32 32 32
  </code></pre>
  <p>I have read somewhere that there is a sum32 algorithm but i can't find any example of it or how to program it.</p>