Why is my USB device not detected or comes up as "Unknown Device"?


Hi, this is Martin Borve from the USB team. In the previous blog, I gave a detailed description on how the device gets enumerated by the core USB stack and reported to the OS. In this post, I’m going to summarize which incorrect hardware behaviors during enumeration causes the core stack to abandon the device and which ones lead to reporting the device as “Unknown Device”. 

Device is not enumerated

There are several reasons why a USB device may not enumerate at all when it is attached to a USB port.  Assuming the connect change was detected by the USB hub driver, the following events will cause the device to not be enumerated at all:

  • The USB device failed to stabilize during the debounce period.
  • An overcurrent event occurred during enumeration.
  • A port disconnect event occurred during enumeration.
  • The port is reported as suspended after a successful port reset.

“Unknown Device” in Device Manager due to Enumeration failure

Update Oct. 14, 2011: We have posted some more solutions in What to Try When Your USB Device is an “Unknown Device”

In most cases when enumeration fails the hub driver will still report the arrival of a device to Windows.  In these cases the USB device will appear as “Unknown Device” in Device Manager, and will have a Device ID of “USB\VID_0000&PID_0000” and a Hardware ID and Compatible ID of “USB\UNKNOWN”.   The following events will cause the USB hub driver to enumerate a USB device as an “Unknown Device”:

  • A port reset request timed out during enumeration.
  • The Set Address request for the USB device failed.
  • The request for the USB device’s Device Descriptor request failed.
  • The USB Device Descriptor was malformed and failed validation.
  • The request for the Configuration Descriptor failed.
  • The USB Configuration Descriptor was malformed and failed validation.

On Windows 7, devices that failed enumeration will be marked with failure Code 43 in the device manager. 

On downlevel OS, namely Vista, the device manager may not have a failure code. So the way to detect enumeration failure is to look at the Hardware ID in the detail property page (right click on the device and select Properties and then look click on Details tab) of the device in the device manager. If the ID is USB\VID_0000&PID_0000 then the failure is during enumeration.

“Unknown Device” in Device Manager due to Unavailable driver

There is a second reason why a device would come up as “Unknown Device” in the device manager even if the enumeration was successful. This happens when the device doesn’t provide a Product ID string during enumeration and the system is not able to find a matching INF for the device to install a driver. In this case, the device will be marked with failure Code 28 in the device manager.

You may be able to get the driver downloaded and installed from the Windows Update site by right clicking on the device in the device manager and selecting “Update Driver Software” option and then selecting “Search automatically for updated driver software.”

Comments (30)

  1. ymhuang says:

    Good article!  

    May I ask does there’ve any software debug method inside USB core stack to figure out what one is?

    A software method always convenient than hardware method. 🙂

  2. mara says:

    I have windows 7 and recently tried to connect my Motorola phone via USB to my laptop and ran into this enumeration failure Code 43. So how can I fix it? I tried unistalling the USB unknown device from the manager, no luck. I tried downloading Motorola’s driver installer, no luck.

  3. mohd says:

    pliz tell me how to fix this issue

  4. Ramaswamy says:

    Dear Mr.Borve,

    I have a peculiar problem in that

    HP Scanjet 3300C is detected and

    shown as USB device in the task bar.

    The device manager identifies it and

    under properties shows that the

    driver is HP driver.  But when the

    scanner programme (Scanjet LT) is

    run it reports "Scanner not found"

    Why is that?

    Regards..

  5. Alan Hill says:

    So why is it that all currently recognized USB devices work while every new device that used to work fails to enumerate on all ports and hubs on my multiport motherboard.  Windows 7 Home Premium.

    Power cycle and restore to earlier did not help.

  6. Saad Ahmed says:

    I have windows 7 ultimate.Recently whenever i am trying to plug in a usb device it is not detected but the light on the device lights up. But when I restart my system it is detected. when i unplug it and plug it again, it is not detected. This is happening with ever usb device. I do not remember changing any usb settings. This just started happenneing suddenly.

  7. Kurt Jacobson says:

    I’ve got a USB mass storage device that works on all other machines, but recently stopped working on my main work machine.  The "Unknown Device" shows Code 43, so based on your comments above, it’s failed enumeration.

    Can you give any guidance as to why it would now fail enumeration on this machine, but succeed on all others?  Is there a way to resolve this problem?

  8. Peter G says:

    i have the same problems:

    "I have windows 7 ultimate.Recently whenever i am trying to plug in any sort of usb devices, it is not detected but the light on the device lights up. and even if i restrated, it still doesnt work, i tried to reboot but since i have exter usb cd-rom now i cant reboot or anything. when i unplug it and plug it again, it is still not detected. I do not remember changing any usb settings. This just started happenneing suddenly."

    please do help. email me to ppgozali@yahoo.com if there is any method to solve this problem. thank you

  9. Richard Schecter says:

    Nice to know, BUT WHAT IS THE SOLUTION??

  10. Self-powered mass storage wouldn't detect after it had been connected to running computer before powering up the device. Even though the device was powered up later, I couldn't get it to detect until I reset the device.  Removed it from the computer, powered the device down, waited several seconds, powered it back up, waited a few more seconds, and connected it to the computer. Detection success! Same thing happened with a 7-port self-powered hub, which is actually what led me to  the solution. I can reproduce solution and problem at will with both devices, just by swapping the sequence.

  11. Dudleymon says:

    Nice article but no ending.  

    what do you do about it?

  12. umim says:

    What is the purpose of explaining what is the problem, if you did not posted SOLUTION? Am I missing something?

  13. andros says:

    hi ive done downloaded and installed from the Windows Update  site by right clicking on the device in the device manager and selecting "Update Driver Software" option and then selecting "Search automatically for updated driver software." but it cant find the update for the driver what shall i do the usb is a kingston data traveler 16 gb made in china

  14. andros says:

    it says an error during installation because of a function was not specified for this devise instance

  15. husain says:

    i have problem like them ,,,,,,,,,, please help me

  16. kuldip says:

    my usb device is not working..

    when i connect usb device to my laptop the usb device is detected,but not opened   and my operating system is hang.(not working any key even task manager also).

    but usb device working in safe mode properly.

    plz, give me solution for that…..

    kuldipatel@gmail.com

  17. USB Blog says:

    To address some of the questions here, we have posted some more solutions to the "Unknown Device" error: blogs.msdn.com/…/things-to-try-when-your-usb-device-is-an-quot-unknown-device-quot.aspx

  18. Gaurav says:

    Hi

    I have developed a software which reads/writes data in an USB instrument's firmware, that was freezed software for XP and Vista. but the same code is not working for Windows7. When i tried to debug using USB trace, I found that when WriteFile method of Kernel32 is called even though it returns true but it is writing the wrong data on USB port. Then i tried to GetLastError. I am getting error code 1008 which says- 'An attempt was made to reference a token that does not exist'. can anyone help me out how fix the issue for Windows7

    Thanks in advance

    gauravsaulanki@gmail.com

  19. Himadri S Mitra says:

    I am running Windows 7 and trying to connect a USB device but it's showing that the "driver is ready to use" but there is no notification any where. How can I make the USB device discoverable so that I can transfer some data? Please help me regarding this matter as I am facing this problem for a long time.

    himadrimitra4@gmail.com

  20. Kimani says:

    Hi i have been using my usb for sometime now but allover sudden it can not be detected by any computer when i use another usb it is recognized what could be the problem and what an i do to fix it.  

  21. joy says:

    hi i am facing a code 43 issue of my device on resume from standby or hibernate.

    its a composite device in nature one of its interface works and the other shows up as code 43.

    could you please tell me the required steps to be peformed on an endpoint before starting to transfer data on resume.

    my device has 4 bulk endpoints

  22. Doogs says:

    I agree.  It is very frustrating to know what the problem is but not how to fix it.

  23. PsySciGuy says:

    This is clearly a win 7 bug!

    Microsoft's own GPS device does not work on win 7 64 bit. Device works fin in XP.

  24. joanne says:

    anyone know how to fix error code 17?  I am getting this after I download Spotify!!!

  25. Chris Apple says:

    I'm developing a USB CDC device. When I stop the firmware in the middle of enumeration, Windows reports “Unknown Device”. After that I can’t get the device to work until I reboot the computer. Is there a way to clear the error? I tried using Device Manager to uninstall the device. I tried using USBDeview to uninstall the device. Of course unplugging and plugging didn’t fix it.

  26. Divyaranjan says:

    When I put my pendrive, it doen't recognise it. so what should i do.

  27. sera says:

    i can't open my usb there's an error 43 in the system properties

  28. Webcam users says:

    I am running a Toshiba Satellite using windows 8.1. Whenver I do a video call in Skype, the webcam turns on and stays on for about 3 seconds and shuts down by itself. Skype says 'can't find webcam'. When I checked the Device Manager in Control Panel, the Imaging Device disappears.I can only recover the device by rebooting the system. Tried to update the device driver and reinstalled a latest version of Skype on Windows 8 desktop. The same thing happens. Please Help!

  29. Michelle says:

    Usb jst charging can't use it for file transfer

  30. ali hemmati says:

    unknown device update