Line 89:
if need_chk:
for loop in range(len(data_bin)):
chk_sum ^= ord(data_bin[loop])
This code is never executed.
Also you have wrong masks for byte2 and 3, perhaps the programmer never heard about nibbles.
I wonder why a pure binary job wasn't written in plane C and use this python crap ?!