Re: USB to Serial assignemts?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Mikkel L. Ellertson wrote:
Jeffrey Ross wrote:
Mikkel L. Ellertson wrote:
Jeffrey Ross wrote:
How does Fedora assign which USB to serial adapter is assigned
/dev/ttyUSB0, /dev/ttyUSB1 etc through a reboot?

I basically want to make sure that one specific USB adapter remains at
one location throughout a reload and unfortunately the on board serial
port doesn't work (hardware problem)

Thanks..Jeff

I believe it assigns them in the order it finds them when scanning
the bus. Changing where the adapter is plugged in, ro plugging in
another serial device can change that. You may want to consider
creating a udev rule that creates a symlink to that serial adapter
with a meaningful name. I do this with the serial adapter for my
GPS. (Actually, this is my old rule. I am working on having it tell
gpsd that it was added/removed, and supporting more then one
device.) If you have more then one device with the same vender and
product ID, you can also test the serial number.

KERNEL=="ttyUSB*", SYSFS{idVendor}=="067b",
SYSFS{idProduct}=="aaa0", SYMLINK+="gps"

Mikkel
Since I have two of these USB to serial adapters made by the same
manufacture
I guess the serial number is going to be the way to go, and I like the
symlink
idea, makes sense and is easy enough to implement in my scripts.

The device according to "lsusb -v" shows the following (among a lot of
other stuff):

 idVendor           0x050d Belkin Components
 idProduct          0x0109 F5U109/F5U409 PDA Adapter
 bcdDevice            1.02
 iManufacturer           1 Belkin USB PDA Adapter
 iProduct                2
 iSerial                 3 799020


If I understand correctly I would create a file in /etc/udev/rules.d say
/etc/udev/rules.d/serialusb an put the following lines:

KERNEL=="ttyUSB*", SYSFS{idSerial}=="799020",
SYSFS{idProduct}=="0109", SYMLINK+="serial"

The next time the device was inserted into the USB port udev would create
the mapping so that /dev/serial was always this adapter.

Did I get it right?

Thanks!

Jeff

It looks right. I would put it a local rules file - something like:
/etc/udev/rules.d/10-local.rules

Mikkel

took a little bit... created the following in /etc/udev/rules.d/10-local.rules:

BUS=="usb", SYSFS{serial}=="799020",KERNEL=="ttyUSB*", SYMLINK+="serial", GROUP="uucp"

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux