I want to restart USB modem like a power on restart without rebooting and unplugging it physically in Linux machine. I have tried doing this procedure :
- echo -n 0 > /sys/devices/platform/omap/ti81xx-usbss/musb-hdrc.0/usb1/bConfigurationValue
- echo -n 1 > /sys/devices/platform/omap/ti81xx-usbss/musb-hdrc.0/usb1/bConfigurationValue
But i was only able to disconnect it but the 2nd command failed. Giving the following prints :
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
usb 1-1: new full speed USB device using musb-hdrc and address 4
usb 1-1: device descriptor read/64, error -19
usb 1-1: device descriptor read/64, error -19
usb 1-1: new full speed USB device using musb-hdrc and address 5
usb 1-1: device descriptor read/64, error -19
usb 1-1: device descriptor read/64, error -19
usb 1-1: new full speed USB device using musb-hdrc and address 6
usb 1-1: device not accepting address 6, error -19
usb 1-1: new full speed USB device using musb-hdrc and address 7
usb 1-1: device not accepting address 7, error -19
hub 1-0:1.0: unable to enumerate USB device on port 1
Is there any way in which I can automate this resetting procedure. Such that if I insmod a module, it should register the USB device and when I rmmod a module it shall disconnect the USB device.
Is there any such Module ?