Android Question usbserial with 4 port

Discussion in 'Android Questions' started by logicielrl, Jul 2, 2015.

  1. logicielrl

    logicielrl Member Licensed User

    i'm using usbserial lib with 4 usb devices

    Sub Process_Globals
    Dim usbt1 As UsbSerial
    Dim usbt2 As UsbSerial
    Dim usbt3 As UsbSerial
    Dim usbt4 As UsbSerial

    Dim astreams1 As AsyncStreams
    Dim astreams2 As AsyncStreams
    Dim astreams3 As AsyncStreams
    Dim astreams4 As AsyncStreams

    End Sub

    Sometime the stream from astream1 get receive from astream2

    What would cause this ?

    this is the sub im using for the astream

    Sub Astreams1_NewData (Buffer() As Byte)
    ListView1.AddSingleLine( BytesToString(Buffer, 0, Buffer.Length, "UTF8"))
    ListView1.SetSelection(ListView1.Size -1)
    End Sub

    Sub Astreams2_NewData (Buffer() As Byte)
    ListView2.AddSingleLine( BytesToString(Buffer, 0, Buffer.Length, "UTF8"))
    ListView2.SetSelection(ListView2.Size -1)
    End Sub

    thks for your help
     
  2. DonManfred

    DonManfred Expert Licensed User

    You need to show more code. How do you initialize the streams?
     
Loading...