Page 1 of 2
U2F extension can not access USB device
Posted: Tue Jan 03, 2017 5:22 am
by Tarantino
Me again. I still have a problem. I have modified usbDevices vendorId and productId of permisssions in manifest.json. But it can not enumerate my device all the same, please help me out.
Re: U2F extension can not access USB device
Posted: Tue Jan 03, 2017 10:44 pm
by Thelogan
Is your device a hid device or a usb device?
Re: U2F extension can not access USB device
Posted: Tue Jan 03, 2017 10:48 pm
by mabel
Is your device a U2F device?
Re: U2F extension can not access USB device
Posted: Tue Jan 03, 2017 11:13 pm
by Tarantino
Thelogan wrote:Is your device a hid device or a usb device?
USB device
Re: U2F extension can not access USB device
Posted: Tue Jan 03, 2017 11:28 pm
by Tarantino
mabel wrote:Is your device a U2F device?
No. Image that if it's a u2f device, after i added "u2fDevices" permission in permisssions of manifest.json, it was supposed to work.
Am i right?
Re: U2F extension can not access USB device
Posted: Wed Jan 04, 2017 1:25 am
by Thelogan
Is the extension written by yourself? Or use the open source extension
https://github.com/google/u2f-ref-code ?
Re: U2F extension can not access USB device
Posted: Wed Jan 04, 2017 1:57 am
by Tarantino
I used the open source extension.
Re: U2F extension can not access USB device
Posted: Wed Jan 04, 2017 2:22 am
by Thelogan
Here is part of code from
usbgnubbydevice.jsCode: Select all
/**
* @const
*/
UsbGnubbyDevice.WINUSB_VID_PIDS = [
{'vendorId': 4176, 'productId': 529} // Yubico WinUSB
];
From the code, you can get that the usb device in this extension works only for Yubico device. So you need to modify vendorId and productId according to to your own device.
Note:
The extension is sure to call API chrome.usb.getDevices() to enumerate usb device. Thus you can check palce where uses this API to find out the problem.
Re: U2F extension can not access USB device
Posted: Wed Jan 04, 2017 6:14 am
by Tarantino
Thelogan wrote:Here is part of code from
usbgnubbydevice.jsCode: Select all
/**
* @const
*/
UsbGnubbyDevice.WINUSB_VID_PIDS = [
{'vendorId': 4176, 'productId': 529} // Yubico WinUSB
];
From the code, you can get that the usb device in this extension works only for Yubico device. So you need to modify vendorId and productId according to to your own device.
Note:
The extension is sure to call API chrome.usb.getDevices() to enumerate usb device. Thus you can check palce where uses this API to find out the problem.
Aha, it works, it works.. Thank you very much for your help.
Re: U2F extension can not access USB device
Posted: Wed Jan 04, 2017 10:29 pm
by Tarantino
Command format that the extension sends is not inconsistent with my product command format. I may need to implement it by myself.