* udev rules for devices that do not have serial
@ 2010-10-11 14:40 Matteo Sgalaberni
2010-10-11 15:34 ` Kay Sievers
0 siblings, 1 reply; 2+ messages in thread
From: Matteo Sgalaberni @ 2010-10-11 14:40 UTC (permalink / raw)
To: linux-hotplug
Hi,
I'm searching a way to write a udev rule for a device that do not expose
any unique value.
I need to attach multiple mobile phones and give to them the same device
name as in every phone I have different numbers... So I need to be sure
that when I receive a call or SMS from /dev/myphone1 is connected the
myphone1 and not myphone2 until reboots or attach-reattach.
The real problem is that the devices that I'm using are not exposing any
unique value from the usbinfo like iSerial or other unique serial
numbers...
I'm tring to do this with some Alcatel Ot-800 but is the same with other
phones...
Any suggestion?
Thanks!
Matteo
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: udev rules for devices that do not have serial
2010-10-11 14:40 udev rules for devices that do not have serial Matteo Sgalaberni
@ 2010-10-11 15:34 ` Kay Sievers
0 siblings, 0 replies; 2+ messages in thread
From: Kay Sievers @ 2010-10-11 15:34 UTC (permalink / raw)
To: linux-hotplug
On Mon, Oct 11, 2010 at 16:40, Matteo Sgalaberni <sgala@sgala.com> wrote:
> I'm searching a way to write a udev rule for a device that do not expose
> any unique value.
>
> I need to attach multiple mobile phones and give to them the same device
> name as in every phone I have different numbers... So I need to be sure
> that when I receive a call or SMS from /dev/myphone1 is connected the
> myphone1 and not myphone2 until reboots or attach-reattach.
>
> The real problem is that the devices that I'm using are not exposing any
> unique value from the usbinfo like iSerial or other unique serial
> numbers...
>
> I'm tring to do this with some Alcatel Ot-800 but is the same with other
> phones...
>
> Any suggestion?
I guess at the AT command level you can distinguish the phones pretty
easily. Might be that the layer of using /dev is just not the right
one to solve your problem.
Usually devices with all-the-same properties are identified by the
physical connection path. But that allows no re-config, not even for a
single device, and therefore might be not the right thing to use to
solve some setups.
Serial ports have both types of persistent identifiers in udev.
/dev/serial/by-id/ + by-path/
http://git.kernel.org/?p=linux/hotplug/udev.git;a=commit;h¼4c751802147f1ff21bf52a57a2976754949453
Kay
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-11 15:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-11 14:40 udev rules for devices that do not have serial Matteo Sgalaberni
2010-10-11 15:34 ` Kay Sievers
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.