Skip to content

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

@contrabass22

Description

@contrabass22

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions