Hola:
 
Tengo este código que utilizo para leer datos procedentes de un scanner lector de codigos de barras.
 
El problema es que al leer los datos los recibo con simbolos de interrogación:
 
5094?254??524
 
alguna sugerencia?
 
Public Class Form1
    Delegate Sub delegado(ByVal data As String)
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        For Each s As String In My.Computer.Ports.SerialPortNames
            lista.Items.Add(s)
        Next
    End Sub
    Private Sub lista_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lista.SelectedIndexChanged
        Try
            'sp3.Close()
            sp.Close()
            consola.AppendText("Puerto " & sp.PortName & " Cerrado" & vbCrLf)
            sp.PortName = lista.SelectedItem
            consola.AppendText("Abriendo Puerto : " & sp.PortName & vbCrLf)
            sp.Open()
            ''  sp3.Open()
            consola.AppendText("Puerto : " & sp.PortName & " Abierto" & vbCrLf)
        Catch ex As Exception
            MessageBox.Show(ex.ToString, "", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try
    End Sub
 
 
 
    Sub mostar(ByVal d As String)
        consola.AppendText(d)
    End Sub
 
 
    Private Sub sp_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles sp.DataReceived
        Dim s As String = sp.ReadExisting
        Dim escribeport3 As New delegado(AddressOf Me.mostar)
        Me.Invoke(escribeport3, s)
    End Sub
End Class 
  
 

