Dave said:
How do you do it? I can't get it to won't work for the situation
described. I plugged in a 4 GB Flash drive and then used the Windows
"Safe removal" option. I then ran USBDevice as adminstrator, and
although the flash drive is listed, none of the actions offered
reconnect it. I repeated the actions with USBDevice running, with the
same result.
In USBDevView, what were the statuses listed for the device (after you
"safely removed" the USB device)? From the columns for that device,
what were the values for:
Connected?
Safe to Unplug?
Disabled?
Is the USB drive plugged into a USB port on the system case so it goes
to a USB controller on the motherboard? Or are you plugging it into a
USB hub?
Are you sure you are looking at the correct USB device listed in
USBdevView? USB devices record enumeration data in the registry when
plugged in. That data remains in the registry after you unplug the USB
device since it gets reused when you later re-plug the device back in.
So it's possible, for example, that you are looking at a USB drive that
you plugged in sometime earlier thinking it's the one you have plugged
in now. For example, I have 2 USB thumb drives: one from PNY and
another from FujiFilm. Both of them show up in USBdevView because their
enumeration data remains in the registry whether they are plugged in or
not. So I could be looking at the FujiFilm USB thumb drive which is
sitting in a drawer somewhere when it's the PNY that actually plugged
in.
Use the Description column to decipher the USB device. Hopefully there
is something differnt between all the USB thumb drives that you've
plugged into this host. If they are from the same brand and are the
same model, use the serial numbers to different them. Of course, you
won't know what is that value unless you plug just one of them into a
USB port and see which one has Connected=Yes status.
If you only have one USB thumb drive plugged in, it should have Device
Type = Mass Storage. While you might have multiple entries in the
registry for enumeration data on several USB thumb drives, you should
only see one listed as Connected = Yes (if you only have one plugged
in). For the Device Type = Mass Storage device whose Description (and
Serial Number) are for the *one* USB thumb drive that you have plugged
into a port so it shows Connected = Yes status, what does USBdevView
report for its Safe to Unplug state? Is Disabled = No (if Yes then you
cannot reach the device)? Is USB Hub = No?
I did a test. With my "PNY USB 2.0 FD USB Device" (Description) plugged
into a USB port to a mobo USB controller (Hub = No), it Connected state
was Yes. If it was no then I'd know there was something already wrong.
Safe To Unplug was No since it was still plugged in and I had not yet
stopped the device. Disabled = No since the device was active and
reachable. I then used the Safely Remove Hardware wizard and clicked
the Stop button. A prompt appeared saying what devices would get
stopped. It worked okay and the Safely Remove Hardware wizard went
blank (Hardware Devices list got emptied out since not were ready).
I had expected Safe To Unplug status in USBdevView to change from No to
Yes. Didn't happen. It was still Safe To Unplug = No. Could be it
doesn't apply to flash memory. What I did notice in USBdevView is
Connected went from Yes to No. So I right-clicked on the PNY device and
was expecting to find a Connect option. Nope, just Disconnected was
there. So I couldn't get the device to get reconnected while it was
still in the USB port after I had just removed it. Then I remembered
something ...
When you plug in a USB device, there's some handshaking with the device
to get its "presentation data". This identifies the device. Windows
won't know what type of device it is, its description or serial number,
or other parameters until that handshaking occurs. Well, it occurs when
you plug in the device. The device has to "present" itself. Sitting in
a USB port without initiating the presentation means the device isn't
even known to exist.
If you right-click on a USB drive in USBdevView and select Properties
from the context menu, you'll see what is included in the presentation
data during the handshaking. However, what you see here is what got
recorded in the registry from a prior presentation handshake. After
being unplugged, being in the USB port is no different than sitting on
your desk. It's the handshaking that's needed to present the device to
Windows so it know what type of device it is and what driver(s) to use.
You need to instigate the handshake phase to get the device's
presentation data to the OS so it knows how to interface with that
device. I'm probably not using the exact or accurate terms here. USB
designers probably have their own terminology.
http://www.pulsewan.com/data101/usb_basics.htm
http://wiki.osdev.org/Universal_Serial_Bus
They mention a Control transfer to configure (identify) the device. In
the 2nd article, section 6.4 talks about USB Device Enumeration. You
need a physical state change to initiate enumeration (definition of the
device).