libftdi Archives

Subject: Re: UDEV, was: Re: Writing and reading to a FT232R

From: Uwe Bonnes <bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 8 Nov 2011 10:43:36 +0100
>>>>> "Uwe" == Uwe Bonnes <bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> writes:

>>>>> "Robert" == Robert Pearce <rob@xxxxxxxxxxxxxxxxxxxx> writes:
    Robert> Hi Uwe, On Mon, 7 Nov 2011 20:41:26 +0100 you wrote:
    >>>
    Robert> SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{serial}=="xxxxxxx",
    Robert> SYMLINK="port_01"
    >>> Robert,
    >>> 
    >>> it there any way I can have ATTRS{serial} as SYMLINK target?

    Robert> You mean have the device name (or link path) contain the serial
    Robert> number?  Yes, I think so, but I've not tried it. In theory the
    Robert> %s modifier gives access to attributes, so:

    Robert> SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", SYMLINK="sio_%s{serial}"

    Robert> I haven't tried it, though.

    Uwe> SUBSYSTEMS=="usb", KERNEL=="ttyUSB*",
    Uwe> SYMLINK="%s{product}_%s{serial}" produces lrwxrwxrwx 1 root root 7
    Uwe> 8. Nov 10:05 _ -> ttyUSB0

    Uwe> SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{vendor}=="IKDA",
    Uwe> SYMLINK="%s{product}_%s{serial}" doesn't produce any link

SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{manufacturer}=="IKDA", 
SYMLINK="%s{product}_%s{serial}"

works as expected:
lrwxrwxrwx  1 root root           7  8. Nov 10:41 QM07_CONN_0001 -> ttyUSB0

Thanks!
-- 
Uwe Bonnes                bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread