FT311D ftdi android chip
unfortunately it's not that simple for me !!
i'm comunicating with the chip and i have permission but i can't send anything!
i get an error event when trying to send
Dim UsbAcc() As UsbAccessory
UsbAcc = manager.GetAccessories
For i= 0 To UsbAcc.Length - 1
Log( i & " accessorio " & UsbAcc(i))
Next
Log (UsbAcc(0).Description)
Log (UsbAcc(0).Manufacturer)
Log (UsbAcc(0).Model)
Log (UsbAcc(0).Serial)
Log (UsbAcc(0).Uri)
Log (UsbAcc(0).Version)
' -------------------------------------------
If manager.HasAccessoryPermission(UsbAcc(0)) = False Then
manager.RequestAccessoryPermission(UsbAcc(0))
Log("richiesta permesso")
Else
Log("ha permesso")
End If
Log("connetti")
manager.OpenAccessory(UsbAcc (0))
AStreams.InitializePrefix(UsbAcc(0).InputStream, False, UsbAcc(0).OutputStream, "AStreams")
bStreams.Initialize(UsbAcc(0).InputStream, UsbAcc(0).OutputStream, "bStreams"
Sub Button2_Click
Dim UsbAcc() As UsbAccessory
UsbAcc = manager.GetAccessories
If AStreams.IsInitialized = False Then Return
Log("1111")
Dim sNewLine As String
sNewLine ="1234567890abcdefghi"
Dim buffer() As Byte
buffer = sNewLine.GetBytes("UTF8")
AStreams.Write (buffer)
bStreams.Write (buffer)
sout.WriteBytes (buffer , 1, 6)
sout.Flush ' send to serial port
End Sub