Pass down URB_FUNCTION_SELECT_CONFIGURATION in a USB lower filter driver failed

I development a USB lower filter driver and install it on the XBox 360 Gamepad. Because I want to get the pipe handles and pipe information, so when the lower filter driver receives the URB_FUNCTION_SELECT_CONFIGURATION request, I use WdfRequestFormatRequestUsingCurrentType to format the request and then call WdfRequestSetCompletionRountine to set a completion routine. Then I use WdfRequestSend to pass down the request to the local IO target. The completion routine is called successfully but I find that the enumeration of the XBox 360 device is blocked after that, no set interface or other request after select configuration, and the XBox 360 gamepad cannot be used.
If I don't call WdfRequestFormatRequestUsingCurrentType and WdfRequestSetCompletionRountine, and send the request by WDF_REQUEST_SEND_OPTION_SEND_AND_FORGET directly, the enumeration of XBox 360 device is OK, but I cannot get the USB pipe handles and information.
I want to know how I set the completion rountine correctly?

How are you completing the request in your completion routine? Are you passing along the Information value as well?

You can send URBs on your own. You don’t have to wait for a request from above to hitchhike on.

Hi, Tim:
Thank you very much. I resolve this issue. Because I didn’t call WdfRequestComplete to complete the request in the complete routine, so it blocked.
I try to send URBs to get the pipe handles and pipe info in my lower filter driver. I send URB to get device descriptor successfully, and I send URB to get configuration descriptor successfully. But after I send URB to select configuration by URB_FUNCTION_SELECT_CONFIGURATION to get pipe handles and information, the enumeration of the XBox 360 device stopped, but it didn’t block, the URBs was completed successfully. I don’t know why.

Yeah – don’t do that. You can fetch descriptors to your heart’s content, but SELECT_CONFIGURATION and SELECT_INTERFACE cause state changes that the upper levels need to know about. Let them handle that one.

OK, thanks.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.