in reply to CRC off-by-one
$crc = crc16($a, $a + 32, $crc); ... for ($adr = $startadr; $adr <= $endadr; $adr++) { [download]