[Xastir] writing udev rules

Tony Hunt wavetel at internode.on.net
Tue May 5 08:18:20 EDT 2009


Thanks to Jeremy for posting on this one originally. I found the udev rules
very easy to make work and have tested it on Debian 5 and also Ubuntu 7.01
so it should work on Ubuntu 9 .

The web site with the info on writing udev rules was valuable and frankly
there is still probably more I could get out of it.

Interestingly my Debian 5 box seems to have issues and I am stuck with
multiple USB devices for long periods after plugin/out . Currently I have
/ttyUSB0 to /ttyUSB5 inclusive and yet there is only 1 USB port and 1 USB
device being the TNC-X . The Devices just dont clear down for days perhaps
until reboot. This is another issue but the udev rules kind of get around
this.

Its a persistant naming scheme that makes a symlink to a specified device
when its seen.
I think the file contents that follow explain it all. Most of the file
consists of comments. I will look at forwarding this info to John Hansen
maker of the TNC-X .

Here are the contents of a rule file called 10-tnc-x.rules
The 10 on the front of the file name is important but the rest of the name
is not.

# udev rules for TNC-X
# This file is usually located at   /etc/udev/rules.d/   check your system
to be sure.
# Using the serial of the individual TNC-X FTDI USB device it is most likely
possible to have
# multiple TNC-X devices attached with individual persistant names.
# Other attributes like product manufacturer idProduct are common
identification attributes
# not unique to a specific TNC-X
# To find the attributes you will need use USBview (GTK Gui) or udevinfo
from a console
# I have even found the required attributes in the syslog after plugging in
the device.
# Usually a TNC-X shows as a device /dev/ttyUSB0 or similar before you
install any udev rules
# To check your udev rule is working for the TNC-X use   ls /dev/TNC*   from
the console
# If this lists your TNC-X then the udev rule is working.
#
SUBSYSTEMS=="usb", ATTRS{serial}=="FS2SIUJX", KERNEL=="ttyUSB*",
SYMLINK+="TNC-X-0"
# SUBSYSTEMS=="usb", ATTRS{product}=="TNC-X from W2FS", KERNEL=="ttyUSB*",
SYMLINK+="TNC-X"
# SUBSYSTEMS=="usb", ATTRS{manufacturer}=="W2FS", KERNEL=="ttyUSB*",
SYMLINK+="TNC-X"
# SUBSYSTEMS=="usb", ATTRS{idProduct}=="ebe0", KERNEL=="ttyUSB*",
SYMLINK+="TNC-X"

Tony Hunt  VK5AH

----- Original Message ----- 

> Date: Sat, 02 May 2009 09:48:08 -0700
> From: AC7YY - Kim <ac7yy at comcast.net>
> Subject: [Xastir] writing udev rules
> To: Xastir - APRS client software discussion <xastir at lists.xastir.org>
> Message-ID: <1241282888.3774.19.camel at kim-desktop>
> Content-Type: text/plain
>
> On Sat, 2009-05-02 at 08:51 -0500, Jeremy Utley wrote:
> >
> > This would be done via custom udev rules.  The following web page will
> > give you a run down on writing your own custom rules for Udev:
> >
> > http://reactivated.net/writing_udev_rules.html
> >
> > Hope this helps!
> >
> > Jeremy, N0YAX
>
> This appears to be a solution to a problem I ran into with the
> installation of ubuntu 9.04 on my workstation. As I understand it, 9.04
> did away with the legacy method of creation of devices. It uses udev
> only.
>
> My problem here, is that pseudo tty ports (ptyp and ttyp pairs) do not
> exist in /dev  I have used these to access RF ports for xastir for the
> past few years.
>
> Reading the udev rules is confusing me. Has anyone created the ptyp/ttyp
> pairs using udev rules? An example would be outstanding.
>
> Advice ??
>
> kim - ac7yy





More information about the Xastir mailing list