abandonware / node-bluetooth-hci-socket Goto Github PK
View Code? Open in Web Editor NEWThis project forked from noble/node-bluetooth-hci-socket
License: MIT License
This project forked from noble/node-bluetooth-hci-socket
License: MIT License
[email protected] install C:\Users\DELL\Desktop\new_noble\noble\node_modules\usb
node-gyp-build
@abandonware/[email protected] install C:\Users\DELL\Desktop\new_noble\noble\node_modules@abandonware\bluetooth-hci-socket
node-pre-gyp install --fallback-to-build --update-binary
node-pre-gyp ERR! install response status 404 Not Found on https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-11/bluetooth_hci_socket-0.5.3-11-node-v83-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for @abandonware/[email protected] and [email protected] (node-v83 ABI,
unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error response status
404 Not Found on https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-11/bluetooth_hci_socket-0.5.3-11-node-v83-win32-x64.tar.gz
Traceback (most recent call last):
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 50, in
sys.exit(gyp.script_main())
^^^^^^^^^^^^^^^^^
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 554, in script_main
return main(sys.argv[1:])
^^^^^^^^^^^^^^^^^^
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 547, in main
return gyp_main(args)
^^^^^^^^^^^^^^
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 520, in gyp_main
[generator, flat_list, targets, data] =
Load(
^^^^^
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 136, in Load
result = gyp.input.Load(build_files, default_variables, includes[:],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 2782, in Load
LoadTargetBuildFile(build_file, data, aux_data,
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 391, in LoadTargetBuildFile
build_file_data = LoadOneBuildFile(build_file_path, data, aux_data,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 234, in LoadOneBuildFile
build_file_contents = open(build_file_path, 'rU').read()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid mode: 'rU' while trying
to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp
failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit
(C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)gyp ERR! stack at ChildProcess.emit (events.js:400:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--update-binary" "--module=C:\Users\DELL\Desktop\new_noble\noble\node_modules\@abandonware\bluetooth-hci-socket\lib\binding\bluetooth_hci_socket.node" "--module_name=bluetooth_hci_socket" "--module_path=C:\Users\DELL\Desktop\new_noble\noble\node_modules\@abandonware\bluetooth-hci-socket\lib\binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83" "--python=C:\Users\DELL\AppData\Local\Programs\Python\Python311\python.exe"
gyp ERR! cwd C:\Users\DELL\Desktop\new_noble\noble\node_modules@abandonware\bluetooth-hci-socket
gyp ERR! node -v v14.21.3
gyp ERR! node-gyp -v v5.1.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --update-binary --module=C:\Users\DELL\Desktop\new_noble\noble\node_modules@abandonware\bluetooth-hci-socket\lib\binding\bluetooth_hci_socket.node --module_name=bluetooth_hci_socket --module_path=C:\Users\DELL\Desktop\new_noble\noble\node_modules@abandonware\bluetooth-hci-socket\lib\binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83 --python=C:\Users\DELL\AppData\Local\Programs\Python\Python311\python.exe' (1)
node-pre-gyp ERR! stack at ChildProcess. (C:\Users\DELL\Desktop\new_noble\noble\node_modules@mapbox\node-pre-gyp\lib\util\compile.js:89:23)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:400:28)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1088:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5)
node-pre-gyp ERR! System Windows_NT 10.0.19045
node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\DELL\Desktop\new_noble\noble\node_modules\@mapbox\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build" "--update-binary"
node-pre-gyp ERR! cwd C:\Users\DELL\Desktop\new_noble\noble\node_modules@abandonware\bluetooth-hci-socket
node-pre-gyp ERR! node -v v14.21.3
node-pre-gyp ERR! node-pre-gyp -v v1.0.11
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --update-binary --module=C:\Users\DELL\Desktop\new_noble\noble\node_modules@abandonware\bluetooth-hci-socket\lib\binding\bluetooth_hci_socket.node --module_name=bluetooth_hci_socket --module_path=C:\Users\DELL\Desktop\new_noble\noble\node_modules@abandonware\bluetooth-hci-socket\lib\binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83 --python=C:\Users\DELL\AppData\Local\Programs\Python\Python311\python.exe' (1)
@abandonware/[email protected] install C:\Users\DELL\Desktop\new_noble\noble
node-gyp-build
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @abandonware/[email protected] (node_modules@abandonware\bluetooth-hci-socket):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @abandonware/[email protected] install: node-pre-gyp install --fallback-to-build --update-binary
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
audited 667 packages in 11.047s
107 packages are looking for funding
run npm fund
for details
found 9 vulnerabilities (8 moderate, 1 high) run npm audit fix
to fix them, or npm audit
for details
C:\Users\DELL\Desktop\new_noble\noble>node test.js
noble
on -> stateChange: unsupported
^C
C:\Users\DELL\Desktop\new_noble\noble>npm install
[email protected] install C:\Users\DELL\Desktop\new_noble\noble\node_modules\usb
node-gyp-build
@abandonware/[email protected] install C:\Users\DELL\Desktop\new_noble\noble\node_modules@abandonware\bluetooth-hci-socket
node-pre-gyp install --fallback-to-build --update-binary
node-pre-gyp ERR! install response status 404 Not Found on https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-11/bluetooth_hci_socket-0.5.3-11-node-v83-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for @abandonware/[email protected] and [email protected] (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-11/bluetooth_hci_socket-0.5.3-11-node-v83-win32-x64.tar.gz
Traceback (most recent call last):
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 50, in
sys.exit(gyp.script_main())
^^^^^^^^^^^^^^^^^
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 554, in script_main
return main(sys.argv[1:])
^^^^^^^^^^^^^^^^^^
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 547, in main
return gyp_main(args)
^^^^^^^^^^^^^^
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 520, in gyp_main
[generator, flat_list, targets, data] = Load(
^^^^^
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp_init_.py", line 136, in Load
result = gyp.input.Load(build_files, default_variables, includes[:],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 2782, in Load
LoadTargetBuildFile(build_file, data, aux_data,
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 391, in LoadTargetBuildFile
build_file_data = LoadOneBuildFile(build_file_path, data, aux_data,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 234, in LoadOneBuildFile
build_file_contents = open(build_file_path, 'rU').read()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid mode: 'rU' while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp
failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:400:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--update-binary" "--module=C:\Users\DELL\Desktop\new_noble\noble\node_modules\@abandonware\bluetooth-hci-socket\lib\binding\bluetooth_hci_socket.node" "--module_name=bluetooth_hci_socket" "--module_path=C:\Users\DELL\Desktop\new_noble\noble\node_modules\@abandonware\bluetooth-hci-socket\lib\binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83" "--python=C:\Users\DELL\AppData\Local\Programs\Python\Python311\python.exe"
gyp ERR! cwd C:\Users\DELL\Desktop\new_noble\noble\node_modules@abandonware\bluetooth-hci-socket
gyp ERR! node -v v14.21.3
gyp ERR! node-gyp -v v5.1.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --update-binary --module=C:\Users\DELL\Desktop\new_noble\noble\node_modules@abandonware\bluetooth-hci-socket\lib\binding\bluetooth_hci_socket.node --module_name=bluetooth_hci_socket --module_path=C:\Users\DELL\Desktop\new_noble\noble\node_modules@abandonware\bluetooth-hci-socket\lib\binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83 --python=C:\Users\DELL\AppData\Local\Programs\Python\Python311\python.exe' (1)
node-pre-gyp ERR! stack at ChildProcess. (C:\Users\DELL\Desktop\new_noble\noble\node_modules@mapbox\node-pre-gyp\lib\util\compile.js:89:23)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:400:28)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1088:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5)
node-pre-gyp ERR! System Windows_NT 10.0.19045
node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\DELL\Desktop\new_noble\noble\node_modules\@mapbox\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build" "--update-binary"
node-pre-gyp ERR! cwd C:\Users\DELL\Desktop\new_noble\noble\node_modules@abandonware\bluetooth-hci-socket
node-pre-gyp ERR! node -v v14.21.3
node-pre-gyp ERR! node-pre-gyp -v v1.0.11
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --update-binary --module=C:\Users\DELL\Desktop\new_noble\noble\node_modules@abandonware\bluetooth-hci-socket\lib\binding\bluetooth_hci_socket.node --module_name=bluetooth_hci_socket --module_path=C:\Users\DELL\Desktop\new_noble\noble\node_modules@abandonware\bluetooth-hci-socket\lib\binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83 --python=C:\Users\DELL\AppData\Local\Programs\Python\Python311\python.exe' (1)
@abandonware/[email protected] install C:\Users\DELL\Desktop\new_noble\noble
node-gyp-build
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @abandonware/[email protected] (node_modules@abandonware\bluetooth-hci-socket):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @abandonware/[email protected] install: node-pre-gyp install --fallback-to-build --update-binary
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
audited 658 packages in 11.01s
can the Bluetooth HCI from Zephyr RTOS be supported?
https://docs.zephyrproject.org/latest/connectivity/usb/device/usb_device.html
There are options for USB and UART, when flashed whey report PID: 0x00b and for H4 pid: 0x00c
The Vid is: 0x2fe3
I understand its useful on Windows where people don't always have MSVC installed however I've had no end of issues with it on newer npm versions. I dropped it and reverted the project to npm-gyp on my fork.
What do people think about dropping support for it?
Hi, not sure where to file this issue but this seems like the best place. We're using bleno in an iot project at my company and noticed a problem connecting to our devices specifically when using v0.5.3-8 of this project. Devices will connect and pair, but when trying to actually communicate the connection doesn't respond. In a chrome browser (where we're connecting to the gatt server from) we get an error that says No Services matching UUID <uuid> found
when trying to retrieve the primary service by uuid. This problem isn't exhibited when using earlier versions of this project (0.5.3-7 works as expected)
This commit seems like it could be a source of the problem 3ebb846 (by process of elimination looking at other commits between the two latest releases)
We have a simple nodejs bleno project that exhibits the issue when switching between versions if you need to see the problem; it's running on debian buster, node 12. We don't have the resources to find an actual fix here and are going to lock our versions on the previous ones, but thought someone should be made aware of what seems like a bug here
Ask for help. I can't install this function. Mistake..
pi@raspberrypi:~ $ npm install @abandonware / bluetooth-HCI-socket
npm ERR! code EINVALIDTAGNAME
npm ERR! Invalid tag name "@abandonware": Tags may not have any characters that encodeURIComponent encodes.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2020-05-31T17_24_24_678Z-debug.log
pi@raspberrypi:~ $
When using npm install on Node 12 I get the following errors:
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-6/bluetooth_hci_socket-0.5.3-6-node-v72-linux-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not found for @abandonware/[email protected] and [email protected] (node-v72 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory '/home/pi/node_modules/@abandonware/bluetooth-hci-socket/build'
CXX(target) Release/obj.target/bluetooth_hci_socket/src/BluetoothHciSocket.o
In file included from /root/.cache/node-gyp/12.19.0/include/node/uv/unix.h:31,
from /root/.cache/node-gyp/12.19.0/include/node/uv.h:66,
from ../../../nan/nan.h:55,
from ../src/BluetoothHciSocket.cpp:8:
/usr/include/netinet/in.h:18: error: unterminated #ifndef
18 | #ifndef _NETINET_IN_H
|
In file included from /usr/include/arpa/inet.h:22,
from /root/.cache/node-gyp/12.19.0/include/node/uv/unix.h:33,
from /root/.cache/node-gyp/12.19.0/include/node/uv.h:66,
from ../../../nan/nan.h:55,
from ../src/BluetoothHciSocket.cpp:8:
/usr/include/netinet/in.h:18: error: unterminated #ifndef
18 | #ifndef _NETINET_IN_H
|
In file included from /usr/include/netdb.h:27,
from /root/.cache/node-gyp/12.19.0/include/node/uv/unix.h:34,
from /root/.cache/node-gyp/12.19.0/include/node/uv.h:66,
from ../../../nan/nan.h:55,
from ../src/BluetoothHciSocket.cpp:8:
/usr/include/netinet/in.h:18: error: unterminated #ifndef
18 | #ifndef _NETINET_IN_H
|
^Cmake: *** [bluetooth_hci_socket.target.mk:109: Release/obj.target/bluetooth_hci_socket/src/BluetoothHciSocket.o] Interrupt
... lots more compilation errors
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:314:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 5.4.51-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/pi/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node" "--module_name=bluetooth_hci_socket" "--module_path=/home/pi/node_modules/@abandonware/bluetooth-hci-socket/lib/binding" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /home/pi/node_modules/@abandonware/bluetooth-hci-socket
gyp ERR! node -v v12.19.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node --module_name=bluetooth_hci_socket --module_path=/home/pi/node_modules/@abandonware/bluetooth-hci-socket/lib/binding --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/pi/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:314:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Linux 5.4.51-v7+
node-pre-gyp ERR! command "/usr/local/bin/node" "/home/pi/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/pi/node_modules/@abandonware/bluetooth-hci-socket
node-pre-gyp ERR! node -v v12.19.0
node-pre-gyp ERR! node-pre-gyp -v v0.15.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node --module_name=bluetooth_hci_socket --module_path=/home/pi/node_modules/@abandonware/bluetooth-hci-socket/lib/binding --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @abandonware/[email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @abandonware/[email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
It would help to add cross link URL in commit messages
Relate-to: noble#123
Relate-to: abandonware/abandonware.github.io#8
Hi,
I'm trying to install this after running into issues installing noble. For both noble and for installing this I'm getting an error like something below. Any idea what I'm doing wrong? I'm running this on a Raspberry Pi4 with Node.js version v.12.16.1 and npm version 6.14.1.
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h: In instantiation of ‘void v8::PersistentBase::SetWeak(P*, typename v8::WeakCallbackInfo
::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo
::Callback = void ()(const v8::WeakCallbackInfoNan::ObjectWrap&)]’:
../../nan/nan_object_wrap.h:65:61: required from here
/home/pi/.cache/node-gyp/12.16.1/include/node/v8.h:10226:16: warning: cast between incompatible function types from v8::WeakCallbackInfoNan::ObjectWrap::Callback’ {aka ‘void ()(const v8::WeakCallbackInfoNan::ObjectWrap&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo&)’} [-Wcast-function-type]
make: *** [binding.target.mk:109: Release/obj.target/binding/src/BluetoothHciSocket.o] Error 1
make: Leaving directory '/home/pi/node_modules/bluetooth-hci-socket/build'
gyp ERR! build error
gyp ERR! stack Error:make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:311:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.19.97-v7l+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/node_modules/bluetooth-hci-socket
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v5.0.7
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/xpc-connection):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/bluetooth-hci-socket):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install:node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm install @abandonware/bluetooth-hci-socket gives the following error message
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-4/binding-0.5.3-4-node-v72-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for @abandonware/[email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
MSBUILD : error MSB1009: Project file does not exist.
any clue on how to fix that?
Hi guys,
We are developing an application that uses noble for central and bleno for peripheral. Here we were facing the socket error whenever we try to switch from central to peripheral or vice versa.
Error: EALREADY, Operation already in progress
To handle this we used to delete the socket and reinitialize it whenever we switch from central to peripheral or vice versa.
We just wanted to know is this a good approach?
(Note: Either noble or bleno will be active at a time).
is it possible to use the common HCI socket for both noble and bleno instead of creating the new socket every time whenever we switch from central to peripheral? or is there any alternative or best approaches for this?
Hi i'm using Arch linux and after upgrading to 6.9.3 kernel, my script using @abandonware/noble stopped working.
After some investigations I managed to easily reproduce the issue by simply running examples/le-scan-test.js
And here's the result:
$ sudo node le-scan-test.js
Error: EINVAL, Invalid argument
at setFilter (/tmp/a/node-bluetooth-hci-socket/examples/le-scan-test.js:83:22)
at Object.<anonymous> (/tmp/a/node-bluetooth-hci-socket/examples/le-scan-test.js:124:1)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
errno: 22,
code: 'EINVAL',
syscall: 'setsockopt'
}
Exact kernel :
Linux 6.9.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 31 May 2024 15:14:45 +0000 x86_64 GNU/Linux
I unfortunately have no time to try to rollback to older kernels and find where it broke.
I got the following error when I try to recompile this module (required from @abandonware/noble) with electron-rebuild. It was fine on electron10, but not on electron11. It seems to be caused by v8-internal.h change bundled with electron 11, but I'm not familiar with node-gyp configuration and couldn't figure out how to fix it myself.
I found it failed on RaspberrypiOS too.
Here's how to reproduce it.
npm init -y
npm i --save-dev electron@beta electron-rebuild
npm i @abandonware/bluetooth-hci-socket
npx electron-rebuild
make: Entering directory '/home/xxx/tes3/node_modules/usb/build'
CC(target) Release/obj.target/libusb/libusb/libusb/core.o
⠦ Building module: usb, Completed: 1 CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
⠏ Building module: usb, Completed: 1 CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
⠙ Building module: usb, Completed: 1 CC(target) Release/obj.target/libusb/libusb/libusb/io.o
⠼ Building module: usb, Completed: 1 CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
⠴ Building module: usb, Completed: 1 CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
⠧ Building module: usb, Completed: 1 CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
⠇ Building module: usb, Completed: 1 CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
⠏ Building module: usb, Completed: 1 CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
⠦ Building module: usb, Completed: 1 CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
⠧ Building module: usb, Completed: 1 AR(target) Release/obj.target/usb.a
COPY Release/usb.a
⠇ Building module: usb, Completed: 1 CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
⠙ Building module: usb, Completed: 1In file included from /home/xxx/tes3/node_modules/usb/11.0.0-beta.16/include/node/v8.h:30,
from ../src/node_usb.h:12,
from ../src/node_usb.cc:1:
/home/xxx/tes3/node_modules/usb/11.0.0-beta.16/include/node/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:
/home/xxx/tes3/node_modules/usb/11.0.0-beta.16/include/node/v8-internal.h:418:38: error: ‘remove_cv_t’ is not a member of ‘std’
!std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
^~~~~~~~~~~
/home/xxx/tes3/node_modules/usb/11.0.0-beta.16/include/node/v8-internal.h:418:38: note: suggested alternative: ‘remove_cv’
!std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
^~~~~~~~~~~
remove_cv
/home/xxx/tes3/node_modules/usb/11.0.0-beta.16/include/node/v8-internal.h:418:38: error: ‘remove_cv_t’ is not a member of ‘std’
/home/xxx/tes3/node_modules/usb/11.0.0-beta.16/include/node/v8-internal.h:418:38: note: suggested alternative: ‘remove_cv’
!std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
^~~~~~~~~~~
remove_cv
/home/xxx/tes3/node_modules/usb/11.0.0-beta.16/include/node/v8-internal.h:418:50: error: template argument 2 is invalid
!std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
^
/home/xxx/tes3/node_modules/usb/11.0.0-beta.16/include/node/v8-internal.h:418:63: error: ‘::Perform’ has not been declared
!std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
^~~~~~~
/home/xxx/tes3/node_modules/usb/11.0.0-beta.16/include/node/v8-internal.h:418:63: note: suggested alternative: ‘perror’
!std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
^~~~~~~
perror
⠹ Building module: usb, Completed: 1In file included from ../src/node_usb.h:12,
from ../src/node_usb.cc:1:
/home/xxx/tes3/node_modules/usb/11.0.0-beta.16/include/node/v8.h: At global scope:
/home/xxx/tes3/node_modules/usb/11.0.0-beta.16/include/node/v8.h:9182:75: warning: ‘MicrotasksCompletedCallback’ is deprecated [-Wdeprecated-declarations]
void AddMicrotasksCompletedCallback(MicrotasksCompletedCallback callback);
^
/home/xxx/tes3/node_modules/usb/11.0.0-beta.16/include/node/v8.h:9190:78: warning: ‘MicrotasksCompletedCallback’ is deprecated [-Wdeprecated-declarations]
void RemoveMicrotasksCompletedCallback(MicrotasksCompletedCallback callback);
^
⠼ Building module: usb, Completed: 1In file included from ../src/helpers.h:3,
from ../src/node_usb.h:21,
from ../src/node_usb.cc:1:
../node_modules/nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../node_modules/nan/nan.h:2232:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
, reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
^
In file included from ../src/node_usb.h:14,
from ../src/node_usb.cc:1:
../src/node_usb.cc: At global scope:
/home/xxx/tes3/node_modules/usb/11.0.0-beta.16/include/node/node.h:613:43: warning: cast between incompatible function types from ‘void (*)(v8::Local<v8::Object>)’ to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
(node::addon_register_func) (regfunc), \
^
/home/xxx/tes3/node_modules/usb/11.0.0-beta.16/include/node/node.h:647:3: note: in expansion of macro ‘NODE_MODULE_X’
NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
^~~~~~~~~~~~~
../src/node_usb.cc:95:1: note: in expansion of macro ‘NODE_MODULE’
NODE_MODULE(usb_bindings, Initialize)
^~~~~~~~~~~
../src/node_usb.cc: In function ‘void handleHotplug(std::pair<libusb_device*, libusb_hotplug_event>)’:
../src/node_usb.cc:151:58: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(hotplugThis), "emit", 2, argv);
^
In file included from ../src/helpers.h:3,
from ../src/node_usb.h:21,
from ../src/node_usb.cc:1:
../node_modules/nan/nan.h:1001:46: note: declared here
NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
^~~~~~~~~~~~
../src/node_usb.cc:151:58: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(hotplugThis), "emit", 2, argv);
^
In file included from ../src/helpers.h:3,
from ../src/node_usb.h:21,
from ../src/node_usb.cc:1:
../node_modules/nan/nan.h:1001:46: note: declared here
NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
^~~~~~~~~~~~
⠴ Building module: usb, Completed: 1make: *** [usb_bindings.target.mk:128: Release/obj.target/usb_bindings/src/node_usb.o] Error 1
Hi everybody,
I need to transmit short packages (23 Bytes) of data at a high frequency (at least 60 Hz/every 16ms) to a connected BLE device.
The device accepts a min connection interval of 7.5ms but insist on an mtu of 23.
So I'm using a setInterval loop to send a new write request every xx ms. Right now 30ms seem to work fine but anything below leads to an LIBUSB_TRANSFER_STALL on the InEndpoint. I guess this might have smth to do with response packets not being handled correctly. I attached a package capure of such an event.
dump.zip
Do I need to change some parameter to make it more stable, increase some buffer or smth? Even tried to not use startPoll on the InEndpoint and use a custom loop at a lower rate to no avail.
I don't know much about USB communication so any help is appreciated. Thanks!
First time here, I looked and couldn't find anything about this issue.
node-pre-gyp uses Python 2.7 which is now deprecated. node-pre-gyp itself is also deprecated and we are told to use @mapbox/node-pre-gyp instead.
Was this considered and rejected or is there a path for this upgrade?
Thanks.
root@homebridge:/home/pi#
root@homebridge:/home/pi# npm i @abandonware/bluetooth-hci-socket
npm ERR! code 1
npm ERR! path /home/pi/node_modules/@abandonware/bluetooth-hci-socket
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! make: Entering directory '/home/pi/node_modules/@abandonware/bluetooth-hci-socket/build'
npm ERR! CXX(target) Release/obj.target/bluetooth_hci_socket/src/BluetoothHciSocket.o
npm ERR! make: Leaving directory '/home/pi/node_modules/@abandonware/bluetooth-hci-socket/build'
npm ERR! Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node --module_name=bluetooth_hci_socket --module_path=/home/pi/node_modules/@abandonware/bluetooth-hci-socket/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | linux | arm
npm ERR! node-pre-gyp info check checked for "/home/pi/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-8/bluetooth_hci_socket-0.5.3-8-node-v93-linux-arm.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-8/bluetooth_hci_socket-0.5.3-8-node-v93-linux-arm.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for @abandonware/[email protected] and [email protected] (node-v93 ABI, glibc) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-8/bluetooth_hci_socket-0.5.3-8-node-v93-linux-arm.tar.gz
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] | linux | arm
npm ERR! gyp info ok
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] | linux | arm
npm ERR! gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"
npm ERR! gyp WARN EACCES current user ("pi") does not have permission to access the dev dir "/root/.cache/node-gyp/16.13.1"
npm ERR! gyp WARN EACCES attempting to reinstall using temporary dev dir "/tmp/.node-gyp"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/local/lib/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 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/pi/node_modules/@abandonware/bluetooth-hci-socket/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/tmp/.node-gyp/16.13.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=/tmp/.node-gyp/16.13.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/tmp/.node-gyp/16.13.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/pi/node_modules/@abandonware/bluetooth-hci-socket',
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 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok
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] | linux | arm
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from /usr/include/stdio.h:39,
npm ERR! from /tmp/.node-gyp/16.13.1/include/node/v8.h:20,
npm ERR! from /tmp/.node-gyp/16.13.1/include/node/node.h:63,
npm ERR! from /tmp/.node-gyp/16.13.1/include/node/node_buffer.h:25,
npm ERR! from ../src/BluetoothHciSocket.cpp:7:
npm ERR! /usr/include/arm-linux-gnueabihf/bits/types/__fpos_t.h:1:2: error: invalid preprocessing directive #avndef; did you mean #ifndef?
npm ERR! #avndef _____fpos_t_defaned
npm ERR! ^~~~~~
npm ERR! ifndef
npm ERR! /usr/include/arm-linux-gnueabihf/bits/types/__fpos_t.h:2:2: error: invalid preprocessing directive #defing; did you mean #define?
npm ERR! #defing __]__fpos_t_defined 1
npm ERR! ^~~~~~
npm ERR! define
npm ERR! /usr/include/arm-linux-gnueabihf/bits/types/__fpos_t.h:5:2: error: invalid preprocessing directive #inglude; did you mean #include?
npm ERR! #inglude 8bits/types/__mbstate_t.h>J
npm ERR! ^~~~~~~
npm ERR! include
npm ERR! /usr/include/arm-linux-gnueabihf/bits/types/__fpos_t.h:10:1: error: stray ‘\177’ in program
npm ERR!
npm ERR! ^
npm ERR! /usr/include/arm-linux-gnueabihf/bits/types/__fpos_t.h:13:12: error: stray ‘\212’ in program
npm ERR! } __fpos_t;�
npm ERR! ^
npm ERR! /usr/include/arm-linux-gnueabihf/bits/types/__fpos_t.h:14:2: error: #endif without #if
npm ERR! #endif
npm ERR! ^~~~~
npm ERR! In file included from /usr/include/stdlib.h:566,
npm ERR! from /usr/include/c++/8/cstdlib:75,
npm ERR! from /usr/include/c++/8/ext/string_conversions.h:41,
npm ERR! from /usr/include/c++/8/bits/basic_string.h:6400,
npm ERR! from /usr/include/c++/8/string:52,
npm ERR! from /usr/include/c++/8/stdexcept:39,
npm ERR! from /usr/include/c++/8/array:39,
npm ERR! from /usr/include/c++/8/tuple:39,
npm ERR! from /usr/include/c++/8/bits/unique_ptr.h:37,
npm ERR! from /usr/include/c++/8/memory:80,
npm ERR! from /tmp/.node-gyp/16.13.1/include/node/v8.h:23,
npm ERR! from /tmp/.node-gyp/16.13.1/include/node/node.h:63,
npm ERR! from /tmp/.node-gyp/16.13.1/include/node/node_buffer.h:25,
npm ERR! from ../src/BluetoothHciSocket.cpp:7:
npm ERR! /usr/include/alloca.h:15:2: error: stray ‘#’ in program
npm ERR! J#ifnddf _ALLOCA_H
npm ERR! ^
npm ERR! /usr/include/alloca.h:18:2: error: invalid preprocessing directive #includ; did you mean #include?
npm ERR! #includ% <features.h>
npm ERR! ^~~~~~
npm ERR! include
npm ERR! /usr/include/alloca.h:20:1: error: missing terminating " character
npm ERR! "dedile __need_size_t
npm ERR! ^~~~~~~~~~~~~~~~~~~~~
npm ERR! /usr/include/alloca.h:21:10: fatal error: stdd%f.h: No such file or directory
npm ERR! #include <stdd%f.h>
npm ERR! ^~~~~~~~~~
npm ERR! compilation terminated.
npm ERR! make: *** [bluetooth_hci_socket.target.mk:111: Release/obj.target/bluetooth_hci_socket/src/BluetoothHciSocket.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: make
failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Linux 5.10.63-v7+
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/pi/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node" "--module_name=bluetooth_hci_socket" "--module_path=/home/pi/node_modules/@abandonware/bluetooth-hci-socket/lib/binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
npm ERR! gyp ERR! cwd /home/pi/node_modules/@abandonware/bluetooth-hci-socket
npm ERR! gyp ERR! node -v v16.13.1
npm ERR! gyp ERR! node-gyp -v v8.3.0
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node --module_name=bluetooth_hci_socket --module_path=/home/pi/node_modules/@abandonware/bluetooth-hci-socket/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess. (/home/pi/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Linux 5.10.63-v7+
npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/home/pi/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /home/pi/node_modules/@abandonware/bluetooth-hci-socket
npm ERR! node-pre-gyp ERR! node -v v16.13.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.8
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-12-22T12_21_21_309Z-debug.log
Unsure if this is just me but I can't install Noble because of this package.
Trying to install the package directly I get these same errors.
I've got all the right libs installed from the noble FAQ for Ubuntu.
I've set the permissions correct too for root access.
I've installed node-gyp
globally.
npm WARN deprecated [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
> [email protected] install /home/server/home-server/microservices/temperatures/node_modules/usb
> prebuild-install --runtime napi --target 4 --verbose || node-gyp rebuild
prebuild-install info begin Prebuild-install version 5.3.6
prebuild-install info looking for cached prebuild @ /home/server/.npm/_prebuilds/8627f2-usb-v1.7.2-napi-v4-linux-x64.tar.gz
prebuild-install info found cached prebuild
prebuild-install info unpacking @ /home/server/.npm/_prebuilds/8627f2-usb-v1.7.2-napi-v4-linux-x64.tar.gz
prebuild-install info unpack resolved to /home/server/home-server/microservices/temperatures/node_modules/usb/build/Release/usb_bindings.node
prebuild-install info install Successfully installed prebuilt binary!
> @abandonware/[email protected] install /home/server/home-server/microservices/temperatures/node_modules/@abandonware/bluetooth-hci-socket
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-7/bluetooth_hci_socket-0.5.3-7-node-v83-linux-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for @abandonware/[email protected] and [email protected] (node-v83 ABI, glibc) (falling back to source compile with node-gyp)
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/home/server/.nvm/versions/node/v14.17.6/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack at F (/home/server/.nvm/versions/node/v14.17.6/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack at E (/home/server/.nvm/versions/node/v14.17.6/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /home/server/.nvm/versions/node/v14.17.6/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /home/server/.nvm/versions/node/v14.17.6/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack at /home/server/.nvm/versions/node/v14.17.6/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqCallback.oncomplete (fs.js:192:21)
gyp ERR! System Linux 5.4.0-81-generic
gyp ERR! command "/home/server/.nvm/versions/node/v14.17.6/bin/node" "/home/server/.nvm/versions/node/v14.17.6/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/server/home-server/microservices/temperatures/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node" "--module_name=bluetooth_hci_socket" "--module_path=/home/server/home-server/microservices/temperatures/node_modules/@abandonware/bluetooth-hci-socket/lib/binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd /home/server/home-server/microservices/temperatures/node_modules/@abandonware/bluetooth-hci-socket
gyp ERR! node -v v14.17.6
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/home/server/.nvm/versions/node/v14.17.6/bin/node /home/server/.nvm/versions/node/v14.17.6/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/server/home-server/microservices/temperatures/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node --module_name=bluetooth_hci_socket --module_path=/home/server/home-server/microservices/temperatures/node_modules/@abandonware/bluetooth-hci-socket/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/server/home-server/microservices/temperatures/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:400:28)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1055:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Linux 5.4.0-81-generic
node-pre-gyp ERR! command "/home/server/.nvm/versions/node/v14.17.6/bin/node" "/home/server/home-server/microservices/temperatures/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/server/home-server/microservices/temperatures/node_modules/@abandonware/bluetooth-hci-socket
node-pre-gyp ERR! node -v v14.17.6
node-pre-gyp ERR! node-pre-gyp -v v0.17.0
node-pre-gyp ERR! not ok
Failed to execute '/home/server/.nvm/versions/node/v14.17.6/bin/node /home/server/.nvm/versions/node/v14.17.6/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/server/home-server/microservices/temperatures/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node --module_name=bluetooth_hci_socket --module_path=/home/server/home-server/microservices/temperatures/node_modules/@abandonware/bluetooth-hci-socket/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
I did some nodejs upgrade tests and had bigger issues getting bluetooth-hci-socket rebuilded because by default it simply told
[@abandonware/bluetooth-hci-socket] Success: "/opt/iobroker/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
I tried many things and did a bigger research. There is no way to add more parameters to the "nom rebuild" command, so in the end "npm i" would be the only option (with other side effects).
In fact I ended up in adding "--update-binary" to the "install script" and with this a rebuild was successful too ...
Hi,
I'm using your version of noble on my homebridge plugin (https://github.com/SteidlD/homebridge-inkbird-bt-thsensor). I use cyclic scan requests in order to get the manufacturer specific data (contains everything I need) in the scan response of a specific BLE device (I know the MAC address!!). So I don't need to establish a connection.
Now I was looking for a way to only send the scan requests to the one device with this MAC address (save battery on the other devices). Tried to read me through your code, but got lost on my way...
Thanks in advance.
Could you please publish a new version with the latest commits (notably 8ddae50, which gets rids of the deprecation warnings when installing).
I ended up publishing local forks for noble and node-bluetooth-hci-socket, because I feared these libraries were no longer maintained, but I saw a recent PR being merged by @rzr into noble.
I really appreciate the work you're doing here and am more than willing to help where I can.
Hi,
for supporting the onboard Broadcom BCM 20702A0 please add
{vid: 0x0a5c, pid: 0x21f1 }, // Broadcom BCM20702A0
to the supported devices.
I have a setup that it works.
All other ble devices are listed but the PS5 wireless controller is not. What would be the reason? Can you help me?
OperatingSystem: Raspberry Pi OS - Electron App
Hi,
IObroker always states the following error:
Cannot find module '@abandonware/bluetooth-hci-socket' Require stack: - /opt/iobroker/node_modules/@abandonware/noble/lib/hci-socket/hci.js - /opt/iobroker/node_modules/@abandonware/noble/lib/hci-socket/bindings.js - /opt/iobroker/node_modules/@abandonware/noble/lib/resolve-bindings.js - /opt/iobroker/node_modules/@abandonware/noble/index.js - /opt/iobroker/node_modules/iobroker.ble/build/scanProcess.js
But everything is installed properly and the files are in the path as requested.
Any ideas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.