728x90
반응형
개요
USB에 대한 상세한 정보를 확인하는 방법을 알아 보겠습니다.
시험 환경
- SBC : NVIDIA Orin NX
- OS : L4T r35.4.1
필수 패키지 설치
USB 정보를 상세하기 확인하기 위하여 먼저 "usbutils" 필수 패키지를 다음과 같이 설치합니다.
$ sudo apt install -y usbutils
lsusb
가장 기본적인 것으로 현재 USB 허브 및 연결된 기기에 대한 기본적인 정보를 확인할 수 있습니다.
$ lsusb
Bus 002 Device 002: ID 2109:0822 VIA Labs, Inc. USB3.1 Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 2109:8822 VIA Labs, Inc.
Bus 001 Device 005: ID 046d:c07e Logitech, Inc. G402 Gaming Mouse
Bus 001 Device 004: ID 0c45:672e Microdia USB2.0 Hub
Bus 001 Device 003: ID 0bda:8179 Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter
Bus 001 Device 002: ID 2109:2822 VIA Labs, Inc. USB2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
트리 형태로 확인하기 위하여 "-t" 옵션을 이용한 결과는 다음과 같습니다.
$ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 10000M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 10000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 480M
|__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M
|__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=r8188eu, 480M
|__ Port 2: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 2: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 4: Dev 5, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 4: Dev 5, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 5: Dev 6, If 0, Class=, Driver=, 480M
usb-devices
"usb-devices" 명령을 이용하면 아래와 같이 각 USB 포트별로 더 세부적인 정보를 확인할 수 있습니다.
$ usb-devices
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 4
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev=05.10
S: Manufacturer=Linux 5.10.120-tegra xhci-hcd
S: Product=xHCI Host Controller
S: SerialNumber=3610000.xhci
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=480 MxCh= 5
D: Ver= 2.10 Cls=09(hub ) Sub=00 Prot=02 MxPS=64 #Cfgs= 1
P: Vendor=2109 ProdID=2822 Rev=00.30
S: Manufacturer=VIA Labs, Inc.
S: Product=USB2.0 Hub
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#=0x0 Alt= 1 #EPs= 1 Cls=09(hub ) Sub=00 Prot=02 Driver=hub
T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0bda ProdID=8179 Rev=00.00
S: Manufacturer=Realtek
S: Product=802.11n NIC
S: SerialNumber=00ADA7300CA1
C: #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
I: If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=r8188eu
T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 4 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0c45 ProdID=672e Rev=01.02
S: Manufacturer=SONiX
S: Product=USB DEVICE
C: #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=100mA
I: If#=0x0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=01 Driver=usbhid
I: If#=0x1 Alt= 0 #EPs= 2 Cls=03(HID ) Sub=01 Prot=02 Driver=usbhid
T: Bus=01 Lev=02 Prnt=02 Port=03 Cnt=03 Dev#= 5 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=046d ProdID=c07e Rev=90.03
S: Manufacturer=Logitech
S: Product=Gaming Mouse G402
S: SerialNumber=6D923FA85152
C: #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=300mA
I: If#=0x0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbhid
I: If#=0x1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid
T: Bus=01 Lev=02 Prnt=02 Port=04 Cnt=04 Dev#= 6 Spd=480 MxCh= 0
D: Ver= 2.01 Cls=11() Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=2109 ProdID=8822 Rev=00.01
S: Manufacturer=VIA Labs, Inc.
S: Product=USB Billboard Device
S: SerialNumber=0000000000000001
C: #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
I: If#=0x0 Alt= 0 #EPs= 0 Cls=11() Sub=00 Prot=00 Driver=(none)
T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=10000 MxCh= 4
D: Ver= 3.10 Cls=09(hub ) Sub=00 Prot=03 MxPS= 9 #Cfgs= 1
P: Vendor=1d6b ProdID=0003 Rev=05.10
S: Manufacturer=Linux 5.10.120-tegra xhci-hcd
S: Product=xHCI Host Controller
S: SerialNumber=3610000.xhci
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=10000 MxCh= 4
D: Ver= 3.10 Cls=09(hub ) Sub=00 Prot=03 MxPS= 9 #Cfgs= 1
P: Vendor=2109 ProdID=0822 Rev=00.30
S: Manufacturer=VIA Labs, Inc.
S: Product=USB3.1 Hub
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
참고자료
- "How to Check Whether a USB Device Is Present on a Linux Machine":https://www.baeldung.com/linux/check-for-usb-devices
'Linux,Unix,BSD' 카테고리의 다른 글
Ubuntu에서 패키지만 다운로드 받아 설치하기 (0) | 2022.02.10 |
---|---|
[script] Let's Encrypt SSL 인증서 갱신 스크립트 (0) | 2022.01.25 |
[shell] 특정 문자열이 포함된 줄 번호 출력하기 (0) | 2021.10.26 |
git push error - sha1 file '<stdout>' write error: Broken pipe (0) | 2021.10.05 |
git push가 안되는 증상 : "fatal: Could not read from remote repository." (0) | 2021.09.27 |