Re: [PLUG] Powered USB-A hub - LSUSB MaxPower

2023-01-17 Thread Tomas Kuchta
On Tue, Jan 17, 2023, 22:16 MC_Sequoia  wrote:

> You want to a guess what the MaxPower is listed for the Logitech V20
> portable usb speakers are that are plugged into my pc?
>
> I'll give you one guess.
>
> Yep, MaxPower is listed as 590 mA
>
> "The USB 1.x and 2.0 specifications provide a 5 V supply on a single wire
> to power connected USB devices.
>
> A unit load is defined as 100 mA in USB 2.0, and 150 mA in USB 3.0. A
> device may draw a maximum of 5 unit loads (500 mA) from a port in USB 2.0;
> 6 (900 mA) in USB 3.0."
>
> "Bus 003 Device 002: ID 046d:0a04 Logitech, Inc. V20 portable speakers
> (USB powered)
> Device Descriptor:
>   bLength18
>   bDescriptorType 1
>   bcdUSB   1.10
>   bDeviceClass0
>   bDeviceSubClass 0
>   bDeviceProtocol 0
>   bMaxPacketSize0 8
>   idVendor   0x046d Logitech, Inc.
>   idProduct  0x0a04 V20 portable speakers (USB powered)
>   bcdDevice0.07
>   iManufacturer   1 Logitech
>   iProduct2 Logitech USB Speaker
>   iSerial 0
>   bNumConfigurations  1
>   Configuration Descriptor:
> bLength 9
> bDescriptorType 2
> wTotalLength   0x00e9
> bNumInterfaces  3
> bConfigurationValue 1
> iConfiguration  3 G6 2005/03/29 10:05
> bmAttributes 0xc0
>   Self Powered
> MaxPower  500mA
>
>
> The total RMS Power of the Logitech V20 Portable USB Speakers = 2 W or
> 2000 mA.
> .
>

Yikes, since when 2W at 5V is 2000mA?

-Tomas


>


Re: [PLUG] Powered USB-A hub - LSUSB MaxPower

2023-01-17 Thread MC_Sequoia
You want to a guess what the MaxPower is listed for the Logitech V20 portable 
usb speakers are that are plugged into my pc?

I'll give you one guess. 

Yep, MaxPower is listed as 590 mA

"The USB 1.x and 2.0 specifications provide a 5 V supply on a single wire to 
power connected USB devices.

A unit load is defined as 100 mA in USB 2.0, and 150 mA in USB 3.0. A device 
may draw a maximum of 5 unit loads (500 mA) from a port in USB 2.0; 6 (900 mA) 
in USB 3.0."

"Bus 003 Device 002: ID 046d:0a04 Logitech, Inc. V20 portable speakers (USB 
powered)
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   1.10
  bDeviceClass0 
  bDeviceSubClass 0 
  bDeviceProtocol 0 
  bMaxPacketSize0 8
  idVendor   0x046d Logitech, Inc.
  idProduct  0x0a04 V20 portable speakers (USB powered)
  bcdDevice0.07
  iManufacturer   1 Logitech
  iProduct2 Logitech USB Speaker
  iSerial 0 
  bNumConfigurations  1
  Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength   0x00e9
bNumInterfaces  3
bConfigurationValue 1
iConfiguration  3 G6 2005/03/29 10:05
bmAttributes 0xc0
  Self Powered
MaxPower  500mA


The total RMS Power of the Logitech V20 Portable USB Speakers = 2 W or 2000 mA. 

Whether I'm driving audio through the speakers our not, the MaxPower stays at 
500 mA. 

LSUSB MaxPower is the power output of the USB port the USB device is connected 
to and not what that MaxPower of the device is or can take. 

All the USB ports on my pc are 2.0, if you've a mix of USB ports or different 
PCs with different USB port specs, you can prove this by moving the USB device 
to the different ports and checking the MaxPower that LSUSB lists.



Sent with Proton Mail secure email.

--- Original Message ---
On Tuesday, January 17th, 2023 at 2:59 PM, Galen Seitz  
wrote:


> On 1/17/23 14:48, MC_Sequoia wrote:
> ...snip...
> 
> > So, in conclusion I think the "MaxPower" data point provided by lsusb
> > command is about the bus electrical output capacity that the device
> > is connected to and not about the device itself that's connected to
> > the usb bus.
> 
> 
> This is not true, at least not for a USB device (not a hub). The
> MaxPower descriptor contains the maximum current that the device will
> ever draw. Properly designed USB devices first come up in a low power
> state where they draw 100 mA or less. The software driving the USB
> system calculates how much power is available. If there is sufficient
> power available, then the system initializes the device and allows it to
> go to its desired higher power state.
> 
> 
> galen
> --
> Galen Seitz
> gal...@seitzassoc.com


Re: [PLUG] Powered USB-A hub

2023-01-17 Thread Galen Seitz

On 1/17/23 09:43, Rich Shepard wrote:

On Tue, 17 Jan 2023, Galen Seitz wrote:


Sorry, I haven't been following this thread too closely, but if this is a
device you already own, you can look this up yourself. First use lsusb to
find the vendor and product ID values for the USB device of interest. 
Then

use lsusb again to get more information about the device.


Galen,

What a valuable lesson!

# lsusb -v -d 1235:8211 | egrep 'iProduct|MaxPower'
   iProduct    3 Scarlett Solo USB
     MaxPower  500mA

This suggests to me that a less expensive hub with fewer ports that has at
least 50W published power would work with all three devices.


FYI, the typical 4 port powered USB 2.0 hub is supplied with a 5V 
adapter that is capable of ~2A, or about 500 mA per port.  With a USB 
3.0 hub where the per port current limit is 900 mA, the max adapter 
current should be higher, but it's unlikely the adapter would be sized 
to allow the max current on every port.


Hubs that have high (>15W) wattage are likely intended to support some 
sort of charging of phones/tablets/etc where communication regarding the 
larger current capability is communicated through a different mechanism.


Once again, the above does not directly apply to USB C hubs that support 
power delivery.


Rich, if you have three devices that draw 500 mA, a hub with a 2A 
adapter should be sufficient.  Look for a hub with a 2.5A or 3A adapter 
if one or two of your devices draw 900 mA.


BTW, I can guarantee you that virtually all of the crazy USB-powered 
things you can buy do *not* have USB descriptors.  Your Ronco USB fan, 
light, and turnip twaddler connect to VUSB (5V) and immediately attempt 
to draw whatever they need, regardless of any intended USB constraints. 
Buyer beware.



galen
--
Galen Seitz
gal...@seitzassoc.com


Re: [PLUG] Powered USB-A hub - LSUSB MaxPower

2023-01-17 Thread Galen Seitz

On 1/17/23 14:48, MC_Sequoia wrote:
...snip...

So, in conclusion I think the "MaxPower" data point provided by lsusb
command is about the bus electrical output capacity that the device
is connected to and not about the device itself that's connected to
the usb bus.


This is not true, at least not for a USB device (not a hub).  The 
MaxPower descriptor contains the maximum current that the device will 
ever draw.  Properly designed USB devices first come up in a low power 
state where they draw 100 mA or less.  The software driving the USB 
system calculates how much power is available.  If there is sufficient 
power available, then the system initializes the device and allows it to 
go to its desired higher power state.



galen
--
Galen Seitz
gal...@seitzassoc.com


Re: [PLUG] Powered USB-A hub - LSUSB MaxPower

2023-01-17 Thread MC_Sequoia
I was a bit skeptical about this MaxPower rating for a couple of reasons so I 
did some digging and I think I found some evidence to support my 
skepticism. 

Why is MaxPower given in Amps and not Watts? 

I suspect it's because MaxPOower refers to the usb bus and not the usb device 
connected to it. 

Here's 2 data points to support that theory.

1. "USB device configuration descriptor expresses bus power electrical current 
requirement in field bMaxPower." 

"usbutils 008 lsusb misreports MaxPower for SuperSpeed devices.  For example, 
lsusb -v outputs 'MaxPower 500mA' when a device is connected on 
High Speed bus, but 'MaxPower 224mA' when connected on SuperSpeed bus. usbfs 
devices holds correct 'MxPwr=896mA'."

Reference - https://www.spinics.net/lists/linux-usb/msg124590.html

SuperSpeed and HighSpeed refer to different USB bus standards. 

"SuperSpeed USB is ten times faster than USB 2.0 (also called HighSpeed USB) 
and increases the power output from about 100 milliamps to 900 milliamps."

Reference - 
https://www.techtarget.com/searchwindowsserver/definition/USB-30-SuperSpeed-USB

2. Electrical devices are rated by watts that you can find listed on them and 
circuit breakers are rated in amps. Why?

Because the amp rating is about capacity/output. For example, my rechargeable 
battery charger says:
 "Output - 220 mA - AA x 2
80 mA - AAA x 2

3. "As with earlier versions of USB, USB 3.0 provides power at 5 volts nominal. 
The available current for low-power (one unit load) SuperSpeed devices is 150 
mA, an increase from the 100 mA defined in USB 2.0. For high-power SuperSpeed 
devices, the limit is six unit loads or 900 mA (4.5 W)—almost twice USB 2.0's 
500 mA.[12]: section 9.2.5.1 Power Budgeting 

USB 3.0 ports may implement other USB specifications for increased power, 
including the USB Battery Charging Specification for up to 1.5 A or 7.5 W, or, 
in the case of USB 3.1, the USB Power Delivery Specification for charging the 
host device up to 100 W.[14]"

Reference - https://en.wikipedia.org/wiki/USB_3.0

So, in conclusion I think the "MaxPower" data point provided by lsusb command 
is about the bus electrical output capacity that the device is connected to and 
not about the device itself that's connected to the usb bus.

This might not affect your buying decision, but I think it's worth having 
correct information and understanding what you're working with. 









Re: [PLUG] Powered USB-A hub

2023-01-17 Thread Rich Shepard

On Tue, 17 Jan 2023, Galen Seitz wrote:


Sorry, I haven't been following this thread too closely, but if this is a
device you already own, you can look this up yourself. First use lsusb to
find the vendor and product ID values for the USB device of interest. Then
use lsusb again to get more information about the device.


Galen,

What a valuable lesson!

# lsusb -v -d 1235:8211 | egrep 'iProduct|MaxPower'
  iProduct3 Scarlett Solo USB
MaxPower  500mA

This suggests to me that a less expensive hub with fewer ports that has at
least 50W published power would work with all three devices.

Thanks very much,

Rich


Re: [PLUG] Powered USB-A hub

2023-01-17 Thread Galen Seitz

On 1/17/23 07:08, Rich Shepard wrote:

On Mon, 16 Jan 2023, Ben Koenig wrote:

That's probably fine. My rule of thumb is to not PLUG higher end hubs 
into
lower end ports. e.g. a bunch of USB 3.0 devices in a hub that 
connects to

a USB 2.0 host.


The Sabrent HB-7B3C provides 900mA to each USB port. I assume that's not
what the webcam and headphones draw. Just sent a message to Focusrite 
asking

how much power the Scarlett Solo Gen 3 draws.


Sorry, I haven't been following this thread too closely, but if this is a
device you already own, you can look this up yourself.  First use lsusb
to find the vendor and product ID values for the USB device of interest.
Then use lsusb again to get more information about the device.

Here I've chosen to find the current used by my scanner.

$ lsusb
Bus 002 Device 005: ID 046d:c404 Logitech, Inc. TrackMan Wheel
Bus 002 Device 004: ID 0472:0065 Chicony Electronics Co., Ltd PFU-65 Keyboard 
[Chicony]
Bus 002 Device 003: ID 0472:0065 Chicony Electronics Co., Ltd PFU-65 Keyboard 
[Chicony]
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 007: ID 051d:0002 American Power Conversion Uninterruptible 
Power Supply
Bus 001 Device 005: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle 
(HCI mode)
Bus 001 Device 004: ID 04a9:220d Canon, Inc. CanoScan N670U/N676U/LiDE 20
Bus 001 Device 014: ID 0403:6001 Future Technology Devices International, Ltd 
FT232 Serial (UART) IC
Bus 001 Device 009: ID 1d50:6018 OpenMoko, Inc. Black Magic Debug Probe 
(Application)
Bus 001 Device 008: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub
Bus 001 Device 011: ID 1679:2001 Total Phase Beagle Protocol Analyzer
Bus 001 Device 003: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub
Bus 001 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 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

$ lsusb -v -d 04a9:220d | egrep 'iProduct|MaxPower'
  iProduct2 CanoScan
MaxPower  500mA

My scanner draws a max of 500 mA, assuming the manufacturer hasn't lied
when generating the data for the device descriptors.  Since the units are
mA, MaxPower is a misnomer.  Actual max power would be 2.5W.

Note that everything above doesn't necessarily apply if USB C Power Delivery
is being used.  With power delivery, the voltage is no longer necessarily
5V.  I'm not sure how the descriptors change in order to accommodate this.


galen
--
Galen Seitz
gal...@seitzassoc.com


Re: [PLUG] Powered USB-A hub

2023-01-17 Thread Rich Shepard

On Mon, 16 Jan 2023, Ben Koenig wrote:


That's probably fine. My rule of thumb is to not PLUG higher end hubs into
lower end ports. e.g. a bunch of USB 3.0 devices in a hub that connects to
a USB 2.0 host.


The Sabrent HB-7B3C provides 900mA to each USB port. I assume that's not
what the webcam and headphones draw. Just sent a message to Focusrite asking
how much power the Scarlett Solo Gen 3 draws.

Rich