LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   How simulate unplug an re-plug of USB devices? (https://www.linuxquestions.org/questions/linux-hardware-18/how-simulate-unplug-an-re-plug-of-usb-devices-817475/)

scmbg 07-01-2010 02:06 PM

How simulate unplug an re-plug of USB devices?
 
Hi.

After some tests I found that some USB Bluetooth Dongles errors, only are recoverable if the USB is unplugged an then plugged again.

Is there some way to simulate that a USB device is unplugged and re-plugged?

Thanks!

smoker 07-01-2010 02:24 PM

As root, you could run
Code:

start_udev
This will "rediscover" the devices attached, but it may not reset the device itself.

mostlyharmless 07-01-2010 02:44 PM

If you find the solution, let me know... but I don't think it is a Linux problem per se, as I've observed the occasional need to physically unplug the device under Windows XP as well.

scmbg 07-01-2010 04:32 PM

Yes, I also suspect that the problem is not Linux only, but the next test is try the simulation of un-plug and re-plug.

Thanks!

Let's try with udev.

jefro 07-01-2010 07:37 PM

I think it is part to usb tools. I am not sure that is the correct package but there is a usb tool kit that I think includes what you'd need.

business_kid 07-02-2010 10:20 AM

You won't accurately simulate an unplug - ever imho, because the chip will still see the impedance.
This became an issue for me when I had a box (around kernel2.6.19) which gave copious usb2 log spam. Someone on via hardware wrote a kernel patch that threw out what the usb controller chip was thinking. The (via) usb chip behaved differently if it had a device plugged in or not. This was my contribution to kernel development - required because I had the dodgiest box on the planet :-/. The end result was an option for ehci_hcd
ignore_oc=1


All times are GMT -5. The time now is 07:29 PM.