Closed wangjianxiang closed 2 years ago
Are you able to scan normally with bluetoothctl?
By the way, the exception is caused by the connectPeripheral method. So it looks like scanning is working....right?
Bluetooth scanning is normal. I don't know why this problem occurs, but I saw an article today about low-power Bluetooth data collection. So I reduced the Bluetooth version on the machine to 5.47, and then I tried to run your project again. Surprisingly, it can run normally and get data.
So I think it may be caused by the Bluetooth version。You can look at this project: https://github.com/sputnikdev/bluetooth-manager-tinyb
Thank you very much for your answer
hello , I'm using your blessed BlueZ project. I have some problems. Can you help me? When I run the project, I can't collect scan data normally. Errors are reported as follows:
BluetoothPeripheral - Input/output error 10:11:45.923 [Central-queue] ERROR BluetoothPeripheral - connection failed with status 'DBUS_EXECUTION_EXCEPTION' org.freedesktop.dbus.exceptions.DBusExecutionException: Input/output error at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.freedesktop.dbus.errors.Error.getException(Error.java:145) at org.freedesktop.dbus.errors.Error.throwException(Error.java:175) at org.freedesktop.dbus.RemoteInvocationHandler.executeRemoteMethod(RemoteInvocationHandler.java:152) at org.freedesktop.dbus.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:216) at com.sun.proxy.$Proxy22.Connect(Unknown Source) at com.welie.blessed.bluez.BluezDevice.connect(BluezDevice.java:416) at com.welie.blessed.BluetoothPeripheral.connect(BluetoothPeripheral.java:324) at com.welie.blessed.BluetoothCentralManager.lambda$connectPeripheral$11(BluetoothCentralManager.java:896)