I ended up using a timer inside a sub that fires on a SerialPort1.PinChanged event and looks for Carrier Detect to raise. Then the code starts a timer that fires in 15 seconds (more or less) which triggers the OnBadConnectionFound sub which resets the port.



Public Sub TimeOutBadConnection(ByVal sender As Object, _
ByVal e As System.IO.Ports.SerialPinChangedEventArgs) _
Handles SerialPort1.PinChanged
Dim portTimer As New System.Timers.Timer()
AddHandler portTimer.Elapsed, AddressOf OnBadConnectionFound
If SerialPort1.CDHolding = True And SerialPort1.BytesToRead = 0 Then
portTimer.Enabled = True
portTimer.Interval = 15000
portTimer.AutoReset = False
GC.KeepAlive(portTimer)
End If
End Sub
Public Sub OnBadConnectionFound(ByVal Source As Object, ByVal e As System.Timers.ElapsedEventArgs) ' Handles portTimer.Elapsed
resetPort()
End Sub

Regards,

Ike