[Networkmanager] U-Blox Sara R412m Fails over Serial

Robert Colvin punk.spot9096 at skrapost.net
Wed Feb 1 11:14:44 UTC 2023


Hi!

I have a U-Blox Sara R412m LTE-M Modem which I am attempting to use with Network Manager. The modem is supplied via an IoT 6 Click from Mikroe (https://www.mikroe.com/lte-iot-6-click). It is connected to a Raspberry Pi 3b running the latest version of Raspbian Lite 32-bit.

to summarise early (more detail will follow) Modem Manager is seeing the modem, however Network Manager is failing to setup a connection; specifically the error I am seeing currently is "failed to connect 'r412m_serial': Connection requested IPv4 but IPv4 is unsupported by the modem." - which is incorrect. 

more detail:

Initially I had an issue with the Raspberry Pi recognising the modem on ttyS0; this ended up being an issue with HW Flow Control, by only connecting RX, TX, 5V and Ground the modem was found on ttyS0 and through minicom (minicom -b 115200 -D /dev/ttyS0) I am able to issue AT Commands to the modem.

currently, Modem Manager is able to see the device

$ mmcli -L
    /org/freedesktop/ModemManager1/Modem/0 [u-blox] SARA-R412M-02B

it looks as I would expect

$ 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

I have setup a connection, and that to me looks correct

===============================================================================
                   Connection profile details (r412m_serial)
===============================================================================
connection.id:                          r412m_serial
connection.uuid:                        4da6b696-4540-4764-a942-2b6facda45ca
connection.stable-id:                   --
connection.type:                        gsm
connection.interface-name:              ttyS0
connection.autoconnect:                 yes
connection.autoconnect-priority:        0
connection.autoconnect-retries:         -1 (default)
connection.multi-connect:               0 (default)
connection.auth-retries:                -1
connection.timestamp:                   0
connection.read-only:                   no
connection.permissions:                 --
connection.zone:                        --
connection.master:                      --
connection.slave-type:                  --
connection.autoconnect-slaves:          -1 (default)
connection.secondaries:                 --
connection.gateway-ping-timeout:        0
connection.metered:                     unknown
connection.lldp:                        default
connection.mdns:                        -1 (default)
connection.llmnr:                       -1 (default)
connection.wait-device-timeout:         -1
-------------------------------------------------------------------------------
ipv4.method:                            auto
ipv4.dns:                               --
ipv4.dns-search:                        --
ipv4.dns-options:                       --
ipv4.dns-priority:                      0
ipv4.addresses:                         --
ipv4.gateway:                           --
ipv4.routes:                            --
ipv4.route-metric:                      -1
ipv4.route-table:                       0 (unspec)
ipv4.routing-rules:                     --
ipv4.ignore-auto-routes:                no
ipv4.ignore-auto-dns:                   no
ipv4.dhcp-client-id:                    --
ipv4.dhcp-iaid:                         --
ipv4.dhcp-timeout:                      0 (default)
ipv4.dhcp-send-hostname:                yes
ipv4.dhcp-hostname:                     --
ipv4.dhcp-fqdn:                         --
ipv4.dhcp-hostname-flags:               0x0 (none)
ipv4.never-default:                     no
ipv4.may-fail:                          yes
ipv4.dad-timeout:                       -1 (default)
ipv4.dhcp-vendor-class-identifier:      --
ipv4.dhcp-reject-servers:               --
-------------------------------------------------------------------------------
ipv6.method:                            disabled
ipv6.dns:                               --
ipv6.dns-search:                        --
ipv6.dns-options:                       --
ipv6.dns-priority:                      0
ipv6.addresses:                         --
ipv6.gateway:                           --
ipv6.routes:                            --
ipv6.route-metric:                      -1
ipv6.route-table:                       0 (unspec)
ipv6.routing-rules:                     --
ipv6.ignore-auto-routes:                no
ipv6.ignore-auto-dns:                   no
ipv6.never-default:                     no
ipv6.may-fail:                          yes
ipv6.ip6-privacy:                       -1 (unknown)
ipv6.addr-gen-mode:                     stable-privacy
ipv6.ra-timeout:                        0 (default)
ipv6.dhcp-duid:                         --
ipv6.dhcp-iaid:                         --
ipv6.dhcp-timeout:                      0 (default)
ipv6.dhcp-send-hostname:                yes
ipv6.dhcp-hostname:                     --
ipv6.dhcp-hostname-flags:               0x0 (none)
ipv6.token:                             --
-------------------------------------------------------------------------------
gsm.auto-config:                        no
gsm.number:                             --
gsm.username:                           --
gsm.password:                           <hidden>
gsm.password-flags:                     0 (none)
gsm.apn:                                <redacted>
gsm.network-id:                         --
gsm.pin:                                <hidden>
gsm.pin-flags:                          0 (none)
gsm.home-only:                          no
gsm.device-id:                          --
gsm.sim-id:                             --
gsm.sim-operator-id:                    --
gsm.mtu:                                auto
-------------------------------------------------------------------------------
proxy.method:                           none
proxy.browser-only:                     no
proxy.pac-url:                          --
proxy.pac-script:                       --
-------------------------------------------------------------------------------

in the above, by default IPV6 is auto; however this results in the following error:

failed to connect 'r412m_serial': Connection requested both IPv4 and IPv6 but dual-stack addressing is unsupported by the modem.

this is incorrect, the modem does indeed support dual-stack IPV4V6; however the APN I am connecting to doesn't and so I set ipv6.method to disabled; this results in the error I am seeing currently

failed to connect 'r412m_serial': Connection requested IPv4 but IPv4 is unsupported by the modem.

which again, is incorrect, the modem definitely supports IPV4, as does the APN

$ nmcli d
DEVICE         TYPE      STATE         CONNECTION                     
wlan0          wifi      connected     home_wifi
ttyS0          gsm       disconnected  --                             
p2p-dev-wlan0  wifi-p2p  disconnected  --                             
eth0           ethernet  unavailable   --                             
lo             loopback  unmanaged     --   

$ nmcli c

NAME                            UUID                                  TYPE      DEVICE 
home_wifi                       8dd9fd2d-f41f-46ac-a03e-bbc7951c2763  wifi      wlan0  
Wired connection 1              2c4f0563-b9c0-3e9a-8474-c72993f8dfa8  ethernet  --     
r412m_serial                    4da6b696-4540-4764-a942-2b6facda45ca  gsm       --     
r412m_usb                       8533c1ad-a8df-4f37-a533-82dd087f3614  gsm       -- 

as can be seen in the above, the IoT 6 click provides a USB interface. The r412m_usb connection works perfectly, further I can use PPP with this board using ttyS0 with no issue. Thus my suspicion that the issue is somewhere in the interaction between NetworkManger and the R412m (for PPP I needed to adjust the chat-connect to only look for endings of words as the first character was garbled sometimes)

$ sudo pon
$ ping -I ppp0 -c5 www.google.com.au
PING www.google.com.au (142.250.187.99) from 10.103.205.10 ppp0: 56(84) bytes of data.
64 bytes from sof02s44-in-f3.1e100.net (142.250.187.99): icmp_seq=1 ttl=114 time=289 ms
64 bytes from sof02s44-in-f3.1e100.net (142.250.187.99): icmp_seq=2 ttl=114 time=347 ms
64 bytes from sof02s44-in-f3.1e100.net (142.250.187.99): icmp_seq=3 ttl=114 time=289 ms
64 bytes from sof02s44-in-f3.1e100.net (142.250.187.99): icmp_seq=4 ttl=114 time=329 ms
64 bytes from sof02s44-in-f3.1e100.net (142.250.187.99): icmp_seq=5 ttl=114 time=290 ms

--- www.google.com.au ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4000ms
rtt min/avg/max/mdev = 289.279/308.917/346.877/24.422 ms

with Network Manager, I notice in the connection there is a serial section, but it's not printed by default - looking at it, it shows

nmcli> goto serial
You may edit the following properties: baud, bits, parity, stopbits, send-delay
nmcli serial> print
['serial' setting values]
serial.baud:                            57600
serial.bits:                            8
serial.parity:                          none
serial.stopbits:                        1
serial.send-delay:                      0

the r412m though is set to use 115200 (which is how I have MM setup)

$ sudo systemctl stop ModemManager
$ sudo minicom -b 115200 -D /dev/ttyS0

AT+CGMM

SARA-R412M-02B

OK
AT+IPR?


+IPR:115200 

I have adjusted the serial properties to use 115200, but that has not resolved the issue 

Lastly, using USB is not an option as the R422m device will not use USB for data, rather it will be over UART hence this work; it is preferential to use NM rather than PPP if possible

I am at a loss as to what the issue could be
- is the fact that it assumes the modem does not support IPV4 and IPV4V6 a bug which should be reported?
- apart from Modem Manager detecting the modem, I am not setting up the PDP connection with MM, rather allowing NM to do that; is it best to setup a MM simple-connection first and then allow NM to manage the network connections?

cheers


More information about the Networkmanager mailing list