We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

Resetting a USB port via software.

Options
2»

Comments

  • Belnahua
    Belnahua Posts: 1,493 Forumite
    Cashback Cashier
    Forgot to mention this:- Check to see if there's a Chipset update driver from the PC's manufacturer. I know HP and Dell had a USB issue, where it failed to see the USB port properly and a chipset driver update sorted that.
    A friend is someone who understands your past, believes in your future, and accepts you just the way you are.
  • tomstickland
    tomstickland Posts: 19,538 Forumite
    10,000 Posts Combo Breaker
    I'm not looking for manual ways of rescanning the drives.
    I want to locate a low level dll command that I can call from software to force the computer to disconnect/rescan the USB ports.

    The device is an industrial encoder interface, not something you'd ever use at home. The disconnect is known to be caused by noise/static.
    Happy chappy
  • tomstickland
    tomstickland Posts: 19,538 Forumite
    10,000 Posts Combo Breaker
    buglawton wrote: »
    Scan for hardware changes (without de- or re-installing anything) has worked for me in the past
    So if I could locate the low level dll command that is used for this I'd be half way there.
    Happy chappy
  • MoneyTown
    MoneyTown Posts: 99 Forumite
    This looks interesting:

    http://www.robvanderwoude.com/devcon.html

    Specificallly:

    RenewUSB.batRemove all USB devices and then rescan for new onesFindAll =USB
    FindAll USB*
    Remove "@hwid"
    Rescan11/06/2004Warning: May cripple your OS, use entirely at your own risk, and only after making a full backup.
    I had to run this script twice before my computer accepted my new USB stick.
    This script will prompt you for download if DEVCON isn't found
  • albertross_2
    albertross_2 Posts: 8,932 Forumite
    Ever get the feeling you are wasting your time? :rolleyes:
  • tomstickland
    tomstickland Posts: 19,538 Forumite
    10,000 Posts Combo Breaker
    I've had a play today with both devcon.exe and USBDeview.exe and they both seem to do what they should.
    However, neither is capable of forcing a device to reconnect.

    With devcon I can locate the disconnected device and it shows as :
    Device has a problem: 47.

    Doing a search on that shows:
    Windows cannot use this hardware device because it has been prepared for "safe removal", but it has not been removed from the computer. (Code 47) To fix this problem, unplug this device from your computer and then plug it in again.
    To fix this problem, unplug this device from the computer and then plug it in again.

    The device has been prepared for ejection.

    This error code occurs only if the user used the Safe Removal application to prepare the device for removal, or pressed a physical eject button. Restarting the computer brings the device online if the user does not want to eject from the dock.

    Unplug the device, and then plug it in again. Alternately, restart the computer to make the device available.
    If I use devcon to restart the device then it says that the computer needs a reboot to do it.
    Happy chappy
  • tomstickland
    tomstickland Posts: 19,538 Forumite
    10,000 Posts Combo Breaker
    Rather annoyingling I now cannot cause the original problem to happen, but know it will come back. Over 2 years it has come and gone, depending on the humidity apparently.
    Happy chappy
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 351K Banking & Borrowing
  • 253.1K Reduce Debt & Boost Income
  • 453.6K Spending & Discounts
  • 244K Work, Benefits & Business
  • 599K Mortgages, Homes & Bills
  • 176.9K Life & Family
  • 257.3K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.1K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.