Android device: Sony Xperia Tipo ST21a
Platform: Android 4.0.4
Interface (Android <=> UART): UMFT311EV de FTDI Chip
USB Library: USB Serial 2.30
Protocol: 9600, 8, N, 2
I need to control an "electronic device" with RS232 communication using smartphone. The "electronic device" is successfully communicating with a PC using an RS232 serial port.
Question 1:
The Android phone transmitting properly to the "electronic device", but the string that receives the phone arrives incorrect response, apparently some bits are lost, only the first character arrives correctly.
The "electronic device" transmits one character after another without delays between characters.
If between each character transmitted from the "electronic device" expect about 2 ms before transmitting the next, the string comes right to your phone.
Someone can suggest me a solution to avoid adding delays in the response from the "electronic device"?
Question 2:
Every time I connect the phone to the UMFT311EV board a message indicates that there is no application that works with this accessory usb (Vinculum Accessory Test). I can avoid this message board and only associate with my application? Someone can suggest me a solution?
Part Code:
--------------------------------------------------------------------------------------------------
Sub Process_Globals
DimusbAsUsbSerial
DimastreamsAsAsyncStreams
End Sub
--------------------------------------------------------------------------------------------------
Sub OpenPort
If (usb.HasPermission) Then
dev = usb.Open(9600)
If dev <> usb.USB_NONE Then
' Se pudo conectar
astreams.Initialize(usb.GetInputStream, usb.GetOutputStream, "astreams")
'usb.SetParameters(9600, 8, 2, 0)
‘usb.UsbTimeout = 2000
Else
Log("Error opening USB port")
ChkUsb.Checked = False
EndIf
Else
usb.RequestPermission
EndIf
End Sub
-------------------------------------------------------------------------------------------------
Sub Astreams_NewData (Buffer() AsByte)
Dim EnteroHex AsString
Dim bb(1) AsByte
For i = 0To Buffer.Length - 1
bb(0) = Buffer(i)
EnteroHex = BC.HexFromBytes(bb)
If (EnteroHex.Length < 2) Then EnteroHex = "0" & EnteroHex
StrRta = StrRta & " " & EnteroHex
Next
LblTitulo.Text = StrRta
End Sub
Platform: Android 4.0.4
Interface (Android <=> UART): UMFT311EV de FTDI Chip
USB Library: USB Serial 2.30
Protocol: 9600, 8, N, 2
I need to control an "electronic device" with RS232 communication using smartphone. The "electronic device" is successfully communicating with a PC using an RS232 serial port.
Question 1:
The Android phone transmitting properly to the "electronic device", but the string that receives the phone arrives incorrect response, apparently some bits are lost, only the first character arrives correctly.
The "electronic device" transmits one character after another without delays between characters.
If between each character transmitted from the "electronic device" expect about 2 ms before transmitting the next, the string comes right to your phone.
Someone can suggest me a solution to avoid adding delays in the response from the "electronic device"?
Question 2:
Every time I connect the phone to the UMFT311EV board a message indicates that there is no application that works with this accessory usb (Vinculum Accessory Test). I can avoid this message board and only associate with my application? Someone can suggest me a solution?
Part Code:
--------------------------------------------------------------------------------------------------
Sub Process_Globals
DimusbAsUsbSerial
DimastreamsAsAsyncStreams
End Sub
--------------------------------------------------------------------------------------------------
Sub OpenPort
If (usb.HasPermission) Then
dev = usb.Open(9600)
If dev <> usb.USB_NONE Then
' Se pudo conectar
astreams.Initialize(usb.GetInputStream, usb.GetOutputStream, "astreams")
'usb.SetParameters(9600, 8, 2, 0)
‘usb.UsbTimeout = 2000
Else
Log("Error opening USB port")
ChkUsb.Checked = False
EndIf
Else
usb.RequestPermission
EndIf
End Sub
-------------------------------------------------------------------------------------------------
Sub Astreams_NewData (Buffer() AsByte)
Dim EnteroHex AsString
Dim bb(1) AsByte
For i = 0To Buffer.Length - 1
bb(0) = Buffer(i)
EnteroHex = BC.HexFromBytes(bb)
If (EnteroHex.Length < 2) Then EnteroHex = "0" & EnteroHex
StrRta = StrRta & " " & EnteroHex
Next
LblTitulo.Text = StrRta
End Sub