LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Help with ModemManager and modem on UART port (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/help-with-modemmanager-and-modem-on-uart-port-4175747941/)

nabelekt-vl 02-25-2025 11:22 AM

Help with ModemManager and modem on UART port
 
I have a SARA-R52M10 cellular modem attached to a Raspberry Pi CM4 running Ubuntu 24.04 on UART3:

Code:

    root@GATEWAY-0x00000028:~# ll /dev/ttyAMA3
    crw-rw---- 1 root dialout 204, 67 Feb 25 01:21 /dev/ttyAMA3

I can get responses from it fine with
Code:

    screen /dev/ttyAMA3 115200
or by running
Code:

    stty -F /dev/ttyAMA3 115200 && cat /dev/ttyAMA3
in one terminal and
Code:

    echo -e "AT\r" > /dev/ttyAMA3
in another.

But I am trying to get ModemManager to talk to it, and I cannot.

I am running:
Code:

    echo 'ACTION!="add|change|move|bind", GOTO="mm_sara_r52m10_end"
    SUBSYSTEMS=="tty", DEVPATH=="/devices/platform/soc/fe201600.serial/fe201600.serial:0/fe201600.serial:0.0/tty/ttyAMA3"
    LABEL="mm_sara_r52m10_end"

    # Rule for ModemManager to handle the device on ttyAMA3
    ACTION=="add|change|move", SUBSYSTEM=="tty", KERNEL=="ttyAMA3", \
        ENV{ID_MM_DEVICE_PROCESS}="1", \
        ENV{ID_MM_TTY_BAUDRATE}="115200", \
        ENV{ID_MM_PORT_TYPE_AT_PRIMARY}="1", \
        ENV{ID_MM_TTY_FLOW_CONTROL}="rts-cts"
    ' > /etc/udev/rules.d/99-sara-r52m10.rules
    udevadm control --reload && udevadm trigger

    systemctl restart ModemManager
    mmcli --scan-modems
    mmcli --list-modems

and get
Code:

    successfully requested to scan devices
    No modems were found

And
Code:

    journalctl -u ModemManager --no-pager --since "$(systemctl show -p ActiveEnterTimestamp ModemManager | cut -d'=' -f2)"
shows:
Code:

    Feb 25 01:27:02 GATEWAY-0x00000028 systemd[1]: Starting ModemManager.service - Modem Manager...
    Feb 25 01:27:02 GATEWAY-0x00000028 ModemManager[1737]: <msg> ModemManager (version 1.23.4) starting in system bus...
    Feb 25 01:27:02 GATEWAY-0x00000028 systemd[1]: Started ModemManager.service - Modem Manager.
    Feb 25 01:27:09 GATEWAY-0x00000028 ModemManager[1737]: <msg> [base-manager] couldn't check support for device '/sys/devices/platform/scb/fd580000.ethernet': not supported by any plugin
    Feb 25 01:27:09 GATEWAY-0x00000028 ModemManager[1737]: <msg> [base-manager] couldn't check support for device '/sys/devices/platform/soc/fe300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1': not supported by any plugin
    Feb 25 01:27:18 GATEWAY-0x00000028 ModemManager[1737]: <msg> [device /sys/devices/platform/soc] creating modem with plugin 'generic' and '1' ports
    Feb 25 01:27:18 GATEWAY-0x00000028 ModemManager[1737]: <wrn> [plugin/generic] could not grab port ttyAMA3: Cannot add port 'tty/ttyAMA3', unhandled port type
    Feb 25 01:27:18 GATEWAY-0x00000028 ModemManager[1737]: <wrn> [base-manager] couldn't create modem for device '/sys/devices/platform/soc': Failed to find primary AT port

Do my rules look ok? I am pretty unconfident in them.

How can I resolve the issue shown in the last couple lines of that output and get ModemManager talking to my modem?

Any thoughts are appreciated. Thanks!

ferrari 02-26-2025 01:15 AM

I can't really assist directly with this, but consider casting your support net wider by posting at the Raspberry Pi Forums

BTW, I assume that your cellular modem doesn't provide QMI network interface support? Most modern devices can be handled as network devices these days.

nabelekt-vl 02-28-2025 11:13 AM

Thank you for your reply. Unfortunately, no, u-blox modems do not support QMI. I will post in the R Pi forum, thanks. I have made some good progress without ModemManager and just creating a ppp interface, chat script, etc. However, I would still prefer for ModemManager to handle the connection. U-blox modems are being phased out, so when we switch to something else, I'll look for QMI support.


All times are GMT -5. The time now is 07:07 PM.