libftdi Archives

Subject: Re: Writing and reading to a FT232R

From: Robert Pearce <rob@xxxxxxxxxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Mon, 7 Nov 2011 18:51:29 +0000
On Mon, 7 Nov 2011 16:17:32 +0100 Uwe wrote:
> 
> You can programm VID/PID/Vendor/Description/Serial. I tried something like
> SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{product}=="QM07", NAME="qm07_%n"
> in
> /etc/udev/rules.d/10-udev.rules
> and even so udev was not happy with my syntax, the devices/links were
> created.

While this is the nice way to do it in many cases, the current version
of UDEV will whinge about the "NAME" if it doesn't match the kernel
default. Since one of the claimed driving factors for UDEV was "to
remove (naming) policy from the kernel", this seems utterly broken to
me, but there you go.

The approved way is to substitute "SYMLINK" for "NAME" and then you get
both the kernel default and the name you want.

However, for the OP's purpose this is still no good, because he has two
"identical" FTDI chips. He may have better luck using:

  SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{serial}=="xxxxxxx", 
SYMLINK="port_01"

He should definitely read up on UDEV rules. I have to every time I try 
to write one!

Cheers,
Rob

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

Current Thread