LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-14-2014, 12:56 PM   #1
Automatic
Member
 
Registered: Mar 2013
Posts: 42

Rep: Reputation: Disabled
Is it possible to set USB power?


When I'm out and about on my laptop, I wish to tether my phone via USB, unfortunately, I don't wish to charge the phone via USB (I.E. draining laptop's battery to charge phones), considering the cables are one-and-the-same (Data transfer & power), this is annoying.

After a bit of googling, apparently I can simply cut the left and right most pins out (Ground & Vcc/Voltage), unfortunately, that means that I can't use the same cable for powering the device when I want to (I.E. on desktop, or, when plugged into the mains on laptop)

Considering my laptop has three USB ports (two 2.0, one 3.0), what I want is one of the 2.0s to *not* send power, and, one to send power, so, when I need to power a device (Mouse, keyboard, etc...), I can use one USB port, when I don't (Android, wall-powered external drive, etc...) I can use the other one.

Is this possible from the OS's point-of-view? Or is this something that is purely hardware? And if I do it (Either via cutting the cable or software based), will the phone still detect it's plugged in to tether? Or will it just think "No power, no point listening to the two data pins"?

I know this is slightly off a Linux question (Hardware), but, it still sort of is (How to do it in Linux via software), so, heyho.

Last edited by Automatic; 05-14-2014 at 12:58 PM.
 
Old 05-14-2014, 02:11 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,260

Rep: Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948Reputation: 1948
Where on earth did you find a site telling you to cut the ground line??? Please tell me there isn't any idiot blog out there recommending people do this.

If you cut Vcc and Gnd, you'll turn the cable into a brick. Voltage is all relative. A voltage of 5V means nothing without also specifying a reference (rather than saying line 1 is at 5V, you say line 1 is 5V higher than the reference). If you cut the Gnd line, you sever that reference, and the cable won't do jack. You MUST leave the ground line in-tact in order for the data lines to do anything.

Now as for severing the Vcc, that may also turn the cable into a brick. Most USB devices have a USB controller that connects to the port, and is powered by the host/cable. When you plug in the device, the host powers up this USB controller on the device, and then the device decides what to do from there. If Vcc on the cable is cut, this controller won't be powered, and data transfer will be impossible.

But don't give up just yet. USB has multiple power modes, not just on/off. USB ports always provide power, but by default they're software limited to just a few milliamps for safety's sake. The USB device has to acknowledge the connection and request high power mode from the host before the host will allow it to draw more. You MAY be able to shut off this high power mode in Linux to prevent it from allowing the port to charge the phone. Depending on the phone, this may prevent data communication as well though, it really depends on how sophisticated the USB controller in the phone is (does it just wake up, request high power, and then activate everything, or does it wake up, activate data, request high power, and then activate charging?). I'm not even sure if this is possible with Linux though, you'd have to do some looking.

Here are some more details on controlling USB power in Linux, though it appears that it's just on/off, not high/low/off.
http://stackoverflow.com/questions/4...off-with-linux

Last edited by suicidaleggroll; 05-14-2014 at 02:22 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Power off USB storage device/port to avoid power consumption johndir Linux - Hardware 4 11-15-2011 06:04 PM
USB power management? Want to charge my mobile/cell/handy phone with USB port. icy-flame Linux - General 1 05-23-2009 07:01 PM
USB IR receivers supporting power on/off via mb power header dblade Linux - Hardware 0 09-16-2007 02:22 AM
set iBook to automatically power-up after power failure peachy Other *NIX 4 04-19-2006 01:44 PM
APM - How do i set up power management? RottenMutt Linux - Hardware 1 07-08-2003 02:42 AM


All times are GMT -5. The time now is 05:31 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration