D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Sheevaplug/Ubuntu/USB serial/udev fun

 

On 13/04/10 19:41, James Fidell wrote:
I have a Sheevaplug running ubuntu that has a number of USB serial
devices connected. On reboots these can be randomly renumbered such
that what was for example /dev/ttyUSB0 last time is something else this
time.

What I'd like to do is to tweak the udev rules in /etc/udev/rules.d
such that udev will also create, say, a symlink called /dev/modem for
the device that's a modem and /dev/thingy for the one with thingy
connected. Presumably I need to have a bit of udev configuration
that matches the ttyUSB* device name and compares the device ID to
make the correct link.

Unfortunately I appear to have become lost in a twisty turny maze of
documentation, all alike.

Can anyone supply an example of how to do this?

Thanks,
James



I've done it a while ago with a couple of hard drives, but I'd guess the theory is the same (I used UUID's on the drives IIRC, but I gather it can be used with USB ID's too).

There is a guide here which covers how to do it with discs, it might at least give you some pointers on how to do it with other USB drives.

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

Rob


--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html