Hi
When I set the baudrate to 115200 the "LastException.Message" in "AStreams_Error" gives me a "java.io.IOException: Expected at least 2 bytes".
With ex. a baudrate 57600 the is no error but of course the data is garbage.
Anyone tried the library with a baudrate of 115200.
I use a profilic 2303 usb to serial cable
my code :
Mogens
When I set the baudrate to 115200 the "LastException.Message" in "AStreams_Error" gives me a "java.io.IOException: Expected at least 2 bytes".
With ex. a baudrate 57600 the is no error but of course the data is garbage.
Anyone tried the library with a baudrate of 115200.
I use a profilic 2303 usb to serial cable
my code :
B4X:
If usb.UsbPresent(1) = usb.USB_NONE Then
Log("Msgbox - no device")
Msgbox("No USB device or accessory detected!", "Error")
Log("Msgbox - returned")
Return
End If
Log("Checking permission")
If (usb.HasPermission(1)) Then
'Msgbox(usb.DeviceInfo(1), "Device Information")
Dim dev As Int
dev = usb.Open(115200, 1)
If dev <> usb.USB_NONE Then
Log("Connected successfully!")
AStreams.Initialize(usb.GetInputStream, usb.GetOutputStream, "Astreams")
Else
Log("Error opening USB port")
End If
Else
usb.RequestPermission(1)
End If
Mogens