IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION Error

Hi,

I am trying to retrieve the string descriptor for usb serial.

In order to get it, I queried the hub using IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION through DeviceIoControl.

DeviceIoControl returned error ERROR_GEN_FAILURE 31 (0x1F)
“A device attached to the system is not functioning.”

Using usb analyzer, I can see the IRP is returned with STATUS_UNSUCCESSFUL.

On further investigation, I found out that there is a problem in the bcdDevice field in device descriptor which is causing it to fail.

Whenever I changed it, it works for few mins then it stops working. Then I have to change it to different value, it works again for few mins.

I do not understand it why the bcdDevice field causes the above I/O control request to fail.

Here is Original Device Descriptor

Device Descriptor:
bcdUSB: 0x0200
bDeviceClass: 0xFF
bDeviceSubClass: 0xFF
bDeviceProtocol: 0xFF
bMaxPacketSize0: 0x40 (64)
idVendor: 0x3FEB
idProduct: 0x83FF
bcdDevice: 0x1001
iManufacturer: 0x01
iProduct: 0x02
iSerialNumber: 0x03
bNumConfigurations: 0x01

Regards.

xxxxx@prescott-instruments.com wrote:

I am trying to retrieve the string descriptor for usb serial.

In order to get it, I queried the hub using IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION through DeviceIoControl.

How did you figure out where to send this request? This has to get send
to the USB hub that contains your device’s port. Can you show us the
code that calls this?

DeviceIoControl returned error ERROR_GEN_FAILURE 31 (0x1F)
“A device attached to the system is not functioning.”

Using usb analyzer, I can see the IRP is returned with STATUS_UNSUCCESSFUL.

That’s not what a USB Analyzer would show you. Is the request getting
out to the device? What is the response from the device?

On further investigation, I found out that there is a problem in the bcdDevice field in device descriptor which is causing it to fail.

How did you decide this was the case?

Whenever I changed it, it works for few mins then it stops working. Then I have to change it to different value, it works again for few mins.

I do not understand it why the bcdDevice field causes the above I/O control request to fail.

It doesn’t, of course. The device descriptor is irrelevant. The
problem is more likely to be in the device, or in the code you’re using
to make the request. Changing the bcdDevice field means burning an
EEPROM, which means restarting the device.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.