Linux API/usb2012. 2. 4. 18:24
심심(?)해서 USB 조이스틱 2개를 연결해서 본 목록

$ cat /proc/bus/usb/devices 
$ cat /sys/kernel/debug/usb/devices
에는 토폴로지 별로 상세하게 출력되고 

lsusb를 통해서도 볼수는 있는데
$ lsusb -d 12bd:a02f -v 식으로 하나의 장치만을 자세히 볼수도 있다.
$ lsusb
Bus 005 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 003 Device 005: ID 0583:206f Padix Co., Ltd (Rockfire) 
Bus 003 Device 004: ID 12bd:a02f  
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


$ tree -a /dev/bus
/dev/bus
`-- usb
    |-- 001
    |   `-- 001
    |-- 002
    |   `-- 001
    |-- 003
    |   |-- 001
    |   |-- 004
    |   `-- 005
    |-- 004
    |   `-- 001
    `-- 005
        `-- 001

6 directories, 7 files 


















 
$ tree -a /proc/bus
/proc/bus
|-- input
|   |-- devices
|   `-- handlers
|-- pccard
|   `-- drivers
`-- pci
    |-- 00
    |   |-- 00.0
    |   |-- 02.0
    |   |-- 02.1
    |   |-- 1b.0
    |   |-- 1c.0
    |   |-- 1c.2
    |   |-- 1d.0
    |   |-- 1d.1
    |   |-- 1d.2
    |   |-- 1d.3
    |   |-- 1d.7
    |   |-- 1e.0
    |   |-- 1f.0
    |   |-- 1f.1
    |   |-- 1f.2
    |   `-- 1f.3
    |-- 02
    |   `-- 00.0
    |-- 06
    |   |-- 00.0
    |   |-- 00.2
    |   |-- 00.3
    |   |-- 00.4
    |   `-- 02.0
    `-- devices

6 directories, 26 files 
$ tree -a /sys/kernel/debug/usb/
/sys/kernel/debug/usb/
|-- devices
`-- usbmon
    |-- 0s
    |-- 0u
    |-- 1s
    |-- 1t
    |-- 1u
    |-- 2s
    |-- 2t
    |-- 2u
    |-- 3s
    |-- 3t
    |-- 3u
    |-- 4s
    |-- 4t
    |-- 4u
    |-- 5s
    |-- 5t
    `-- 5u

1 directory, 18 files 












 

$ tree -a /dev/input
/dev/input
|-- by-id
|   |-- usb-0583_USB_2-axis_8-button_gamepad-event-joystick -> ../event10
|   |-- usb-0583_USB_2-axis_8-button_gamepad-joystick -> ../js1
|   |-- usb-12bd_5-Axis_12-Button_with_POV-event-joystick -> ../event6
|   `-- usb-12bd_5-Axis_12-Button_with_POV-joystick -> ../js0
|-- by-path
|   |-- pci-0000:00:1d.1-usb-0:1:1.0-event-joystick -> ../event6
|   |-- pci-0000:00:1d.1-usb-0:1:1.0-joystick -> ../js0
|   |-- pci-0000:00:1d.1-usb-0:2:1.0-event-joystick -> ../event10
|   |-- pci-0000:00:1d.1-usb-0:2:1.0-joystick -> ../js1
|   |-- platform-i8042-serio-0-event-kbd -> ../event5
|   |-- platform-i8042-serio-2-event-mouse -> ../event8
|   `-- platform-i8042-serio-2-mouse -> ../mouse1
|-- event0
|-- event1
|-- event10
|-- event2
|-- event3
|-- event4
|-- event5
|-- event6
|-- event7
|-- event8
|-- event9
|-- js0
|-- js1
|-- mice
|-- mouse0
`-- mouse1

2 directories, 27 files 

아무튼, 개략적으로 USB 연결시 확인해야 할 경로는 위에 녀석들 뿐이려나?

[링크 : http://docs.blackfin.uclinux.org/kernel/generated/usb/index.html] << USB API
[링크 : http://www.linux-usb.org/USB-guide/book1.html]
Posted by 구차니