chrome.usb.findDevices not working shows error message Failed to open device: Entity not found in chrome://device-log/

57 views
Skip to first unread message

Santinath Mishra

unread,
Mar 22, 2016, 7:51:09 AM3/22/16
to Chromium-Apps-Announce
Hi Folks,

I am developing a chrome app to communicate to HID device using chrome.usb APIs. I am using below chrome APIs

1. chrome.usb.findDevices
2. chrome.usb.controlTransfer

So far I am not able to make it work. chrome://device-log/ shows below error message. 

USBEvent[13:54:01] Failed to open device: Entity not found

I am using right VendorId and ProductId in decimal format, Which I have extracted from device manager info.


Does anyone know about this issue? Any kind of help will be highly appreciated.



Below is the code snippet I am using.

    chrome.usb.findDevices(DEVICE_INFO, function (devices) {
        if (!devices || !devices.length) {
            console.log('device not found');
        }

        console.log("Devices: " + devices);
        console.log(devices[0]);

 var TransferData = {
    "requestType": "class",
    "recipient": "interface",
    "direction": "out",
    "request": 0xx9,
    "value": 0xxx0,
    "index": 0,
   "data": new Uint8Array([00,05, 47, 76, 66, 48, 47,00]).buffer
  };


        setTimeout(function () {
            chrome.usb.controlTransfer(devices[0], TransferData, function (config) {
                if (chrome.runtime.lastError) {
                    console.log(chrome.runtime.lastError);
                } else {
                    console.log('Data Transfer completed');
                }
            });
        }, 3000);
    });



Reply all
Reply to author
Forward
0 new messages