Hi Mark,
In the meantime, it looks like your checksum calculation is wrong:
# Calculate the payload checksum (not including the payload checksum bytes)
inputChecksum = 0x42 + 0x4d
for x in range(0, 27):
inputChecksum = inputChecksum + data[x]
Here, range(0, 27) will only give you the first 27 indexes ([0, 1, ..., 26]).
You need the first 28 indexes, as the last
2 are the checksum.
Instead you can write the checksum calculation as:
# Calculate the payload checksum (not including the payload checksum bytes)
inputChecksum = 0x42 + 0x4d + sum(data[:-2])
Hi Mark, In the meantime, it looks like your checksum calculation is wrong:
Here, range(0, 27) will only give you the first 27 indexes ([0, 1, ..., 26]). You need the first 28 indexes, as the last 2 are the checksum. Instead you can write the checksum calculation as:
Please let me know if i am wrong. Thank you.