I need to programmatically read device descriptors of a USB device plugged into a Linux system (Ubuntu 18.04). I can read most of the descriptors I need (iSerial, iProduct, etc) by parsing lsusb output, or by reading directly from the usbfs files at /sys/bus/usb/devices/
. However I'm having trouble finding the Binary Device Object Store (BOS) descriptor using either method.
I imagine I can query the BOS using libusb but it seems like since this is a USB spec standard descriptor, there may be a simpler way. Is possible read it directly from the usbfs, or query it from a standard utility tool like lsusb or other?