thegecko / webusb

Node.js implementation of the WebUSB Specification
https://thegecko.github.io/webusb/
MIT License
183 stars 27 forks source link

Devices from second USB bus does not appear in list #25

Closed yene closed 6 years ago

yene commented 6 years ago

Problem:

How to reproduce: JSON export of getDeviceList()

Picture of USB hierarchy shot 2018-07-27 at 18 58 44

thegecko commented 6 years ago

Do these devices appear if you use the node-usb library directly?

yene commented 6 years ago

Yes, it is reported by node-usb usb.getDeviceList()

yene commented 6 years ago

When I connect the GPS Receiver to the other USB bus (a different USB port) he appears in webusb. It seems the second USB bus is filtered out somewhere in the code. I did a quick look but found no location where this could have happened.

Working shot 2018-07-29 at 16 08 55

Not working shot 2018-07-29 at 16 09 09

thegecko commented 6 years ago

That is strange. As a test, you can "fool" webusb into listing all devices returned by the libusb adapter by passing an invalid filter:

usb.requestDevice({
    filters: [{something: null}]
})
.then(device => {
    ...
});

This will at least tell us if its the filters removing your device if it correctly appears in that list.