Smart card enumeration failure.

Running Windows 10, my remote USB hub won’t enumerate multiple USB smart cards when I make a network connection to it. For example, if you have two smart cards connected to the remote hub, only one of the cards will appear in the device manager. Though both smart card readers show up in DevMgr. The Smart card reader service logs this message to the system event viewer:

“reader object has duplicate name: Avtor Secure Token 0”

However if I physically plug in the two smart cards, they both enumerate. It’s only when I connect to the remote hub while they’re both plugged in.

Any suggestions on how I might troubleshoot this? The device instance paths of the two readers are different (and if they were the same, I think Windows would blue-screen). I wonder if I could get a logman trace of the smart card drivers / services and get a clearer picture of what’s going on.

Another interesting detail is that when you try to eject the smart card from the system tray, the ones connected to the remote hub say “Eject Avtore SecureToken” but when connected to a local hub, it shows “Eject SecureToken”. These inconsistencies are really frustrating.

Without knowing the intricacies of the smart card stack, my guess is that each card has a unique identity (either explicit or derived from data the reader reports) and that both cards reported by your driver contain duplicates of the unique data/IDs.

Yes, that makes sense. It has to have something to do with the identity the smart card reports whatever that mechanism is, but it puzzles me how the identify of card A and B are the identical when they are enumerated at the same time but they are apparently different when they are enumerated separately (as in the case when they are physically plugged into the remote hub). I suppose it could be a timing issue but I can’t imagine how. And btw, both smart cards enumerat when I connect a hub directly to the PC with the two smart cards connected to it.

I know this may not be your exact issue, but many remote or virtual USB driver suffer from different non-complaint issues. Over the years we have seen this kind of things in libusb project, similar to the third party Windows 7 USB 3 driver last time.

Ref: problems with IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX
https://github.com/libusb/libusb/issues/918

Ref: problems with SPDRP_LOCATION_INFORMATION or SPDRP_LOCATION_PATHS.
https://github.com/libusb/libusb/pull/867