changed txRet from 'char' to 'unsigned char'