title: Hard reconect USB device from bash
body: <p>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.</p>
  
  <p>I need a way to do this from bash. I know is impossible shutdown disabling energy. Any ideas?</p>
  
  <p>I try with:</p>
  
  <ul>
  <li>usbreset.c (<a href="https://gist.github.com/x2q/5124616" rel="nofollow noreferrer">https://gist.github.com/x2q/5124616</a>)</li>
  <li>usbpower.pl (<a href="https://gist.github.com/Krellan/6575538" rel="nofollow noreferrer">https://gist.github.com/Krellan/6575538</a>)</li>
  </ul>
  
  <p>Both solutions detach device and atach again, but the problem when I request data still failing.</p>
  
  <p>A solution passing this data is better for me :)</p>
  
  <ul>
  <li>/dev/ttyUSB0</li>
  <li>/dev/bus/usb/001/001</li>
  </ul>