Is it possible to re-detect serial port without unplugging it

This will be a really ugly method of doing it, but this may do what you wish.

Private Function ResetSerialPort() As IO.Ports.SerialPort
    Try
        For Each sPort As String In IO.Ports.SerialPort.GetPortNames()
            Dim spMyPort As New IO.Ports.SerialPort(sPort)

            If spMyPort.IsOpen Then spMyPort.Close()
            spMyPort.Open()

            Return spMyPort
        Next

        Return Nothing
    Catch ex As Exception
        MsgBox(ex.Message, MsgBoxStyle.Critical, "Error!")
        Return Nothing
    End Try
End Function
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.