Win32 serial port - recieve buffer

I’m using P-Invoke to make some calls to the Win32 API with C# running in version 1.1 of the .NET framework.

I’m opening a port using the system default receive buffer size. When I make a call to GetCommProperties() its telling me that the receive buffer is growing beyond its declared size. The size is 100 bytes, but it will keep growing as long as I’m throwing data at it. If I disconnect the cable it will keep processing data from the buffer until its empty.

My question is whether there is some other setting that you need change so that the receive buffer is fixed or if this is a bug. I’m using XP Pro and the serial cable is connected through a USB adapter. Thanks in advance.

<EDIT>
Its definately the USB adapter. The buffer stays a fixed size on my other machine with a proper RS-232 port. Be careful if you’re using a USB-serial adapter because the recieve buffer will keep growing. Will post information if I can find anything from Belkin.
</EDIT>

I have had no success with Belkin USB to Serial products. From digging around the web, they do not faithfully implement the timing signals for the RS232 ports. Based on what you tell me, they don’t have clean Window drivers either.

I have used the Bafo Technologies unit (from TigerDirect.com) with great success. I have used it on the Stamp2 at 9600 baud and I have used it with the EDU controller at over 100Kbaud with no the smallest problem.

Drop Belkin – use Bafo.

Really.

Joe J.

Have you used teh Bafo adapter to upload code to the new controller? The team ordered a new laptop that will probably not have a serial port and I want to make sure that whatever adapter they get will work. Sitting around waiting 10 minutes to program the controller will get old really quick. Thanks for the information.

Yes, the Bafo 810 works with the EDU controller.

It is a small dongle on the end of a cord that plugs into the USB port.

I have had no problems at all.

As to speed it is as fast as the PC I have that uses a PC based RS-232 port.

Joe J.

See this message for more details on the Bafo BF-810

Joe J.