Article View: pl.comp.os.linux
Article #895981Re: Reguły dla udev bierzecie z udevadm?
From: Pszemol
Date: Fri, 20 May 2016 11:42
Date: Fri, 20 May 2016 11:42
87 lines
3874 bytes
3874 bytes
"marrgol" <marrgol@address.invalid> wrote in message
news:nhfhjr$usf$1@dont-email.me...
> On 2016-05-17 17:08, Pszemol wrote:
>> Próbuję używać wartości pola MINOR=="0" w regule ale udev nie akceptuje
>> takiego warunku.
>
> Bo powinno być ENV{MINOR}=="0".
>
>> […]
>> E: ID_MODEL_ID=1422
>> […]
>> E: ID_VENDOR_ID=04e2
>> E: MAJOR=266
>> E: MINOR=1
>>
>> Jak napisac taka regułę ktora wyróżni port po numerach MAJOR/MINOR
>> dodatkowo do VendorId i ProductId?
>
> Te linie z 'E:' na początku pokazują zmienne środowiskowe - używaj ich
> tak, jak napisałem wyżej.
Mam jeszcze jedno pytanko...
Patrzę na wydruk z udevadm infor -a dla urządzenia /dev/ttyXRUSB0
looking at device
'/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.4/1-1.4.1/1-1.4.1:1.2/tty/ttyXRUSB1':
KERNEL=="ttyXRUSB1"
SUBSYSTEM=="tty"
DRIVER==""
looking at parent device
'/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.4/1-1.4.1/1-1.4.1:1.2':
KERNELS=="1-1.4.1:1.2"
SUBSYSTEMS=="usb"
DRIVERS=="cdc_xr_usb_serial"
ATTRS{bInterfaceClass}=="02"
ATTRS{iad_bFunctionClass}=="02"
ATTRS{bmCapabilities}=="6"
ATTRS{iad_bFirstInterface}=="02"
ATTRS{bInterfaceSubClass}=="02"
ATTRS{bInterfaceProtocol}=="01"
ATTRS{bNumEndpoints}=="01"
ATTRS{iad_bFunctionSubClass}=="02"
ATTRS{iad_bFunctionProtocol}=="01"
ATTRS{supports_autosuspend}=="1"
ATTRS{iad_bInterfaceCount}=="02"
ATTRS{bAlternateSetting}==" 0"
ATTRS{bInterfaceNumber}=="02"
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.1':
KERNELS=="1-1.1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="02"
ATTRS{bDeviceProtocol}=="01"
ATTRS{devpath}=="1.1"
ATTRS{idVendor}=="04e2"
ATTRS{speed}=="12"
ATTRS{bNumInterfaces}==" 4"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{busnum}=="1"
ATTRS{devnum}=="18"
ATTRS{configuration}==""
ATTRS{bMaxPower}=="100mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="a0"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="0"
ATTRS{bcdDevice}=="0002"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{serial}=="E340598121"
ATTRS{version}==" 2.00"
ATTRS{urbnum}=="23"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="Exar Corp."
ATTRS{removable}=="removable"
ATTRS{idProduct}=="1422"
ATTRS{bDeviceClass}=="ef"
ATTRS{product}=="Exar USB UART"
Zacytowałem trzy pierwsze sekcje: obie sekcje "parent" mają
"SUBSYSTEM"="usb"...
Czy dałoby się użyć ATTRS{devpath}=="1.1" i wstawić ją do nazwy urządzenia
NAME?
Technical Details
Message-ID:
<nhmt45$tt6$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mailReferences:
<nhf1or$3dn$1@dont-email.me> <nhfbtt$8r7$1@dont-email.me> <nhfhjr$usf$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Pszemol" <Pszemol@PolBox.com> Newsgroups: pl.comp.os.linux Subject: Re: Reguły dla udev bierzecie z udevadm? Date: Fri, 20 May 2016 06:42:08 -0500 Organization: A noiseless patient Spider Lines: 4 Message-ID: <nhmt45$tt6$1@dont-email.me> References: <nhf1or$3dn$1@dont-email.me> <nhfbtt$8r7$1@dont-email.me> <nhfhjr$usf$1@dont-email.me> Reply-To: "Pszemol" <Pszemol@BigFoot.com> Mime-Version: 1.0 Injection-Date: Fri, 20 May 2016 11:40:53 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="1a6d3fa4af3609ccdbd33ac7cb86c1f1"; logging-data="30630"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX199Q5dS7oYI15mWndwUcBCS" X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416 In-Reply-To: <nhfhjr$usf$1@dont-email.me> X-Newsreader: Microsoft Windows Live Mail 14.0.8117.416 Importance: Normal Cancel-Lock: sha1:ympzPYeke56eVHCuvBqOL/6WXg4= X-Priority: 3 X-MSMail-Priority: Normal Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit