0

I am using node-hid library on Windows 10 64 bit.

Its installed perfectly but when I attached any USB device. HID.devices() returning empty array ( [] ). The same code shows array of objects perfectly for the device on Linux or MAC platform.

What I have already tried is to install pre build binaries and also build node-hid from source in both the cases, Output is same.

There is nothing I found on internet related to this problem.

Thanks in advance

simply-put
  • 1,068
  • 1
  • 11
  • 20

1 Answers1

0

A lot of barcode scanners present themselves as a keyboard to the OS, which in your case may be causing the problem, because the README for node-hid states:

Mouse and keyboards on Windows -- does not work, the OS will not allow it

EDIT: also mentioned in these issue comments:

robertklep
  • 198,204
  • 35
  • 394
  • 381
  • Is there any way to make them present simple HID devices rather than keyboard devices? – simply-put Oct 23 '17 at 07:39
  • The second comment I linked to suggests that some devices can be changed from "keyboard" to something else. However, the device needs to support that (in hardware), it's not a thing that can be solved in software. – robertklep Oct 23 '17 at 07:41