Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

0

MY ACCOUNT
Log in

INNOVATIONS PRODUCTS SUPPORT COMMUNITY

Home Support How Do I Force Windows to Remove and Re-detect a USB Device?

This content is not available in your preferred language.


The content is shown in another available language. Your browser may include features that can help translate the text.

How Do I Force Windows to Remove and Re-detect a USB Device?


Updated Apr 1, 2019

 

Reported In
Hardware Driver Operating System
USB-6501 NI-DAQmx Windows
cDAQ-9132
cDAQ-9133
cDAQ-9138
cDAQ-9139
cDAQ-9135
Multifunction I/O Device

Issue Details
My USB device will occasionally lose connection to the computer, and I have to disconnect and then reconnect it before it will work. Why does this happen, and how can I get
Windows to re-detect the device, without having to physically disconnect the device?

Solution
This behavior occurs when the device loses power, but the computer does not. For example, often when a computer goes into standby or power-save mode it will often shut down
power to the USB ports. Also, this can happen when a computer returns from having been hibernated. In either case, the device is not re-detected by the computer and thus you will
not be able to communicate with it.
Follow the instructions below to re-detect the device within Windows when this happens:
1. Install the DevCon utility from Microsoft. The DevCon utility is a command-line utility that acts as an alternative to Device Manager. Using DevCon, you can enable, disable,
restart, update, remove, and query individual devices or groups of devices. You can download DevCon here.
2. Open the Windows Device Manager by going to Start » Run, type in devmgmt.msc, and then click the OK button.

3. You will now need to determine which USB hub (port) the troubled device is connected to. To do this, expand the Universal Serial Bus controllers group at the bottom of the list.

4. In sequence, double click on every USB Root Hub entry and click the Power tab to see if your device is listed.

5. When you have found the hub that has your device listed, click the Details tab and select Device Instance Id from the drop down menu. If you are running Windows 7,
select Device Instance Path instead of Device Instance Id. Record the name shown in the list between the first and second \ sign, for example ROOT_HUB20.
6. Next, start a Command Prompt by going to Start » Run, type in cmd, and then click the OK button.
7. In the Command Prompt window, first change directory to the folder that contains the devcon.exe file that you downloaded. If you are using a 64-bit operating system, you need
to ensure you are calling the 64-bit version of devcon.exe. Once you have navigated to the proper directory, type in the following command followed by enter,
replacing ROOT_HUB20 with what you recorded in step 4.
devcon restart *ROOT_HUB20*

Note: If your user interface devices such as a mouse or keyboard, or any other USB devices such as a USB Network Adapter are on the same root hub as the USB device you
are trying to re-detect, then you will lose connectivity to your mouse or keyboard while the restart is performed.
8. Now, Windows will remove and re-detect the hub and any USB devices attached to it, re-enabling them in the process. If this does not work, you probably selected the wrong hub
in step 4. Repeat steps 3 - 6 until the restart is successful.
9. Once you know which root hub your device is connected to, you can implement this solution programatically in LabVIEW using the System Exec VI, which allows you to pass
commands to the command prompt. The System Exec VI can be found in the Libraries and Executables Palette.

Related Links Other Support Options


Ask the NI Community
KnowledgeBase: USB-92xx Devices May Not Wake from Hibernation Collaborate with other users in our discussion forums
External Link: Windows Device Console (Devcon.exe) Search the NI Community for a solution

Request Support from an Engineer


A valid service agreement may be required, and support options vary by country.
Open a service request Purchase or renew support
services

WAS THIS ARTICLE HELPFUL?

Helpful Not Helpful

 

PRODUCT SUPPORT COMPANY MISSION

Order status and history Submit a service request About National Instruments NI equips engineers and scientists with
systems that accelerate productivity,
Order by part number Manuals Investor Relations innovation, and discovery.

Activate a product Drivers Events

Retrieve a quote Alliance Partners Careers

Contact Us

Legal | Privacy © 2019 National Instruments. All rights reserved. Magyarország 

You might also like