V
VanguardLH
Nope, apparently not. You can't do in software the physical latch inDave said:Can you do this with USBDeview or not?
the hardware logic to show change in state of the logic to initiate the
transfer of the presentation data to identify the device. I can't think
of any software that's going to, for example, make a floating signal
line suddenly get pulled low or high without the device doing something
physical, like plugging into the port.
http://www.usb.org/developers/docs/ has some specs you can download.
Get http://www.usb.org/developers/docs/usb_20_101111.zip and unzip.
Read the D:\TEMP\usb_20_101111\usb_20.pdf, section 4.6.1, which says:
4.6.1 Attachment of USB Devices
All USB devices attach to the USB through ports on specialized USB
devices known as hubs. Hubs have status bits that are used to report
the attachment or removal of a USB device on one of its ports. The
host queries the hub to retrieve these bits. In the case of an
attachment, the host enables the port and addresses the USB device
through the device¢s control pipe at the default address.
The host assigns a unique USB address to the device and then
determines if the newly attached USB device is a hub or a function.
The host establishes its end of the control pipe for the USB device
using the assigned USB address and endpoint number zero.
There's more on removal of a device and enumeration. So my guess that
the device won't initiate until it gets plugged in (which, in your case
requires removal so it can then be attached) looks to be good. The
device can't say "I'm here" until it leaves and then comes back, and
that's handled in the hardware to which you don't have software control.
Besides the device presenting itself after plugged in, it also has to
first get reset on connection to ensure it is in a known state. When
the hub (controller) detects attachment, it has to get the configuration
to know the device. The spec also says:
9.1.1.1 Attached
A USB device may be attached or detached from the USB. The state of a
USB device when it is detached from the USB is not defined by this
specification. This specification only addresses required operations
and attributes once the device is attached.
9.1.1.5 Configured
Before a USB device¢s function may be used, the device must be
configured. From the device¢s perspective, configuration involves
correctly processing a SetConfiguration() request with a non-zero
configuration value.
Configured doesn't mean what was left in the registry from prior
discovery and use. It means the device identifying itself when it is
discovered.
By the way, why do you bother doing a safe removal of a flash drive? I
assumed "USB drive" meant a USB /flash/ drive (i.e., it's a memory
card). There's no spinning platter or other latency in writes in the
hardware. Maybe you meant it is a USB-attached hard disk so that does
have latency along with its interface buffer to flush.