noble/node-bluetooth-hci-socket

TypeError: Cannot read property 'endpoint' of undefined

francescolaghetti opened this issue · 1 comments

Hello everyone,
I'm trying to use this git project:
https://github.com/IBM-Cloud/node-mqtt-for-anki-overdrive
and I had to install this node module, since it's required, with the command
$ npm install bluetooth-hci-socket
Currently I'm using Windows 7, node version 8.11.0 and npm version 6.13.1
Unfortunately when I use the command
$ node discovery.js
the following error appears:

$ node discovery.js
C:\Users\IGV\Documents\Universita\TESI\AnkiDriveGit\node-mqtt-for-anki-overdrive
\node_modules\bluetooth-hci-socket\lib\usb.js:94
  this._aclDataOutEndpoint = this._usbDeviceInterface.endpoint(0x02);
                                                      ^

TypeError: Cannot read property 'endpoint' of undefined
    at BluetoothHciSocket.bindUser (C:\Users\IGV\Documents\Universita\TESI\AnkiD
riveGit\node-mqtt-for-anki-overdrive\node_modules\bluetooth-hci-socket\lib\usb.j
s:94:55)
    at BluetoothHciSocket.bindRaw (C:\Users\IGV\Documents\Universita\TESI\AnkiDr
iveGit\node-mqtt-for-anki-overdrive\node_modules\bluetooth-hci-socket\lib\usb.js
:43:8)
    at Hci.init (C:\Users\IGV\Documents\Universita\TESI\AnkiDriveGit\node-mqtt-f
or-anki-overdrive\node_modules\noble\lib\hci-socket\hci.js:101:35)
    at NobleBindings.init (C:\Users\IGV\Documents\Universita\TESI\AnkiDriveGit\n
ode-mqtt-for-anki-overdrive\node_modules\noble\lib\hci-socket\bindings.js:82:13)

    at Noble.<anonymous> (C:\Users\IGV\Documents\Universita\TESI\AnkiDriveGit\no
de-mqtt-for-anki-overdrive\node_modules\noble\lib\noble.js:57:24)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)
    at Function.Module.runMain (module.js:695:11)
    at startup (bootstrap_node.js:188:16)
    at bootstrap_node.js:609:3

Any suggestion how to resolve it?

rzr commented

Please compare to @abandonware fork and comment

#123