# Serial port Question

**URL:** <https://forums.digi.com/t/serial-port-question/3426>\
**Category:** NET+OS\
**Tags:** hardware\
**Created:** [January 16, 2008, 4:47pm UTC](https://forums.digi.com/t/serial-port-question/3426 "2008-01-16T16:47:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jballif](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@jballif](https://forums.digi.com/u/jballif)\
**Post date:** [January 16, 2008, 4:47pm UTC](https://forums.digi.com/t/serial-port-question/3426/1 "2008-01-16T16:47:16Z")

</div>

Folks,

I have been working with an Connection Wi-EM device for sometime. My application is a specialized serial - wireless - bridge. I have the code working. But when I stress the serial channel everything comes to a halt.

Specifically. I receive a packet of serial information at 115.2K baud and I package and send the packet using the zero copy buffer UDP socket interface to another WI-EM board running the same firmware with a different address. The target board receives the UDP packet using zero copy UDP buffering and does a serial write of the whole buffer out at 115.2K baud. What is happening is the outbound serial buffer is growing at an astronomical rate. I have set the BSP\_SERIAL\_FAST\_INTERRUPT TRUE and still the tx buffer with any significant data is grows full very quickly. For example from 0 to 2050 bytes. If the data stream is 10 bytes every 25ms the serial output is fine.

I have tried several things. In opening the serial port with O\_DMA mode the read on the port never returns any bytes. The return is -1 and errno EINVAL (22). If I open the serial port without O\_DMA mode the read function returns data.

I have included an attachment with the init and main loop code snippets. Has anyone had these type of problems with the serial driver?

Thanks in advance,  
Jeff
