Gene said:
I use Uwe Sieber's removedrive, and its output implies that remounting
in place is possible. I have E-mailed him, and when I have a
response, I will follow up.
Thanks for that. I remember seeing "uwe-sieber" mentioned over in the
alt.comp.freeware group but never looked at his tools. Going back to
the safelyremove.com site, I found:
Return stopped device back! if a device is stopped, but is not
unplugged yet, it will be displayed in the menu, but its icon will be
red-crossed. Just righ click on the device and it will be returned
back into the system!"
So the USB Safely Remove product claims to rediscover a still-present
but detached (a logic state) device. They don't describe how they
perform that action but I suspect they reset the device, the same as
what happens when you boot and a reset gets sent to the devices to put
them into a known state.
Paul's reply quotes a comment from the Sieber site about having to
revert state by using devcon as a command-line tool (versus using the
Device Management GUI tool). Other than disabling the [root] hub (USB
controller) and then reenabling (which means the device also gets
reset), I'm not sure what other functions in devcon could make the hub
go [re]discover the devices still physically attached to it.
devcon does have a 'restart' command but I don't know what it really
does different than doing 'disable' followed by 'enable'. Running
"devcon help restart" only gives the terse output of "Restarts devices
that match the specific hardware or instance ID." The Device Management
GUI tool doesn't have a 'restart' function, just enable/disable of a
device. From reading posts in forums by driver authors for USB devices,
it appears "devcon restart <id>" resets the device. Resetting a USB hub
means it needs to rediscover any devices still physically attached but
would affect all devices attached to that hub.
Although Sieber's comment mentioned by Paul mentions using devcon to
restart the USB hub, I found the following article which mentions doing
the hardware rescan:
http://digital.ni.com/public.nsf/allkb/1D120A90884C25AF862573A700602459
Using either the Device Management GUI tool or devcon, you remove the
device and then perform a rescan to find new hardware. I suspect part
of finding and setting up the newly discovered hardware would be to
reset it to put it into a known state. When new hardware is found,
you'll notice the balloons telling you new hardware found and more about
setting it up. As the first respondent, Andy had mentioned using the
hardware rescan method so he got the OP halfway there. Removing the
device before the scan was the rest of the trick. The OP got a driver
error message but it's unclear if the OP removed the device before
rescanning for it.
While there looks to be software solutions the OP requested to
rediscover a still-present device, they all look to affect ALL devices
connected to the hub that gets reset. So those software solutions don't
fully comply with the OP's desire to rediscover just the one device he
logically detached but didn't physically remove. It's possible that
resetting the hub could affect his other USB devices in ways he doesn't
want. Would the driver as the interface between OS and device get
confused while performing some function but during which the device
temporarily disappeared because the hub to which it is connected got
reset? You get the one device rediscovered but perhaps the other
devices that were still attached do something "bad" when they were
working but got reset in the middle of their work. Guess that depends
on whether or not the driver was written to recover from such
catastrophic state change. What happens when you reset/restart a USB
hub to which was attached a printer that had traffic going to it? Would
you lose your whole print job or does the loss of commands result in
garbled output?
So far, the methods mentioned here (and elsewhere by reference) don't
look like they reestablish configuration for just one device but affects
all devices connected to the hub that got reset. You save one device
but perhaps negatively affect others with a reset the devices or their
drivers don't expect.