I think you are printing the memory address of the buffer. Change the databuf in your printf to databuf[0] to print the first byte.