I am able to connect to serial port but not able to read the data from the connected device. Here is the code which i am using to read the device- // Create the serial port with basic settings SerialPort port = new SerialPort("COM1", 9600, Parity.None, 8, StopBits.One); port.Handshake = System.IO.Ports.Handshake.None; port.ReadTimeout = 5000; port.Open(); //retrieve number of bytes in the buffer int bytes = port.BytesToRead; //create a byte array to hold the awaiting data byte[] comBuffer = new byte[bytes]; //read the data and store it port.Read(comBuffer, 0, bytes); string str; System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); str = enc.GetString(comBuffer); txtData.Text = str; port.Close(); when i am running this code then I get 0 in BytesToRead and comBuffer. I think i am doing something wrong but what it is not have any idea.