Hi Erel,
Thanks a lot for the hint into the right direction.
Connection is successful with
Serial1.ConnectInsecure(Admin,connectedDevice.Mac,1)
Looks like RFCOMM channel 1 only is accepted, though.
Now, the chat activity throws an out-of-memory error after
sending a command 3 times without response.
Are there any further options besides "UTF8" here:
LogMessage("You", BytesToString(Buffer, 0, Buffer.Length, "UTF8"))
Not sure whether my BT module supports UTF8, but ASCII if
I am not mistaken.
If you do not see any problem with the Serial library, please do not
bother to reply, I will investigate further.
Thanks so much for always reacting so promptly.
Error Log:
connected: true
Starting activity: Intent { flg=0x20000 cmp=anywheresoftware.b4a.samples.bluetooth/.chatactivity }
** Activity (main) Pause, UserClosed = false **
Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@47b02c78
** Activity (chatactivity) Create, isFirst = true **
** Activity (chatactivity) Resume **
Displayed activity anywheresoftware.b4a.samples.bluetooth/.chatactivity: 371 ms (total 371 ms)
[url]https://droidsecurity.appspot.com/secure/xmlrpc[/url]
dvmMalloc(68297496/0x04122318): someone's allocating a huge buffer
Out of memory on a 68297496-byte allocation.
"Thread-9" daemon prio=5 tid=8 RUNNABLE
| group="main" sCount=0 dsCount=0 s=N obj=0x4778a5a0 self=0x3d9830
| sysTid=6588 nice=0 sched=0/0 cgrp=unknown handle=4036976
at anywheresoftware.b4a.randomaccessfile.AsyncStreams$AIN.run(AsyncStreams.java:~168)
at java.lang.Thread.run(Thread.java:1096)
threadid=8: thread exiting with uncaught exception (group=0x4001d7d8)
FATAL EXCEPTION: Thread-9
java.lang.OutOfMemoryError
at anywheresoftware.b4a.randomaccessfile.AsyncStreams$AIN.run(AsyncStreams.java:168)
at java.lang.Thread.run(Thread.java:1096)
Force finishing activity anywheresoftware.b4a.samples.bluetooth/.chatactivity
** Activity (chatactivity) Pause, UserClosed = true **
** Activity (main) Resume **
Synergy async event, q = 4000, prim_base = 0520, event = 8036, len = 9
Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
Default buffer size used in BufferedWriter constructor. It would be better to be explicit if an 8k-char buffer is required.
Default buffer size used in BufferedWriter constructor. It would be better to be explicit if an 8k-char buffer is required.
Process anywheresoftware.b4a.samples.bluetooth (pid 6577) has died.
WIN DEATH: Window{47bc16c8 anywheresoftware.b4a.samples.bluetooth/anywheresoftware.b4a.samples.bluetooth.main paused=false}
Unexpected resume of com.android.launcher2 while already resumed in anywheresoftware.b4a.samples.bluetooth
[unregister] handle 0x789ac8 still locked (state=40000001)
!!! FAILED BINDER TRANSACTION !!!
Got RemoteException sending setActive(false) notification to pid 6577 uid 10120
Timed out waiting on IInputContextCallback