Click here to Skip to main content
15,905,782 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hello all
Is it possible to check programmatically whether usbser.sys does still poll a specific COM port where a USB device using CDC (Communication Device Class) is connected? If yes any idea how to do that?

By the way the question is to make some test code to verify whether there is a usbser.sys problem like described e.g. at In short what you can read there: If the pc communicates with a USB device and the communication fails (caused e.g. noisy signals, to long or bad quality usb cable) three times, then Microsoft’s driver usbser.sys stops working/polling. Usually you can reactivate the interface by unplug/plug the respective device.

Especally to recognize this situation visualized here:;538194[^]

N.B. This question is a 'successor' from a previous q from side: USB Device simulation c#, c++[^

Many thanks in advance.
Updated 6-Jun-12 11:12am
SoMad 6-Jun-12 16:34pm    
I was not aware of this problem, thank you for bringing that to my attention. I need to check if this could ever be a problem in our application when interfacing to external devices.

Soren Madsen
[no name] 6-Jun-12 16:45pm    
Your welcome to this problem:) Keen on hear news. Regards, Bruno
TRK3 6-Jun-12 17:48pm    
Here's a link to similar data:

It points out another issue that causes the same behavior and might be solvable in the device firmware. It also gives more data on the problem described in your link, but it doesn't have a solution for it either.
TRK3 6-Jun-12 17:52pm    
Even if you can programmatically recognize the problem, is there anything you can do to fix it programmatically?

When I ran into a similar situation with old winusb.sys drivers I could detect a problem at the application level (although I couldn't say what the problem was), but there was no way I could reset the driver at the application level -- the ONLY thing that worked was physically disconnecting the USB cable and plugging it back in...
[no name] 8-Jun-12 11:53am    
I told my customer to bring noise onto the USB cable with a hairdryer :) A standard USB cable extended with an USB extension cable and the hairdryer on the connector. Thisway it is no problem to reproduce the bad behavior of usbser.sys.
Thanks for your help. Regards, Bruno

1 solution

Not that I know of, no. I don't know of an interface exposed by it that will let you query that information.
Share this answer
[no name] 6-Jun-12 13:53pm    
Many thanks for answering. I think also about something like hooking between usbser.sys and the class driver (like I think usb sniffers do), but at the moment I do not have a clear idea how to do that... Regards, Bruno

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900