Yes, I think I have seen some issues. I will try it tomorrow. The crc should be resetted after it is stored in the array crcDataRec[1] and buffer[crcIndex2]. The crc = 0 in the command() function and at the end of the readCommand() function is not needed.