ModemManager 1.6.4 on Raspbian Stretch cannot acquire the 'org.freedesktop.ModemManager1' service name

Valens D'Silva valens.dsilva at revivalanalytics.com
Sun Apr 5 22:01:11 UTC 2020


Thank you Aleksander for the tips and help.

I tried a newer distro with

Setting up network-manager (1.14.6-2+deb10u1) …

Setting up modemmanager (1.10.0-1) ...

I’m still running into errors but I’ll post my question on our Git issues tracker if that is better.

Thanks,

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

From: Aleksander Morgado<mailto:aleksander at aleksander.es>
Sent: Saturday, April 4, 2020 2:24 AM
To: Valens D'Silva<mailto:valens.dsilva at revivalanalytics.com>
Cc: modemmanager-devel at lists.freedesktop.org<mailto:modemmanager-devel at lists.freedesktop.org>
Subject: Re: ModemManager 1.6.4 on Raspbian Stretch cannot acquire the 'org.freedesktop.ModemManager1' service name

Hey,

>
> I now see that the port /dev/ttyAMA0 is not whitelisted.
>
>
>
> I found a post from an old mailing list on identifying the kernel driver and whitelisting it using this
>
>
>
> ACTION!="add|change|move", GOTO="mm_platform_device_whitelist_end"
>
> SUBSYSTEM!="platform", GOTO="mm_platform_device_whitelist_end"
>
> DRIVERS=="imx-uart", ENV{ID_MM_PLATFORM_DRIVER_PROBE}="1"
>
> LABEL="mm_platform_device_whitelist_end"
>

Please upgrade ModemManager to a newer version, because 1.6.4 is not
even the latest version in the 1.6.x stable series. Ideally, you
should upgrade to the latest 1.12.8 which is the latest stable
version.

>
>
> Before I found all this info I created 2 udev rules for /dev/ttyAMA0 and the /devices/platform/soc/20201000.serial. I named them randomly
>
>
>
> cat /etc/udev/rules.d/s7648-ttyama0.rules
>
> ACTION=="add", KERNEL=="20201000.serial", ENV{ID_MM_PLATFORM_DRIVER_PROBE}="1"
>

The best way to user-tag the devices, in my opinion, is to use the
device sysfs path of the port. E.g. in order to tag a single TTY you
would get the full realpath of the port:

$ realpath /sys/class/tty/ttyUSB0
/sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.4/1-11.4.1/1-11.4.1:1.0/ttyUSB0/tty/ttyUSB0

And then add the tag based on its devpath (tagging the USB interface,
and *without* the "/sys" prefix):

$ sudo vim /lib/udev/rules.d/78-mm-user.rules
ACTION!="add|change|move", GOTO="mm_user_rules_end"
DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.4/1-11.4.1/1-11.4.1:1.0",ENV{ID_MM_PLATFORM_DRIVER_PROBE}="1"
LABEL="mm_user_rules_end"

Now reload rules and trigger them so that they are re-applied:
$ sudo udevadm control --reload
$ sudo udevadm trigger

Now, check that the tag is really applied:
$ sudo udevadm info -p
/sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.4/1-11.4.1/1-11.4.1:1.0
P: /devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.4/1-11.4.1/1-11.4.1:1.0
L: 0
E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.4/1-11.4.1/1-11.4.1:1.0
....
E: ID_MM_PLATFORM_DRIVER_PROBE=1

After that, restart ModemManager.

But please note, ID_MM_PLATFORM_DRIVER_PROBE is no longer supported
since 1.12, you should instead use the more generic
ID_MM_DEVICE_PROCESS introduced in 1.10,

>
>
> cat /etc/udev/rules.d/ttyama0.rules
>
> ACTION=="add|change|move", KERNEL=="ttyAMA0", ENV{ID_MM_TTY_FLOW_CONTROL}="rts-cts", ENV{ID_MM_TTY_BAUDRATE}="115200"
>

Both ID_MM_TTY_BAUDRATE and ID_MM_TTY_FLOW_CONTROL were introduced in
ModemManager 1.10.

>
>
> And lastly here is the output of udevadm
>
>
>
> udevadm info --attribute-walk /dev/ttyAMA0
>
>

You shouldn't look at the attributes, you should look at the
properties. See the udevadm commands above.

Cheers!

--
Aleksander
https://aleksander.es

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20200405/b9a21d5a/attachment.htm>


More information about the ModemManager-devel mailing list