[FrontPage] [TitleIndex] [WordIndex

Assessing a USB Device's Power Requirements

(without plugging it into a Raspberry Pi)

Too see the current list of attached USB devices use the lsusb command:

trevor@BlueElf:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 039: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 001 Device 003: ID 064e:d101 Suyin Corp. Acer CrystalEye Webcam
Bus 001 Device 040: ID 04d9:1702 Holtek Semiconductor, Inc. 
Bus 001 Device 041: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse

In the above example, for an Acer Aspire One D250 netbook running Ubuntu 12.04 LTS four external USB devices can be seen:

  1. The Acer's webcam: 064e:d101 Suyin Corp. Acer Crystal Eye Webcam,
  2. An external hub: 1a40:0101 Terminus Technology Inc. 4-Port HUB,
  3. A mouse: 093a:2510 Pixart Imaging, Inc. Optical Mouse, and
  4. finally device 04d9:1702 Holtek Semiconductor, Inc., which is a mini-keyboard.

To find the power requirements for these devices, use the usb-devices command and find the matching device ID entries ...

T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  3 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=064e ProdID=d101 Rev=07.11
S:  Manufacturer=SuYin
S:  Product=WebCam
S:  SerialNumber=CN0316-M608-OV011-VA-R07.01.01
C:  #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=0e(video) Sub=01 Prot=00 Driver=uvcvideo
I:  If#= 1 Alt= 0 #EPs= 0 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 39 Spd=480 MxCh= 4
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=02 MxPS=64 #Cfgs=  1
P:  Vendor=1a40 ProdID=0101 Rev=01.00
S:  Product=USB 2.0 Hub [MTT]
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:  If#= 0 Alt= 1 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=02 Driver=hub

T:  Bus=01 Lev=02 Prnt=39 Port=02 Cnt=02 Dev#= 41 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=093a ProdID=2510 Rev=01.00
S:  Manufacturer=PixArt
S:  Product=USB Optical Mouse
C:  #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbhid

T:  Bus=01 Lev=02 Prnt=39 Port=00 Cnt=01 Dev#= 40 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=04d9 ProdID=1702 Rev=01.01
S:  Manufacturer= 
S:  Product=USB Keyboard
C:  #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbhid
I:  If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid

The critical part of each entry is that beginning C:  #Ifs=, which includes a section like MxPwr=100mA which appears to declare a M(a)x(imum)P(o)w(e)r requirement, expressed as a load current of 100mA. (Strictly power should be expressed in mW, however, for our purposes, it is the load current associated with that power level that we need) It so happens that the 4-port hub above can be powered, however usb-devices cannot "determine" this fact, or whether said hub is powered, in fact.

DeviceMgrUSBPwr.png


2018-06-16 20:31