LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 04-18-2006, 02:38 PM   #1
neked
LQ Newbie
 
Registered: Apr 2006
Posts: 3

Rep: Reputation: 0
turn USB port on/off


Hi all,

I am trying to write a script to turn a USB port on and off... I am using the USB port to power a device that needs to be occassionally reset, so the idea is to cut power off the USB and then back on. How do I do that with Shell programming? Furthermore, I have many USB ports on my computer, how do I know which port I am controlling?

I've been doing some searching in the linux file system, and found this file /sys/bus/usb/devices/usb1/power/state which seem like it says whether a USB port is on or off. The problem is I know for sure that there is at least one USB port that is on, yet all the power/state files have the value 0, does that mean the power is "on" on all the devices?

Thanks,
Neked
 
Old 04-19-2006, 05:02 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
I do not think one can turn the power off on the USB port unless the hardware has the capability. Best place is to contact the vendor of the hardware and get the specs on the device. Normally 0 means off and 1 would mean on. But not sure how the usb modules are designed there. Best place to start there is check the readme files on the kernel to find the developers on the USB modules and contact them for there input.

Brian1
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
turn a computer into a usb or firewire mass storage device. exodist Linux - General 13 01-17-2011 09:07 AM
After plug in apacer ht202 usb mass storage into usb port. Nothing appear. tellmeimhong Linux - Hardware 3 02-04-2006 02:32 AM
USB Flashdrive light does not turn off when unmounted josedsilva Linux - Hardware 5 12-29-2005 01:08 AM
Using an USB port as a standard DB9 Serial Port Lsteele Linux - Newbie 1 10-22-2005 09:48 AM
turn off http port 80, keep https port 443 lothario Linux - Networking 6 02-11-2005 04:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration