android-bluetooth-serial icon indicating copy to clipboard operation
android-bluetooth-serial copied to clipboard

Uncaught exception thrown by finalizer, Socket not created.

Open sufiaji opened this issue 5 years ago • 3 comments

Hi Harry, Thanks for the library, work like a charm!

However, there is an error on Logcat when executing OpenSerialDevice. Anyway, all the functions are still working, i.e. sending and receiving data. How do you think about this error and is there anyway to eliminate it? I am afraid it will crash on the long term usage.

Thanks!

image

sufiaji avatar Jul 15 '20 17:07 sufiaji

Hi, I get this error at runtime and the connection is never established.

    private void onError(Throwable error) {
        Toast.makeText(getApplicationContext(), error.getMessage(), Toast.LENGTH_LONG).show();
    }

I receive the error continiously and never connects. I tryed with an installed Android app and my device just appears as LE. So maybe the library does not support LE devices?

Anyeos avatar Oct 24 '20 01:10 Anyeos

@sufiaji Sorry I didn't see this issue got opened! That is very strange and even stranger is that the stacktrace does not run through your app or the library at any point, as the error is created on a new thread - you'd have to track down where that thread was created..

harryjph avatar Jan 14 '21 12:01 harryjph

@Anyeos Hi! Sorry for the slow response also. The library only supports regular bluetooth devices, not BLE I'm afraid. They work completely differently and the Serial devices eg. HC-06 are not BLE.

harryjph avatar Jan 14 '21 12:01 harryjph