Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
udev - DigiCam gibt immer andere Model-Info
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Louisdor
Veteran
Veteran


Joined: 14 Dec 2003
Posts: 1231
Location: im Brandenburgischen

PostPosted: Mon Jul 18, 2005 12:34 pm    Post subject: udev - DigiCam gibt immer andere Model-Info Reply with quote

HI!

Ich habe mir eine Rule /etc/udev/rules.d/10-udev.rules für meine DigiCam (Pentax EI 2000) erstellt.
Das hat gut funktioniert.
Nun habe ich wieder ein paar Bilder gemacht und wollte sie heute von der Cam holen, da funktioniert es nicht.
Ich habe nun festgestellt, dass die Cam jedesmal andere Info bei SYSFS{model}== ausgibt.
So kann meine Regel für die Cam ja auch nicht funktionieren!?

z.B.: (die Ausgabe ist etwas gekürzt
Code:
root@gentoo: ~ # udevinfo -a -p /sys/block/sda

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-2/1-2:1.0/host3/target3:0:0/3:0:0:0':
    BUS=="scsi"
    ID=="3:0:0:0"
    DRIVER=="sd"
    SYSFS{device_blocked}=="0"
    SYSFS{iocounterbits}=="32"
    SYSFS{iodone_cnt}=="0xb"
    SYSFS{ioerr_cnt}=="0x0"
    SYSFS{iorequest_cnt}=="0xb"
    SYSFS{max_sectors}=="240"
    SYSFS{model}=="ce/2:0:0:0"
    SYSFS{queue_depth}=="1"
    SYSFS{queue_type}=="none"
    SYSFS{rev}==""
    SYSFS{scsi_level}=="3"
    SYSFS{state}=="running"
    SYSFS{timeout}=="30"
    SYSFS{type}=="0"
    SYSFS{vendor}=="csi_devi"

couldn't open device directory
root@gentoo: ~ #
oder
Code:
root@gentoo: ~ # udevinfo -a -p /sys/block/sda

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-2/1-2:1.0/host2/target2:0:0/2:0:0:0':
    BUS=="scsi"
    ID=="2:0:0:0"
    DRIVER=="sd"
    SYSFS{device_blocked}=="0"
    SYSFS{iocounterbits}=="32"
    SYSFS{iodone_cnt}=="0x78"
    SYSFS{ioerr_cnt}=="0x0"
    SYSFS{iorequest_cnt}=="0x78"
    SYSFS{max_sectors}=="240"
    SYSFS{model}==""
    SYSFS{queue_depth}=="1"
    SYSFS{queue_type}=="none"
    SYSFS{scsi_level}=="3"
    SYSFS{state}=="running"
    SYSFS{timeout}=="30"
    SYSFS{type}=="0"
    SYSFS{vendor}==""

couldn't open device directoryroot@gentoo: ~ #
oder
Code:
udevinfo -a -p /sys/block/sda

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-2/1-2:1.0/host1/target1:0:0/1:0:0:0':
    BUS=="scsi"
    ID=="1:0:0:0"
    DRIVER=="sd"
    SYSFS{device_blocked}=="0"
    SYSFS{iocounterbits}=="32"
    SYSFS{iodone_cnt}=="0xb"
    SYSFS{ioerr_cnt}=="0x0"
    SYSFS{iorequest_cnt}=="0xb"
    SYSFS{max_sectors}=="240"
    SYSFS{model}==".2"
    SYSFS{queue_depth}=="1"
    SYSFS{queue_type}=="none"
    SYSFS{scsi_level}=="3"
    SYSFS{state}=="running"
    SYSFS{timeout}=="30"
    SYSFS{type}=="0"
    SYSFS{vendor}=="linux.so"

couldn't open device directory
root@gentoo: ~ #
Auch bei SYSFS{vendor}== steht immer etwas anderes.

/var/log/messages:
Code:
Jul 18 14:01:17 gentoo usb 1-2: new full speed USB device using uhci_hcd and address 4
Jul 18 14:01:17 gentoo scsi2 : SCSI emulation for USB Mass Storage devices
Jul 18 14:01:17 gentoo usb-storage: device found at 4
Jul 18 14:01:17 gentoo usb-storage: waiting for device to settle before scanning
Jul 18 14:01:22 gentoo Vendor:           Model:                   Rev:     
Jul 18 14:01:22 gentoo Type:   Direct-Access                      ANSI SCSI revision: 00
Jul 18 14:01:22 gentoo SCSI device sda: 256001 512-byte hdwr sectors (131 MB)
Jul 18 14:01:22 gentoo sda: Write Protect is off
Jul 18 14:01:22 gentoo sda: Mode Sense: 0f 00 00 00
Jul 18 14:01:22 gentoo sda: assuming drive cache: write through
Jul 18 14:01:22 gentoo SCSI device sda: 256001 512-byte hdwr sectors (131 MB)
Jul 18 14:01:22 gentoo sda: Write Protect is off
Jul 18 14:01:22 gentoo sda: Mode Sense: 0f 00 00 00
Jul 18 14:01:22 gentoo sda: assuming drive cache: write through
Jul 18 14:01:22 gentoo /dev/scsi/host2/bus0/target0/lun0: p1
Jul 18 14:01:22 gentoo Attached scsi removable disk sda at scsi2, channel 0, id 0, lun 0
Jul 18 14:01:22 gentoo usb-storage: device scan complete


Wie kann ich für so eine Cam eine brauchbare Regel festlegen?

Merci & Ciao,
aleX!

_________________
"Ich bin ich."
Back to top
View user's profile Send private message
misterjack
Veteran
Veteran


Joined: 03 Oct 2004
Posts: 1655

PostPosted: Mon Jul 18, 2005 1:13 pm    Post subject: Reply with quote

da du die ausgabe verkürzt hast, habe ich keine SYSFS{serial} bei dir gefunden. mit der sollte es gehen, da die sich nicht ändern sollte. alles weitere dazu: http://de.gentoo-wiki.com/Udev_Rules
_________________
„Meine Meinung steht fest! Bitte verwirren Sie mich nicht mit Tatsachen.“
Back to top
View user's profile Send private message
Louisdor
Veteran
Veteran


Joined: 14 Dec 2003
Posts: 1231
Location: im Brandenburgischen

PostPosted: Mon Jul 18, 2005 1:35 pm    Post subject: Reply with quote

Ausgabe ungekürzt:
Code:
root@gentoo: / # udevinfo -a -p /sys/block/sda

udevinfo starts with the device the node belongs to and then walks up the
device chain, to print for every device found, all possibly useful attributes
in the udev key format.
Only attributes within one device section may be used together in one rule,
to match the device for which the node will be created.

device '/sys/block/sda' has major:minor 8:0
  looking at class device '/sys/block/sda':
    SUBSYSTEM=="block"
    SYSFS{dev}=="8:0"
    SYSFS{range}=="16"
    SYSFS{removable}=="1"
    SYSFS{size}=="256001"
    SYSFS{stat}=="       1        7        8        9        0        0        0        0        0        9        9"

follow the "device"-link to the physical device:
  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1:1.0/host5/target5:0:0/5:0:0:0':
    BUS=="scsi"
    ID=="5:0:0:0"
    DRIVER=="sd"
    SYSFS{device_blocked}=="0"
    SYSFS{iocounterbits}=="32"
    SYSFS{iodone_cnt}=="0xb"
    SYSFS{ioerr_cnt}=="0x0"
    SYSFS{iorequest_cnt}=="0xb"
    SYSFS{max_sectors}=="240"
    SYSFS{model}==""
    SYSFS{queue_depth}=="1"
    SYSFS{queue_type}=="none"
    SYSFS{rev}==""
    SYSFS{scsi_level}=="3"
    SYSFS{state}=="running"
    SYSFS{timeout}=="30"
    SYSFS{type}=="0"
    SYSFS{vendor}==""

couldn't open device directory
root@gentoo: / #
Leider habe ich da keine SYSFS{serial} gefunden.
Sonst hätte ich die schon mal versucht, da sie ja eindeutig sein sollte und dadurch helfen könnte!

Ciao,
aleX!

_________________
"Ich bin ich."
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum