Giter Site home page Giter Site logo

connection error about bluetooth-library HOT 8 OPEN

omaraflak avatar omaraflak commented on May 26, 2024 3
connection error

from bluetooth-library.

Comments (8)

omaraflak avatar omaraflak commented on May 26, 2024

What kind of the device are you trying to connect to ?

Take a look at this README section :
https://github.com/OmarAflak/Bluetooth-Library/blob/master/README.md#connect-to-device-using-port-trick

from bluetooth-library.

sontqq avatar sontqq commented on May 26, 2024

I'm trying to connect from an Android 9.0 Samsung device to a Windows 10 PC with a bluetooth dongle.

I have also tried to connect with the port tricking but no success.

from bluetooth-library.

sontqq avatar sontqq commented on May 26, 2024

I get this error:

W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'android.bluetooth.BluetoothSocket android.bluetooth.BluetoothDevice.createRfcommSocketToServiceRecord(java.util.UUID)' on a null object reference
        at me.aflak.bluetooth.Bluetooth.connect(Bluetooth.java:462)
W/System.err:     at me.aflak.bluetooth.Bluetooth.connectToDevice(Bluetooth.java:271)
        at me.aflak.bluetooth.Bluetooth.connectToDevice(Bluetooth.java:279)
W/System.err:     at com.sontme.esp.getlocation.activities.MainActivity$3$2.onDiscoveryFinished(MainActivity.java:363)
        at me.aflak.bluetooth.Bluetooth$7$3.run(Bluetooth.java:597)
        at me.aflak.bluetooth.utils.ThreadHelper.run(ThreadHelper.java:15)
W/System.err:     at me.aflak.bluetooth.Bluetooth$7.onReceive(Bluetooth.java:594)
        at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0(LoadedApk.java:1486)
        at android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run(Unknown Source:2)
        at android.os.Handler.handleCallback(Handler.java:873)
W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7073)
W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)

from bluetooth-library.

jpeiter avatar jpeiter commented on May 26, 2024

I'm having the same error, using either connectToDevice and connectToDeviceWithPortTrick, but fails every time.
I downloaded the Bluetooth Terminal app and it logs the same error on the screen.
I tried to connect from a Pixel 3 (Android 10) to a Galaxy J5 Pro (Android 9).

from bluetooth-library.

glebkravchenko avatar glebkravchenko commented on May 26, 2024

yep, same for me, trying to connect to medical device, but it is saying same, error_read failed, socket might closed or timeout, read ret: -1

from bluetooth-library.

omaraflak avatar omaraflak commented on May 26, 2024

Please make sure you are using a regular Bluetooth dongle, not BLE. BLE is not supported.

from bluetooth-library.

charlieporth1 avatar charlieporth1 commented on May 26, 2024

I'm getting this msg too. Is there any solution? Is there any way to disable BLE @omaraflak?

from bluetooth-library.

ibrahim-iqbal avatar ibrahim-iqbal commented on May 26, 2024

This issue is still persistent, is there a workaround for this, none of the other libraries are also able to tackle this.

from bluetooth-library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.