fix two points: 1. the number of bytes to read for chk_byte, 2. the wron...

...g indentation about the defination of sendDiagnostics()