Magnus Therning wrote:
> On Thu, May 8, 2014 at 12:51 PM, Uwe Bonnes
> <[email protected]> wrote:
> >>>>>> "Magnus" == Magnus Therning <[email protected]> writes:
> >
> >     Magnus> The full application I want to port uses ftd2xx to find devices
> >     Magnus> to talk to, I think doing that discovery is easiest via libftdi.
> >     Magnus> However, maybe a combination works well enough, as long as I
> >     Magnus> somehow can tie the items in a `ftdi_device_list` to
> >     Magnus> /dev/ttyUSBx somehow.
> >
> > To name the kernel device, I use udev. Look at appended udev rule. I program
> > deviced like:
> > usb 3-10: new full-speed USB device number 7 using xhci_hcd
> > usb 3-10: New USB device found, idVendor=0403, idProduct=6001
> > usb 3-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> > usb 3-10: Product: CPS_CONN
> > usb 3-10: Manufacturer: IKDA
> > usb 3-10: SerialNumber: 0003
> >
> > and the udev rule created a link like:
> > crw-rw----  1 root dialout 188,   0  8. Mai 12:00 ttyUSB0
> > lrwxrwxrwx  1 root root           7  8. Mai 12:00 CPS_CONN_0003_00 -> 
> > ttyUSB0
> 
> Yes, I did find some mentions of using udev to generate names for
> devices.  It's neat on one level, but I have to say I'm not
> enthusiastic about users having to install extra udev rules just to
> use the program.

Udev has already included the rules to create persistent names for
serial devices in /dev/serial/by-id since version 136 (released in 2009).

Jim

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [email protected]   

Reply via email to