I have a lot of USB modems connected to a server. Sometimes USB not respond to software like gnokii o gammu (I need read IMEI) and we need disconnect device and reconnect, and the problem is solved.
I need a way to do this from bash. I know is impossible shutdown disabling energy. Any ideas?
I try with:
- usbreset.c (https://gist.github.com/x2q/5124616)
- usbpower.pl (https://gist.github.com/Krellan/6575538)
Both solutions detach device and atach again, but the problem when I request data still failing.
A solution passing this data is better for me :)
- /dev/ttyUSB0
- /dev/bus/usb/001/001