Hi John, yes I receive 2 packets fine (with response) then things go strange 
only on checksum.  Your C# routine is different from DLPlus for the Calc, I’ll 
try that in the morning and see if that changes.

Sent from my iPhone

> On Sep 19, 2019, at 9:58 PM, John R. Hogerhuis <jho...@pobox.com> wrote:
> 
> Are you sure you got a full, aligned packet? It starts with ZZ , counted 
> length, no missing characters?
> 
> The DLPlus checksum is correct. More likely you're misaligned, or somehow 
> dropped, swapped, or corrupted a character.
> 
> Here is the C# code too for comparison
> 
>         public byte Checksum(byte[] ary, uint ofs, uint fence)
>         {
>             uint sum = 0;
> 
>             for (var i = ofs; i < fence; i++)
>                 sum += ary[i];
> 
>             return (byte)((~sum) & 0xff);
>         }
> 
> Welcome to the cabal of TPDD protocol initiates.
> 
> -- John.

Reply via email to