USB switches: To keep alive, or not to keep alive, etc...
Joel Hammer
Joel
Mon May 17 11:44:20 PDT 2004
The question:
Will a usb switch cut off the connection between the computer and the
peripheral completely, similar to pulling the plug, or do switches have
a "keep alive" capability which will make the peripheral think it is
still attached to the computer?
That's the question. Here is all the verbiage, if you care to know the
reason why I ask.
We are going to get a coolpix 4500 for capturing digital images over our
surgical pathology cutting board.
This camera will be connected to a computer, to automatically upload and
label each image and rename the image appropriately.
I upload digital images easily with my coolpic 2500 using the usb mass
storage option and a usb cable. The camera mounts as a scsi device. Very
nice. No special software is needed. The 4500 has the same usb mass
storage option, so I assume it will work the same.
The only hitch is that as soon as you plug the usb cable into the
computer and the camera, the camera more or less switches off all
functions and you cannot take any pictures until you unplug the camera
from the computer. Plugging the cable into just the camera doesn't have
this effect. So, it looks like some message from the usb bus tells the
camera what to do. I tried an experiment. I disabled assigning an irq
to the usb device (PCI) in the BIOS, and removed all modules pertaining
to usb. This had no effect. So, this must be a hardware controlled
behavior, beyond the ability of software to control. I assume that the
usb bus sends some low voltage signal to the peripherals to tell them
they are connected.
This camera is going to be tethered to a computer with the usb cable
while in use. I don't want the users to have to unplug the usb cable
at the computer to be able to take photos, then plug in the cable to
upload photos, I am thinking that a simple mechanical usb switch box
would solve the problem. Just throw the switch to take photos, throw the
switch back to upload. This will work if the box isn't too smart and
doesn't send some "keep alive" message to the camera when a peripheral
is switched off. I assume a dumb mechanical switch box wouldn't send
any "keep alive" message. However, some switch boxes are smart, and do
send keep alive messages when they are turned off. These are usually the
better sort, and are electronic, not mechanical.
I could just end the suspense by going out and getting a switch (about
$40 for a nice one), but, I would appreciate hearing others experience
before I spend my employer's money.
Thanks, Joel
More information about the Linux-users
mailing list