2013-07-14 11:39 PM
I developed a device based on the STM32F103 MCU that implements an USB MSC + Custom HID composite device based on the ST USB FS library 4.0.0. The Custom HID is used to upload data (following a command/response exchange format with 18bytes length) to a PC at relatively high rate.
This has been working fine with Windows XP and Windows 7 OSs, but this does not work well under Windows 8. The device works well under Win8 for mass storage but with the Custom HID the communication interrupts at a random time.The communication can be resumed by cycling the device power or waiting some time. After analyzing the traces with a software USB sniffer it looks like it is related to IN packets that are not delivered to the PC (crc or timeout errors) and the PC stops accepting IN packets from this endpoint. I tried to globally disable the Win8 selective suspend feature but with the same result. I am investigating deeper the problem but I would like to know if anyone has a similar issue with Win 8 or has any hint about the possible cause of the problem. Thanks,2013-07-15 07:58 AM
Not certain, but I think Microsoft tightened security on HID and Custom HID may not be supported in standard Win 8 drivers. I just Googled a little and it seems to be an issue for others as well.
You will have to verify if this is indeed the issue. I do Win driver work. Win 8 does indeed stop communicating to a device when it misbehaves. You have to remove device or reset hard. Something you might want to consider for a countermeasure.2013-07-16 09:47 AM
[quote]After analyzing the traces with a software USB sniffer it looks like it is related to IN packets that are not delivered to the PC (crc or timeout errors) and the PC stops accepting IN packets from this endpoint.[/quote]
It sound like hardware trouble of the PC (or hub, if any). Try another PC. Windows does heavy error recovery on Mass-Storage class (MSC), but no recovery for HID. Single error report from host controller (after three retries on the host controller) freezes the HID interrupt IN endpoint. MSC may look like working fine even when it is suffered with the same transaction errors as HID. Tsuneo2013-07-16 11:10 PM
For my tests I am using a PC with Windows 7 and running Windows 8 in a virtual machine (Virtual Box). I don't have access yet to a PC running natively Windows 8, but one of the customers of my device reported the problem with this OS. Therefore it does not look a hardware problem but some difference in the Win8 driver implementation that interacts with my device, causing the problem.
Maybe what I have to do is analyze the packets in Win7 and see if there are errors and in this case, how the OS recovers from them and then compare with Win8.2013-07-17 10:05 AM
> For my tests I am using a PC with Windows 7 and running Windows 8 in a virtual machine (Virtual Box).
Virtual box is not reliable to test USB device operation. Apply VMware (Player), instead. ''crc or timeout errors'' means that the host controller on the PC gets corrupted packet or no response, unless it were false sign brought by virtual box. To confirm it, a hardware bus analyzer is much better. Anyway, it's unfair you would hide such a serious information in your first post. Tsuneo2013-07-17 01:45 PM
Hi Tsuneo,
I'm sorry, but it has been an oversight from my side not fully describing this important information. I am going to test with a VMware Player VM instead. Thanks,2013-07-29 01:20 AM