Coder Social home page Coder Social logo

clausbroch / node-red-contrib-noble-bluetooth Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 15.0 121 KB

A Node-RED module based on noble for interaction with Bluetooth Low Energy (BLE) devices.

License: MIT License

HTML 35.77% JavaScript 64.23%
ble noble node-red bluetooth bluetooth-low-energy

node-red-contrib-noble-bluetooth's Introduction

node-red-contrib-noble-bluetooth

A Node-RED module based on noble for interaction with Bluetooth Low Energy (BLE) devices.

Installation

npm install node-red-contrib-noble-bluetooth

Prerequisite

Requires @abandonware/noble module for bluetooth communication

Quick Start

Create a BLE scanner node and hook its input up to an inject node. Send a message with topic "start" to start scanning for devices. By befault it will search for any device. Can be configured to only search for devices publishing certaing services by providing an array of UUID's.

Connect the output to a BLE device node to connect to the found device. This will establish a connection to the device and discover all published services and characteristics.

Use a BLE in node to read from the device or a BLE out note to write to it.

More details about parameters and usage in each node's info panel.

Examples

The following show some simple examples of how to use the nodes. They are both available from the Import menu in the Node RED editor.

Scan for Devices

Shows the different ways to scan for devices, including continuous mode or for a limited time.

Heart Rate Sensor

Shows how to scan for a standard heart rate sensor and subscribe to the pulse measurements. Also shows how to read data from characteristics.

License

Licensed under the MIT License - see the LICENSE file for details.

node-red-contrib-noble-bluetooth's People

Contributors

clausbroch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

node-red-contrib-noble-bluetooth's Issues

Crashing node-red 2.0.5

Hi,
Using
node-red 2.0.5
nodejs 14.17.6
When I restart node-red or republish all flows, node-red crashes with this error:
18 Sep 17:12:06 - [red] Uncaught Exception: 18 Sep 17:12:06 - Error: EALREADY, Operation already in progress at Hci.init (/home/flo/nodered/node_modules/@abandonware/noble/lib/hci-socket/hci.js:120:18) at Hci.pollIsDevUp (/home/flo/nodered/node_modules/@abandonware/noble/lib/hci-socket/hci.js:135:14) at listOnTimeout (internal/timers.js:557:17) at processTimers (internal/timers.js:500:7) 17:12:06.043 DRIVER destroying driver instance...

Support option to `Write with response` or `Write without response`

My particular application communicates with a peripheral set to require Write with response. I was only able to correctly write to a characteristic by changing the following line to false to allow Write with response. Would be useful to send option from node (ex. msg.WriteWithResponse=true, ....=false, etc).

 // true if for write without response
            characteristic.write(data, false, function(error) {

How to disconnect

After it is connected to a peripheral and values are read I want to disconnect it, how to do that?

Scanner not firing device node.

I'm trying to connect to my ESP32 running a heart rate monitor program with the included "Heart Rate" example flow.
Both in the example flow and a custom flow I later tried. The scanner discovers my device with the heart rate monitor UUID and outputs the object just fine, but won't connect to it. I see no activity in the BLE device node.

My NodeRED version is 1.2.9 and the heart rate monitor code I'm using for my ESP32 is available here

I'm also able to discover, connect and subscribe to my ESP32 through my phone.

Unable to write to peripheral

I've been able to scan for peripherals, select one, and even subscribe to a characteristic. However, I have not been able to write to any of the characteristics using BLE out. Do you have any more details or examples for writing to a peripheral? Do the peripheral and payload messages need to be in specific formats?

poweredOn error

When scan, I alway have this error:

Error scanning for devices: Error: Could not start scanning, state is unknown (not poweredOn)

No compatible device found, Arduino 33 Ble

Greetings,

I'm currently trying to connect a Arduino 33 BLE to node red using your library.
But when I try to use it, I receive the following messaging :
image
Any idea why ?

BLEInNode creating new message and not sending device id

The BLEInNode doesn't send the device ID of the device that has sent the data, and also removes any messages that were sent to the node.

https://github.com/clausbroch/node-red-contrib-noble-bluetooth/blob/master/bluetooth.js#L300

https://github.com/clausbroch/node-red-contrib-noble-bluetooth/blob/master/bluetooth.js#L329

For my use case I needed to connect multiple Bluetooth devices and then depending on the device send the output to a different device. (Heart rate tracker to Philips Hue lights)

By modifying the above-mentioned lines to not create a new message and also attaching the device ID I can distinguish between devices and accomplish my goal.

characteristic.on('data', function(data, isNotification) {
                    msg.characteristic = characteristic.uuid;
                    msg.payload = data;
                    msg.peripheral =  peripheral.id;
                    node.send(msg);
                });
 characteristic.read(function(error, data) {
                    if (error) {
                       node.error("Error reading from characteristic: " + error);
                       return;
                    }
                    msg.characteristic = characteristic.uuid;
                    msg.payload = data;
                    msg.peripheral =  peripheral.id;
                    node.send(msg);
                });

So my question is if the current behavior is by design or could be modified as mentioned. If it were ok to modify it like above, I could create a pull request to change it.

Help with reading characteristic

Hi
I have managed to get your lib working with node-red on a pi zero. I can connect to my peripheral. The issue I am having is how to read data from the characteristic on a regular basis. Once connected I only get the data once. I followed your demo for setup.

The unit I am interrogating is a Nasa BM1 battery monitor and it appears it only a read characteristics.

Any help would be appreciated

unable to install on nodered v3.1.0

is any step required before installing?
noble and bleno are installed.

27 Sep 17:07:54 - [info] Node-RED version: v3.1.0
27 Sep 17:07:54 - [info] Node.js version: v18.17.1
27 Sep 17:07:54 - [info] Windows_NT 10.0.22621 x64 LE

27 Sep 17:08:12 - [info] Installing module: node-red-contrib-noble-bluetooth, version: 0.9.1
27 Sep 17:08:12 - [debug] npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict [email protected]
27 Sep 17:08:13 - [debug] [err] npm
27 Sep 17:08:13 - [debug] [err] WARN config production Use --omit=dev instead.
27 Sep 17:08:21 - [debug] [err] npm
27 Sep 17:08:21 - [debug] [err] WARN cleanup Failed to remove some directories [
27 Sep 17:08:21 - [debug] [err] npm WARN cleanup [
27 Sep 17:08:21 - [debug] [err] npm WARN cleanup 'C:\Users\nodeuser\.node-red\node_modules\@mapbox\node-pre-gyp',
27 Sep 17:08:21 - [debug] [err] npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\nodeuser.node-red\node_modules@mapbox\node-pre-gyp\node_modules\readable-stream'] {
27 Sep 17:08:21 - [debug] [err] npm WARN cleanup errno: -4048,
27 Sep 17:08:21 - [debug] [err] npm WARN cleanup code: 'EPERM',
27 Sep 17:08:21 - [debug] [err] npm
27 Sep 17:08:21 - [debug] [err] WARN cleanup syscall: 'rmdir',
27 Sep 17:08:21 - [debug] [err] npm WARN cleanup path: 'C:\Users\nodeuser\.node-red\node_modules\@mapbox\node-pre-gyp\node_modules\readable-stream'
27 Sep 17:08:21 - [debug] [err] npm WARN cleanup }
27 Sep 17:08:21 - [debug] [err] npm WARN cleanup ]
27 Sep 17:08:21 - [debug] [err] npm WARN cleanup ]
27 Sep 17:08:21 - [debug] [err] npm ERR! code
27 Sep 17:08:21 - [debug] [err] 1
27 Sep 17:08:21 - [debug] [err] npm ERR! path C:\Users\nodeuser.node-red\node_modules@abandonware\noble
27 Sep 17:08:21 - [debug] [err] npm ERR!
27 Sep 17:08:21 - [debug] [err] command failed
27 Sep 17:08:21 - [debug] [err] npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp-build
27 Sep 17:08:21 - [debug] [err] npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
27 Sep 17:08:21 - [debug] [err] npm ERR! nothing.c
27 Sep 17:08:21 - [debug] [err] npm ERR! win_delay_load_hook.cc
27 Sep 17:08:21 - [debug] [err] npm ERR! nothing.vcxproj -> C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\Release\nothing.lib
27 Sep 17:08:21 - [debug] [err] npm ERR! cl : command line warning D9025: overriding '/std:c++17' with '/std:c++latest' [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
27 Sep 17:08:21 - [debug] [err] npm ERR! noble_winrt.cc
27 Sep 17:08:21 - [debug] [err] npm ERR! C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(983,26): error C2039: 'wait_for': is not a member of 'winrt::impl' [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
27 Sep 17:08:21 - [debug] [err] npm ERR! C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(103): message : see declaration of 'winrt::impl' [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
27 Sep 17:08:21 - [debug] [err] npm ERR! C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(985): message : see reference to class template instantiation 'winrt::impl::consume_Windows_Foundation_IAsyncAction' being compiled [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
27 Sep 17:08:21 - [debug] [err] npm ERR! C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(1004,26): error C2039: 'wait_for': is not a member of 'winrt::impl' [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
27 Sep 17:08:21 - [debug] [err] npm ERR!
27 Sep 17:08:21 - [debug] [err] C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(103): message : see declaration of 'winrt::impl' [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
27 Sep 17:08:21 - [debug] [err] npm ERR! C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(1006): message : see reference to class template instantiation 'winrt::impl::consume_Windows_Foundation_IAsyncActionWithProgress<D,TProgress>' being compiled [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
27 Sep 17:08:21 - [debug] [err] npm ERR! C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(1038,26): error C2039: 'wait_for': is not a member of 'winrt::impl' [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
27 Sep 17:08:21 - [debug] [err] npm ERR! C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(103): message : see declaration of 'winrt::impl' [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
27 Sep 17:08:21 - [debug] [err] npm ERR! C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(1040): message : see reference to class template instantiation 'winrt::impl::consume_Windows_Foundation_IAsyncOperationWithProgress<D,TResult,TProgress>' being compiled [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
27 Sep 17:08:21 - [debug] [err] npm ERR! C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(1057,26): error C2039: 'wait_for': is not a member of 'winrt::impl' [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
27 Sep 17:08:21 - [debug] [err] npm ERR! C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(103): message : see declaration of 'winrt::impl' [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
27 Sep 17:08:21 - [debug] [err] npm ERR! C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(1059): message : see reference to class template instantiation 'winrt::impl::consume_Windows_Foundation_IAsyncOperation<D,TResult>' being compiled [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
27 Sep 17:08:21 - [debug] [err] npm ERR! C:\Users\nodeuser.node-red\node_modules@abandonware\noble\lib\win\src\notify_map.h(31,54): error C2064: term does not evaluate to a function taking 1 arguments [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
27 Sep 17:08:21 - [debug] [err] npm ERR! C:\Users\nodeuser.node-red\node_modules@abandonware\noble\lib\win\src\notify_map.h(32,61): error C2064: term does not evaluate to a function taking 1 arguments [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
27 Sep 17:08:21 - [debug] [err] npm ERR! C:\Users\nodeuser.node-red\node_modules@abandonware\noble\lib\win\src\notify_map.h(33,1): error C3536: 'serviceHash': cannot be used before it is initialized [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
27 Sep 17:08:21 - [debug] [err] npm ERR! C:\Users\nodeuser.node-red\node_modules@abandonware\noble\lib\win\src\notify_map.h(34,1): error C3536: 'characteristicHash': cannot be used before it is initialized [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info it worked if it ends with ok
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info using [email protected]
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info using [email protected] | win32 | x64
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info find Python using Python version 3.8.0 found at "C:\Python38\python.exe"
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info find VS using VS2019 (16.11.33927.289) found at:
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info find VS run with --verbose for detailed information
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn C:\Python38\python.exe
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args [
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args 'C:\Users\nodeuser\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args 'binding.gyp',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args '-f',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args 'msvs',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args '-I',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args 'C:\Users\nodeuser\.node-red\node_modules\@abandonware\noble\build\config.gypi',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args '-I',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args 'C:\Users\nodeuser\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\addon.gypi',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args '-I',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args 'C:\Users\nodeuser\AppData\Local\node-gyp\Cache\18.17.1\include\node\common.gypi',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args '-Dlibrary=shared_library',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args '-Dvisibility=default',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args '-Dnode_root_dir=C:\Users\nodeuser\AppData\Local\node-gyp\Cache\18.17.1',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\Users\nodeuser\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\nodeuser\\AppData\\Local\\node-gyp\\Cache\\18.17.1\\<(target_arch)\\node.lib',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\Users\nodeuser\.node-red\node_modules\@abandonware\noble',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args '-Dnode_engine=v8',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args '--depth=.',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args '--no-parallel',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args '--generator-output',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args 'C:\Users\nodeuser\.node-red\node_modules\@abandonware\noble\build',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args '-Goutput_dir=.'
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args ]
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args [
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args 'build/binding.sln',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args '/clp:Verbosity=minimal',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args '/nologo',
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args '/p:Configuration=Release;Platform=x64'
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp info spawn args ]
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp ERR! build error
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe failed with exit code: 1
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp ERR! stack at ChildProcess.onExit (C:\Users\nodeuser\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:203:23)
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:514:28)
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12)
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp ERR! System Windows_NT 10.0.22621
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp ERR! command "D:\AppsOL\nodejs\node.exe" "C:\Users\nodeuser\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp ERR! cwd C:\Users\nodeuser.node-red\node_modules@abandonware\noble
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp ERR! node -v v18.17.1
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp ERR! node-gyp -v v9.4.0
27 Sep 17:08:21 - [debug] [err] npm ERR! gyp ERR! not ok
27 Sep 17:08:21 - [debug] [err]
27 Sep 17:08:21 - [debug] [err] npm
27 Sep 17:08:21 - [debug] [err] ERR! A complete log of this run can be found in: C:\Users\nodeuser\AppData\Local\npm-cache_logs\2023-09-27T15_08_13_622Z-debug-0.log
27 Sep 17:08:21 - [debug] rc=1
27 Sep 17:08:21 - [warn] Installation of module node-red-contrib-noble-bluetooth failed:
27 Sep 17:08:21 - [warn] ------------------------------------------
27 Sep 17:08:21 - [warn] npm WARN config production Use --omit=dev instead.
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'C:\Users\nodeuser\.node-red\node_modules\@mapbox\node-pre-gyp',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\nodeuser.node-red\node_modules@mapbox\node-pre-gyp\node_modules\readable-stream'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\Users\nodeuser\.node-red\node_modules\@mapbox\node-pre-gyp\node_modules\readable-stream'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\nodeuser.node-red\node_modules@abandonware\noble
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp-build
npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
npm ERR! nothing.c
npm ERR! win_delay_load_hook.cc
npm ERR! nothing.vcxproj -> C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\Release\nothing.lib
npm ERR! cl : command line warning D9025: overriding '/std:c++17' with '/std:c++latest' [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
npm ERR! noble_winrt.cc
npm ERR! C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(983,26): error C2039: 'wait_for': is not a member of 'winrt::impl' [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
npm ERR! C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(103): message : see declaration of 'winrt::impl' [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
npm ERR! C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(985): message : see reference to class template instantiation 'winrt::impl::consume_Windows_Foundation_IAsyncAction' being compiled [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
npm ERR! C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(1004,26): error C2039: 'wait_for': is not a member of 'winrt::impl' [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
npm ERR! C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(103): message : see declaration of 'winrt::impl' [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
npm ERR! C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(1006): message : see reference to class template instantiation 'winrt::impl::consume_Windows_Foundation_IAsyncActionWithProgress<D,TProgress>' being compiled [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
npm ERR! C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(1038,26): error C2039: 'wait_for': is not a member of 'winrt::impl' [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
npm ERR! C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(103): message : see declaration of 'winrt::impl' [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
npm ERR! C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(1040): message : see reference to class template instantiation 'winrt::impl::consume_Windows_Foundation_IAsyncOperationWithProgress<D,TResult,TProgress>' being compiled [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
npm ERR! C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(1057,26): error C2039: 'wait_for': is not a member of 'winrt::impl' [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
npm ERR! C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(103): message : see declaration of 'winrt::impl' [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
npm ERR! C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\impl\Windows.Foundation.0.h(1059): message : see reference to class template instantiation 'winrt::impl::consume_Windows_Foundation_IAsyncOperation<D,TResult>' being compiled [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
npm ERR! C:\Users\nodeuser.node-red\node_modules@abandonware\noble\lib\win\src\notify_map.h(31,54): error C2064: term does not evaluate to a function taking 1 arguments [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
npm ERR! C:\Users\nodeuser.node-red\node_modules@abandonware\noble\lib\win\src\notify_map.h(32,61): error C2064: term does not evaluate to a function taking 1 arguments [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
npm ERR! C:\Users\nodeuser.node-red\node_modules@abandonware\noble\lib\win\src\notify_map.h(33,1): error C3536: 'serviceHash': cannot be used before it is initialized [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
npm ERR! C:\Users\nodeuser.node-red\node_modules@abandonware\noble\lib\win\src\notify_map.h(34,1): error C3536: 'characteristicHash': cannot be used before it is initialized [C:\Users\nodeuser.node-red\node_modules@abandonware\noble\build\lib\win\binding.vcxproj]
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 3.8.0 found at "C:\Python38\python.exe"
npm ERR! gyp info find VS using VS2019 (16.11.33927.289) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Python38\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'C:\Users\nodeuser\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'msvs',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\nodeuser\.node-red\node_modules\@abandonware\noble\build\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\nodeuser\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\nodeuser\AppData\Local\node-gyp\Cache\18.17.1\include\node\common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=C:\Users\nodeuser\AppData\Local\node-gyp\Cache\18.17.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\Users\nodeuser\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\nodeuser\\AppData\\Local\\node-gyp\\Cache\\18.17.1\\<(target_arch)\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\Users\nodeuser\.node-red\node_modules\@abandonware\noble',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'C:\Users\nodeuser\.node-red\node_modules\@abandonware\noble\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'build/binding.sln',
npm ERR! gyp info spawn args '/clp:Verbosity=minimal',
npm ERR! gyp info spawn args '/nologo',
npm ERR! gyp info spawn args '/p:Configuration=Release;Platform=x64'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onExit (C:\Users\nodeuser\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:203:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:514:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Windows_NT 10.0.22621
npm ERR! gyp ERR! command "D:\AppsOL\nodejs\node.exe" "C:\Users\nodeuser\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\nodeuser.node-red\node_modules@abandonware\noble
npm ERR! gyp ERR! node -v v18.17.1
npm ERR! gyp ERR! node-gyp -v v9.4.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: C:\Users\nodeuser\AppData\Local\npm-cache_logs\2023-09-27T15_08_13_622Z-debug-0.log

27 Sep 17:08:21 - [warn] ------------------------------------------
Error: Install failed
at C:\Users\nodeuser\AppData\Roaming\npm\node_modules\node-red\node_modules@node-red\registry\lib\installer.js:285:25
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
27 Sep 17:08:21 - [error] Error: Install failed

Why not connect on MAC

What is the reason to scan UUID instead of connect to address?
You have to be 100% sure that a UUID is only used on one device. Making it impossible to read out battery level for one specific device.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.