Help improve this code

Check your Bluetooth modules default baud rate. is it 9600? Check the module using a direct serial interface and and read the received code for each character you sent by the software to verify is there any extra characters coming with each frame.