The two devices (same hardware, let's call them device X and Y) are flashed with two different firmware flavours so that they appear with different names in the midi enumeration. If I only connect device X it shows itself as "Brain2" / if I only connect device Y it's "Brain2B". Those are the names I get from the MIDIINCAPS / MIDIOUTCAPS (winmm.dll). So far so good.

The problem arises as soon I connect both devices at the same time, than both get the same name (of the latter connected) - so the enumeration changes:

first X, then Y => both get the name "Brain2B"

first Y, then X => both get the name "Brain2"

However, I can access and use the devices but I am not able to distinguish between them anymore (which is basically the same starting position as having the identical firmware on both devices).

I'd be happy if anyone could point me in the right direction. Has anyone encountered anything similiar? Could this be a system related issue? (Or is it a bad driver, maybe?) Thanks in advance!

EDIT:

I had a closer look at the usb properties with a tool callled USB Device Tree Viewer (similar to USBView) and it turned out the identifiers are correct there. So, how does winmm.dll get the midi enumeration - could it be a bug in there? (unlikely)

Moritz

(btw: here is the related topic/post in the manufacturer's forum: link)

I guess these devices use the same USB vendor/product IDs. Do they have USB serial numbers?
– CL.Nov 27 '15 at 17:49

If they're class-compliant and are reporting different names from the device, then I don't see how this could happen. I suspect there's something else weird going on, and things aren't exactly as they seem.
– BradNov 28 '15 at 20:48

@Brad I just had a closer look with the 'USB Device Tree Viewer' and it turns out, that the device descriptors are correct and consistent there. Therefore the problem seems to be in the midi domain.
– mvoNov 30 '15 at 17:02

@CL They do have a different usb serial number, but unfortunately that doesn't help if I cannot associate a found midi device (through winmm.dll) to a certain usb device.
– mvoNov 30 '15 at 17:11

@Brad's probably on the right track. The host PC is allowed to make its own decisions regarding differentiating identical (that is, same VID/PID) USB devices. Your most effective recourse will probably be to always plug the devices in in the same order, or always leave them connected to the same ports, and have your code add a (1) or (2) to the names when it displays them.
– Brian A. HenningDec 11 '15 at 16:20