FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 12-10-2008, 08:58 PM
Martin McCormick
 
Default USB Serial RS-232 Converter Question

I have 2 USB RS-232 dongles that will be installed on a Ubuntu
system, one per USB port. I determined which one was ttyUSB0 by
trial and error, rebooted the system and it was still ttyUSB0.
That's a very good thing, but my question is, is it likely to
always boot up and assign the 2 dongles their tty numbers in the
same order?

I am sure that if one removed ttyUSB0, the dongle that
is now ttyUSB1 would become ttyUSB0 on the next reboot.
Normally, they will be connected at all times and will be
connected to 2 different RS-232 streams. If there was a question
on reboot, I would need to figure out some strategy to make sure
each application got the right stream each time.

Martin McCormick WB5AGZ Stillwater, OK
Systems Engineer
OSU Information Technology Department Telecommunications Services Group

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-11-2008, 05:58 AM
Nils Kassube
 
Default USB Serial RS-232 Converter Question

Martin McCormick wrote:
> I have 2 USB RS-232 dongles that will be installed on a Ubuntu
> system, one per USB port. I determined which one was ttyUSB0 by
> trial and error, rebooted the system and it was still ttyUSB0.
> That's a very good thing, but my question is, is it likely to
> always boot up and assign the 2 dongles their tty numbers in the
> same order?

You can't rely on constant association of device and device name. The
kernel gives the device name ttyUSB0 to the first device detected. If
both devices are different models you can make your own udev rules which
would create the wanted device name. See "man udev" and / or [1]. If both
devices are the same type it isn't likely that you can distinguish them
from the USB device information. With the command "sudo lsusb -v" you can
check if there is a difference between the devices. If both devices look
the same you would probably have to probe the device on the other end of
the cable to find out which device is connected to which device name. You
could then setup symbolic links to the correct device names and use the
symbolic links instead of the device names directly.


Nils

[1] <http://reactivated.net/writing_udev_rules.html>

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-11-2008, 08:02 AM
Toby Dickenson
 
Default USB Serial RS-232 Converter Question

Nils Kassube wrote:

> You can make your own udev rules which
> would create the wanted device name.

Here is an example to work from. I use this to assign the /dev/ttyUSBfan name to a port based on its embedded serial number, and also set the permissions and group. I hope this helps,

$ cat /etc/udev/rules.d/55-custom-names.rules
KERNEL=="ttyUSB*", ATTRS{serial}=="FTBA8KFX", NAME="ttyUSBfan", GROUP="toby", MODE="0660"




--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 05:54 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org