I found out that my 3G modem keeps closing the connection every couple hours. I tried to set up a reset script, everything works fine and I know how to do it, with one little problem: The only way I've found how to reset the device is physically unplug it and plug it back.
So my question is, how can I perform the unplug+replug operation software-wise? I've seen both How do I reset a USB device using a script? suggesting echo 0/1 > authorized
and Resetting usb device from terminal suggesting usbreset
, but usbreset
doesn't manage to reset the device properly, and writing to authorized
managed to cause two things: 1) freeze RPi, 2) forbidding echo 1>authorized
with Error: Broken pipe
.
So I look for another method how to truly reset the device without having to touch it. If it's easily possible via GPIO with some trick, I'm open to such solution as well.
Details: Debian GNU/Linux 7.0 (wheezy), the device is Huawei E220 12d1:1003, plugged through a powered USB hub 05e3:0606.