question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Possible upstream issues with noble causing No compatible USB Bluetooth 4.0 device found!

See original GitHub issue

http://forum.espruino.com/comments/13473028/ for some background. Possible problems with noble https://github.com/sandeepmistry/noble/issues/553

Installation: Windows 10 with Zadig giving No compatible USB Bluetooth 4.0 device found! with github clone (and in the IDE console and in downloaded Native)

image

using C:\nwjs\nwjs-sdk-v0.20.1-win-x64 (there may be a need to debug …)

git clone --recursive https://github.com/espruino/EspruinoWebI­DE.git
npm install

C:\source\repos\github\espruino\Espruino­WebIDE\node_modules\noble>node examples\advertisement-discovery.js
C:\source\repos\github\espruino\Espruino­WebIDE\node_modules\bluetooth-hci-socket­\lib\usb.js:70
    throw new Error('No compatible USB Bluetooth 4.0 device found!');
    ^
Error: No compatible USB Bluetooth 4.0 device found!
    at BluetoothHciSocket.bindUser (C:\source\repos\github\espruino\Espruin­oWebIDE\node_modules\bluetooth-hci-socke­t\lib\usb.js:70:11)
    at BluetoothHciSocket.bindRaw (C:\source\repos\github\espruino\Espruin­oWebIDE\node_modules\bluetooth-hci-socke­t\lib\usb.js:28:8)
    at Hci.init (C:\source\repos\github\espruino\Espruin­oWebIDE\node_modules\noble\lib\hci-socke­t\hci.js:101:35)
    at NobleBindings.init (C:\source\repos\github\espruino\Espruin­oWebIDE\node_modules\noble\lib\hci-socke­t\bindings.js:82:13)
    at new Noble (C:\source\repos\github\espruino\Espruin­oWebIDE\node_modules\noble\lib\noble.js:­50:18)
    at Object.<anonymous> (C:\source\repos\github\espruino\Espruin­oWebIDE\node_modules\noble\index.js:4:18­)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)

C:\source\repos\github\espruino\EspruinoWebIDE>rmdir /S node_modules
C:\source\repos\github\espruino\EspruinoWebIDE>node install ..\..\sandeepmistry\node-bluetooth-hci-socket
C:\source\repos\github\espruino\EspruinoWebIDE>node install ..\..\sandeepmistry\nobel
npm install
C:\source\repos\github\espruino\EspruinoWebIDE\node_modules\noble>node examples\advertisement-discovery.js
peripheral discovered (bc1485e88e81 with address <bc:14:85:e8:8e:81, public>, connectable true, RSSI -62:
        hello my local name is:
                [TV] UE48J5515
        can I interest you in any of the following advertised services:
                []
        here is my manufacturer data:
                "7500420401018fbc1485e88e81be148564cf4024000000000000"

peripheral discovered (dff5a5ec431b with address <df:f5:a5:ec:43:1b, random>, connectable true, RSSI -45:
        hello my local name is:
                Puck.js 431b
        can I interest you in any of the following advertised services:
                ["6e400001b5a3f393e0a9e50e24dcca9e"]

Edit EspruinoWebIDE log: going for EspruinoTools tests

We have chrome.serial - not using 'serialport' module
'noble' module couldn't be loaded, no node.js Bluetooth Low Energy  Error: A dynamic link library (DLL) initialization routine failed. \\?

Edit

EspruinoTools does not “see” ble at the moment

C:\source\repos\github\espruino\EspruinoWebIDE>npm install -g EspruinoTools
C:\source\repos\github\espruino\EspruinoWebIDE>c:\Users\owen\AppData\Roaming\npm\espruino.cmd
C:\source\repos\github\espruino\EspruinoWebIDE>c:\Users\owen\AppData\Roaming\npm\espruino.cmd --list
Espruino Command-line Tool 0.0.30
-----------------------------------

PORTS:
  COM3 (Microsoft)

C:\source\repos\github\espruino\EspruinoWebIDE\EspruinoTools>rmdir /s node_modules
C:\source\repos\github\espruino\EspruinoWebIDE\EspruinoTools>npm install ..\..\..\sandeepmistry\node-bluetooth-hci-socket
C:\source\repos\github\espruino\EspruinoWebIDE\EspruinoTools>npm install ..\..\..\sandeepmistry\noble
C:\source\repos\github\espruino\EspruinoWebIDE\EspruinoTools>npm install
C:\source\repos\github\espruino\EspruinoWebIDE\EspruinoTools>node bin\espruino-cli.js --list
Espruino Command-line Tool 0.0.30
-----------------------------------

PORTS:
  COM3 (Microsoft)
  df:f5:a5:ec:43:1b (Puck.js 431b)

EspruinoWebIDE still giving same error: dive into nw.js ???

We have chrome.serial - not using 'serialport' module
'noble' module couldn't be loaded, no node.js Bluetooth Low Energy  Error: A dynamic link library (DLL) initialization routine failed. \\?

Edit: My only point of reference at this time is http://docs.nwjs.io/en/latest/For Users/Debugging with DevTools/

Edit Doesn’t work: possible disablement enablement needed

Open Developer Tools DevTools can be opened with keyboard shortcut F12 on Windows and Linux or ⌘+⌥+i on Mac.

Edit: Guessing …

  "window": {
    "title": "Espruino Native IDE",
    "toolbar": true,
    "frame": true,
    "show": true,
    "fullscreen": false,
    "width": 1024,
    "height": 600,
    "position": "center"
  },
  "//chromium-args": "--enable-web-bluetooth",
  "chromium-args": "--enable-logging=stderr --enable-web-bluetooth",
  "//2": "-------------------------------------------------------- NPM",
  

Edit:

[11696:14664:0214/192750.935:WARNING:push_messaging_service_factory.cc(30)] PushMessagingService could not be built because InstanceID is unexpectedly disabled
[11696:14664:0214/192751.537:INFO:CONSOLE(30)] "We have chrome.serial - not using 'serialport' module", source: chrome-extension://bipaijaoackljocodhjdhecjbfoajehf/js/core/settingsConsole.js (30)
[11696:14664:0214/192751.862:INFO:CONSOLE(30)] "'noble' module couldn't be loaded, no node.js Bluetooth Low Energy
", source: chrome-extension://bipaijaoackljocodhjdhecjbfoajehf/js/core/settingsConsole.js (30)
[11696:14664:0214/192751.922:INFO:CONSOLE(30)] "'winnus' module not found, no Windows Bluetooth Low Energy", source: chrome-extension://bipaijaoackljocodhjdhecjbfoajehf/js/core/settingsConsole.js (30)

Edit: debugger/console at last C:\source\repos\github\espruino\EspruinoWebIDE>nw --remote-debugging-port=9222 .

Edit: image



OK: I now have a Windows 10 Zandig Installation with nw.js SDK and can debug under suggestions as to what to do. ie: that is about as far as I go just now until I get some good idea as to what to do next


Edit: OK: one doesn’t learn anything by sitting around: diving into https://github.com/tessel/node-usb

gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=C:\\source\\repos\\github\\nonolith\\node-usb\\src\\binding\\usb_bindings.node" "--module_name=usb_bindings" "--module_path=C:\\source\\repos\\github\\nonolith\\node-usb\\src\\binding"
gyp ERR! cwd C:\source\repos\github\nonolith\node-usb
gyp ERR! node -v v6.9.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd build --fallback-to-build --module=C:\source\repos\github\nonolith\node-usb\src\binding\usb_bindings.node --module_name=usb_bindings --module_path=C:\source\repos\github\nonolith\node-usb\src\binding' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\source\repos\github\nonolith\node-usb\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:877:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Windows_NT 10.0.14393
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\source\\repos\\github\\nonolith\\node-usb\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\source\repos\github\nonolith\node-usb
node-pre-gyp ERR! node -v v6.9.5
node-pre-gyp ERR! node-pre-gyp -v v0.6.33
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd build --fallback-to-build --module=C:\source\repos\github\nonolith\node-usb\src\binding\usb_bindings.node --module_name=usb_bindings --module_path=C:\source\repos\github\nonolith\node-usb\src\binding' (1)

And a lot of other lovly, lovly stuff that ended me here: https://github.com/tessel/node-usb/issues/109

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
gfwilliamscommented, Feb 20, 2017

When building the USB lib in Windows 10 I actually modified the windows header file - just seemed easier. After that the build works first time 😃

I’m open to PRs that would trap certain errors and report them in a more helpful way…

1reaction
OwenBrotherwoodcommented, Feb 18, 2017

Building EspruinoWebIDE from github: Windows 10 and puck.js ONLY (USB support problems) Download:

And smoke a cigar PR on request for the doc README.md



I regard this as good as I can now build for puck.js windows 10 BUT BLOCKING issue for Windows 7 and usb with https://github.com/tessel/node-usb/issues/163

sandeep has a little refresh of npm as a problem for noble and bluetooth-hci-socket



Notes for next step:

The Jared Wilcurt @TheJaredWilcurt 02:30 @OwenBrotherwood https://nwjs.io/blog/ Looks like either 0.18.1 or 0.18.2 it will be somewhere around Node v6.8.1 - 7.0.0 https://nwjs.io/blog/v0.18.2/ That will be the newest version of NW.js, pre-Node 7

Which almost fits this, unknown node version, from README.md nw-gyp rebuild --target=0.18.6 --arch=x64

need to find last nw version that supports node 6.X LTS to get usb working

https://nwjs.io/blog/v0.18.2/ is the last one before 7

Read more comments on GitHub >

github_iconTop Results From Across the Web

"No compatible USB Bluetooth 4.0 device found!" error with ...
Hi Espruino Savants, I am trying to use the Espruino Command Line module on a Windows 10 PC. I type "espruino -p COM18"...
Read more >
Adding Noble Specified Hardware Failed To Enable BLE ...
No compatible USB Bluetooth 4.0 device found ! Looking at the crash stack, the culprit appears to be Noble, the Node.
Read more >
ACEP Week 4 Flashcards | Quizlet
Which of the following issues occurs due to an incompatible display driver? a) Overheat shutdown b) Flickering image c) Color patterns incorrect
Read more >
How to Fix Bluetooth Pairing Problems - Techlicious
Can't connect two devices? Try these 16 tips to solve your Bluetooth pairing problems.
Read more >
dual app note 9
You'll see a list of apps that you can make copies of—not every app is supported. Open in Split Screen View · From...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found