On 02/13/2018 01:53 PM, Pau Espin Pedrol wrote:
The current udevng.c implementation sets dbus path names for modems
based on type and a number incremented seuqntially for each new modem
found. As a result, the dbus path for a given device is non
deterministic, since it depends on the devices available during ofono
Why should it be deterministic?
Furthermore, if a modem crashes and reboots while in operation, then
udev will trigger a remove event followed by a create event, and the
same modem will now be given a different name (as the sequence number is
This is non suitable for systems handling several modems which want to
identify them easily based on its path.
This sounds like a very specific non-real world usecase, right? I mean
why don't you simply compare the IMEI if you really care?
This patch introduces a way to be able to set persistent names for
specific devices while still permitting previous dynamic naming
One can set a persistent name using udev rules for the target device
which set the OFONO_PATHNAME env property. If ofono finds this property
set, it will use its value as the dbus path name for the modem.
I'm hesitant to take this patch as udev logic is already complex and
this doesn't seem to be relevant for anyone else besides your test system.
$ cat /etc/udev/rules.d/90-local.rules
$ udevadm info -p
$ mdbus2 -s org.ofono
How are you making sure that dbus path is valid? ofono_modem_create
can fail after all...
plugins/udevng.c | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
ofono mailing list