-
Notifications
You must be signed in to change notification settings - Fork 26
Can't open device #3
Comments
@devyaz I can not come up with a direct solutions at the moment. Have you made any progress with this issue in the past days? |
Nope I haven't
…On Thu., 27 Dec. 2018, 15:56 Mike Rovers ***@***.*** wrote:
@devyaz <https://github.com/devyaz> I can not come up with a direct
solutions at the moment. Have you made any progress with this issue in the
past days?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ATfQSTeyr6Q03HJQzlGMmUuSB38tEfY-ks5u9NGigaJpZM4ZJqsE>
.
|
I have the same issue in windows, when I run the nodejs with sudo in ubuntu it works but i get the same value twice per scan. |
@dimitrisal can you show code! So we can help |
@devyaz I am using the example code. With the same code if i run the nodejs as sudo in the linux work but without sudo or in windows doesnt work i get the same error (with different vendor id and product id) Error: cannot open device with vendor id 0x4b4 and product id 0xbca1 `let UsbScanner = require('usb-barcode-scanner').UsbScanner; let scanner = new UsbScanner({ scanner.on('data', (data) => { scanner.startScanning();` |
It needs sudo to run in linux since it has to access devices on the pc which require permission i guess it might as well run in windows if CMD is run ad administrator |
It might be something in linux or Electron update thats breaking escpos. Perhaps @mikerovers you need to upgrade it?, Unfortunately i haven't tried using Node 8 i think it worked then |
@devyaz @dimitrisal I am facing the same problems on Windows (node v11.12.0). I will try to look for differences in HID usage in Windows and Unix for a start. |
I was unable to find a working solutions for this at the moment. I would suggest trying another package of making your application Unix only. |
I have just run into the same problem on windows and despite my best efforts to enable permissions extra, I have not been able to fix the problem. Have you been able to solve this problem? Thanks in advance! |
I think I might have found the answer. Please see this response to a similar issue. |
i used to run the same code in an Electron App without problems, now after 2 system upgrades am getting the below error
Uncaught Exception: Error: cannot open device with vendor id 0x4b4 and product id 0xbca1 at new HID (/home/martin/Electron/electron-api-demos/node_modules/node-hid/nodehid.js:54:17) at new UsbScanner (/home/martin/Electron/electron-api-demos/node_modules/usb-barcode-scanner/dist/usb-barcode-scanner.js:31:25)
i tried removing node-modules and
yarn
to re-install but still cant open device if i either use deviceId or path!EDIT
Node HID reports a different devID vendID from what i get with
const getDevices= require('usb-barcode-scanner').getDevices console.log(getDevices());
the above code gives{ vendorId: 1204, productId: 48289, path: '/dev/hidraw0', serialNumber: '', manufacturer: 'Guest', product: 'Barcode Reader', release: 594, interface: 0 }
and Node HID reportsvendor id 0x46d and product id 0xc52f
which is hexadecimal for 1133 and prodID 50479 which is my mouse BT dongle yet i provided my vendor Id and product id of 1204 and 48289 even if i remove the bluetoth dongle for wireless mouse
The text was updated successfully, but these errors were encountered: