nyholku / purejavahidapi

Other
121 stars 69 forks source link

RFE: device path: bus/addr/port #58

Open Andrei-Pozolotin opened 6 years ago

Andrei-Pozolotin commented 6 years ago

please expose libusb/usb4java compatible device path: bus/addr/port

for example, see: https://github.com/usb4java/usb4java-javax/issues/10

nyholku commented 6 years ago

usb4java is based on libusb. Last time I checked libusb source code the device path was not available on all platforms. I'm not willing to add a feature that is not cross platform.

Andrei-Pozolotin commented 6 years ago

you expose public String getDeviceId() https://github.com/nyholku/purejavahidapi/blob/master/src/purejavahidapi/HidDeviceInfo.java#L159

which looks like /dev/bus/usb/${bus}/${addr}

and is conceptually identical to libusb parameters ${bus}/${addr}

so essentially I am asking for unified platform-agnostic ${bus}/${addr} extract

nyholku commented 6 years ago

Yes, but the 'agnostic' is the problem, I do not see how to implement that.