Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: ENODEV, No such device #132

Closed
atrovato opened this issue Oct 17, 2020 · 3 comments · Fixed by #310
Closed

Error: ENODEV, No such device #132

atrovato opened this issue Oct 17, 2020 · 3 comments · Fixed by #310

Comments

@atrovato
Copy link

Hello,
I work on a domotic application called Gladys: https://gladysassistant.com/

I build a integrated BLE service with noble package, but a user gets the following uncatchable error.

/src/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/hci.js:100
    this._deviceId = this._socket.bindRaw(deviceId);
                                  ^

Error: ENODEV, No such device
    at Hci.init (/src/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/hci.js:100:35)
    at NobleBindings.init (/src/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:78:13)
    at /src/server/services/bluetooth/node_modules/@abandonware/noble/lib/noble.js:60:24
    at processTicksAndRejections (internal/process/task_queues.js:79:11) {
  errno: 19,
  code: 'ENODEV',
  syscall: 'bind'
}

Does anybody know what it means?
Is there any way to not throw this king of error, even if BLE is not usable?

I'm a bit lost to explain this.

Thank you

@michaelpalumbo
Copy link

Hi there, I am getting the same error, trying to run noble on an armv7 raspberry pi.

/home/we/sto/node_modules/@abandonware/noble/lib/hci-socket/hci.js:120
    this._socket.bindRaw(this._deviceId);
                 ^

Error: ENODEV, No such device
    at Hci.init (/home/we/sto/node_modules/@abandonware/noble/lib/hci-socket/hci.js:120:18)
    at NobleBindings.init (/home/we/sto/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:93:13)
    at /home/we/sto/node_modules/@abandonware/noble/lib/noble.js:61:24
    at processTicksAndRejections (internal/process/task_queues.js:75:11) {
  errno: 19,
  code: 'ENODEV',
  syscall: 'bind'
}

@stevenjoezhang
Copy link

I reproduced this problem on a Raspberry Pi 3b. It seems that the cause of the problem is that Bluetooth is not enabled properly. You can try to switch the Bluetooth on / off or reboot the device

@fleutot
Copy link

fleutot commented Nov 15, 2021

I get this error if I try to access a HCI device which does not exist. For example, if hcitool dev gives me only hci0, but I try to access hci1 this way, this is what I get:

$ DEBUG=* NOBLE_HCI_DEVICE_ID=1 nodejs discover-airglows.js
/home/gauthier/src/airglow_fw/tools/node/node_modules/@abandonware/noble/lib/hci-socket/hci.js:101
    this._deviceId = this._socket.bindRaw(deviceId);
                                  ^

Error: ENODEV, No such device
    at Hci.init (/home/gauthier/src/airglow_fw/tools/node/node_modules/@abandonware/noble/lib/hci-socket/hci.js:101:35)
    at NobleBindings.init (/home/gauthier/src/airglow_fw/tools/node/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:82:13)
    at Noble.<anonymous> (/home/gauthier/src/airglow_fw/tools/node/node_modules/@abandonware/noble/lib/noble.js:57:24)
    at process._tickCallback (internal/process/next_tick.js:61:11)
    at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

Maybe the systems where you see the error don't name their bluetooth unit hci0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants