Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NR crash at GATT attributes search #72

Open
IgorDancik opened this issue Jun 9, 2023 · 1 comment
Open

NR crash at GATT attributes search #72

IgorDancik opened this issue Jun 9, 2023 · 1 comment

Comments

@IgorDancik
Copy link

IgorDancik commented Jun 9, 2023

Environment:
• RPi 4: Linux version 5.15.84-v8+ (dom@buildbot) (aarch64-linux-gnu-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1613 SMP PREEMPT Thu Jan 5 12:03:08 GMT 2023
• npm -version 9.3.1
• Linux 5.15.84-v8+ arm64 LE
• Node-RED version: v3.0.2
• Node.js version: v18.14.0
• bluez version 5.55
• stty -F /dev/ttyAMA0 -a : speed 3000000 baud; rows 0; columns 0; line = 15;

Node Error : BLE scanning found the Bluetooth (address field), but at GATT attributes scanning (GATT attributes table) it crashes NR. Bluetoothctl works fine, I can get all data (gattool is not available - probably already deprecated )

Log:

Starting as a systemd service.
7 Jun 23:07:52 - [info] Installing module: node-red-contrib-generic-ble, version: 4.0.3
7 Jun 23:08:36 - [info] Installed module: node-red-contrib-generic-ble
7 Jun 23:08:37 - [info] Added node types:
7 Jun 23:08:37 - [info] - node-red-contrib-generic-ble:Generic BLE in
7 Jun 23:08:37 - [info] - node-red-contrib-generic-ble:Generic BLE out
7 Jun 23:08:37 - [info] - node-red-contrib-generic-ble:Generic BLE
7 Jun 23:10:13 - [info] [GenericBLE] Start BLE scanning
7 Jun 23:11:07 - [error] /__bledev/4c74d4e26f23 err:DBusError: Software caused connection abort
=>DBusError: Software caused connection abort
at methodReturnHandlers. (/home/pi/.node-red/node_modules/dbus-next/lib/bus.js:339:27)
at handleMessage (/home/pi/.node-red/node_modules/dbus-next/lib/bus.js:98:11)
at EventEmitter. (/home/pi/.node-red/node_modules/dbus-next/lib/bus.js:147:9)
at EventEmitter.emit (node:events:513:28)
at /home/pi/.node-red/node_modules/dbus-next/lib/connection.js:112:14
at Socket. (/home/pi/.node-red/node_modules/dbus-next/lib/message.js:63:9)
at Socket.emit (node:events:513:28)
at emitReadable
(node:internal/streams/readable:590:12)
at processTicksAndRejections (node:internal/process/task_queues:81:21)
7 Jun 23:11:07 - [red] Uncaught Exception:
7 Jun 23:11:07 - [error] TypeError: this._discoveredPeripheralUUids.indexOf is not a function
at PeripheralRemovableNoble.onMiss (/home/pi/.node-red/node_modules/node-red-contrib-generic-ble/dist/noble/noble/index.js:61:72)
at BluezBindings.emit (node:events:513:28)
at BluezBindings.onDeviceMissed (/home/pi/.node-red/node_modules/node-red-contrib-generic-ble/dist/noble/lib/bluez/noble/lib/bluez/bindings.js:716:10)
at BluezBindings.onDevicesServicesCharacteristicsMissed (/home/pi/.node-red/node_modules/node-red-contrib-generic-ble/dist/noble/lib/bluez/noble/lib/bluez/bindings.js:710:12)
at ProxyInterface.emit (node:events:513:28)
at EventEmitter.$listeners. (/home/pi/.node-red/node_modules/dbus-next/lib/client/proxy-interface.js:108:17)
at EventEmitter.emit (node:events:513:28)
at handleMessage (/home/pi/.node-red/node_modules/dbus-next/lib/bus.js:118:23)
at EventEmitter. (/home/pi/.node-red/node_modules/dbus-next/lib/bus.js:147:9)
at EventEmitter.emit (node:events:513:28)
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Failed with result 'exit-code'.

@dhruvjhalani95
Copy link

I am facing the same issue -> connecting and fetching data from a bluetooth device using bluetoothctl works fine but as soon as I use the ble in node to connect and fetch data Node-Red crashes and restarts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants