🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #1907

Re: USB Device Detection

#1907
From: Anthony
Date: Fri, 01 Jun 2007 21:09
34 lines
1967 bytes
I used the follwing command:

devcon restart "@usb\root_hub20\*"

It took a little work to figure out what to restart.

Anthony

On 31 May 2007 20:44:01 -0700, "AlexB" <b.a.v@inbox.ru> wrote:

>Anthony wrote:
>
>> ...when I plug in
>> the devices I have to unplug and plug in the USB cable to initiate the
>> USB hardware detection routine so that the device can be accessed by
>> the OS. I would really like to get away from the unplug/plug step and
>> was thinking I should be able to do it programmatically with a small
>> program.
>...
>> Any suggestions ...
>
>You can use MS utility DevCon.exe.
>Example: restart all devices with VID=0x0547 and PID=0x2005
>
>devcon.exe restart "@USB\VID_0547&PID_2005\*"
>
>This utility is very useful when something goes wrong and you have to
>restart driver and start the enumeration without device unplugging.
>
>Do not forget to wait the end of work of the utility before continue
>(for example with WinExecAndWait32 by Peter Below). And some devices
>(based on Cypress chip) do enumeration twice so for them it is
>necessary to add an additional pause.
Technical Details
Message-ID: <km2163dkfbldbsrm9sdggkcp15li5t9uke@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <vluu53p1td3u3tiir0rqo3fd29sicr7cdc@4ax.com> <465f9601$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,487f80d121183d21
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Anthony <>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: USB Device Detection
Date: Fri, 01 Jun 2007 17:09:45 -0400
Message-ID: <km2163dkfbldbsrm9sdggkcp15li5t9uke@4ax.com>
References: <vluu53p1td3u3tiir0rqo3fd29sicr7cdc@4ax.com> <465f9601$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.91/32.564
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 64.222.181.239
X-Trace: newsgroups.borland.com 1180730431 64.222.181.239 (1 Jun 2007 13:40:31 -0700)
Lines: 35
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail