Ok I think this is end I can get so far...but I don't get any result in my textbox...I removed the unnecessary loops and every other triggering just made the read data code into DataReceived.
Can you help me a little bit more...
Previous properties are : ReceivedDataThreshold = 1, DTR and RTS enabled and ReadTimeout = 500 (ms). When I run the other applications they show me data in the txtbox...but with the code I have no error but no result aswell...
Code:
Private Sub srpPBX_DataReceived(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles srpPBX.DataReceived
        'This event will Receive the data from the selected COM port..
        Dim n As Integer = RS232.BytesToRead()
        Dim comBuffer As Byte() = New Byte(n - 1) {}
        Dim BytesReceived As Integer     
        Try
            BytesReceived = RS232.Read(comBuffer, 0, n)

            If BytesReceived > 0 Then
                txtReceive.Text = txtReceive.Text + System.Text.Encoding.ASCII.GetString(comBuffer)
                'My.Computer.FileSystem.WriteAllText("C:\Users\albann\Desktop\SMDR_New_Log.txt", txtReceive.Text, True) output to a txt file for later use.
            End If
        Catch ex As Exception
            MessageBox.Show("Error: " & ex.Message, ex.Source, MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try
    End Sub