Use str to convert received buffer