gnokii-users
[Top][All Lists]
Advanced

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

Re: how a phone mapped to a particular /dev/ttyUSBX ?


From: Petter Törnberg
Subject: Re: how a phone mapped to a particular /dev/ttyUSBX ?
Date: Wed, 7 Sep 2011 08:55:43 +0200

Hi

I'm far from an expert on Linux, but I've previously had some problem
with the assumption that the usb devices would end up at the same
position in /dev/. My phones sometimes changed name in the file system
(possibly caused by someone at the server doing something stupid),
wrecking all sorts of havoc in my gnokii program (when the program
tried using e.g. a USB-hub as a phone.)

A better solution is thus to use udev-rules
(http://reactivated.net/writing_udev_rules.html) to always place the
device in the same position in the file system. However, this means
that you must be able to uniquely identify your different USB-devices
(using e.g. an ID that is embedded in the device). Alas, usually, as
in my case, my USB-cables were cheap and all had the same name and ID,
and this was not possible (I instead rather painfully rewrote my
program in such a way that this was handled by software). But this
might not be the case for you.

The following forum discussion should provide you with adequate
information to attempt an udev solution. If not, try googling with
keywords "lsusb" and "udev".

http://forums.fedoraforum.org/archive/index.php/t-140845.html
http://www.mail-archive.com/address@hidden/msg00991.html
https://bugs.launchpad.net/ubuntu/+source/udev/+bug/107208


Good luck!

Kind Regards,
Petter

On Tue, Sep 6, 2011 at 3:42 PM, Jon Berg <address@hidden> wrote:
> Hi,
>
> Perhaps a stupid question about linux.
>
> I was just wondering how the a phone is mapped to a particular
> /dev/ttyUSB0 -1 -2 -3 etc. ?
>
> It is connected with CA-42.
>
> Is it correct that it gets mapped the order it was first connected and
> then stores the id of the usb device somewhere?
>
> Is it safe to assume the a device will be connected and have the same
> /dev/ttyUSB0 number if you connect more devices, or disconnect some or
> rearrange what is connected?
>
>
> Regards,
> Jon.
>
> _______________________________________________
> gnokii-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/gnokii-users
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]