Themabewertung:
  • 0 Bewertung(en) - 0 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
udev Regel für gleiche USB Geräte ?
#1
Hi,


Kann mir jemand sageb welche Syntax ich hier in der udev Rule brauche ?

Habe hier schon einiges probiert:
Zitat:KERNEL=="ttyUSB*", KERNELS=="1-1.4:1.0", NAME="ttyUSB0-XX"
KERNEL=="ttyUSB*", KERNELS=="1-1.2:1.0", NAME="ttyUSB1-test"
#KERNEL=="ttyUSB*", KERNELS=="1-8.1.2", NAME="ttyUSB3" #soll angebeblich funktionieren
Anschliessend müsste ich ja nach dem einstecken ein Gerät ttyUSB0-xx haben ...

Apr 24 14:22:55 odroid kernel: [[email protected]] ch341 1-1.2:1.0: device disconnected
Apr 24 14:23:09 odroid kernel: [[email protected]] usb 1-1.2: new full-speed USB device number 7 using dwc_otg
Apr 24 14:23:09 odroid kernel: [[email protected]] ch341 1-1.2:1.0: ch341-uart converter detected
Apr 24 14:23:09 odroid kernel: [[email protected]] usb 1-1.2: ch341-uart converter now attached to ttyUSB1
Apr 24 14:23:09 odroid mtp-probe: checking bus 1, device 7: "/sys/devices/lm1/usb1/1-1/1-1.2"

Apr 24 14:26:32 odroid kernel: [[email protected]] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
Apr 24 14:26:32 odroid kernel: [[email protected]] ch341 1-1.4:1.0: device disconnected
Apr 24 14:26:34 odroid kernel: [[email protected]] usb 1-1.4: new full-speed USB device number 8 using dwc_otg
Apr 24 14:26:34 odroid kernel: [[email protected]] ch341 1-1.4:1.0: ch341-uart converter detected


Wers genauer will:
Code:
Bus 001 Device 013: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x1a86 QinHeng Electronics
  idProduct          0x7523 HL-340 USB-Serial adapter
  bcdDevice            2.54
  iManufacturer           0
  iProduct                2 USB2.0-Serial
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           39
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower               96mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      1
      bInterfaceProtocol      2
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 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     0x0020  1x 32 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               1
Device Status:     0x0000
  (Bus Powered)

Bus 001 Device 014: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x1a86 QinHeng Electronics
  idProduct          0x7523 HL-340 USB-Serial adapter
  bcdDevice            2.54
  iManufacturer           0
  iProduct                2 USB2.0-Serial
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           39
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower               96mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      1
      bInterfaceProtocol      2
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 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     0x0020  1x 32 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               1
Device Status:     0x0000
  (Bus Powered)
Grüße
Martin
-----------------------------------------------------------------------------------------------------------
Du brauchst Hilfe? Wir brauchen Daten! English-Version: Don't eat yellow snow!
Meine VDRs (Spoiler klicken) 

Zitieren
#2
Klingt irgendwie nach CH340 Arduino Clone..
Dafür gibts ja eigentlich (wenn man die 0.05€ für nen eeprom spendiert hat..)

iSerial                0

Könnte ohne Seriennr schwierig werden. Physical Address ermitteln vom PCI(e) Port aus über USB Adapter - USB Port ?
Zitieren
#3
Ich glaube KERNEL und KERNALS geht nicht zusammen.


Wie meldet sich das Teil unter lsusb und als welches /dev/..  wird es andemeldet?
Mit
  udevadm info --query=all --attribute-walk --name=/dev/...
bekommst Du den udev-tree
In der udev-rule müssten dann keys aus maximal 2 aufeinanderfolgenden Blöcken (Parent/Child) gesucht werden siehe auch http://www.reactivated.net/writing_udev_rules.html
Beispiele sind z.b. In der /etc/udev/rules.d/01-easyvdr-remote.rules oder der /usr/bin/easyvdr-set-ir_keytable

Gruß
Michel
Produktiv-VDR:
msi K9N2G-Neo (nvidia 8200 onBoard) mit Athlon X2 4850e mit SamuraiZZ
2xNova-HDS2, DH102
Zitieren
#4
(24.04.2016, 15:50)michel8 link schrieb:und als welches /dev/..  wird es andemeldet?

Nicht konstant. Das ist kein devfs..
Zitieren
#5
Genau. Ich will die Arduino Clones anhand des USB Anschlusses fest zu einem Device zuordnen. Also z.B. /dev/Kernreaktor oder so...
8)

Jetzt habe ich fast eine Stunde in den Sand gesetzt mit dem schlauen Einfall ob man nicht mal auf den kaputten (so geliefert) Arduino mit FTDI (echt?) Chip nen Bootloader aufspielen oder notfalls direkt flashen könnte. Der Arduino läuft prächtig. Aber am USB Bus wird nichts enumeriert... Also zurück in die Kiste für "andere Zwecke"


Somit gehts weiter damit...
Zitat:[email protected]:/etc/udev/rules.d#  udevadm info --query=all --attribute-walk --name=/dev/ttyUSB0

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/lm1/usb1/1-1/1-1.4/1-1.4:1.0/ttyUSB0/tty/ttyUSB0':
    KERNEL=="ttyUSB0"
    SUBSYSTEM=="tty"
    DRIVER==""

  looking at parent device '/devices/lm1/usb1/1-1/1-1.4/1-1.4:1.0/ttyUSB0':
    KERNELS=="ttyUSB0"
    SUBSYSTEMS=="usb-serial"
    DRIVERS=="ch341-uart"
    ATTRS{port_number}=="0"

  looking at parent device '/devices/lm1/usb1/1-1/1-1.4/1-1.4:1.0':
    KERNELS=="1-1.4:1.0"
    SUBSYSTEMS=="usb"
    DRIVERS=="ch341"
    ATTRS{bInterfaceClass}=="ff"
    ATTRS{bInterfaceSubClass}=="01"
    ATTRS{bInterfaceProtocol}=="02"
    ATTRS{bNumEndpoints}=="03"
    ATTRS{supports_autosuspend}=="1"
    ATTRS{bAlternateSetting}==" 0"
    ATTRS{bInterfaceNumber}=="00"

  looking at parent device '/devices/lm1/usb1/1-1/1-1.4':
    KERNELS=="1-1.4"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{devpath}=="1.4"
    ATTRS{idVendor}=="1a86"
    ATTRS{speed}=="12"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bMaxPacketSize0}=="8"
    ATTRS{busnum}=="1"
    ATTRS{devnum}=="13"
    ATTRS{configuration}==""
    ATTRS{bMaxPower}=="96mA"
    ATTRS{authorized}=="1"
    ATTRS{bmAttributes}=="80"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{maxchild}=="0"
    ATTRS{bcdDevice}=="0254"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{quirks}=="0x0"
    ATTRS{version}==" 1.10"
    ATTRS{urbnum}=="5005"
    ATTRS{ltm_capable}=="no"
    ATTRS{removable}=="unknown"
    ATTRS{idProduct}=="7523"
    ATTRS{bDeviceClass}=="ff"
    ATTRS{product}=="USB2.0-Serial"

  looking at parent device '/devices/lm1/usb1/1-1':
    KERNELS=="1-1"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bDeviceProtocol}=="02"
    ATTRS{devpath}=="1"
    ATTRS{idVendor}=="05e3"
    ATTRS{speed}=="480"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{busnum}=="1"
    ATTRS{devnum}=="2"
    ATTRS{configuration}==""
    ATTRS{bMaxPower}=="100mA"
    ATTRS{authorized}=="1"
    ATTRS{bmAttributes}=="e0"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{maxchild}=="4"
    ATTRS{bcdDevice}=="3298"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{quirks}=="0x0"
    ATTRS{version}==" 2.00"
    ATTRS{urbnum}=="308"
    ATTRS{ltm_capable}=="no"
    ATTRS{removable}=="unknown"
    ATTRS{idProduct}=="0610"
    ATTRS{bDeviceClass}=="09"
    ATTRS{product}=="USB2.0 Hub"

  looking at parent device '/devices/lm1/usb1':
    KERNELS=="usb1"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bDeviceProtocol}=="01"
    ATTRS{devpath}=="0"
    ATTRS{idVendor}=="1d6b"
    ATTRS{speed}=="480"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{authorized_default}=="1"
    ATTRS{busnum}=="1"
    ATTRS{devnum}=="1"
    ATTRS{configuration}==""
    ATTRS{bMaxPower}=="0mA"
    ATTRS{authorized}=="1"
    ATTRS{bmAttributes}=="e0"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{maxchild}=="1"
    ATTRS{bcdDevice}=="0310"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{quirks}=="0x0"
    ATTRS{serial}=="lm1"
    ATTRS{version}==" 2.00"
    ATTRS{urbnum}=="36"
    ATTRS{ltm_capable}=="no"
    ATTRS{manufacturer}=="Linux 3.10.96-147 dwc_otg_hcd"
    ATTRS{removable}=="unknown"
    ATTRS{idProduct}=="0002"
    ATTRS{bDeviceClass}=="09"
    ATTRS{product}=="DWC OTG Controller"

  looking at parent device '/devices/lm1':
    KERNELS=="lm1"
    SUBSYSTEMS=="logicmodule"
    DRIVERS=="dwc_otg"
    ATTRS{hnp}=="HstNegScs = 0x0"
    ATTRS{srp}=="SesReqScs = 0x0"
    ATTRS{regvalue}=="invalid offset"
    ATTRS{hsic_connect}=="HSIC Connect = 0x0"
    ATTRS{guid}=="GUID = 0x12345678"
    ATTRS{mode}=="Mode = 0x1"
    ATTRS{srpcapable}=="SRPCapable = 0x0"
    ATTRS{regdump}=="Register Dump"
    ATTRS{gpvndctl}=="GPVNDCTL = 0x00000000"
    ATTRS{ggpio}=="GGPIO = 0x00000000"
    ATTRS{hprt0}=="HPRT0 = 0x00001005"
    ATTRS{wr_reg_test}=="Time to write GNPTXFSIZ reg 10000000 times: 1400 msecs (140 jiffies)"
    ATTRS{peri_otg_disable}=="IDDQ = 0x0"
    ATTRS{hcd_frrem}=="HCD Dump Frame Remaining"
    ATTRS{peri_iddq}=="IDDQ = 0x0"
    ATTRS{mode_ch_tim_en}=="Mode Change Ready Timer Enable = 0x0"
    ATTRS{gnptxfsiz}=="GNPTXFSIZ = 0x01f40200"
    ATTRS{remote_wakeup}=="Remote Wakeup Sig = 0 Enabled = -1 LPM Remote Wakeup = 0"
    ATTRS{peri_sleepm}=="SLEEP MODULE = 0x0"
    ATTRS{busconnected}=="Bus Connected = 0x1"
    ATTRS{hcddump}=="HCD Dump"
    ATTRS{gotgctl}=="GOTGCTL = 0x02300000"
    ATTRS{spramdump}=="SPRAM Dump"
    ATTRS{grxfsiz}=="GRXFSIZ = 0x00000200"
    ATTRS{gsnpsid}=="GSNPSID = 0x4f54310a"
    ATTRS{gusbcfg}=="GUSBCFG = 0x00001408"
    ATTRS{hptxfsiz}=="HPTXFSIZ = 0x01f403f4"
    ATTRS{devspeed}=="Device Speed = 0x0"
    ATTRS{fr_interval}=="Frame Interval = 0xea6"
    ATTRS{rem_wakeup_pwrdn}==""
    ATTRS{bussuspend}=="Bus Suspend = 0x0"
    ATTRS{buspower}=="Bus Power = 0x1"
    ATTRS{peri_power}=="PHY Power = 1"
    ATTRS{hnpcapable}=="HNPCapable = 0x0"
    ATTRS{rd_reg_test}=="Time to read GNPTXFSIZ reg 10000000 times: 990 msecs (99 jiffies)"
    ATTRS{enumspeed}=="Device Enumeration Speed = 0x0"
    ATTRS{inv_sel_hsic}=="Invert Select HSIC = 0x0"
    ATTRS{regoffset}=="0xffffffff"

[email protected]:/etc/udev/rules.d#
[email protected]:/etc/udev/rules.d#  udevadm info --query=all --attribute-walk --name=/dev/ttyUSB1

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/lm1/usb1/1-1/1-1.2/1-1.2:1.0/ttyUSB1/tty/ttyUSB1':
    KERNEL=="ttyUSB1"
    SUBSYSTEM=="tty"
    DRIVER==""

  looking at parent device '/devices/lm1/usb1/1-1/1-1.2/1-1.2:1.0/ttyUSB1':
    KERNELS=="ttyUSB1"
    SUBSYSTEMS=="usb-serial"
    DRIVERS=="ch341-uart"
    ATTRS{port_number}=="0"

  looking at parent device '/devices/lm1/usb1/1-1/1-1.2/1-1.2:1.0':
    KERNELS=="1-1.2:1.0"
    SUBSYSTEMS=="usb"
    DRIVERS=="ch341"
    ATTRS{bInterfaceClass}=="ff"
    ATTRS{bInterfaceSubClass}=="01"
    ATTRS{bInterfaceProtocol}=="02"
    ATTRS{bNumEndpoints}=="03"
    ATTRS{supports_autosuspend}=="1"
    ATTRS{bAlternateSetting}==" 0"
    ATTRS{bInterfaceNumber}=="00"

  looking at parent device '/devices/lm1/usb1/1-1/1-1.2':
    KERNELS=="1-1.2"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{devpath}=="1.2"
    ATTRS{idVendor}=="1a86"
    ATTRS{speed}=="12"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bMaxPacketSize0}=="8"
    ATTRS{busnum}=="1"
    ATTRS{devnum}=="14"
    ATTRS{configuration}==""
    ATTRS{bMaxPower}=="96mA"
    ATTRS{authorized}=="1"
    ATTRS{bmAttributes}=="80"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{maxchild}=="0"
    ATTRS{bcdDevice}=="0254"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{quirks}=="0x0"
    ATTRS{version}==" 1.10"
    ATTRS{urbnum}=="24"
    ATTRS{ltm_capable}=="no"
    ATTRS{removable}=="unknown"
    ATTRS{idProduct}=="7523"
    ATTRS{bDeviceClass}=="ff"
    ATTRS{product}=="USB2.0-Serial"

  looking at parent device '/devices/lm1/usb1/1-1':
    KERNELS=="1-1"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bDeviceProtocol}=="02"
    ATTRS{devpath}=="1"
    ATTRS{idVendor}=="05e3"
    ATTRS{speed}=="480"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{busnum}=="1"
    ATTRS{devnum}=="2"
    ATTRS{configuration}==""
    ATTRS{bMaxPower}=="100mA"
    ATTRS{authorized}=="1"
    ATTRS{bmAttributes}=="e0"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{maxchild}=="4"
    ATTRS{bcdDevice}=="3298"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{quirks}=="0x0"
    ATTRS{version}==" 2.00"
    ATTRS{urbnum}=="308"
    ATTRS{ltm_capable}=="no"
    ATTRS{removable}=="unknown"
    ATTRS{idProduct}=="0610"
    ATTRS{bDeviceClass}=="09"
    ATTRS{product}=="USB2.0 Hub"

  looking at parent device '/devices/lm1/usb1':
    KERNELS=="usb1"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bDeviceProtocol}=="01"
    ATTRS{devpath}=="0"
    ATTRS{idVendor}=="1d6b"
    ATTRS{speed}=="480"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{authorized_default}=="1"
    ATTRS{busnum}=="1"
    ATTRS{devnum}=="1"
    ATTRS{configuration}==""
    ATTRS{bMaxPower}=="0mA"
    ATTRS{authorized}=="1"
    ATTRS{bmAttributes}=="e0"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{maxchild}=="1"
    ATTRS{bcdDevice}=="0310"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{quirks}=="0x0"
    ATTRS{serial}=="lm1"
    ATTRS{version}==" 2.00"
    ATTRS{urbnum}=="36"
    ATTRS{ltm_capable}=="no"
    ATTRS{manufacturer}=="Linux 3.10.96-147 dwc_otg_hcd"
    ATTRS{removable}=="unknown"
    ATTRS{idProduct}=="0002"
    ATTRS{bDeviceClass}=="09"
    ATTRS{product}=="DWC OTG Controller"

  looking at parent device '/devices/lm1':
    KERNELS=="lm1"
    SUBSYSTEMS=="logicmodule"
    DRIVERS=="dwc_otg"
    ATTRS{hnp}=="HstNegScs = 0x0"
    ATTRS{srp}=="SesReqScs = 0x0"
    ATTRS{regvalue}=="invalid offset"
    ATTRS{hsic_connect}=="HSIC Connect = 0x0"
    ATTRS{guid}=="GUID = 0x12345678"
    ATTRS{mode}=="Mode = 0x1"
    ATTRS{srpcapable}=="SRPCapable = 0x0"
    ATTRS{regdump}=="Register Dump"
    ATTRS{gpvndctl}=="GPVNDCTL = 0x00000000"
    ATTRS{ggpio}=="GGPIO = 0x00000000"
    ATTRS{hprt0}=="HPRT0 = 0x00001005"
    ATTRS{wr_reg_test}=="Time to write GNPTXFSIZ reg 10000000 times: 1400 msecs (140 jiffies)"
    ATTRS{peri_otg_disable}=="IDDQ = 0x0"
    ATTRS{hcd_frrem}=="HCD Dump Frame Remaining"
    ATTRS{peri_iddq}=="IDDQ = 0x0"
    ATTRS{mode_ch_tim_en}=="Mode Change Ready Timer Enable = 0x0"
    ATTRS{gnptxfsiz}=="GNPTXFSIZ = 0x01f40200"
    ATTRS{remote_wakeup}=="Remote Wakeup Sig = 0 Enabled = -1 LPM Remote Wakeup = 0"
    ATTRS{peri_sleepm}=="SLEEP MODULE = 0x0"
    ATTRS{busconnected}=="Bus Connected = 0x1"
    ATTRS{hcddump}=="HCD Dump"
    ATTRS{gotgctl}=="GOTGCTL = 0x02300000"
    ATTRS{spramdump}=="SPRAM Dump"
    ATTRS{grxfsiz}=="GRXFSIZ = 0x00000200"
    ATTRS{gsnpsid}=="GSNPSID = 0x4f54310a"
    ATTRS{gusbcfg}=="GUSBCFG = 0x00001408"
    ATTRS{hptxfsiz}=="HPTXFSIZ = 0x01f403f4"
    ATTRS{devspeed}=="Device Speed = 0x0"
    ATTRS{fr_interval}=="Frame Interval = 0xea6"
    ATTRS{rem_wakeup_pwrdn}==""
    ATTRS{bussuspend}=="Bus Suspend = 0x0"
    ATTRS{buspower}=="Bus Power = 0x1"
    ATTRS{peri_power}=="PHY Power = 1"
    ATTRS{hnpcapable}=="HNPCapable = 0x0"
    ATTRS{rd_reg_test}=="Time to read GNPTXFSIZ reg 10000000 times: 990 msecs (99 jiffies)"
    ATTRS{enumspeed}=="Device Enumeration Speed = 0x0"
    ATTRS{inv_sel_hsic}=="Invert Select HSIC = 0x0"
    ATTRS{regoffset}=="0xffffffff"

[email protected]:/etc/udev/rules.d#

Aber erst mal ist "Essen und anderes..." Danke für euer Feedback oben!
Grüße
Martin
-----------------------------------------------------------------------------------------------------------
Du brauchst Hilfe? Wir brauchen Daten! English-Version: Don't eat yellow snow!
Meine VDRs (Spoiler klicken) 

Zitieren
#6
Doch noch Frage: Denkt ihr der geänderte Symlink wird überhaupt ohne reboot angelegt wenn man das Gerät neu anstöpselt ?
(Habe gerade das Gegenteil gelesen: OS auf dem Odroid ist Ubuntu 14.04)

Grüße
Martin
-----------------------------------------------------------------------------------------------------------
Du brauchst Hilfe? Wir brauchen Daten! English-Version: Don't eat yellow snow!
Meine VDRs (Spoiler klicken) 

Zitieren
#7
Ja, sollte.
Zitieren
#8
So gibt er mal die wichtigsten Infos schön sortiert aus:

Zitat:[email protected]:/etc/udev/rules.d# udevadm info -q all -n /dev/ttyUSB0
P: /devices/lm1/usb1/1-1/1-1.4/1-1.4:1.0/ttyUSB0/tty/ttyUSB0
N: ttyUSB0
S: serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
S: serial/by-path/usb-0:1.4:1.0-port0
E: DEVLINKS=/dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0 /dev/serial/by-path/usb-0:1.4:1.0-port0
E: DEVNAME=/dev/ttyUSB0
E: DEVPATH=/devices/lm1/usb1/1-1/1-1.4/1-1.4:1.0/ttyUSB0/tty/ttyUSB0
E: ID_BUS=usb
E: ID_MM_CANDIDATE=1
E: ID_MODEL=USB2.0-Serial
E: ID_MODEL_ENC=USB2.0-Serial
E: ID_MODEL_FROM_DATABASE=HL-340 USB-Serial adapter
E: ID_MODEL_ID=7523
E: ID_PATH=usb-0:1.4:1.0
E: ID_PATH_TAG=usb-0_1_4_1_0
E: ID_REVISION=0254
E: ID_SERIAL=1a86_USB2.0-Serial
E: ID_TYPE=generic
E: ID_USB_CLASS_FROM_DATABASE=Vendor Specific Class
E: ID_USB_DRIVER=ch341
E: ID_USB_INTERFACES=:ff0102:
E: ID_USB_INTERFACE_NUM=00
E: ID_VENDOR=1a86
E: ID_VENDOR_ENC=1a86
E: ID_VENDOR_FROM_DATABASE=QinHeng Electronics
E: ID_VENDOR_ID=1a86
E: MAJOR=188
E: MINOR=0
E: SUBSYSTEM=tty
E: USEC_INITIALIZED=21690563664

[email protected]:/etc/udev/rules.d# udevadm info -q all -n /dev/ttyUSB1
P: /devices/lm1/usb1/1-1/1-1.2/1-1.2:1.0/ttyUSB1/tty/ttyUSB1
N: ttyUSB1
S: serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
S: serial/by-path/usb-0:1.2:1.0-port0
E: DEVLINKS=/dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0 /dev/serial/by-path/usb-0:1.2:1.0-port0
E: DEVNAME=/dev/ttyUSB1
E: DEVPATH=/devices/lm1/usb1/1-1/1-1.2/1-1.2:1.0/ttyUSB1/tty/ttyUSB1
E: ID_BUS=usb
E: ID_MM_CANDIDATE=1
E: ID_MODEL=USB2.0-Serial
E: ID_MODEL_ENC=USB2.0-Serial
E: ID_MODEL_FROM_DATABASE=HL-340 USB-Serial adapter
E: ID_MODEL_ID=7523
E: ID_PATH=usb-0:1.2:1.0
E: ID_PATH_TAG=usb-0_1_2_1_0
E: ID_REVISION=0254
E: ID_SERIAL=1a86_USB2.0-Serial
E: ID_TYPE=generic
E: ID_USB_CLASS_FROM_DATABASE=Vendor Specific Class
E: ID_USB_DRIVER=ch341
E: ID_USB_INTERFACES=:ff0102:
E: ID_USB_INTERFACE_NUM=00
E: ID_VENDOR=1a86
E: ID_VENDOR_ENC=1a86
E: ID_VENDOR_FROM_DATABASE=QinHeng Electronics
E: ID_VENDOR_ID=1a86
E: MAJOR=188
E: MINOR=1
E: SUBSYSTEM=tty
E: USEC_INITIALIZED=40077073817

[email protected]:/etc/udev/rules.d#

Aber mit beiden Varianten legt er mir nur immer das normale Device an: /dev/ttyUSBx
Zitat:KERNEL=="ttyUSB*", ID_PATH=="*1.4*", NAME="ttyUSB0-XX"
ID_PATH=="*1.2*", NAME="ttyUSB1-test"

Zitat:Apr 24 20:00:22 odroid kernel: [[email protected]] ch341-uart ttyUSB1: ch341-uart converter now disconnected from ttyUSB1
Apr 24 20:00:22 odroid kernel: [[email protected]] ch341 1-1.2:1.0: device disconnected
Apr 24 20:00:24 odroid kernel: [[email protected]] usb 1-1.2: new full-speed USB device number 28 using dwc_otg
Apr 24 20:00:24 odroid kernel: [[email protected]] ch341 1-1.2:1.0: ch341-uart converter detected
Apr 24 20:00:24 odroid kernel: [[email protected]] usb 1-1.2: ch341-uart converter now attached to ttyUSB1
Apr 24 20:00:24 odroid mtp-probe: checking bus 1, device 28: "/sys/devices/lm1/usb1/1-1/1-1.2"
Grüße
Martin
-----------------------------------------------------------------------------------------------------------
Du brauchst Hilfe? Wir brauchen Daten! English-Version: Don't eat yellow snow!
Meine VDRs (Spoiler klicken) 

Zitieren
#9
S: serial/by-path/usb-0:1.4:1.0-port0

Das wäre immerhin der USB Port als physical Path, wenn du dich also auf einen Port je device festlegst..


[pre]SYMLINK+="kernreaktor"[/pre]
Zitieren
#10
(24.04.2016, 20:16)Wirbel schrieb: S: serial/by-path/usb-0:1.4:1.0-port0

Das wäre immerhin der USB Port als physical Path, wenn du dich also auf einen Port je device festlegst..


[pre]SYMLINK+="kernreaktor"[/pre]

Danke so war mein Ansatz ja auch. Gelernt habe ich: Symlink funktioniert theoretisch immer direkt nach dem Anstöpseln.
"Name" dafür wohl nur nach nem Reboot. Das Problem war, dass mir die exakte Syntax unklar war und somit die Tests gestern erfolglos.

In meiner Software kann ich aber auch /dev/seriell/by-path/xxx angeben, somit lass ichs gutsein.
Wenn die Sachen noch produktiver werden, will ich an der Stelle eh nen ARDUINO anderem USB-Seriell-Chip... 

Also Danke nochmals!
Grüße
Martin
-----------------------------------------------------------------------------------------------------------
Du brauchst Hilfe? Wir brauchen Daten! English-Version: Don't eat yellow snow!
Meine VDRs (Spoiler klicken) 

Zitieren


Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste