none
Windows 7 Composite Usb HID-CDC issue RRS feed

  • Question

  • I work at company that creates a device running composite USB HID-CDC interface. The HID complementary uses Power Device class. The problem is on the surprise-removal Usb device from the pc running Windows 7 x64 (SP1) the former locks the COM port. So when i plug the Usb back Windows can not open the COM port. However the HID complement is working fine. There is no such problem with CDC-only device. I have tried to replace HID Power Device class for HID Generic Desktop Mouse class and the problem was gone. But even making HID Power Device descriptor empty does not help. The COM port is not being used by any application in this scenario. I do not try to open or use the COM port after the first plug-in, it gets lock by itself after usb device removal. I only try to open it after the second plug-in to detect if its locked. Also it correctly appears/disappeares in the Device Manager (even with 'Show Hidden Device' option) if i plug/unplug the device multiple times. However after the first unplugging of the Usb device i can see that symbolic link from NT device name ( \Device\USBSER001 ) to DOS device name ( COM4 ) and registry key at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM is not being removed. I've noticed that plugging/unplugging CDC-only or mouse-HID-CDC device which is working fine causes Windows to create/delete those link and registry key. Apparently the problem is somehow related to the Windows power driver (hidbatt.sys i guess), Windows serial driver (usbser.sys) and Windows generic parent driver for complement USB devices (usbccgp.sys). So my questions are:

    1. Is there a patch to fix this behavior?

    2. Is there a workaround to avoid rebooting pc / deleting reg. key and symlink?

    Monday, September 24, 2018 6:58 AM