Android Question USB-Serial 2.3 with b4a 3.82 problem ?

tiger

New Member
Licensed User
Longtime User
Hi,
last week I bought b4a 3.82. My old projects with USB-Serial do not work on severel devices.
After init the USB I get following error on the devices ( all with Android > v.4.1x)
: An error has occurred in sub:
java.lang.RuntimeException : Cannot parse: 0 as boolean

and sometimes:
An error has occurred in sub:
java.lang.RuntimeException : Cannot parse: 1 as boolean

What can I do ?

It is possible to get an old Version of usbserial lib ?
Thanks for help , Reimer
 

tiger

New Member
Licensed User
Longtime User
Run your app in debug mode and see which line causes this error.
Hi Erel,
thanks for the fast answer.
the debugger stops at line 60 :
If usb.Open(115200) Then
Log("Connected successfully!")

device said: Program paused on line:60
I didnt set any breakpoints
meanwhile made update from SDK
but have the same problem

Thanks again Reimer
 
Upvote 0

tiger

New Member
Licensed User
Longtime User
Have you checked the logs for any errors?
yeap the log said the same at line 60
An error has occurred in sub:
java.lang.RuntimeException : Cannot parse: 0 as boolean
same with your usb-serial example
 
Upvote 0

tiger

New Member
Licensed User
Longtime User
Hi Erel,
thanks again. I made a variable to check the USB_OPEN and now it works fine as before
Reimer
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…