On Wed, 31 Jan 2007, Joe Wells wrote: > I want to simulate the effect of unplugging a USB device and plugging > it back in without having to physically unplug it. Is it possible to > "unplug" a USB device by software actions alone? If so, could someone > please tell me how?
It depends on exactly what you want to simulate. For example, unplugging a USB device will interrupt the +5 V power it receives from the bus. With most PC systems, the USB hardware does not permit you to do this in software. Other aspects of replugging (in particular, the device reset it causes) can indeed be carried out in software. > In case it matters, I am only using one USB device, so resetting the > entire USB subsystem would not be a problem for me. In that case it would be enough to unload the USB controller driver and then load it back. For instance, "rmmod ohci-hcd ; modprobe ohci-hcd". The actual driver to use will depend on your system and on the USB device in question; check the system log to find out. > I'm using Linux kernel version 2.6.17 with some patches (applied by > Emperor Linux who supplied me a kernel customized for my hardware). > My distribution is (except for the kernel) Ubuntu 6.06 LTS. My > computer is a Sony Vaio VGN-TX770P. According to "lspci -tv", my USB > controller is a "Texas Instruments OHCI Compliant IEEE 1394 Host > Controller". Alan Stern ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Linux-usb-users@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users