How do you read data sent from device?

Remember that TCP has not the concept of "single packet" as UDP; so you need to read the correct amount of data.

Can you post the code??