# Problem reading data from serial port.

**URL:** <https://forums.digi.com/t/problem-reading-data-from-serial-port/3752>\
**Category:** NET+OS\
**Tags:** serial-interface\
**Created:** [September 26, 2007, 1:13pm UTC](https://forums.digi.com/t/problem-reading-data-from-serial-port/3752 "2007-09-26T13:13:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebuddy](https://avatars.discourse-cdn.com/v4/letter/e/ecd19e/32.png) [@ebuddy](https://forums.digi.com/u/ebuddy)\
**Post date:** [September 26, 2007, 1:13pm UTC](https://forums.digi.com/t/problem-reading-data-from-serial-port/3752/1 "2007-09-26T13:13:54Z")

</div>

I am new to programming with Digi kit. I have purchased the Digi development board with connect ME and net+OS. I have a serial device connected to the serial port 2 of the development board. I am trying to read and write data to this device. I do this using the serial port APIs open(), read() and write(). However, when I try to read a large chunk of data (around 200 bytes) the read the read function returns only a part of the data and not the entire data. I have provided a buffer large enough for my data to the read function but it doesnt help. Also the tcgetbuffers() function returns only a part of data when there is MORE data on the serial port. I have verified this using hyperterminal, it receives and displays the entire chunk of data. Can anyone help me with this?

Are there any settings I need to do to get this working?
