hkayann / node-red-contrib-ble-sense

Node-RED module for Bluetooth Low Energy (BLE) devices.
MIT License
6 stars 4 forks source link

Uncaught exception in version 0.0.13 #8

Closed aheitmann closed 1 year ago

aheitmann commented 1 year ago

When starting Node-RED without a BLE device (USB dongle) present, Node-RED crashes. This does not happen in version 0.0.12.

blesense

hkayann commented 1 year ago

Hi @aheitmann ,

Could you please check if your Bluetooth controller is named as "hci0"? -> hciconfig

I am surprised that it works in 0.0.12. There are no changes done that would affect finding the controller.

aheitmann commented 1 year ago

The error only occurs if no hci device is present during the startup of NodeRed. In my use case this can happen.

If i comment out the line "noble.on('stateChange', STATE);" in ble.js NodeRed starts without crashing.

hkayann commented 1 year ago

Alright, this means nothing wrong with the latest version then. Thanks for confirming.

The presence of hci device is expected before deploying the BLE nodes anyway. I might add this to README.md.