English 中文(简体)
Is there software or code to alter USB power output
原标题:

I had a look at this and this but no one sounded particularly sure of their ideas and I m kind of after a different thing anyway. I want to hook my usb power cables (red and black) up to my phone so I don t have to use a battery (the battery is dead anyway and this is just an experiment). The problem is that USB standards ensure that a minimum of 4.35V is supplied, when I only want 3.7V. Does anyone know for sure that you can or cannot regulate power output programmatically? Some other queries I have are: What kind of power does the sleep mode provide? And what would I need to code something in to play with this, C++?

最佳回答

No, you won t find a computer that allows you to set this voltage in software. It would break the USB specification.

You can get 150mA by default, and 500mA if your USB device negotiates it with the computer (requiring a little bit of logic in the device). Multiply by 5V to get the provided power.

问题回答

A bit more info on the answer from Pascal:

  1. The normal operation (Non-Configured mode) is 100mA

  2. In theory, the operating system should check the MaxPower value of the device s configuration descriptor to decide if to allow it to draw more than 100mA. In practice, PCs do not do it (and have no way to control it). So you can try taking 500mA. (Of course connecting a bus powered hub and linking more then one 500mA device, should, not work.)

  3. If the device is not actively used, the OS may (and should) suspend it. When suspended the power is limited to 1-0.5mA (Again, in theory, since it can not be controlled by software).





相关问题
Designing Web Interface for Embedded System

OS : Linux. I m trying to find possible ways to implement web interface for my embedded system. Currently there is a shell (text based) and a small set of commands are implemented to query the ...

How bind socket to device in windows?

I have same network cards in computer. All cards has identical IP. I need to bind socket to specific card. In linux I can use flag SO_BINDTODEVICE. How I can do this in windows. P.S. This needed for ...

Choose between multiple devices in XCode

I ve 2 devices (iPhone + iPod) connected to my Mac and both are available as developper devices in XCode. How can I choose which one to use for testing purpose and switch from one to the other when I ...

Simulate a faulty block device with read errors?

I m looking for an easier way to test my application against faulty block devices that generate i/o read errors when certain blocks are read. Trying to use a physical hard drive with known bad blocks ...

Is there software or code to alter USB power output

I had a look at this and this but no one sounded particularly sure of their ideas and I m kind of after a different thing anyway. I want to hook my usb power cables (red and black) up to my phone so I ...

热门标签