pluto hat geschrieben:Du könntest lsusb aufrufen.
Es könnte auch sein, dass die udev Regeln für diese Gerät "anders" sind. Ich musste auch mal ein neues Gerät hinzufügen, weil mein Smartphone nicht erkannt wurde.
Edit01:
https://wiki.ubuntuusers.de/udev
Danke für den Ansatz...
Dennoch frage ich mich, wie ich das in meine Komponente einbinde.
wird wohl darauf hinauslaufen, das ich in dem Package noch eine Timer einbinden muß, der stündlich einen lsusb ausführt, die in eine "log" anlegt, welche dann von der Komponenten Class ausgelesen wird.
Weiterer Nachteil, ich müsste eine interne Database anlegen, welche sich automatisch erweitert und neue Geräte aufnimmt, sofern diese noch nicht mit dem entsprechenden IDV und IDP sowie iSerial gelistet sind.
Hier mal ein Auszug des Gerätes, welches ich verwenden will. bzw welches als Gerät auch von meinem Programm erkannt werden soll.
Code: Alles auswählen
Bus 002 Device 003: ID 0bda:b001 Realtek Semiconductor Corp.
Bus 002 Device 002: ID 0438:7900 Advanced Micro Devices, Inc.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 0bda:5775 Realtek Semiconductor Corp.
Bus 001 Device 012: ID 0403:d8f8 Future Technology Devices International, Ltd <--- den hätte ich gerne als ttyUSBx bzw ttyx / ttySx; Aber wie? UDEV REGEL???
Bus 001 Device 014: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port <--- Erkannt als ttyUSB0 - Egal wo! IST AUCH GUT SO
Bus 001 Device 013: ID 15d9:0a33 Trust International B.V. Optical Mouse
Bus 001 Device 003: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 002: ID 0438:7900 Advanced Micro Devices, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 174c:5136 ASMedia Technology Inc.
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
satan@satan:~$ lsusb -vs 001:012
Bus 001 Device 012: ID 0403:d8f8 Future Technology Devices International, Ltd
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0403 Future Technology Devices International, Ltd
idProduct 0xd8f8
bcdDevice 6.00
iManufacturer 1
iProduct 2
iSerial 3
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 2
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 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 0x0040 1x 64 bytes
bInterval 0
satan@satan:~$