Hi - 

I've got an LG-VL600 LTE USB modem permanently connected to an ALIX.2D13
box running Debian.  Support for the VL600 is fairly new at this point,
so I'm running 2.6.38 slightly patched with the following:

https://github.com/balrog-kun/LG-VL600-utils/

Although this box runs a complex mess of Quagga, OpenVPN, and iptables,
let's just say for the moment that its purpose in life is to provide
backup Internet access.

Every couple of days the LTE connection is lost temporarily, which
results in the modem going into an unusable state, ultimately needing to
be physically unplugged and reconnected.

With the creation of a few simple monitoring scripts I'd like to be able
to reset the modem automatically upon loss of connection to the LTE
network.  Unfortunately, unloading all the associated modules (lg_vl600,
cdc_ether, and cdc_acm) does not reset the modem, so I looked into ways
of shutting off the appropriate USB port and powering it back on.

I Googled around a little, and the best I could find was:

# echo suspend >/sys/bus/usb/devices/$dev/power/control
  --- wait a second ---
# echo on >/sys/bus/usb/devices/$dev/power/control

However, it seems that although this worked prior to 2.6.32, the suspend
option was removed in later kernels for whatever reason, leaving me
apparently no way to cut power to or otherwise reset individual USB
peripherals.  From Documentation/usb/power-management.txt:

     power/control

          This file contains one of two words: "on" or "auto".
          You can write those words to the file to change the
          device's setting.

          "on" means that the device should be resumed and
          autosuspend is not allowed.  (Of course, system
          suspends are still allowed.)

          "auto" is the normal state in which the kernel is
          allowed to autosuspend and autoresume the device.

          (In kernels up to 2.6.32, you could also specify
          "suspend", meaning that the device should remain
          suspended and autoresume was not allowed.  This
          setting is no longer supported.)

Is there some alternate way of cutting the power to a USB device
temporarily in order to reset it?  Maybe some userland application that
I'm not aware of?

Thanks!

- Mark

-- 
Mark Kamichoff
p...@prolixium.com
http://www.prolixium.com/

Attachment: signature.asc
Description: Digital signature

Reply via email to