[] Debian 12 - Scanner wird nicht gefunden

Einrichten des lokalen Netzes, Verbindung zu anderen Computern und Diensten.
Antworten
AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 20.12.2020 18:30:34

wiki ubuntu
Rechte für USB-Scanner anpassen

Bei USB-Scannern müssen ggf. auf dem Server die Zugriffsrechte für USB-Geräte in der Datei /lib/udev/rules.d/50-udev-default.rules in einem Editor mit Root-Rechten [3] von

# libusb device nodes
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664"

in

# libusb device nodes
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0666"

geändert werden.

Achtung, auch diese Änderung kann bei einem Systemupdate überschrieben werden und muss ggf. neu gemacht werden.

Alternativ ist es auch möglich, den Benutzer[5] saned in die Gruppen plugdev und scanner aufzunehmen. Damit erhält dieser Benutzer Schreibrechte auf den Scanner. Für einige Multifunktionsgeräte kann es notwendig sein, saned ebenfalls in die Gruppe lp aufzunehmen.
Das ist aber für USB Scranner.

https://wiki.ubuntuusers.de/udev/
Standardregeln

Die Standardregeln liegen in /lib/udev/rules.d/. Einige Systemregeln, z.B. für Netzwerkkarten, sind auch unter /etc/udev/rules.d/ zu finden.
Eigene udev-Regeln

Sinn eigener Regeln

Standardmäßig werden Gerätenamen unter Linux "hochgezählt". So heißt z.B. der erste USB-Stick /dev/sdb1, der zweite /dev/sdc1. Das System kennt zunächst keinen Unterschied zwischen beiden Sticks. Das bringt einige Nachteile mit sich, wie folgende Beispiele zeigen:

Auf einer USB-Festplatte liegen .mp3-Dateien. Da die Platte immer anders eingebunden wird, wird die Sammlung vom Mediaplayer immer neu eingelesen.

Ein Gerät verschwindet plötzlich aus dem System, Gerätedateien wie z.B. /dev/cdrom funktionieren nicht mehr. Der Grund: SCSI-Geräte werden bei Fehlern einfach "hochgezählt" und fehlerhafte Gerätedateien verworfen. Ein zunächst als sr0 eingebundenes Gerät heißt nach einem Trennen der Verbindung ("disconnect") etwa sr1, und der zugehörige Verweis von /dev/cdrom auf /dev/sr0 ist dann nicht mehr verwendbar.

Ein Skript soll von oder zu einem Laufwerk kopieren (z.B. bei der Datensicherung oder beim Kopieren von SD-Karten), ohne von der Gerätebezeichnung abhängig zu sein.

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 20.12.2020 18:38:47

Standardregeln bei Debian 10 Buster:

Code: Alles auswählen

/lib/udev/rules.d# ls -la
insgesamt 736
drwxr-xr-x 2 root root  12288 Dez 15 14:49 .
drwxr-xr-x 4 root root   4096 Dez 15 14:50 ..
-rw-r--r-- 1 root root    947 Okt  8  2018 39-usbmuxd.rules
-rw-r--r-- 1 root root    998 Jan 20  2019 40-usb-media-players.rules
-rw-r--r-- 1 root root  40871 Feb 23  2018 40-usb_modeswitch.rules
-rw-r--r-- 1 root root    210 Okt 24 20:44 50-firmware.rules
-rw-r--r-- 1 root root   3679 Okt 24 20:44 50-udev-default.rules
-rw-r--r-- 1 root root   7274 Jun 21  2019 55-dm.rules
-rw-r--r-- 1 root root    921 Dez 10  2018 56-hpmud.rules
-rw-r--r-- 1 root root    626 Feb 14  2019 60-block.rules
-rw-r--r-- 1 root root   1071 Feb 14  2019 60-cdrom_id.rules
-rw-r--r-- 1 root root    413 Feb 14  2019 60-drm.rules
-rw-r--r-- 1 root root    974 Feb 14  2019 60-evdev.rules
-rw-r--r-- 1 root root    282 Feb 14  2019 60-input-id.rules
-rw-r--r-- 1 root root   7099 Feb 15  2019 60-libgphoto2-6.rules
-rw-r--r-- 1 root root   3540 Mär 23  2019 60-libsane.rules
-rw-r--r-- 1 root root    616 Feb 14  2019 60-persistent-alsa.rules
-rw-r--r-- 1 root root   2710 Feb 14  2019 60-persistent-input.rules
-rw-r--r-- 1 root root   1794 Jun 21  2019 60-persistent-storage-dm.rules
-rw-r--r-- 1 root root   6891 Feb 14  2019 60-persistent-storage.rules
-rw-r--r-- 1 root root   2135 Feb 14  2019 60-persistent-storage-tape.rules
-rw-r--r-- 1 root root    769 Feb 14  2019 60-persistent-v4l.rules
-rw-r--r-- 1 root root    727 Feb 14  2019 60-sensor.rules
-rw-r--r-- 1 root root   1190 Feb 14  2019 60-serial.rules
-rw-r--r-- 1 root root    612 Okt 24 20:44 64-btrfs.rules
-rw-r--r-- 1 root root    257 Dez  1 18:54 64-xorg-xkb.rules
-rw-r--r-- 1 root root  54624 Feb 28  2019 65-libwacom.rules
-rw-r--r-- 1 root root   4934 Jan 22  2019 69-cd-sensors.rules
-rw-r--r-- 1 root root 218001 Feb  9  2019 69-libmtp.rules
-rw-r--r-- 1 root root   1142 Jun 26  2017 69-wacom.rules
-rw-r--r-- 1 root root    432 Feb 14  2019 70-joystick.rules
-rw-r--r-- 1 root root    734 Feb 14  2019 70-mouse.rules
-rw-r--r-- 1 root root    568 Feb 14  2019 70-power-switch.rules
-rw-r--r-- 1 root root    378 Dez 27  2018 70-printers.rules
-rw-r--r-- 1 root root    473 Feb 14  2019 70-touchpad.rules
-rw-r--r-- 1 root root   2962 Mär  8  2019 70-u2f.rules
-rw-r--r-- 1 root root   2800 Okt 24 20:44 70-uaccess.rules
-rw-r--r-- 1 root root   2727 Okt 24 20:44 71-seat.rules
-rw-r--r-- 1 root root    636 Okt 24 20:44 73-seat-late.rules
-rw-r--r-- 1 root root    961 Okt 24 20:44 73-special-net-names.rules
-rw-r--r-- 1 root root    857 Okt 24 20:44 73-usb-net-by-mac.rules
-rw-r--r-- 1 root root    452 Feb 14  2019 75-net-description.rules
-rw-r--r-- 1 root root    174 Feb 14  2019 75-probe_mtd.rules
-rw-r--r-- 1 root root    626 Feb  5  2019 77-mm-cinterion-port-types.rules
-rw-r--r-- 1 root root    958 Feb  5  2019 77-mm-dell-port-types.rules
-rw-r--r-- 1 root root   7742 Feb  5  2019 77-mm-ericsson-mbm.rules
-rw-r--r-- 1 root root    608 Feb  5  2019 77-mm-fibocom-port-types.rules
-rw-r--r-- 1 root root    507 Feb  5  2019 77-mm-haier-port-types.rules
-rw-r--r-- 1 root root   2028 Feb  5  2019 77-mm-huawei-net-port-types.rules
-rw-r--r-- 1 root root  12940 Feb  5  2019 77-mm-longcheer-port-types.rules
-rw-r--r-- 1 root root   3030 Feb  5  2019 77-mm-mtk-port-types.rules
-rw-r--r-- 1 root root   1942 Feb  5  2019 77-mm-nokia-port-types.rules
-rw-r--r-- 1 root root    388 Feb  5  2019 77-mm-pcmcia-device-blacklist.rules
-rw-r--r-- 1 root root   3155 Apr 24  2018 77-mm-qdl-device-blacklist.rules
-rw-r--r-- 1 root root    401 Feb  5  2019 77-mm-sierra.rules
-rw-r--r-- 1 root root   1756 Feb  5  2019 77-mm-simtech-port-types.rules
-rw-r--r-- 1 root root   2072 Feb  5  2019 77-mm-telit-port-types.rules
-rw-r--r-- 1 root root   3218 Feb  5  2019 77-mm-ublox-port-types.rules
-rw-r--r-- 1 root root   8770 Feb  5  2019 77-mm-usb-device-blacklist.rules
-rw-r--r-- 1 root root   2482 Feb  5  2019 77-mm-usb-serial-adapters-greylist.rules
-rw-r--r-- 1 root root   3678 Feb  5  2019 77-mm-x22x-port-types.rules
-rw-r--r-- 1 root root  14720 Feb  5  2019 77-mm-zte-port-types.rules
-rw-r--r-- 1 root root   4816 Feb 14  2019 78-sound-card.rules
-rw-r--r-- 1 root root   1375 Okt 24 20:44 80-debian-compat.rules
-rw-r--r-- 1 root root    615 Feb 14  2019 80-drivers.rules
-rw-r--r-- 1 root root    190 Aug 25  2018 80-ifupdown.rules
-rw-r--r-- 1 root root   1183 Feb  1  2018 80-iio-sensor-proxy.rules
-rw-r--r-- 1 root root    277 Feb 27  2020 80-libinput-device-groups.rules
-rw-r--r-- 1 root root    972 Feb  5  2019 80-mm-candidate.rules
-rw-r--r-- 1 root root    292 Feb 14  2019 80-net-setup-link.rules
-rw-r--r-- 1 root root   9354 Feb 22  2019 80-udisks2.rules
-rw-r--r-- 1 root root     82 Okt 26  2018 85-hdparm.rules
-rw-r--r-- 1 root root   1872 Okt  5  2018 85-hplj10xx.rules
-rw-r--r-- 1 root root    204 Jan 10  2019 85-hwclock.rules
-rw-r--r-- 1 root root    256 Mär 30  2019 89-alsa-ucm.rules
-rw-r--r-- 1 root root    489 Mär 30  2019 90-alsa-restore.rules
-rw-r--r-- 1 root root    265 Okt 10  2016 90-console-setup.rules
-rw-r--r-- 1 root root    408 Feb 27  2020 90-libinput-model-quirks.rules
-rw-r--r-- 1 root root   7513 Aug 15  2019 90-pulseaudio.rules
-rw-r--r-- 1 root root    847 Apr 18  2018 95-cd-devices.rules
-rw-r--r-- 1 root root    479 Jun 21  2019 95-dm-notify.rules
-rw-r--r-- 1 root root   2624 Feb 24  2019 95-upower-csr.rules
-rw-r--r-- 1 root root   8109 Feb 24  2019 95-upower-hid.rules
-rw-r--r-- 1 root root    354 Feb 24  2019 95-upower-wup.rules
-rw-r--r-- 1 root root   1518 Mär 22  2020 97-hid2hci.rules
-rw-r--r-- 1 root root    851 Nov 10  2017 97-ofono.rules
-rw-r--r-- 1 root root   1367 Nov 10  2017 97-ofono-speedup.rules
-rw-r--r-- 1 root root   4363 Okt 24 20:44 99-systemd.rules
60-libsane.rules

Code: Alles auswählen

cat 60-libsane.rules
# This file was automatically created based on description files (*.desc)
# by sane-desc 3.5 from sane-backends 1.0.27
#
# udev rules file for supported USB and SCSI devices
#
# For the list of supported USB devices see /usr/lib/udev/hwdb.d/20-sane.hwdb
#
# The SCSI device support is very basic and includes only
# scanners that mark themselves as type "scanner" or
# SCSI-scanners from HP and other vendors that are entitled "processor"
# but are treated accordingly.
#
# If your SCSI scanner isn't listed below, you can add it to a new rules
# file under /etc/udev/rules.d/.
#
# If your scanner is supported by some external backend (brother, epkowa,
# hpaio, etc) please ask the author of the backend to provide proper
# device detection support for your OS
#
# If the scanner is supported by sane-backends, please mail the entry to
# the sane-devel mailing list (sane-devel@lists.alioth.debian.org).
#
ACTION!="add", GOTO="libsane_rules_end"

# The following rule will disable USB autosuspend for the device
ENV{DEVTYPE}=="usb_device", ENV{libsane_matched}=="yes", TEST=="power/control", ATTR{power/control}="on"

SUBSYSTEMS=="scsi", GOTO="libsane_scsi_rules_begin"
GOTO="libsane_rules_end"

LABEL="libsane_scsi_rules_begin"
KERNEL!="sg[0-9]*", GOTO="libsane_rules_end"

# Generic: SCSI device type 6 indicates a scanner
ATTRS{type}=="6", ENV{libsane_matched}="yes"

# Some scanners advertise themselves as SCSI device type 3

# Wildcard: for some Epson SCSI scanners
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="SCANNER*", ENV{libsane_matched}="yes"

# Epson Expression 800 | Epson Expression 800
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Expression800", ENV{libsane_matched}="yes"

# Epson Perfection 2450 | Epson GT-9700F | Epson Perfection 2450 PHOTO
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-9700", ENV{libsane_matched}="yes"

# Epson Perfection 3200 | Epson GT-9800F | Epson Perfection 3200 PHOTO
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-9800", ENV{libsane_matched}="yes"

# Epson GT-X900 | Epson Perfection V700 Photo | Epson Perfection V750 Photo
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-X900", ENV{libsane_matched}="yes"

# Epson Perfection 636S | Epson Perfection 1200S | Epson Perfection 1200S
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Perfection1200", ENV{libsane_matched}="yes"

# Epson Perfection 636 | Epson Perfection 636S
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Perfection636", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 4p
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1130A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet IIc
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1750A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet IIp
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1790A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet IIcx
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C2500A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 4c
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C2520A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 5p
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C5110A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 6200C
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C6270A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 6300C
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C7670A", ENV{libsane_matched}="yes"


LABEL="libsane_rules_end"
# If your SCSI scanner isn't listed below, you can add it to a new rules
# file under /etc/udev/rules.d/.
Wie setzte ich das auf meinen Fall um?

https://linuxwiki.de/LinuxHardware/Scanner#Agfa

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 20.12.2020 18:52:37

Auslesen von Informationen

Zunächst müssen möglichst eindeutige Informationen über das jeweilige Gerät ausgelesen werden.


Als Kriterien für eine udev-Regel empfiehlt sich insbesondere:

Die Seriennummer des Geräts (falls vorhanden und nicht NULL).

Die Kombination aus Herstellerkennung und Produktkennung.

Die Kombination aus Hersteller und Modellbezeichnung.

Informationen kann man auf mehrerlei Weise sammeln. Je nachdem, um was für ein Gerät es sich handelt (und wie es angeschlossen wurde), eignen sich hierfür unterschiedliche Werkzeuge. Als Universalwerkzeug kann udevadm eingesetzt werden.
https://linux.die.net/man/8/udevadm

Code: Alles auswählen

udevadm info /dev/sg3
P: /devices/pci0000:00/0000:00:1e.0/0000:18:07.0/host0/target0:0:0/0:0:0:0/scsi_generic/sg3
N: sg3
L: 0
E: DEVPATH=/devices/pci0000:00/0000:00:1e.0/0000:18:07.0/host0/target0:0:0/0:0:0:0/scsi_generic/sg3
E: DEVNAME=/dev/sg3
E: MAJOR=21
E: MINOR=3
E: SUBSYSTEM=scsi_generic
E: USEC_INITIALIZED=23134410
E: libsane_matched=yes
E: ID_PATH=pci-0000:18:07.0-scsi-0:0:0:0
E: ID_PATH_TAG=pci-0000_18_07_0-scsi-0_0_0_0
E: ID_FOR_SEAT=scsi_generic-pci-0000_18_07_0-scsi-0_0_0_0
E: TAGS=:uaccess:seat:

root@p5915:/lib/udev/rules.d# 
root@p5915:/lib/udev/rules.d# 
root@p5915:/lib/udev/rules.d# cd
root@p5915:~# udevadm info /dev/sg3
P: /devices/pci0000:00/0000:00:1e.0/0000:18:07.0/host0/target0:0:0/0:0:0:0/scsi_generic/sg3
N: sg3
L: 0
E: DEVPATH=/devices/pci0000:00/0000:00:1e.0/0000:18:07.0/host0/target0:0:0/0:0:0:0/scsi_generic/sg3
E: DEVNAME=/dev/sg3
E: MAJOR=21
E: MINOR=3
E: SUBSYSTEM=scsi_generic
E: USEC_INITIALIZED=23134410
E: libsane_matched=yes
E: ID_PATH=pci-0000:18:07.0-scsi-0:0:0:0
E: ID_PATH_TAG=pci-0000_18_07_0-scsi-0_0_0_0
E: ID_FOR_SEAT=scsi_generic-pci-0000_18_07_0-scsi-0_0_0_0
E: TAGS=:seat:uaccess:
Wie baue ich mir daraus eine udev Regel?

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 20.12.2020 19:56:37

60-libsane.rules bei Debian 10 wurde sie gegenüber Debian 9 erheblich reduziert.

Code: Alles auswählen

cat 60-libsane.rules
# This file was automatically created based on description files (*.desc)
# by sane-desc 3.5 from sane-backends 1.0.27
#
# udev rules file for supported USB and SCSI devices
#
# For the list of supported USB devices see /usr/lib/udev/hwdb.d/20-sane.hwdb
#
# The SCSI device support is very basic and includes only
# scanners that mark themselves as type "scanner" or
# SCSI-scanners from HP and other vendors that are entitled "processor"
# but are treated accordingly.
#
# If your SCSI scanner isn't listed below, you can add it to a new rules
# file under /etc/udev/rules.d/.
#
# If your scanner is supported by some external backend (brother, epkowa,
# hpaio, etc) please ask the author of the backend to provide proper
# device detection support for your OS
#
# If the scanner is supported by sane-backends, please mail the entry to
# the sane-devel mailing list (sane-devel@lists.alioth.debian.org).
#
ACTION!="add", GOTO="libsane_rules_end"

# The following rule will disable USB autosuspend for the device
ENV{DEVTYPE}=="usb_device", ENV{libsane_matched}=="yes", TEST=="power/control", ATTR{power/control}="on"

SUBSYSTEMS=="scsi", GOTO="libsane_scsi_rules_begin"
GOTO="libsane_rules_end"

LABEL="libsane_scsi_rules_begin"
KERNEL!="sg[0-9]*", GOTO="libsane_rules_end"

# Generic: SCSI device type 6 indicates a scanner
ATTRS{type}=="6", ENV{libsane_matched}="yes"

# Some scanners advertise themselves as SCSI device type 3

# Wildcard: for some Epson SCSI scanners
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="SCANNER*", ENV{libsane_matched}="yes"

# Epson Expression 800 | Epson Expression 800
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Expression800", ENV{libsane_matched}="yes"

# Epson Perfection 2450 | Epson GT-9700F | Epson Perfection 2450 PHOTO
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-9700", ENV{libsane_matched}="yes"

# Epson Perfection 3200 | Epson GT-9800F | Epson Perfection 3200 PHOTO
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-9800", ENV{libsane_matched}="yes"

# Epson GT-X900 | Epson Perfection V700 Photo | Epson Perfection V750 Photo
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-X900", ENV{libsane_matched}="yes"

# Epson Perfection 636S | Epson Perfection 1200S | Epson Perfection 1200S
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Perfection1200", ENV{libsane_matched}="yes"

# Epson Perfection 636 | Epson Perfection 636S
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Perfection636", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 4p
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1130A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet IIc
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1750A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet IIp
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1790A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet IIcx
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C2500A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 4c
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C2520A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 5p
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C5110A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 6200C
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C6270A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 6300C
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C7670A", ENV{libsane_matched}="yes"


LABEL="libsane_rules_end"
99-systemd.rules

Code: Alles auswählen

cat 99-systemd.rules
#  SPDX-License-Identifier: LGPL-2.1+
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

ACTION=="remove", GOTO="systemd_end"

SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270/tty[0-9]*", TAG+="systemd"
KERNEL=="vport*", TAG+="systemd"

SUBSYSTEM=="ubi", TAG+="systemd"

SUBSYSTEM=="block", TAG+="systemd"
SUBSYSTEM=="block", ACTION=="add", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0"

# Ignore encrypted devices with no identified superblock on it, since
# we are probably still calling mke2fs or mkswap on it.
SUBSYSTEM=="block", ENV{DM_UUID}=="CRYPT-*", ENV{ID_PART_TABLE_TYPE}=="", ENV{ID_FS_USAGE}=="", ENV{SYSTEMD_READY}="0"

# add symlink to GPT root disk
SUBSYSTEM=="block", ENV{ID_PART_GPT_AUTO_ROOT}=="1", ENV{ID_FS_TYPE}!="crypto_LUKS", SYMLINK+="gpt-auto-root"
SUBSYSTEM=="block", ENV{ID_PART_GPT_AUTO_ROOT}=="1", ENV{ID_FS_TYPE}=="crypto_LUKS", SYMLINK+="gpt-auto-root-luks"
SUBSYSTEM=="block", ENV{DM_UUID}=="CRYPT-*", ENV{DM_NAME}=="root", SYMLINK+="gpt-auto-root"

# Ignore raid devices that are not yet assembled and started
SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", TEST!="md/array_state", ENV{SYSTEMD_READY}="0"
SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0"

# Ignore loop devices that don't have any file attached
SUBSYSTEM=="block", KERNEL=="loop[0-9]*", ENV{DEVTYPE}=="disk", TEST!="loop/backing_file", ENV{SYSTEMD_READY}="0"

# Ignore nbd devices until the PID file exists (which signals a connected device)
SUBSYSTEM=="block", KERNEL=="nbd*", ENV{DEVTYPE}=="disk", TEST!="pid", ENV{SYSTEMD_READY}="0"

# We need a hardware independent way to identify network devices. We
# use the /sys/subsystem/ path for this. Kernel "bus" and "class" names
# should be treated as one namespace, like udev handles it. This is mostly
# just an identification string for systemd, so whether the path actually is
# accessible or not does not matter as long as it is unique and in the
# filesystem namespace.
#
# http://cgit.freedesktop.org/systemd/systemd/tree/src/libudev/libudev-enumerate.c#n955

SUBSYSTEM=="net", KERNEL!="lo", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsystem/net/devices/$name"
SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsystem/bluetooth/devices/%k"

SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_WANTS}+="bluetooth.target"
ENV{ID_SMARTCARD_READER}=="?*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="smartcard.target"
SUBSYSTEM=="sound", KERNEL=="card*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sound.target"

SUBSYSTEM=="printer", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target"
SUBSYSTEM=="usb", KERNEL=="lp*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target"

# Apply sysctl variables to network devices (and only to those) as they appear.
ACTION=="add", SUBSYSTEM=="net", KERNEL!="lo", RUN+="/lib/systemd/systemd-sysctl --prefix=/net/ipv4/conf/$name --prefix=/net/ipv4/neigh/$name --prefix=/net/ipv6/conf/$name --prefix=/net/ipv6/neigh/$name"

# Pull in backlight save/restore for all backlight devices and
# keyboard backlights
SUBSYSTEM=="backlight", TAG+="systemd", IMPORT{builtin}="path_id", ENV{SYSTEMD_WANTS}+="systemd-backlight@backlight:$name.service"
SUBSYSTEM=="leds", KERNEL=="*kbd_backlight", TAG+="systemd", IMPORT{builtin}="path_id", ENV{SYSTEMD_WANTS}+="systemd-backlight@leds:$name.service"

# Pull in rfkill save/restore for all rfkill devices
SUBSYSTEM=="rfkill", ENV{SYSTEMD_RFKILL}="1"
SUBSYSTEM=="rfkill", IMPORT{builtin}="path_id"
SUBSYSTEM=="misc", KERNEL=="rfkill", TAG+="systemd", ENV{SYSTEMD_WANTS}+="systemd-rfkill.socket"

# Asynchronously mount file systems implemented by these modules as soon as they are loaded.
SUBSYSTEM=="module", KERNEL=="fuse", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sys-fs-fuse-connections.mount"
SUBSYSTEM=="module", KERNEL=="configfs", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sys-kernel-config.mount"

LABEL="systemd_end"
Zuletzt geändert von AxelMD am 20.12.2020 20:20:13, insgesamt 1-mal geändert.

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 20.12.2020 20:11:23

Es scheint so als wenn ich jetzt die richtige udev Regel habe.
:-)

Die Lösung:

Code: Alles auswählen

 cat 60-libsane.rules     
cat: 60-libsane.rules: Datei oder Verzeichnis nicht gefunden
root@p5915:~# cat  /lib/udev/rules.d/60-libsane.rules  
# This file was automatically created based on description files (*.desc)
# by sane-desc 3.5 from sane-backends 1.0.27
#
# udev rules file for supported USB and SCSI devices
#
# For the list of supported USB devices see /usr/lib/udev/hwdb.d/20-sane.hwdb
#
# The SCSI device support is very basic and includes only
# scanners that mark themselves as type "scanner" or
# SCSI-scanners from HP and other vendors that are entitled "processor"
# but are treated accordingly.
#
# If your SCSI scanner isn't listed below, you can add it to a new rules
# file under /etc/udev/rules.d/.
#
# If your scanner is supported by some external backend (brother, epkowa,
# hpaio, etc) please ask the author of the backend to provide proper
# device detection support for your OS
#
# If the scanner is supported by sane-backends, please mail the entry to
# the sane-devel mailing list (sane-devel@lists.alioth.debian.org).
#
ACTION!="add", GOTO="libsane_rules_end"

# The following rule will disable USB autosuspend for the device
ENV{DEVTYPE}=="usb_device", ENV{libsane_matched}=="yes", TEST=="power/control", ATTR{power/control}="on"

SUBSYSTEMS=="scsi", GOTO="libsane_scsi_rules_begin"
GOTO="libsane_rules_end"

LABEL="libsane_scsi_rules_begin"
KERNEL!="sg[0-9]*", GOTO="libsane_rules_end"

# Generic: SCSI device type 6 indicates a scanner
ATTRS{type}=="6", ENV{libsane_matched}="yes"

# Some scanners advertise themselves as SCSI device type 3

# Wildcard: for some Epson SCSI scanners
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="SCANNER*", ENV{libsane_matched}="yes"

# Epson Expression 800 | Epson Expression 800
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Expression800", ENV{libsane_matched}="yes"

# Epson Perfection 2450 | Epson GT-9700F | Epson Perfection 2450 PHOTO
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-9700", ENV{libsane_matched}="yes"

# Epson Perfection 3200 | Epson GT-9800F | Epson Perfection 3200 PHOTO
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-9800", ENV{libsane_matched}="yes"

# Epson GT-X900 | Epson Perfection V700 Photo | Epson Perfection V750 Photo
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-X900", ENV{libsane_matched}="yes"

# Epson Perfection 636S | Epson Perfection 1200S | Epson Perfection 1200S
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Perfection1200", ENV{libsane_matched}="yes"

# Epson Perfection 636 | Epson Perfection 636S
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Perfection636", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 4p
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1130A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet IIc
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1750A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet IIp
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1790A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet IIcx
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C2500A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 4c
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C2520A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 5p
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C5110A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 6200C
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C6270A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 6300C
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C7670A", ENV{libsane_matched}="yes"

# scsi device `snapscan:/dev/sg2' is a AGFA SNAPSCAN 310 flatbed scanner
ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}"


LABEL="libsane_rules_end"

Das folgende ist der nano /lib/udev/rules.d/60-libsane.rules hinzuzufügen:
# scsi device `snapscan:/dev/sg2' is a AGFA SNAPSCAN 310 flatbed scanner
ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}"

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [gelöst] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 21.12.2020 01:13:38

Nach(t)arbeit

https://www.photoinfos.com/Scanner/agfasnapscan.htm

http://www.sane-project.org/man/sane-snapscan.5.html
http://www.sane-project.org/man/sane-scsi.5.html

https://manpages.debian.org/buster/libs ... .5.en.html
DESCRIPTION
The sane-snapscan library implements a SANE (Scanner Access Now Easy) backend that provides access to AGFA SnapScan flatbed scanners. At present, the following scanners are supported from this backend: AGFA SnapScan 300, 310, 600, and 1236s, 1236u, 1212u, e20, e25, e40, e50, e60, Vuego 310s, Acer 300f, 310s, 610s, 610plus, Prisa 620s, Prisa 620u, Prisa 620ut, Prisa 640u, Prisa 640bu, Prisa 1240, Prisa 3300, Prisa 4300, Prisa 5300 and Guillemot Maxi Scan A4 Deluxe (SCSI) (with varying success).
https://manpages.debian.org/buster/libs ... .5.en.html
GENERAL INFO
For scanners with a SCSI interface, it may be necessary to edit the appropriate backend configuration file before using SANE for the first time. For most systems, the configuration file should list the name of the generic SCSI device that the scanner is connected to (e.g., under Linux, /dev/sg4 or /dev/sge is such a generic SCSI device). It is customary to create a symlink from /dev/scanner to the generic SCSI device that the scanner is connected to. In this case, the configuration file simply lists the line /dev/scanner. For a detailed description of each backend's configuration file, please refer to the relevant backend manual page (e.g., sane-epson(5) for Epson scanners, sane-hp(5) for HP scanners, etc.).
scsi VENDOR MODEL TYPE BUS CHANNEL ID LUN

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [gelöst] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 21.12.2020 11:33:27

udevadm

https://linux.die.net/man/8/udevadm

Code: Alles auswählen

scanimage -L
device `snapscan:/dev/sg2' is a AGFA SNAPSCAN 310 flatbed scanner

Code: Alles auswählen

udevadm info --query=all --attribute-walk --name=/dev/sg2

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/pci0000:00/0000:00:1e.0/0000:18:07.0/host0/target0:0:0/0:0:0:0/scsi_generic/sg2':
    KERNEL=="sg2"
    SUBSYSTEM=="scsi_generic"
    DRIVER==""

  looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:18:07.0/host0/target0:0:0/0:0:0:0':
    KERNELS=="0:0:0:0"
    SUBSYSTEMS=="scsi"
    DRIVERS==""
    ATTRS{evt_mode_parameter_change_reported}=="0"
    ATTRS{dh_state}=="detached"
    ATTRS{evt_media_change}=="0"
    ATTRS{state}=="running"
    ATTRS{ioerr_cnt}=="0x0"
    ATTRS{evt_soft_threshold_reached}=="0"
    ATTRS{device_blocked}=="0"
    ATTRS{queue_depth}=="2"
    ATTRS{iodone_cnt}=="0x18"
    ATTRS{evt_capacity_change_reported}=="0"
    ATTRS{iocounterbits}=="32"
    ATTRS{model}=="SNAPSCAN 310    "
    ATTRS{scsi_level}=="3"
    ATTRS{timeout}=="30"
    ATTRS{queue_type}=="none"
    ATTRS{blacklist}==""
    ATTRS{rev}=="2.00"
    ATTRS{type}=="6"
    ATTRS{iorequest_cnt}=="0x18"
    ATTRS{evt_inquiry_change_reported}=="0"
    ATTRS{evt_lun_change_reported}=="0"
    ATTRS{device_busy}=="0"
    ATTRS{vendor}=="AGFA    "
    ATTRS{eh_timeout}=="10"

  looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:18:07.0/host0/target0:0:0':
    KERNELS=="target0:0:0"
    SUBSYSTEMS=="scsi"
    DRIVERS==""

  looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:18:07.0/host0':
    KERNELS=="host0"
    SUBSYSTEMS=="scsi"
    DRIVERS==""

  looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:18:07.0':
    KERNELS=="0000:18:07.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="aic7xxx"
    ATTRS{irq}=="21"
    ATTRS{d3cold_allowed}=="1"
    ATTRS{ari_enabled}=="0"
    ATTRS{revision}=="0x03"
    ATTRS{device}=="0x5078"
    ATTRS{vendor}=="0x9004"
    ATTRS{subsystem_device}=="0x7850"
    ATTRS{dma_mask_bits}=="32"
    ATTRS{local_cpulist}=="0-1"
    ATTRS{local_cpus}=="3"
    ATTRS{broken_parity_status}=="0"
    ATTRS{enable}=="1"
    ATTRS{driver_override}=="(null)"
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{numa_node}=="-1"
    ATTRS{msi_bus}=="1"
    ATTRS{class}=="0x010000"
    ATTRS{subsystem_vendor}=="0x9004"

  looking at parent device '/devices/pci0000:00/0000:00:1e.0':
    KERNELS=="0000:00:1e.0"
    SUBSYSTEMS=="pci"
    DRIVERS==""
    ATTRS{subordinate_bus_number}=="24"
    ATTRS{d3cold_allowed}=="0"
    ATTRS{class}=="0x060401"
    ATTRS{secondary_bus_number}=="24"
    ATTRS{broken_parity_status}=="0"
    ATTRS{driver_override}=="(null)"
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{local_cpulist}=="0-1"
    ATTRS{dma_mask_bits}=="32"
    ATTRS{ari_enabled}=="0"
    ATTRS{enable}=="1"
    ATTRS{local_cpus}=="3"
    ATTRS{numa_node}=="-1"
    ATTRS{device}=="0x244e"
    ATTRS{revision}=="0xf2"
    ATTRS{subsystem_vendor}=="0x1734"
    ATTRS{subsystem_device}=="0x10b6"
    ATTRS{msi_bus}=="1"
    ATTRS{vendor}=="0x8086"
    ATTRS{irq}=="0"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""
Was ist nun was für?

Code: Alles auswählen

scsi VENDOR MODEL TYPE BUS CHANNEL ID LUN
VENDOR ---> ATTRS{vendor}=="AGFA "

MODEL ---> ATTRS{model}=="SNAPSCAN 310 "

TYPE ----> ATTRS{type}=="6"

BUS ---->

CHANNEL ---->

ID ----->

LUN ----> ATTRS{evt_lun_change_reported}=="0" richtig???



AxelMD udevregel

Code: Alles auswählen

# AGFA SNAPSCAN 310 flatbed scanner
ATTRS{type}=="6", ATTRS{vendor}=="AGFA ", ATTRS{model}=="SNAPSCAN 310 ", ENV{libsane_matched}="yes"
für /lib/udev/rules.d/60-libsane.rules
Zuletzt geändert von AxelMD am 21.12.2020 12:38:22, insgesamt 3-mal geändert.

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [gelöst] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 21.12.2020 11:52:13

Wie finde ich die fehlenden Attribute?

BUS
CHANNEL
ID
LUN

Oder genügen die bekannten Attribute?
Hat die ein Scanner evtl. fehlenden Attribute gar nicht?


Wodurch unterscheiden sich folgende 2 Lösungen?

Lösung 1

Code: Alles auswählen

# scsi device `snapscan:/dev/sg2' is a AGFA SNAPSCAN 310 flatbed scanner
ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}"
Lösung 2

Code: Alles auswählen

# AGFA SNAPSCAN 310 flatbed scanner
ATTRS{type}=="6", ATTRS{vendor}=="AGFA ", ATTRS{model}=="SNAPSCAN 310 ", ENV{libsane_matched}="yes"

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 21.12.2020 15:54:07

Hallo, irgendwas stimmt am System nicht.

Jetzt kann ich den Scanner nicht mehr im Netzwerk nutzen.
Die mitscherdinger Teillösung "chown saned:saned /dev/sg2" hilft auch nicht mehr.

Mein Debian 9 (Kernel 4.19.0-0.bpo.11-amd64)
System läuft dagegen stabil, der Scanner kann im Netzwerk genutzt werden.
Image von Debian 9 eingespielt und alles ok.

Ein hin und her hier.

Gestern Abend war alles so schön, selbst das Image von dem "vermeintlichen" Erfolg von gestern kann es nicht richten.

Irgend wie doof, wenn man nicht genügend Plan hat.

Warum der ist der Scanner bei Debian 10 /dev/sg2 und bei Debian 9 /dev/sg3?
Kann man da etwas stellen?

Code: Alles auswählen

Debian 10
 
 looking at device '/devices/pci0000:00/0000:00:1e.0/0000:18:07.0/host0/target0:0:0/0:0:0:0/scsi_generic/sg2':
    KERNEL=="sg2"
    SUBSYSTEM=="scsi_generic"
    DRIVER==""
    
    
Debian 9

 looking at device '/devices/pci0000:00/0000:00:1e.0/0000:18:07.0/host0/target0:0:0/0:0:0:0/scsi_generic/sg3':
    KERNEL=="sg3"
    SUBSYSTEM=="scsi_generic"
    DRIVER==""
22. Dezember 2020
Ein Dualbootsystem Debian_9 / Debian_10 habe ich jetzt.
Mit Debian_10 kann nicht über das Netzwerk auf den Scanner zugegriffen werden.

Für weitere Hinweise bin ich dankbar.

MfG
AxelMd

mellinger
Beiträge: 14
Registriert: 23.12.2020 14:54:15

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von mellinger » 23.12.2020 14:57:58

Ich denke, Dein Problem hängt mit diesem Bug in Debian 10 zusammen:

https://linux.debian.bugs.dist.narkive. ... usb-device

Grüße,
Jürgen

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 23.12.2020 15:20:38

Hallo, danke.

Keine Lösung zur Zeit?

Ob man da etwas mit einem Docker Container oder Flatpak stricken kann?
Der Bug ist ja schon etwas älter.

Code: Alles auswählen

I experience the same problem with 1.0.27-3.2.
Inspecting the udev rules, I found that the file 60-libsane.rules is missing a line to apply permissions to the device if it has been recognized.
Such a line is present towards the file’s end in older versions:

ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}"

Putting this line into a file /etc/udev/rules.d/65-libsane.rules allows scanners to be recognized normally after a reboot.
Das sollte bei mir auch passen?

Kann man mit Docker oder Flatpak auf einen SCSI Bus zugreifen?

http://www.sane-project.org/source.html

Wie baut man einen Backport, kann hier jemand?

MfG
AxelMD

mellinger
Beiträge: 14
Registriert: 23.12.2020 14:54:15

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von mellinger » 23.12.2020 15:39:34

Der Bug ist ja schon etwas älter.
Er bezieht sich auf die libsane-Version in Debian 10.

Code: Alles auswählen

scanimage --version
zeigt die aktuelle Version an.

Grüße,
Jürgen

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 23.12.2020 15:45:12

libsane ist jetzt auch libsane1, soweit ich das gelesen haben.

Dann wieder gibt es in sid nur Paket: libsane (1.0.31-4), ich verstehe das alles nicht.

Da dann libsane1 (version 1.0.31-4)

https://bugs.debian.org/cgi-bin/pkgrepo ... t=unstable


Kann ich irgendwie eine vorherige Version von libsane einbauen?

Z. B. die von Debian 9 Stretch?

mellinger
Beiträge: 14
Registriert: 23.12.2020 14:54:15

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von mellinger » 23.12.2020 16:03:14

Ich würde erst mal den Fix aus dem Bugreport probieren. Bei mir hat das funktioniert.

Grüße,
Jürgen

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 23.12.2020 16:07:11

Welcher Bugreport ist gemeint?

Was meinst Du da konkret, ich habe einen SCSI Scanner?

Mit Bug-Reporten und Fixen kenne ich mich nicht aus.

Meinst Du das:

Code: Alles auswählen

It seems to me that the /lib/udev/rules.d/60-libsane.rules file should contain
an action line such as

ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}"

but i cannot find in my system version of this file.
Wenn ja, das hatte ich schon ausprobiert, funktioniert aber nicht mehr: viewtopic.php?f=30&t=176958&p=1259177#p1258865

Oder siehe auch hier: viewtopic.php?f=30&t=176958&start=105#p1258665

mellinger
Beiträge: 14
Registriert: 23.12.2020 14:54:15

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von mellinger » 23.12.2020 16:49:45

Wenn Du, wie im Bugreport beschrieben, die fehlende Zeile nachgetragen hast, sollte Dein Scanner von der Gruppe "scanner" benutzbar sein.

Code: Alles auswählen

getfacl /dev/sg2
sollte anzeigen: group rw-, group scanner.
Dann musst Du nur noch Deinen Benutzer in die Gruppe scanner aufnehmen:

Code: Alles auswählen

usermod -a -G scanner <benutzer>
.

Grüße,
Jürgen

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 23.12.2020 17:02:39

Hallo mellinger,

welchen Bug Report meinst Du konkret, hast Du bitte den Link?

Was meinst Du mit?

Code: Alles auswählen

getfacl /dev/sg2
Mein Debian 10 ist gebootet.
Zuletzt geändert von AxelMD am 23.12.2020 19:17:14, insgesamt 1-mal geändert.

mellinger
Beiträge: 14
Registriert: 23.12.2020 14:54:15

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von mellinger » 23.12.2020 17:07:56

Ich meine den Bugreport, den ich selbst verlinkt habe. Du hast die entscheidende Stelle hier zitiert:
viewtopic.php?f=30&t=176958&start=135#p1259177
Was meinst Du mit?

Code: Alles auswählen

getfacl /dev/sg2
Du sollst das in Dein Terminal eingeben, was sonst?

Grüße,
Jürgen

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 23.12.2020 17:27:43

Hallo,

das habe ich wieder mal getan:

Code: Alles auswählen

 
scanimage -L
device `snapscan:/dev/sg2' is a AGFA SNAPSCAN 310 flatbed scanner

Fehlende Zeile:
# scsi device `snapscan:/dev/sg2' is a AGFA SNAPSCAN 310 flatbed scanner
ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}"

Sieht dann so aus:
cat /lib/udev/rules.d/60-libsane.rules 

# This file was automatically created based on description files (*.desc)
# by sane-desc 3.5 from sane-backends 1.0.27
#
# udev rules file for supported USB and SCSI devices
#
# For the list of supported USB devices see /usr/lib/udev/hwdb.d/20-sane.hwdb
#
# The SCSI device support is very basic and includes only
# scanners that mark themselves as type "scanner" or
# SCSI-scanners from HP and other vendors that are entitled "processor"
# but are treated accordingly.
#
# If your SCSI scanner isn't listed below, you can add it to a new rules
# file under /etc/udev/rules.d/.
#
# If your scanner is supported by some external backend (brother, epkowa,
# hpaio, etc) please ask the author of the backend to provide proper
# device detection support for your OS
#
# If the scanner is supported by sane-backends, please mail the entry to
# the sane-devel mailing list (sane-devel@lists.alioth.debian.org).
#
ACTION!="add", GOTO="libsane_rules_end"

# The following rule will disable USB autosuspend for the device
ENV{DEVTYPE}=="usb_device", ENV{libsane_matched}=="yes", TEST=="power/control", ATTR{power/control}="on"

SUBSYSTEMS=="scsi", GOTO="libsane_scsi_rules_begin"
GOTO="libsane_rules_end"

LABEL="libsane_scsi_rules_begin"
KERNEL!="sg[0-9]*", GOTO="libsane_rules_end"

# Generic: SCSI device type 6 indicates a scanner
ATTRS{type}=="6", ENV{libsane_matched}="yes"

# Some scanners advertise themselves as SCSI device type 3

# Wildcard: for some Epson SCSI scanners
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="SCANNER*", ENV{libsane_matched}="yes"

# Epson Expression 800 | Epson Expression 800
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Expression800", ENV{libsane_matched}="yes"

# Epson Perfection 2450 | Epson GT-9700F | Epson Perfection 2450 PHOTO
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-9700", ENV{libsane_matched}="yes"

# Epson Perfection 3200 | Epson GT-9800F | Epson Perfection 3200 PHOTO
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-9800", ENV{libsane_matched}="yes"

# Epson GT-X900 | Epson Perfection V700 Photo | Epson Perfection V750 Photo
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="GT-X900", ENV{libsane_matched}="yes"

# Epson Perfection 636S | Epson Perfection 1200S | Epson Perfection 1200S
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Perfection1200", ENV{libsane_matched}="yes"

# Epson Perfection 636 | Epson Perfection 636S
ATTRS{type}=="3", ATTRS{vendor}=="EPSON", ATTRS{model}=="Perfection636", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 4p
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1130A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet IIc
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1750A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet IIp
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C1790A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet IIcx
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C2500A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 4c
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C2520A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 5p
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C5110A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 6200C
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C6270A", ENV{libsane_matched}="yes"

# Hewlett-Packard ScanJet 6300C
ATTRS{type}=="3", ATTRS{vendor}=="HP", ATTRS{model}=="C7670A", ENV{libsane_matched}="yes"

# scsi device `snapscan:/dev/sg2' is a AGFA SNAPSCAN 310 flatbed scanner
ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}"

LABEL="libsane_rules_end"



usermod -a -G scanner axel

Ein Reboot von Debian 10

dann wieder 
 scanimage -L
device `snapscan:/dev/sg2' is a AGFA SNAPSCAN 310 flatbed scanner





Auf dem Client Auf dem Client Auf dem Client


sudo scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).


dann noch mal

Code: Alles auswählen

getfacl /dev/sg2
getfacl: Entferne führende '/' von absoluten Pfadnamen
# file: dev/sg2
# owner: root
# group: root
user::rw-
user:sddm:rw-
group::---
group:scanner:rw-
mask::rw-
other::---
dann korrigiert

Code: Alles auswählen

 getfacl dev/sg2
getfacl: dev/sg2: Datei oder Verzeichnis nicht gefunden

Für den Debian 10 Server mit Scanner [scanimage (sane-backends) 1.0.27; backend version 1.0.27]:

https://help.ubuntu.com/community/sane_Troubleshooting

https://help.ubuntu.com/community/sane_ ... dev_tricks

Fehlt irgendwie ein Symlink?

Wie überprüfe ich die udev Regel?
Zuletzt geändert von AxelMD am 23.12.2020 17:57:43, insgesamt 1-mal geändert.

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 23.12.2020 17:54:39

Debian 9 gebootet und auf dem Client
sudo scanimage -L
device `net:192.168.178.21:snapscan:/dev/sg2' is a AGFA SNAPSCAN 310 flatbed scanner

Taja, und nun, wie weiter mit Debian 10?

mellinger
Beiträge: 14
Registriert: 23.12.2020 14:54:15

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von mellinger » 23.12.2020 18:16:37

Auf dem Server folgendes eingeben:

Code: Alles auswählen

 systemctl status saned

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 23.12.2020 18:36:19

Code: Alles auswählen

Debian 10 Buster


root@p5:~# scanimage -L
device `snapscan:/dev/sg3' is a AGFA SNAPSCAN 310 flatbed scanner

root@p5:~#  systemctl status saned.service
● saned.service
   Loaded: masked (Reason: Unit saned.service is masked.)
   Active: inactive (dead)
root@p5:~#  systemctl start saned.service
Failed to start saned.service: Unit saned.service is masked.
root@p5:~#  systemctl start saned.service
Failed to start saned.service: Unit saned.service is masked.
root@p5:~# 
root@p5:~# 
root@p5:~#  systemctl status saned.service
● saned.service
   Loaded: masked (Reason: Unit saned.service is masked.)
   Active: inactive (dead)
root@p5:~#  systemctl start saned.service
Failed to start saned.service: Unit saned.service is masked.
root@p5:~# 

Kleinproblemlösung:

Code: Alles auswählen


root@p5:~#  systemctl status saned.service
● saned.service
   Loaded: masked (Reason: Unit saned.service is masked.)
   Active: inactive (dead)
root@p5:~#  systemctl start saned.service   
Failed to start saned.service: Unit saned.service is masked.
root@p5:~# systemctl start saned.socket
root@p5:~#  systemctl status saned.service 
● saned.service
   Loaded: masked (Reason: Unit saned.service is masked.)
   Active: inactive (dead)
root@p5:~# systemctl start saned.socket   
root@p5:~# systemctl statis saned.socket  
Unknown operation statis.
root@p5:~# systemctl statuss saned.socket 
Unknown operation statuss.
root@p5:~# systemctl status saned.socket 
● saned.socket - saned incoming socket
   Loaded: loaded (/lib/systemd/system/saned.socket; enabled; vendor preset: enabled)
   Active: active (listening) since Wed 2020-12-23 19:31:57 CET; 53min left
   Listen: [::]:6566 (Stream)
 Accepted: 0; Connected: 0;
    Tasks: 0 (limit: 4678)
   Memory: 28.0K
   CGroup: /system.slice/saned.socket

Dez 23 19:31:57 p5 systemd[1]: Listening on saned incoming socket.
root@p5:~# systemctl enable saned.socket
root@p5:~#  systemctl status saned.service
● saned.service
   Loaded: masked (Reason: Unit saned.service is masked.)
   Active: inactive (dead)
root@p5:~#  systemctl start saned.service
Failed to start saned.service: Unit saned.service is masked.
root@p5:~#  systemctl start saned.service
Failed to start saned.service: Unit saned.service is masked.
root@p5:~# systemctl start saned.socket
root@p5:~#  systemctl start saned.service
Failed to start saned.service: Unit saned.service is masked.
root@p5:~# systemctl start saned.socket
root@p5:~# systemctl status saned.socket
● saned.socket - saned incoming socket
   Loaded: loaded (/lib/systemd/system/saned.socket; enabled; vendor preset: enabled)
   Active: active (listening) since Wed 2020-12-23 19:31:57 CET; 49min left
   Listen: [::]:6566 (Stream)
 Accepted: 1; Connected: 0;
    Tasks: 0 (limit: 4678)
   Memory: 68.0K
   CGroup: /system.slice/saned.socket

Dez 23 19:31:57 p5 systemd[1]: Listening on saned incoming socket.
root@p5:~# systemctl status saned.service
● saned.service
   Loaded: masked (Reason: Unit saned.service is masked.)
   Active: inactive (dead)
root@p5:~# 

Auf dem Client:

Code: Alles auswählen

sudo scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).


https://askubuntu.com/questions/1122426 ... needed-for

mellinger
Beiträge: 14
Registriert: 23.12.2020 14:54:15

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von mellinger » 23.12.2020 19:35:09

Code: Alles auswählen

sudo systemctl unmask saned.socket
sudo systemctl enable saned.socket
systemctl enable saned.service

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 24.12.2020 08:32:30

Hallo Mellinger,

eine frohes Fest wünsche ich.

Auf dem Debian 10 Server:

Code: Alles auswählen

axel@p5:~$ su -
Passwort: 
root@p5:~# scanimage -L
device `snapscan:/dev/sg3' is a AGFA SNAPSCAN 310 flatbed scanner

root@p5:~# uname -r
4.19.0-13-amd64

root@p5:~# systemctl unmask saned.socket
root@p5:~# systemctl enable saned.socket
root@p5:~# systemctl enable saned.service
Synchronizing state of saned.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable saned
Failed to enable unit: Unit file /lib/systemd/system/saned.service is masked.

root@p5:~# scanimage -L
device `snapscan:/dev/sg3' is a AGFA SNAPSCAN 310 flatbed scanner
root@p5:~# 
Jetzt /dev/sg2 in /dev/sg3 geändert, aktiv habe ich nichts geändert.

Auf dem Client (funktioniert ansonsten mit Debian 9, IP-Adressen identisch)

Code: Alles auswählen

sudo scanimage -L
[sudo] Passwort für axel: 

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).

MfG
AxelMD
Zuletzt geändert von AxelMD am 24.12.2020 09:29:20, insgesamt 1-mal geändert.

AxelMD
Beiträge: 1350
Registriert: 15.03.2009 08:02:11

Re: [] Debian 10 - Netzwerkscanner wird nicht gefunden

Beitrag von AxelMD » 24.12.2020 08:44:23

Debian 10 Image vom 21. Dezember 2020 eingespielt.

Code: Alles auswählen

scanimage -L
device `snapscan:/dev/sg2' is a AGFA SNAPSCAN 310 flatbed scanner
Jetzt ist der Scanner wieder /dev/sg2

Die /lib/udev/rules.d/60-libsane.rules ist wieder auf dem Originalzustand von Debian 10.
Es fehlt der Eintrag:

Code: Alles auswählen

# scsi device `snapscan:/dev/sg2' is a AGFA SNAPSCAN 310 flatbed scanner
ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}"
Wo setze ich jetzt wieder an?

Ist meine selbst ermittelt udev Regel (AxelMD udevregel) richtig? --> viewtopic.php?f=30&t=176958&start=135#p1258897

Antworten