usbdetails_bytes0tostring (B4A line: 184)
Return str.SubString2(1, idx)
java.lang.StringIndexOutOfBoundsException: length=4; regionStart=1; regionLength=-2
at java.lang.String.startEndAndLength(String.java:593)
at java.lang.String.substring(String.java:1474)
at anywheresoftware.b4a.agraham.usbdetails.usbdetails._bytes0tostring(usbdetails.java:59)
at anywheresoftware.b4a.agraham.usbdetails.usbdetails._devicedetails(usbdetails.java:183)
at anywheresoftware.b4a.agraham.usbdetails.main._btnconnect_click(main.java:314)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:167)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:155)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:151)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:55)
at android.view.View.performClick(View.java:3670)
at android.view.View$PerformClick.run(View.java:14372)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4513)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:974)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:741)
at dalvik.system.NativeStart.main(Native Method)
java.lang.StringIndexOutOfBoundsException: length=4; regionStart=1; regionLength=-2
That's expected, the other information that matters follows.Now it runs, but returns the following for "Device 0 details" (tried with two different FT232 based devices with the same result:
Manufacturer: not available
Product: not available
Serial: not available
Oops! I don't know why I didn't see that. I will post a new version tomorrow that will fix that. I'll also do a special version for you with some logging so I can see where it hangs. However if it manages 400 bytes, which is more than 6 64byte packets I can't see why it wouldn't manage 4000 bytes as there is an internal 16KB buffer used on reading.It seems to be a mistake in the parameteres order in SetParameters
115200.@yo3ggx
What baud rates are you using?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?