Author Topic: Oops, my bad, connected two devices with same VID/PID and everything  (Read 16028 times)

goodnewsjim

  • Frequent Contributor
  • ****
  • Posts: 52
Hello guys,

Instead of incrementing the serial numbers like I should for new boards, I had a two board setup using all the same USB string: VID/PID/everything.
When I plugged em both in, the computer stopped recognizing them being plugged in at all!  There's no trace of them in the device manager.
I incremented the serial number in the second board to 2, and the first board is 1.  I unplugged them.  I turned off the Windows 8 computer. 
I tried again, plugging in just the first board, and it no longer recognizes it in Windows at all.

I'm sure this is a common mistake, and there must be a common answer that you guys know.

Have a good day,
James

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Oops, my bad, connected two devices with same VID/PID and everything
« Reply #1 on: April 14, 2015, 05:31:24 pm »
See if you can display the device with this:

https://technet.microsoft.com/en-us/magazine/ff184583.aspx

Then uninstall it and detach and reattach to start fresh.

Renate

  • Frequent Contributor
  • ****
  • Posts: 97
Re: Oops, my bad, connected two devices with same VID/PID and everything
« Reply #2 on: April 14, 2015, 07:11:54 pm »
Windows fries its brains when what it thinks already about a USB device is contradicted.
For real fun, make a USB device, plug it in, then change the number of interfaces and plug it in again.
Result: purple smoke out of the processor!

I'm not sure about Windows 8, but try clearing out some of the junk in:
Code: [Select]
HKLM\System\CurrentControlSet\Enum\USB
When developing, I clear that out, sometimes entirely, sometimes by VID/PID.

goodnewsjim

  • Frequent Contributor
  • ****
  • Posts: 52
Re: Oops, my bad, connected two devices with same VID/PID and everything
« Reply #3 on: April 14, 2015, 09:09:26 pm »
Thank you Jan and Renate.

I was unable to use regedit to change properties because of Microsoft and their flawed notion of user access control.

But I was able to view hidden devices as Jan's advice and delete them all.

We'll see if it runs tomorrow

Renate

  • Frequent Contributor
  • ****
  • Posts: 97
Re: Oops, my bad, connected two devices with same VID/PID and everything
« Reply #4 on: April 15, 2015, 06:08:56 am »
Yes, the security stuff on these registry keys is a pain.

Manually, in regedit you have to take ownership of the keys first.

Programmatically you have to clear the DACL on the key:
Code: [Select]
code=SetSecurityInfo(key, SE_REGISTRY_KEY, DACL_SECURITY_INFORMATION, NULL, NULL, NULL, NULL);

goodnewsjim

  • Frequent Contributor
  • ****
  • Posts: 52
Re: Oops, my bad, connected two devices with same VID/PID and everything
« Reply #5 on: April 15, 2015, 10:43:28 pm »
Renate,

Can you help me just a tiny bit more, where do I find that key?  And do I set it exactly as you have there?

,Jim

goodnewsjim

  • Frequent Contributor
  • ****
  • Posts: 52
Re: Oops, my bad, connected two devices with same VID/PID and everything
« Reply #6 on: April 15, 2015, 11:32:09 pm »
Or, anyone ever download software from http://www.resplendence.com/main

Can I get their registry editor, it looks safe, is it?

Renate

  • Frequent Contributor
  • ****
  • Posts: 97
Re: Oops, my bad, connected two devices with same VID/PID and everything
« Reply #7 on: April 16, 2015, 04:59:29 am »
where do I find that key?

Oops, I thought that I had mentioned it: HKLM\System\CurrentControlSet\Enum\USB

goodnewsjim

  • Frequent Contributor
  • ****
  • Posts: 52
Re: Oops, my bad, connected two devices with same VID/PID and everything
« Reply #8 on: April 17, 2015, 02:42:50 pm »
Hmmm,

I removed hidden devices in Device Manager.

I deleted a bunch of USB devices in registry by downloading a custom registry editor.

So my status now is that the devices still don't get recognized when plugged in.

And somehow 2/4 of my USB ports no longer work.  I guess I removed the wrong thing from registry?  Its all good, this is a work computer anyway.  Some collateral damage is okay.

Any more suggestions?

,James

goodnewsjim

  • Frequent Contributor
  • ****
  • Posts: 52
Re: Oops, my bad, connected two devices with same VID/PID and everything
« Reply #9 on: April 17, 2015, 04:01:11 pm »
Figured it out, the conflict crashed the firmware!
So I just reinstalled the firmware.
Obviously I wrote a bad handshake, but there's no problems with that since serial numbers should never conflict.
I just notified the people I worked with of the situation and they should be fine.

In other news: My project is done.  Spent several months, and I owe it mostly to helpful forum folk here and on microchip forums.