U-Blox R412m IP capabilities incorrectly reported over serial
When Network Manager attempts to setup a mobile-broadband connection to a U-Blox R412m over serial (ttyS0) an error is reported
failed to connect 'r412m-serial': Connection requested IPv4 but IPv4 is unsupported by the modem.
This is incorrect, as the r412m supports IPv4, IPv6 and dual-stack. Initially I believed this to be an issue in Network Manager, however investigating further, it appears the MM is not able to identify the IP capabilities over serial for this modem.
I have tested this modem over USB using QMI WWAN, and this works as expected, NM is able to setup a connection and investigating the modem in MM, the expected capabilities, modes etc are reported. However this is not the case when using serial.
mmcli -L is able to see the modem, and I am able to setup a connection using simple-connect using serial, I am also able to create a connection using PPP, however as reported, NM + MM with serial does not work.
Looking at the list of supported devices, although U-Blox devices are not mentioned, it does list "qualcomm" and as the r412m works over qmi, I believe it should be supported.
$ mmcli -L
/org/freedesktop/ModemManager1/Modem/0 [u-blox] SARA-R412M-02B
$ mmcli -m 0
--------------------------------
General | dbus path: /org/freedesktop/ModemManager1/Modem/0
| device id: 69b7c92de0606d6bbd08dd68bbf7a8ddd0cddd3e
--------------------------------
Hardware | manufacturer: u-blox
| model: SARA-R412M-02B
| firmware revision: M0.12.00 [Dec 04 2020 16:05:31]
| supported: gsm-umts, lte
| current: gsm-umts, lte
| equipment id: 359159977335935
--------------------------------
System | device: /sys/devices/platform/soc/3f215040.serial
| drivers: bcm2835-aux-uart
| plugin: u-blox
| primary port: ttyS0
| ports: ttyS0 (at)
--------------------------------
Status | state: registered
| power state: on
| access tech: lte
| signal quality: 100% (recent)
--------------------------------
Modes | supported: allowed: any; preferred: none
| current: allowed: any; preferred: none
--------------------------------
Bands | supported: egsm, dcs, pcs, g850, eutran-1, eutran-2, eutran-3,
| eutran-4, eutran-5, eutran-8, eutran-12, eutran-13, eutran-19,
| eutran-20, eutran-28, eutran-39
--------------------------------
3GPP | imei: <redacted>
| operator id: <redacted>
| operator name: <redacted>
| registration: home
--------------------------------
3GPP EPS | ue mode of operation: csps-2
--------------------------------
SIM | dbus path: /org/freedesktop/ModemManager1/SIM/0
compare to using QMI
$ mmcli -L
/org/freedesktop/ModemManager1/Modem/1 [u-blox] SARA-R412M-02B
pi@frankenpi:~ $ mmcli -m 1
--------------------------------
General | dbus path: /org/freedesktop/ModemManager1/Modem/1
| device id: de83324a2f10f4fb23e2cf14ef59743b3f3d919c
--------------------------------
Hardware | manufacturer: u-blox
| model: SARA-R412M-02B
| firmware revision: M0.12.00 1 [Dec 04 2020 16:05:31]
| carrier config: default
| h/w revision: 10000
| supported: gsm-umts, lte
| current: gsm-umts, lte
| equipment id: 359159977335935
--------------------------------
System | device: /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4
| drivers: qmi_wwan, option1
| plugin: generic
| primary port: cdc-wdm0
| ports: cdc-wdm0 (qmi), ttyUSB0 (qcdm), ttyUSB1 (at), wwan0 (net)
--------------------------------
Status | lock: sim-pin2
| unlock retries: sim-pin (3), sim-puk (10), sim-pin2 (3), sim-puk2 (10)
| state: registered
| power state: on
| access tech: lte
| signal quality: 96% (recent)
--------------------------------
Modes | supported: allowed: 2g; preferred: none
| allowed: 4g; preferred: none
| allowed: 2g, 4g; preferred: 4g
| allowed: 2g, 4g; preferred: 2g
| current: allowed: 2g, 4g; preferred: 2g
--------------------------------
Bands | supported: egsm, dcs, pcs, g850, eutran-2, eutran-3, eutran-4,
| eutran-5, eutran-8, eutran-12, eutran-13, eutran-20, eutran-26,
| eutran-28
| current: egsm, dcs, pcs, g850, eutran-2, eutran-3, eutran-4,
| eutran-5, eutran-8, eutran-12, eutran-13, eutran-20, eutran-26,
| eutran-28
--------------------------------
IP | supported: ipv4, ipv6, ipv4v6
--------------------------------
3GPP | imei: redacted
| operator id: redacted
| operator name: redacted
| registration: home
--------------------------------
3GPP EPS | ue mode of operation: csps-2
--------------------------------
SIM | dbus path: /org/freedesktop/ModemManager1/SIM/1
although this device supports USB (and so QMI), this is not always so, the r422 variant of this modem removes the option to use data over USB and enforces data over serial, and so I suspect this issue would also occur for the r422