Re: Programatic disconnect and reconnect of USB device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Is it
> possible to programmatically tell the linux host to 'turn off' the usb to
> that device to simulate a disconnect and then 'turn on' the connection
> back on as if I had plugged the cable back in?

As root you can cause the USB system to de-register the device at the
driver level, this will not however turn off power to the port and might
not be sufficient to 'reset' the device's internal micro/memory.

ie.
$ echo -n '3-1:1.0' > /sys/bus/usb/drivers/usbhid/unbind
and
$ echo -n '3-1:1.0' > /sys/bus/usb/drivers/usbhid/bind

Change the '3-1:1.0' to match wherever your device is plugged in,
Simon

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux