hidraw fest zuordnen

Wenn mehr als ein Gerät an den Raspberry angeschlossen werden sollen. Z.B. ein Regler und ein Wechselrichter oder mehrere Wechselrichter. Das Maximum sind 6 Geräte pro Raspberry Pi.

Moderator: Ulrich

Antworten
Benutzeravatar
sralus
Beiträge: 38
Registriert: Mi 21. Sep 2022, 00:04
Hat sich bedankt: 6 Mal

hidraw fest zuordnen

Beitrag von sralus »

Hallo

Ich habe zwei USB Geräte die eine Hidraw schnitstelle benutzen.
Ich möchte diesen Geräten gerne eine feste zuornung geben.
Die ausgabe von : sudo udevadm info -q path -n /dev/hidraw0 ist:
/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.0/0003:0665:5161.0001/hidraw/hidraw0
und von : sudo udevadm info -q path -n /dev/hidraw1
/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:0665:5161.0002/hidraw/hidraw1

dmesg | grep hid
hid: raw HID events driver (C) Jiri Kosina
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
hid-Wortzensur 0003:0665:5161.0001: hiddev96,hidraw0: USB HID v1.11 Device [HID 0665:5161] on usb-0000:01:00.0-1.1/input0
hid-Wortzensur 0003:0665:5161.0002: hiddev97,hidraw1: USB HID v1.11 Device [HID 0665:5161] on usb-0000:01:00.0-1.4/input0

Wie kann ich eine regel erstellen damit diese USB Geräte immer HID1 und HID2 bleiben ?


MFG
Sralus

TeamO
Beiträge: 713
Registriert: Mo 22. Jun 2020, 08:58
Hat sich bedankt: 8 Mal
Danksagung erhalten: 121 Mal

Re: hidraw fest zuordnen

Beitrag von TeamO »

Du kannst den angeschlossenen Geräten einen festen USB-Port zuweisen. Solange das jeweilige Gerät an dem entsprechenden USB-Port angeschlossen ist, bekommt es immer denselben Namen.

solarfanenrico
Beiträge: 655
Registriert: Mi 20. Jan 2021, 19:49
Hat sich bedankt: 34 Mal
Danksagung erhalten: 52 Mal

Re: hidraw fest zuordnen

Beitrag von solarfanenrico »

Hallo Timo,
nach meinen Erfahrungen stimmt dies so nicht ganz.
Die Zuordnung bleibt nur solange, der Pi aktiv ist. Gibt es irgendwelche Probleme, und man rebootet ihn, z.B mit zusätzlich angeschlossener Maus, oder ein anderes Gerät mit diesem Protokoll, wird HIDRAW neu geordnet.

Besser ist es den USB-Ports nach Steckplatz geordnet "SYMLINKS" zuzuordnen.

So hatte ich es mal im Webinstaller eingebaut. Die meisten Nutzer waren damit zufrieden.

Enrico

Benutzeravatar
sralus
Beiträge: 38
Registriert: Mi 21. Sep 2022, 00:04
Hat sich bedankt: 6 Mal

Re: hidraw fest zuordnen

Beitrag von sralus »

hi
Könntest du mir evtl. sagen wie du das gemacht hast ...

MFG
Sralus

TeamO
Beiträge: 713
Registriert: Mo 22. Jun 2020, 08:58
Hat sich bedankt: 8 Mal
Danksagung erhalten: 121 Mal

Re: hidraw fest zuordnen

Beitrag von TeamO »

@Enrico: Das ist doch genau das, was ich geschrieben habe. Er muss den Geräten den USB-Port (Steckplatz) fest zuweisen (SYMLINK).
@sralus:Ich kann es gerne schauen, dass ich hierfür mal eine passende Anleitung zusammenschreibe. Wird aber erst nächstes Jahr :lol:

Benutzeravatar
sralus
Beiträge: 38
Registriert: Mi 21. Sep 2022, 00:04
Hat sich bedankt: 6 Mal

Re: hidraw fest zuordnen

Beitrag von sralus »

hätte es gerne mit dem Webinstaller getestet leider ist der link
wget https://solaranzeige.schnippsche.de/webinstaller.tar
nicht mehr online !?

gibt es den webinstaller noch ?

Gruß Sralus

solarfanenrico
Beiträge: 655
Registriert: Mi 20. Jan 2021, 19:49
Hat sich bedankt: 34 Mal
Danksagung erhalten: 52 Mal

Re: hidraw fest zuordnen

Beitrag von solarfanenrico »

TeamO hat geschrieben:
Sa 31. Dez 2022, 12:47
@Enrico: Das ist doch genau das, was ich geschrieben habe. Er muss den Geräten den USB-Port (Steckplatz) fest zuweisen (SYMLINK).
@sralus:Ich kann es gerne schauen, dass ich hierfür mal eine passende Anleitung zusammenschreibe. Wird aber erst nächstes Jahr :lol:
Hallo Timo,
Du hättest dan wenigstens SYMLINK sagen sollen, und daß es schon eine Anleitung im Forum gibt, wo sogar ElekroFuchs auf den {devpath} hingewiesen hat. Was soll ein relativer Unerfahrener aus Deiner ersten Antwort entnehmen?
Du darfst sogar meine Annleitung verwenden und diese entsprechend auf den jetzigen "solaranzeigen.Stand" bringen.
Es soll sich wohl etwas geändert haben.
https://solarfanenrico.de/hidraw_usb.pdf
Enrico

TeamO
Beiträge: 713
Registriert: Mo 22. Jun 2020, 08:58
Hat sich bedankt: 8 Mal
Danksagung erhalten: 121 Mal

Re: hidraw fest zuordnen

Beitrag von TeamO »

Symlink = fester Zuordnung. Am Handy schreibe ich nicht so gerne viel. Deswegen nur der Hinweis einfach er suchen soll.
Aber lassen wir das. Etwas im Forum suchen und die Anleitung, bzw der Link von dir wäre gefunden worden.
Bezüglich der Änderungen was die Solaranzeige betrifft kann ich gerne was passendes zusammenschreiben.

Benutzeravatar
sralus
Beiträge: 38
Registriert: Mi 21. Sep 2022, 00:04
Hat sich bedankt: 6 Mal

Re: hidraw fest zuordnen

Beitrag von sralus »

Hallo
Wäre das in meinem Fall so richtig ?

44-my-devices.rules
SUBSYSTEM=="tty", ATTRS{devpath}=="1.1", ATTRS{idVendor}=="0665", ATTRS{idProduct}=="5161", SYMLINK+="hidraw0"
SUBSYSTEM=="tty", ATTRS{devpath}=="1.4", ATTRS{idVendor}=="0665", ATTRS{idProduct}=="5161", SYMLINK+="hidraw1"

udevadm info -n /dev/hidraw0 -a

Code: Alles auswählen

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/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.0/0003:0665:5161.0001/hidraw/hidraw0':
    KERNEL=="hidraw0"
    SUBSYSTEM=="hidraw"
    DRIVER==""
    ATTR{power/control}=="auto"
    ATTR{power/runtime_active_time}=="0"
    ATTR{power/runtime_status}=="unsupported"
    ATTR{power/runtime_suspended_time}=="0"

  looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.0/0003:0665:5161.0001':
    KERNELS=="0003:0665:5161.0001"
    SUBSYSTEMS=="hid"
    DRIVERS=="hid-Wortzensur"
    ATTRS{country}=="00"
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"

  looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.0':
    KERNELS=="1-1.1:1.0"
    SUBSYSTEMS=="usb"
    DRIVERS=="usbhid"
    ATTRS{authorized}=="1"
    ATTRS{bAlternateSetting}==" 0"
    ATTRS{bInterfaceClass}=="03"
    ATTRS{bInterfaceNumber}=="00"
    ATTRS{bInterfaceProtocol}=="00"
    ATTRS{bInterfaceSubClass}=="00"
    ATTRS{bNumEndpoints}=="01"
    ATTRS{supports_autosuspend}=="1"

  looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1':
    KERNELS=="1-1.1"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{authorized}=="1"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bDeviceClass}=="00"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bMaxPacketSize0}=="8"
    ATTRS{bMaxPower}=="100mA"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bcdDevice}=="0002"
    ATTRS{bmAttributes}=="a0"
    ATTRS{busnum}=="1"
    ATTRS{configuration}==""
    ATTRS{devnum}=="3"
    ATTRS{devpath}=="1.1"
    ATTRS{devspec}=="(null)"
    ATTRS{idProduct}=="5161"
    ATTRS{idVendor}=="0665"
    ATTRS{ltm_capable}=="no"
    ATTRS{maxchild}=="0"
    ATTRS{power/active_duration}=="92038152"
    ATTRS{power/autosuspend}=="2"
    ATTRS{power/autosuspend_delay_ms}=="2000"
    ATTRS{power/connected_duration}=="92038148"
    ATTRS{power/control}=="on"
    ATTRS{power/level}=="on"
    ATTRS{power/persist}=="1"
    ATTRS{power/runtime_active_time}=="92037970"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{quirks}=="0x0"
    ATTRS{removable}=="unknown"
    ATTRS{rx_lanes}=="1"
    ATTRS{speed}=="1.5"
    ATTRS{tx_lanes}=="1"
    ATTRS{urbnum}=="371732"
    ATTRS{version}==" 1.10"

  looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1':
    KERNELS=="1-1"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{authorized}=="1"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bDeviceProtocol}=="01"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bMaxPower}=="100mA"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bcdDevice}=="0421"
    ATTRS{bmAttributes}=="e0"
    ATTRS{busnum}=="1"
    ATTRS{configuration}==""
    ATTRS{devnum}=="2"
    ATTRS{devpath}=="1"
    ATTRS{devspec}=="(null)"
    ATTRS{idProduct}=="3431"
    ATTRS{idVendor}=="2109"
    ATTRS{ltm_capable}=="no"
    ATTRS{maxchild}=="4"
    ATTRS{power/active_duration}=="92038656"
    ATTRS{power/autosuspend}=="0"
    ATTRS{power/autosuspend_delay_ms}=="0"
    ATTRS{power/connected_duration}=="92038656"
    ATTRS{power/control}=="auto"
    ATTRS{power/level}=="auto"
    ATTRS{power/runtime_active_time}=="92038382"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{product}=="USB2.0 Hub"
    ATTRS{quirks}=="0x0"
    ATTRS{removable}=="unknown"
    ATTRS{rx_lanes}=="1"
    ATTRS{speed}=="480"
    ATTRS{tx_lanes}=="1"
    ATTRS{urbnum}=="57"
    ATTRS{version}==" 2.10"

  looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1':
    KERNELS=="usb1"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{authorized}=="1"
    ATTRS{authorized_default}=="1"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bDeviceProtocol}=="01"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bMaxPower}=="0mA"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bcdDevice}=="0515"
    ATTRS{bmAttributes}=="e0"
    ATTRS{busnum}=="1"
    ATTRS{configuration}==""
    ATTRS{devnum}=="1"
    ATTRS{devpath}=="0"
    ATTRS{idProduct}=="0002"
    ATTRS{idVendor}=="1d6b"
    ATTRS{interface_authorized_default}=="1"
    ATTRS{ltm_capable}=="no"
    ATTRS{manufacturer}=="Linux 5.15.76-v8+ xhci-hcd"
    ATTRS{maxchild}=="1"
    ATTRS{power/active_duration}=="92038796"
    ATTRS{power/autosuspend}=="0"
    ATTRS{power/autosuspend_delay_ms}=="0"
    ATTRS{power/connected_duration}=="92038800"
    ATTRS{power/control}=="auto"
    ATTRS{power/level}=="auto"
    ATTRS{power/runtime_active_time}=="92038794"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{product}=="xHCI Host Controller"
    ATTRS{quirks}=="0x0"
    ATTRS{removable}=="unknown"
    ATTRS{rx_lanes}=="1"
    ATTRS{serial}=="0000:01:00.0"
    ATTRS{speed}=="480"
    ATTRS{tx_lanes}=="1"
    ATTRS{urbnum}=="26"
    ATTRS{version}==" 2.00"

  looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0':
    KERNELS=="0000:01:00.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="xhci_hcd"
    ATTRS{ari_enabled}=="0"
    ATTRS{broken_parity_status}=="0"
    ATTRS{class}=="0x0c0330"
    ATTRS{consistent_dma_mask_bits}=="64"
    ATTRS{current_link_speed}=="5.0 GT/s PCIe"
    ATTRS{current_link_width}=="1"
    ATTRS{device}=="0x3483"
    ATTRS{dma_mask_bits}=="64"
    ATTRS{driver_override}=="(null)"
    ATTRS{enable}=="1"
    ATTRS{irq}=="48"
    ATTRS{link/clkpm}=="0"
    ATTRS{local_cpulist}=="0-3"
    ATTRS{local_cpus}=="f"
    ATTRS{max_link_speed}=="5.0 GT/s PCIe"
    ATTRS{max_link_width}=="1"
    ATTRS{msi_bus}=="1"
    ATTRS{msi_irqs/48}=="msi"
    ATTRS{power/control}=="on"
    ATTRS{power/runtime_active_time}=="92038956"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{power_state}=="D0"
    ATTRS{reset_method}=="pm bus"
    ATTRS{revision}=="0x01"
    ATTRS{subsystem_device}=="0x3483"
    ATTRS{subsystem_vendor}=="0x1106"
    ATTRS{vendor}=="0x1106"

  looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0':
    KERNELS=="0000:00:00.0"
    SUBSYSTEMS=="pci"
    DRIVERS==""
    ATTRS{ari_enabled}=="0"
    ATTRS{broken_parity_status}=="0"
    ATTRS{class}=="0x060400"
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{current_link_speed}=="5.0 GT/s PCIe"
    ATTRS{current_link_width}=="1"
    ATTRS{device}=="0x2711"
    ATTRS{dma_mask_bits}=="32"
    ATTRS{driver_override}=="(null)"
    ATTRS{enable}=="1"
    ATTRS{irq}=="0"
    ATTRS{local_cpulist}=="0-3"
    ATTRS{local_cpus}=="f"
    ATTRS{max_link_speed}=="5.0 GT/s PCIe"
    ATTRS{max_link_width}=="1"
    ATTRS{msi_bus}=="1"
    ATTRS{power/control}=="on"
    ATTRS{power/runtime_active_time}=="92038968"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{power_state}=="D0"
    ATTRS{revision}=="0x10"
    ATTRS{secondary_bus_number}=="1"
    ATTRS{subordinate_bus_number}=="1"
    ATTRS{subsystem_device}=="0x0000"
    ATTRS{subsystem_vendor}=="0x0000"
    ATTRS{vendor}=="0x14e4"
    ATTRS{waiting_for_supplier}=="0"

  looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"

  looking at parent device '/devices/platform/scb/fd500000.pcie':
    KERNELS=="fd500000.pcie"
    SUBSYSTEMS=="platform"
    DRIVERS=="brcm-pcie"
    ATTRS{driver_override}=="(null)"
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"

  looking at parent device '/devices/platform/scb':
    KERNELS=="scb"
    SUBSYSTEMS=="platform"
    DRIVERS=="simple-pm-bus"
    ATTRS{driver_override}=="(null)"
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"

  looking at parent device '/devices/platform':
    KERNELS=="platform"
    SUBSYSTEMS==""
    DRIVERS==""
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"
udevadm info -n /dev/hidraw1 -a

Code: Alles auswählen

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/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:0665:5161.0002/hidraw/hidraw1':
    KERNEL=="hidraw1"
    SUBSYSTEM=="hidraw"
    DRIVER==""
    ATTR{power/control}=="auto"
    ATTR{power/runtime_active_time}=="0"
    ATTR{power/runtime_status}=="unsupported"
    ATTR{power/runtime_suspended_time}=="0"

  looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:0665:5161.0002':
    KERNELS=="0003:0665:5161.0002"
    SUBSYSTEMS=="hid"
    DRIVERS=="hid-Wortzensur"
    ATTRS{country}=="00"
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"

  looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0':
    KERNELS=="1-1.4:1.0"
    SUBSYSTEMS=="usb"
    DRIVERS=="usbhid"
    ATTRS{authorized}=="1"
    ATTRS{bAlternateSetting}==" 0"
    ATTRS{bInterfaceClass}=="03"
    ATTRS{bInterfaceNumber}=="00"
    ATTRS{bInterfaceProtocol}=="00"
    ATTRS{bInterfaceSubClass}=="00"
    ATTRS{bNumEndpoints}=="01"
    ATTRS{supports_autosuspend}=="1"

  looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4':
    KERNELS=="1-1.4"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{authorized}=="1"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bDeviceClass}=="00"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bMaxPacketSize0}=="8"
    ATTRS{bMaxPower}=="100mA"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bcdDevice}=="0002"
    ATTRS{bmAttributes}=="a0"
    ATTRS{busnum}=="1"
    ATTRS{configuration}==""
    ATTRS{devnum}=="6"
    ATTRS{devpath}=="1.4"
    ATTRS{devspec}=="(null)"
    ATTRS{idProduct}=="5161"
    ATTRS{idVendor}=="0665"
    ATTRS{ltm_capable}=="no"
    ATTRS{maxchild}=="0"
    ATTRS{power/active_duration}=="91983352"
    ATTRS{power/autosuspend}=="2"
    ATTRS{power/autosuspend_delay_ms}=="2000"
    ATTRS{power/connected_duration}=="91983348"
    ATTRS{power/control}=="on"
    ATTRS{power/level}=="on"
    ATTRS{power/persist}=="1"
    ATTRS{power/runtime_active_time}=="91983170"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{quirks}=="0x0"
    ATTRS{removable}=="unknown"
    ATTRS{rx_lanes}=="1"
    ATTRS{speed}=="1.5"
    ATTRS{tx_lanes}=="1"
    ATTRS{urbnum}=="58290"
    ATTRS{version}==" 1.10"

  looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1':
    KERNELS=="1-1"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{authorized}=="1"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bDeviceProtocol}=="01"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bMaxPower}=="100mA"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bcdDevice}=="0421"
    ATTRS{bmAttributes}=="e0"
    ATTRS{busnum}=="1"
    ATTRS{configuration}==""
    ATTRS{devnum}=="2"
    ATTRS{devpath}=="1"
    ATTRS{devspec}=="(null)"
    ATTRS{idProduct}=="3431"
    ATTRS{idVendor}=="2109"
    ATTRS{ltm_capable}=="no"
    ATTRS{maxchild}=="4"
    ATTRS{power/active_duration}=="91984496"
    ATTRS{power/autosuspend}=="0"
    ATTRS{power/autosuspend_delay_ms}=="0"
    ATTRS{power/connected_duration}=="91984496"
    ATTRS{power/control}=="auto"
    ATTRS{power/level}=="auto"
    ATTRS{power/runtime_active_time}=="91984222"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{product}=="USB2.0 Hub"
    ATTRS{quirks}=="0x0"
    ATTRS{removable}=="unknown"
    ATTRS{rx_lanes}=="1"
    ATTRS{speed}=="480"
    ATTRS{tx_lanes}=="1"
    ATTRS{urbnum}=="57"
    ATTRS{version}==" 2.10"

  looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1':
    KERNELS=="usb1"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{authorized}=="1"
    ATTRS{authorized_default}=="1"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bDeviceProtocol}=="01"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bMaxPower}=="0mA"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bcdDevice}=="0515"
    ATTRS{bmAttributes}=="e0"
    ATTRS{busnum}=="1"
    ATTRS{configuration}==""
    ATTRS{devnum}=="1"
    ATTRS{devpath}=="0"
    ATTRS{idProduct}=="0002"
    ATTRS{idVendor}=="1d6b"
    ATTRS{interface_authorized_default}=="1"
    ATTRS{ltm_capable}=="no"
    ATTRS{manufacturer}=="Linux 5.15.76-v8+ xhci-hcd"
    ATTRS{maxchild}=="1"
    ATTRS{power/active_duration}=="91984636"
    ATTRS{power/autosuspend}=="0"
    ATTRS{power/autosuspend_delay_ms}=="0"
    ATTRS{power/connected_duration}=="91984632"
    ATTRS{power/control}=="auto"
    ATTRS{power/level}=="auto"
    ATTRS{power/runtime_active_time}=="91984629"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{product}=="xHCI Host Controller"
    ATTRS{quirks}=="0x0"
    ATTRS{removable}=="unknown"
    ATTRS{rx_lanes}=="1"
    ATTRS{serial}=="0000:01:00.0"
    ATTRS{speed}=="480"
    ATTRS{tx_lanes}=="1"
    ATTRS{urbnum}=="26"
    ATTRS{version}==" 2.00"

  looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0':
    KERNELS=="0000:01:00.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="xhci_hcd"
    ATTRS{ari_enabled}=="0"
    ATTRS{broken_parity_status}=="0"
    ATTRS{class}=="0x0c0330"
    ATTRS{consistent_dma_mask_bits}=="64"
    ATTRS{current_link_speed}=="5.0 GT/s PCIe"
    ATTRS{current_link_width}=="1"
    ATTRS{device}=="0x3483"
    ATTRS{dma_mask_bits}=="64"
    ATTRS{driver_override}=="(null)"
    ATTRS{enable}=="1"
    ATTRS{irq}=="48"
    ATTRS{link/clkpm}=="0"
    ATTRS{local_cpulist}=="0-3"
    ATTRS{local_cpus}=="f"
    ATTRS{max_link_speed}=="5.0 GT/s PCIe"
    ATTRS{max_link_width}=="1"
    ATTRS{msi_bus}=="1"
    ATTRS{msi_irqs/48}=="msi"
    ATTRS{power/control}=="on"
    ATTRS{power/runtime_active_time}=="91984783"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{power_state}=="D0"
    ATTRS{reset_method}=="pm bus"
    ATTRS{revision}=="0x01"
    ATTRS{subsystem_device}=="0x3483"
    ATTRS{subsystem_vendor}=="0x1106"
    ATTRS{vendor}=="0x1106"

  looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0':
    KERNELS=="0000:00:00.0"
    SUBSYSTEMS=="pci"
    DRIVERS==""
    ATTRS{ari_enabled}=="0"
    ATTRS{broken_parity_status}=="0"
    ATTRS{class}=="0x060400"
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{current_link_speed}=="5.0 GT/s PCIe"
    ATTRS{current_link_width}=="1"
    ATTRS{device}=="0x2711"
    ATTRS{dma_mask_bits}=="32"
    ATTRS{driver_override}=="(null)"
    ATTRS{enable}=="1"
    ATTRS{irq}=="0"
    ATTRS{local_cpulist}=="0-3"
    ATTRS{local_cpus}=="f"
    ATTRS{max_link_speed}=="5.0 GT/s PCIe"
    ATTRS{max_link_width}=="1"
    ATTRS{msi_bus}=="1"
    ATTRS{power/control}=="on"
    ATTRS{power/runtime_active_time}=="91984791"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{power_state}=="D0"
    ATTRS{revision}=="0x10"
    ATTRS{secondary_bus_number}=="1"
    ATTRS{subordinate_bus_number}=="1"
    ATTRS{subsystem_device}=="0x0000"
    ATTRS{subsystem_vendor}=="0x0000"
    ATTRS{vendor}=="0x14e4"
    ATTRS{waiting_for_supplier}=="0"

  looking at parent device '/devices/platform/scb/fd500000.pcie/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"

  looking at parent device '/devices/platform/scb/fd500000.pcie':
    KERNELS=="fd500000.pcie"
    SUBSYSTEMS=="platform"
    DRIVERS=="brcm-pcie"
    ATTRS{driver_override}=="(null)"
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"

  looking at parent device '/devices/platform/scb':
    KERNELS=="scb"
    SUBSYSTEMS=="platform"
    DRIVERS=="simple-pm-bus"
    ATTRS{driver_override}=="(null)"
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"

  looking at parent device '/devices/platform':
    KERNELS=="platform"
    SUBSYSTEMS==""
    DRIVERS==""
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"

TeamO
Beiträge: 713
Registriert: Mo 22. Jun 2020, 08:58
Hat sich bedankt: 8 Mal
Danksagung erhalten: 121 Mal

Re: hidraw fest zuordnen

Beitrag von TeamO »

Hier mal im Kurzformat.
Wenn Du schon weißt, welches Gerät hidraw0 und hidraw1 hat und diese Geräte immer am selben USB-Port vom Raspi angeschlossen bleiben, muss Deine /etc/udev/rules.d/99-usb-serial.rules so aussehen:

Code: Alles auswählen

SUBSYSTEM=="tty", ATTRS{devpath}=="1.1", SYMLINK+="hidraw0", OWNER="pi"
SUBSYSTEM=="tty", ATTRS{devpath}=="1.4", SYMLINK+="hidraw1", OWNER="pi"

Antworten