Showing posts with label device. Show all posts
Showing posts with label device. Show all posts

Sending On/Off Signal to USB devices in Linux

Tags: February 15, 2014 1:14 PM
0 comments

Some devices like USB modem get stuck when it failed to connect and just hang up forever when trying to dial a number. The solution is unplug and plug it again, weird but it works. But seriously, that is not "a geek way". Rather than plug/unplug we could do it via shell to send the device "on" or "off" signal.

Recognizing the USB Devices

These steps is used to get information about device that we want to send the signal to. A Tool used for this task is lsusb. Here's example of output in my system, make to sure run as root.
$ lsusb
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 04f2:b290 Chicony Electronics Co., Ltd 
Bus 001 Device 009: ID 0cf3:3005 Atheros Communications, Inc. AR3011 Bluetooth
Bus 002 Device 018: ID 201e:1022 <-- WE WANT TO SEND SIGNAL TO THIS DEVICE
Bus 002 Device 016: ID 03f0:ae07 Hewlett-Packard 
Bus 002 Device 012: ID 0458:00ee KYE Systems Corp. (Mouse Systems)

Share on Facebook Twitter