[SOLVED] Writing UDEV Rule for peripherals

What works, and doesn't, for you. Be specific, and please include Puppy version.
Post Reply
Message
Author
laserman
Posts: 22
Joined: Sun 18 Oct 2009, 16:16
Location: Florida, USA

[SOLVED] Writing UDEV Rule for peripherals

#1 Post by laserman »

I currently have Wine installed on Puppy 5.2.8 with an amateur radio program running, providing data through my terminal node controller (TNC) and radio for the local area. The TNC is connected via USB. When it is connected, it is given /dev/TTYUSB0 or whatever one wins when the program is booted. I have another item plugged into another port that sometimes wins out, taking the spot the TNC had and it causes communication issues with the program.

I originally tested this set up with Ubuntu 10.04 and did some research on writing UDEV Rules and didn't find a lot of information on it but what I did find, I was able to successfully assign a special name to my TNC, regardless of what order they were registered with the help of this website.

http://hackaday.com/2009/09/18/how-to-write-udev-rules/


I used udevadm command

Code: Select all

udevadm info -a -p $(udevadm info -q path -n /dev/ttyUSB0)
listed on this site and was able to extract the identifying characteristics and wrote a rule and placed it in /etc/udev/rules.d.

Code: Select all

SUBSYSTEMS=="usb", ATTRS{product}=="USB-Serial Controller D", KERNELS=="2-2", SYMLINK+="tt4"
The key thing with this rule was one, identifying the product and two, the fact that it was plugged into a specific USB port. I had two adapters, both being the same and the only thing that separated them was the physical port they were plugged into and it worked. It kept all of the programs happy and separate.

I tried this same approach with Puppy 5.2.8 and it did not recognize the device the same way.

My question for the group is, are the UDEV rule writings any different and if so, any ideas?

laserman
Last edited by laserman on Tue 08 Oct 2013, 00:59, edited 1 time in total.

laserman
Posts: 22
Joined: Sun 18 Oct 2009, 16:16
Location: Florida, USA

#2 Post by laserman »

Mark this one solved.

Couldn't stand idly by. I looked back over my work and found a typo in the rule I had written. Where the KERNELS was written as 2-2. It should have been 2-1.

The rule as it was written was fine, just didn't proof my rule.

Good info anyways. If anyone wants to specify their peripherals, this is a good start and I have other links if you like.

laserman

Post Reply