Forum
« Switch on-off USB ports? »

Welcome Guest. Please Login or Register.
May 25, 2013, 10:55am



Return to or visit the SalineOS webpage

Forum :: General :: Hardware Support :: Switch on-off USB ports?
   [Search This Thread] [Share Topic] [Print]
 AuthorTopic: Switch on-off USB ports? (Read 1,028 times)
desputin
New Member
*
member is offline





Joined: Aug 2011
Gender: Male
Posts: 13
 Switch on-off USB ports?
« Thread Started on Oct 7, 2011, 11:50am »

Hi,

I have a USB-Lamp connected to my salineOS Server and would like to switch that lamp on and off. I found this:

Code:
# disable external wake-up; do this only once
echo disabled > /sys/bus/usb/devices/usb1/power/wakeup

echo on > /sys/bus/usb/devices/usb1/power/level # turn on
echo suspend > /sys/bus/usb/devices/usb1/power/level # turn off


But it doesn't seem to work.

Does anybody here know how I can sitch power on-off of USB ports with salineOS?

best regards
desputin
Link to Post - Back to Top  IP: Logged
beardedragon
Global Moderator
*****
member is offline

[avatar]



Joined: Feb 2011
Gender: Male
Posts: 858
 Re: Switch on-off USB ports?
« Reply #1 on Oct 7, 2011, 1:34pm »

This cannot be used to turn off a usb parasitic device (usb lights and the like), which have no communications interface. There are no command line switches that can accomplish this. The preceding is a consenses of several threads I checked through Google and Linux.
Link to Post - Back to Top  IP: Logged

Robert Collard, Madison, WI
HP s5710f, 2x AMD Athlon II 260@3.2Ghz 3GB RAM, 640GB HD
Debian 7.0 XFCE-4.10 3.2.0-4-amd64

If you are satisfied with the results, please Edit your first post and add [Solved] to the Subject line.
debby
Full Member
***
member is offline





Joined: Nov 2011
Gender: Male
Posts: 124
 Re: Switch on-off USB ports?
« Reply #2 on Jan 10, 2012, 4:39pm »

I know. Seriously they need to make an actual inline (on the cable) physical switch for just these purposes. Probably could be hacked very easily to do just that.
Link to Post - Back to Top  IP: Logged
Anthony Nordquist
Administrator
*****
member is offline




[homepage]

Joined: Dec 2010
Gender: Male
Posts: 1,339
 Re: Switch on-off USB ports?
« Reply #3 on Jan 10, 2012, 10:54pm »

All I can chime in on this is Beardedragon is correct, there really isn't a way to do this in software. As far as hacking this is relativity easy, if you don't mind learning to solder. There are tons of guides on youtube that will teach you. Basically all you would have to do is use a pair of wire strippers to take off a small section of the outermost wire insulation to expose the inner wires. There are 4 wires inside a USB cable, two are for power (Positive and negative) and two are for data transfer. What you would need to do is cut the red wire and solder the two ends you created to each of the posts on a switch (use a switch rated for at least 5 AMPS). Then wrap a little electrical tape around the soldered post and wire, thats really it. For coolness sake you should put the switch into a case, the cases that come with Altoids mints are commonly used for small electronics hacking and are great fun.

If you decide to use an Altoids case you can create a hole for the switch by filling the case 2/3 full of water and then freezing it (Water expands when frozen, you gotta leave room for that or the water will bend the metal). Then take a real small chisel and hammer and chisel a hole through the metal using the ice as a back plate. Then create a hole in both sides of the case for the wires to run through, a small dremel bit and a hammer works pretty well for this while its frozen. Let the ice melt and the tin dry before super gluing or epoxying the switch into place. Post pictures on the internet for 500 geek cred, or something.
Link to Post - Back to Top  IP: Logged
   [Search This Thread] [Share Topic] [Print]



Anthony Nordquist, on behalf of the SalineOS project, is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com. As such, if you click the above banner and then make any purchase including digital downloads, a small percentage will be paid to the SalineOS project.
Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!
Terms of Service | Privacy Policy | Notice | FTC Disclosure | Report Abuse | Mobile