Serial lib v1.21 for USB 3.0

jjcc

Member
Licensed User
Longtime User
Serial lib v1.21 for bluetooth 3.0

Edit: “USB 3.0" in the title should be "bluetooth 3.0"

Hello,

I tried a bluetooth module for testing. The module is 3.0. The connection is much faster than my another 2.0 module in a demo written in Java.

When I use the "bluetooth" sample in tutorial to test the module, the application stopped on an exception. It was OK when I use the chat sample from Google.

Any advice? Is bluetooth 3.0 special?

Jian

B4X:
BM57SPP:00:11:67:E4:45:B1


connected: true


** Activity (main) Pause, UserClosed = false **


** Activity (chatactivity) Create, isFirst = true **


** Activity (chatactivity) Resume **


java.lang.OutOfMemoryError: array size too large


   at anywheresoftware.b4a.randomaccessfile.AsyncStreams$AIN.run(AsyncStreams.java:168)
   at java.lang.Thread.run(Thread.java:1019)
** Activity (chatactivity) Pause, UserClosed = true **


** Activity (main) Resume **


** Activity (main) Create, isFirst = true **


** Activity (main) Resume **


BM57SPP:00:11:67:E4:45:B1


BM57SPP:00:11:67:E4:45:B1


connected: true


** Activity (main) Pause, UserClosed = false **


** Activity (chatactivity) Create, isFirst = true **


** Activity (chatactivity) Resume **


java.lang.OutOfMemoryError: array size too large


   at anywheresoftware.b4a.randomaccessfile.AsyncStreams$AIN.run(AsyncStreams.java:168)
   at java.lang.Thread.run(Thread.java:1019)
** Activity (chatactivity) Pause, UserClosed = true **


** Activity (main) Resume **

The error happens only when I tried to send 4th byte to "bluetooth" app from a serial console on PC. i.e. the app is receiving. The app didn't crash during first 3 bytes while nothing was show up. The "Send" function also didn't work but didn't crash the app either.
 
Last edited:

jjcc

Member
Licensed User
Longtime User
Thanks.

But I didn't use prefix mode. The PC side is a serial terminal similar to HyperTerm, the android application is the sample application from BT tutorial.
 
Upvote 0

jjcc

Member
Licensed User
Longtime User
Thank you Erel. You are right. The sample use prefix mode. I didn't notice that.

The BT 3.0 is really fast. Connection time is less than 1 sec.
 
Upvote 0
Top