quarta-feira, 18 de março de 2015

LPI 101.1 Identificar e editar configurações de hardware (Comando lsusb)

Mais um comando para ver as configurações do seu computador.

Comando lsusb:
Vai mostrar todos os canais disponíveis e também os devices(dispositivos) plugados nas postas USB.

Vamos digitar no terminal

root@computador1:~# 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 002 Device 002: ID 80ee:0021 VirtualBox USB Tablet

O primeiro item é o dispositivo 001 tem duas entradas:
  • 1d6b:0002 Linux Foundation 2.0 root hub
  • 1d6b:0001 Linux Foundation 1.1 root hub
Só podemos ver um resumo.

Agora preste atenção, quando queremos corrigir algum problema nos dispositivos USB, precisamos de mais detalhes.

O comando lsusb é bom até demais em mostrar todos os detalhes.

Vejam a saída:

root@computador1:~# lsusb -v -d 1d6b:0002

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0002 2.0 root hub
  bcdDevice            3.02
  iManufacturer           3 Linux 3.2.0-4-amd64 ehci_hcd
  iProduct                2 EHCI Host Controller
  iSerial                 1 0000:00:0b.0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12
Hub Descriptor:
  bLength              11
  bDescriptorType      41
  nNbrPorts             8
  wHubCharacteristic 0x000a
    No power switching (usb 1.0)
    Per-port overcurrent protection
  bPwrOn2PwrGood       10 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x00 0x00
  PortPwrCtrlMask    0xff 0xff
 Hub Port Status:
   Port 1: 0000.0100 power
   Port 2: 0000.0100 power
   Port 3: 0000.0100 power
   Port 4: 0000.0100 power
   Port 5: 0000.0100 power
   Port 6: 0000.0100 power
   Port 7: 0000.0100 power
   Port 8: 0000.0100 power
Device Status:     0x0001
  Self Powered

Para o comando lsusb é o básico para mais detalhes pesquise com 
#man lsusb


Vou ficando por aqui, até a próxima

Nenhum comentário:

Postar um comentário