Pure C program to read & write on serial port for bluetooth device