Где находится usb устройство под Убунтой?
Oct. 7th, 2008 08:06 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
А конкретно, цифровой фотоаппарат?
Я в курсе, что можно вытащить карту памяти и прочитать в ридере, но по здравому смыслу если я подсоединяю сам фотоаппарта через usb, то содержимое карты должно отображаться как какой-то файл/директория, так?
Под катом - результат выдаваемый командой lsusb -v -d 007:005
Bus 007 Device 005: ID 04a9:3125 Canon, Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x04a9 Canon, Inc.
idProduct 0x3125
bcdDevice 0.02
iManufacturer 1 Canon Inc.
iProduct 2 Canon Digital Camera
iSerial 3 4D6014935A0E48E698727035B06D71AE
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 39
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 2mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 6 Imaging
bInterfaceSubClass 1 Still Image Capture
bInterfaceProtocol 1 Picture Transfer Protocol (PIMA 15470)
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 10
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0001
Self Powered
Где его в результате искать? Содержимое /dev/bus/usb - странный набор подкаталогов с одиночными файлами, которые непонятно какой программой читать хотя похоже они-то мне и нужны. Задача - получить доступ к каждой фотографии как к отдельному файлу. Это возможно или опять я хочу левой ногой ухо чесать? :)
Я в курсе, что можно вытащить карту памяти и прочитать в ридере, но по здравому смыслу если я подсоединяю сам фотоаппарта через usb, то содержимое карты должно отображаться как какой-то файл/директория, так?
Под катом - результат выдаваемый командой lsusb -v -d 007:005
Bus 007 Device 005: ID 04a9:3125 Canon, Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x04a9 Canon, Inc.
idProduct 0x3125
bcdDevice 0.02
iManufacturer 1 Canon Inc.
iProduct 2 Canon Digital Camera
iSerial 3 4D6014935A0E48E698727035B06D71AE
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 39
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 2mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 6 Imaging
bInterfaceSubClass 1 Still Image Capture
bInterfaceProtocol 1 Picture Transfer Protocol (PIMA 15470)
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 10
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0001
Self Powered
Где его в результате искать? Содержимое /dev/bus/usb - странный набор подкаталогов с одиночными файлами, которые непонятно какой программой читать хотя похоже они-то мне и нужны. Задача - получить доступ к каждой фотографии как к отдельному файлу. Это возможно или опять я хочу левой ногой ухо чесать? :)
no subject
Date: 2008-10-07 07:16 pm (UTC)no subject
Date: 2008-10-07 07:35 pm (UTC)Кстати, странная штука - при попытке просмотра file explorer'ом директория показалась пустой, файлы появились только через ls. Это нормально? :)
no subject
Date: 2008-10-07 08:17 pm (UTC)Поковырявшись немножко с udev, можно его заставить исполнять нужную команду при каждом подключении фотоаппарата. Подробностей, правда, не помню, надо manual читать.
при попытке просмотра file explorer'ом директория показалась пустой, файлы появились только через ls
Странно.. нет, не должно такого быть. А refresh пробовал делать в explorer'е?
no subject
Date: 2008-10-08 07:23 am (UTC)no subject
Date: 2008-10-07 07:31 pm (UTC)