Re: SerialPort control using RTS/CTS seems to loose bytes

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



***,

I'm using hardware handshaking for flow control. The cable being used
has CTS and RTS crossed and RXD and TXD crossed (as well as DSR/DTR but
I'm not using that).

The SerialPort on both sides is setup like this:

With SerialPort1
Try
.PortName = "COM1" 'windows mobile 5
.ReadBufferSize = 4096 * 4
.WriteBufferSize = 4096
.Open()
.BaudRate = 115200
.Parity = IO.Ports.Parity.None
.DataBits = 8
.StopBits = IO.Ports.StopBits.One
.Handshake = IO.Ports.Handshake.RequestToSend
.ReadTimeout = 500
.WriteTimeout = 500

.Encoding = System.Text.Encoding.UTF8
.ReceivedBytesThreshold = 1
.DiscardInBuffer()
.DiscardOutBuffer()
Catch ex As Exception
MsgBox(ex.Message)
Exit Sub
End Try
End With

Receive Buffer Overflow .... yes ... the receiver is reporting an
Overrun ... (stupid me I should have been trapping those errors all
along anyway).

Now I need to figure out why with RTS/CTS it is getting an overrun.

.


Quantcast