Android Question error message in felUsbSerial example

yaniv hanya

Active Member
Licensed User
Hello, I"m using the felUsbSerail jar to connect tablet to usb port, which in his turn connect to microchip serial device.

the app connect to the device, and ask for permission, but when I click "connect" it crushes...

this is the LOG-
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Resume
** Activity (main) Pause, UserClosed = false **
--------- beginning of system
** Activity (main) Resume **
Resume
Number of devices: 1
Ready to start...
Buffer size: 16384
Error occurred on line: 74 (Main)
java.lang.RuntimeException: Error opening serial device.
at anywheresoftware.b4a.objects.usb.felUsbSerial.Initialize2(felUsbSerial.java:82)
at anywheresoftware.b4a.objects.usb.felUsbSerial.Initialize(felUsbSerial.java:62)
at b4a.example.main._btnconnect_click(main.java:535)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:180)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:176)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:5624)
at android.view.View$PerformClick.run(View.java:22441)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6316)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
 

yaniv hanya

Active Member
Licensed User
just talk with microchip developer. he said it is CDC. we will try to change it to ch340 and check again, may be it will work. if not, I"l get back to you.

thanks a lot
 
Upvote 0

yaniv hanya

Active Member
Licensed User
this is the first thing I checked. the device recognize and get bytes from application I downloaded from google play. I sent and received info/
 
Upvote 0

yaniv hanya

Active Member
Licensed User
thanks erel, it is connecting, and I can see the device name and properties. when I try to send information I get error message. I"m trying to find what's the problem, because as I said, it is working with goggle play examples.
 
Upvote 0

yaniv hanya

Active Member
Licensed User
in the "connect" command. the permission work fine, the first msgBox show the correct device (the correct model of microchip), and the connect crushes.
 
Upvote 0

yaniv hanya

Active Member
Licensed User
I unchecked the filter checkbox, this is what I got-

לוגר מחובר ל: LGE LG-H870
--------- beginning of system
Timeline: Activity_idle id: android.os.BinderProxy@ef10d4d time:30548116
ViewRoot's Touch Event : ACTION_DOWN
ViewRoot's Touch Event : ACTION_UP
Timeline: Activity_idle id: android.os.BinderProxy@ef10d4d time:30558311
ViewRoot's Touch Event : ACTION_DOWN
ViewRoot's Touch Event : ACTION_UP
ViewRoot's Touch Event : ACTION_DOWN
ViewRoot's Touch Event : ACTION_UP
--------- beginning of main
Log reader error: java.io.InterruptedIOException: read interrupted
-1 received
writer error
java.lang.InterruptedException
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2010)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2044)
at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:358)
at anywheresoftware.b4a.remotelogger.Connector$Writer.run(Connector.java:160)
at java.lang.Thread.run(Thread.java:761)
Starting remote logger. Port: 29705
After accept
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…