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

Can't scan or connect to peripheral device without restarting Node-RED #49

Open
contrabass22 opened this issue Apr 26, 2021 · 0 comments

Comments

@contrabass22
Copy link

contrabass22 commented Apr 26, 2021

Symptoms

  1. Checking "BLE Scanning" in a global Generic-BLE configuration node finds no devices after a long period of waiting. Unchecking, waiting a moment, and re-checking "BLE Scanning" exhibits the same behavior.
  2. Trying to connect to a peripheral device fails, and the nodes are in either the "error" or transition to the "missing" state.

Workaround
Restart the Node-RED server. Subsequent attempts to scan or connect may succeed.

Details
The following log occurred at the time of the failure:

[error] [GenericBLE:ERROR] Missing Bluetooth Object, Path:/org/bluez/hci0, Valid Paths:/org/bluez}, Error: Missing Bluetooth Object, Path:/org/bluez/hci0, Valid Paths:/org/bluez}
    at BluezBindings.init (/home/user/.node-red/node_modules/node-red-contrib-generic-ble/dist/noble/lib/bluez/noble/lib/bluez/bindings.js:182:19)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Note that this issue can be compounded with #40 where even after restarting Node-RED may require the workaround of unchecking and/or checking "BLE Scanning" in the global configuration node to fix the issue.

Steps to Reproduce
This is an intermittent issue. There don't seem to be any unusual aspects of a flow to get this to occur. I've seen it happen on flows with different devices. All of them have an inject node to connect to a peripheral device. The GATT characteristics they read/write don't seem to affect the behavior.

Component Versions
Platform: Linux armv7l (32-bit)
Bluez: 5.54
Node.js: v10.16.3
Node-red-contrib-generic-ble: 4.0.3
Node RED: v1.2.9

Hardware
Bluetooth adapter: TPLINK UB400
Peripheral Device: TI Sensor Tag CC2650STK

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

1 participant