Hi NetworkManager authors,

***********************************************************************************************************

What I except:
    I want NetworkManager can auto-connect the GSM module in my board when
reboot every time,
    So I set the 'connection.autoconnect' to 'yes' and set the
'connection.autoconnect-retries' to 3.

What I encounter:
    I found that the NetworkManager auto-connect GSM module is not stable,
sometimes it works fine, but sometimes it is not ok

What I find:
    I checked the log of NetworkManager in syslog and found that
NetworkManager tried to connect the GSM module only once in the condition
auto-connect failed.
    I have set the 'connection.autoconnect' to 3 and why does
NetworkManager reconnect only once sometimes?


***********************************************************************************************************

1. The Version of softwares is as follows:

root@debian:~# nmcli -v

nmcli tool, version 1.14.6


root@debian:~# mmcli -V

mmcli 1.10.0


root@debian:~# cat /proc/version

Linux version 4.19.38+ (builder@6628e7f94e5a) (gcc version 8.3.0 (Debian
8.3.0-2)) #1 SMP PREEMPT Mon Oct 14 20:34:37 UTC 2019

***********************************************************************************************************

2. My GSM connection file is as follows:

root@debian:~# nmcli connection show id cellular4g

connection.id:                          cellular4g
connection.uuid:                        ce204ddd-8e3e-4a15-8435-e4b7f399e353
connection.stable-id:                   --
connection.type:                        gsm
connection.interface-name:              --
connection.autoconnect:                 yes
connection.autoconnect-priority:        0
connection.autoconnect-retries:         3
connection.multi-connect:               0 (default)
connection.auth-retries:                -1
connection.timestamp:                   1571799683
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)
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.ignore-auto-routes:                no
ipv4.ignore-auto-dns:                   no
ipv4.dhcp-client-id:                    --
ipv4.dhcp-timeout:                      0 (default)
ipv4.dhcp-send-hostname:                yes
ipv4.dhcp-hostname:                     --
ipv4.dhcp-fqdn:                         --
ipv4.never-default:                     no
ipv4.may-fail:                          yes
ipv4.dad-timeout:                       -1 (default)
ipv6.method:                            auto
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.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.dhcp-duid:                         --
ipv6.dhcp-send-hostname:                yes
ipv6.dhcp-hostname:                     --
ipv6.token:                             --
gsm.number:                             *99#
gsm.username:                           --
gsm.password:                           <hidden>
gsm.password-flags:                     0 (none)
gsm.apn:                                ctnet
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:                       --
GENERAL.NAME:                           cellular4g
GENERAL.UUID:                           ce204ddd-8e3e-4a15-8435-e4b7f399e353
GENERAL.DEVICES:                        ttyUSB1
GENERAL.STATE:                          activated
GENERAL.DEFAULT:                        yes
GENERAL.DEFAULT6:                       no
GENERAL.SPEC-OBJECT:                    --
GENERAL.VPN:                            no
GENERAL.DBUS-PATH:
 /org/freedesktop/NetworkManager/ActiveConnection/2
GENERAL.CON-PATH:
/org/freedesktop/NetworkManager/Settings/1
GENERAL.ZONE:                           --
GENERAL.MASTER-PATH:                    --
IP4.ADDRESS[1]:                         10.10.145.85/30
IP4.GATEWAY:                            10.10.145.86
IP4.ROUTE[1]:                           dst = 10.10.145.84/30, nh =
0.0.0.0, mt = 700
IP4.ROUTE[2]:                           dst = 0.0.0.0/0, nh = 10.10.145.86,
mt = 700
IP4.DNS[1]:                             223.87.253.100
IP4.DNS[2]:                             223.87.253.253
IP6.GATEWAY:                            --

***********************************************************************************************************

3. The log of NeworkManager is as follows:

root@debian:~# cat /var/log/syslog | grep NetworkManager

Oct 23 05:05:36 iot2040b-debian NetworkManager[274]: <info>
 [1571807136.3727] NetworkManager (version 1.14.6) is starting... (for the
first time)
Oct 23 05:05:36 iot2040b-debian NetworkManager[274]: <info>
 [1571807136.3733] Read config: /etc/NetworkManager/NetworkManager.conf
(lib: no-mac-addr-change.conf)
Oct 23 05:05:36 iot2040b-debian NetworkManager[274]: <info>
 [1571807136.4012] bus-manager: acquired D-Bus service
"org.freedesktop.NetworkManager"
Oct 23 05:05:36 iot2040b-debian NetworkManager[274]: <info>
 [1571807136.4111] manager[0xaaaaeaab5020]: monitoring kernel firmware
directory '/lib/firmware'.
Oct 23 05:05:36 iot2040b-debian NetworkManager[274]: <info>
 [1571807136.4113] monitoring ifupdown state file '/run/network/ifstate'.
Oct 23 05:05:36 iot2040b-debian dbus-daemon[273]: [system] Activating via
systemd: service name='org.freedesktop.hostname1'
unit='dbus-org.freedesktop.hostname1.service' requested by ':1.5' (uid=0
pid=274 comm="/usr/sbin/NetworkManager --no-daemon ")
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.4172] hostname: hostname: using hostnamed
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.4174] hostname: hostname changed from (none) to
"iot2040b-debian"
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.4186] dns-mgr[0xaaaaeaac3120]: init: dns=default,
rc-manager=resolvconf
Oct 23 05:05:37 iot2040b-debian dbus-daemon[273]: [system] Activating via
systemd: service name='org.freedesktop.nm_dispatcher'
unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.5'
(uid=0 pid=274 comm="/usr/sbin/NetworkManager --no-daemon ")
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.5695] ifupdown:       interface-parser: parsing file
/etc/network/interfaces
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.5697] ifupdown:       interface-parser: source line includes
interfaces file(s) /etc/network/interfaces.d
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.5699] ifupdown:       interface-parser: finished parsing file
/etc/network/interfaces
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.5700] ifupdown: management mode: unmanaged
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.5700] settings: Loaded settings plugin: SettingsPluginIfupdown
("/usr/lib/aarch64-linux-gnu/NetworkManager/1.14.6/libnm-settings-plugin-ifupdown.so")
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.5701] settings: Loaded settings plugin: NMSKeyfilePlugin
(internal)
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.5923] keyfile: new connection
/etc/NetworkManager/system-connections/cellular4g
(ce204ddd-8e3e-4a15-8435-e4b7f399e353,"cellular4g")
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.5965] manager: rfkill: WiFi enabled by radio killswitch;
enabled by state file
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.5975] manager: rfkill: WWAN enabled by radio killswitch;
enabled by state file
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.5982] manager: Networking is enabled by state file
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.5992] dhcp-init: Using DHCP client 'dhclient'
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.6317] Loaded device plugin: NMWwanFactory
(/usr/lib/aarch64-linux-gnu/NetworkManager/1.14.6/libnm-device-plugin-wwan.so)
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.6429] Loaded device plugin: NMWifiFactory
(/usr/lib/aarch64-linux-gnu/NetworkManager/1.14.6/libnm-device-plugin-wifi.so)
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.6604] Loaded device plugin: NMTeamFactory
(/usr/lib/aarch64-linux-gnu/NetworkManager/1.14.6/libnm-device-plugin-team.so)
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.6807] Loaded device plugin: NMBluezManager
(/usr/lib/aarch64-linux-gnu/NetworkManager/1.14.6/libnm-device-plugin-bluetooth.so)
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.6849] Loaded device plugin: NMAtmManager
(/usr/lib/aarch64-linux-gnu/NetworkManager/1.14.6/libnm-device-plugin-adsl.so)
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.6885] device (lo): carrier: link connected
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.6901] manager: (lo): new Generic device
(/org/freedesktop/NetworkManager/Devices/1)
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.6975] manager: (eth0): new Ethernet device
(/org/freedesktop/NetworkManager/Devices/2)
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.7103] keyfile: add connection
/run/NetworkManager/system-connections/Wired connection 1.nmconnection
(a763cb2c-3b39-3bde-b726-0fde88041a85,"Wired connection 1")
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.7132] settings: (eth0): created default wired connection
'Wired connection 1'
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.7172] device (eth0): state change: unmanaged -> unavailable
(reason 'managed', sys-iface-state: 'external')
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.8126] manager: (eth1): new Ethernet device
(/org/freedesktop/NetworkManager/Devices/3)
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.8275] keyfile: add connection
/run/NetworkManager/system-connections/Wired connection 2.nmconnection
(5e3aaea2-5d3a-3718-a421-9d6fe181c167,"Wired connection 2")
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.8304] settings: (eth1): created default wired connection
'Wired connection 2'
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.8330] device (eth1): state change: unmanaged -> unavailable
(reason 'managed', sys-iface-state: 'external')
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.9752] modem-manager: ModemManager available
Oct 23 05:05:43 iot2040b-debian NetworkManager[274]: <info>
 [1571807143.9209] manager: startup complete
Oct 23 05:05:48 iot2040b-debian systemd[1]:
NetworkManager-dispatcher.service: Succeeded.
Oct 23 05:06:08 iot2040b-debian NetworkManager[274]: <info>
 [1571807168.4621] modem["ttyUSB1"]: modem state changed, 'disabled' -->
'enabling' (reason: user preference)
Oct 23 05:06:08 iot2040b-debian NetworkManager[274]: <info>
 [1571807168.4634] manager: (ttyUSB1): new Broadband device
(/org/freedesktop/NetworkManager/Devices/4)
Oct 23 05:06:08 iot2040b-debian NetworkManager[274]: <info>
 [1571807168.4657] device (ttyUSB1): state change: unmanaged -> unavailable
(reason 'managed', sys-iface-state: 'external')
Oct 23 05:06:08 iot2040b-debian NetworkManager[274]: <info>
 [1571807168.4680] device (ttyUSB1): modem state 'enabling'
Oct 23 05:06:08 iot2040b-debian NetworkManager[274]: <info>
 [1571807168.4710] device (ttyUSB1): state change: unavailable ->
disconnected (reason 'none', sys-iface-state: 'managed')
Oct 23 05:06:08 iot2040b-debian NetworkManager[274]: <info>
 [1571807168.4733] policy: auto-activating connection 'cellular4g'
(ce204ddd-8e3e-4a15-8435-e4b7f399e353)
Oct 23 05:06:08 iot2040b-debian NetworkManager[274]: <info>
 [1571807168.4777] device (ttyUSB1): Activation: starting connection
'cellular4g' (ce204ddd-8e3e-4a15-8435-e4b7f399e353)
Oct 23 05:06:08 iot2040b-debian NetworkManager[274]: <info>
 [1571807168.4783] device (ttyUSB1): state change: disconnected -> prepare
(reason 'none', sys-iface-state: 'managed')
Oct 23 05:06:08 iot2040b-debian NetworkManager[274]: <info>
 [1571807168.4803] manager: NetworkManager state is now CONNECTING
Oct 23 05:06:11 iot2040b-debian NetworkManager[274]: <info>
 [1571807171.3977] modem["ttyUSB1"]: modem state changed, 'enabling' -->
'enabled' (reason: user-requested)
Oct 23 05:06:11 iot2040b-debian NetworkManager[274]: <info>
 [1571807171.4845] modem["ttyUSB1"]: modem state changed, 'enabled' -->
'connecting' (reason: user-requested)
Oct 23 05:06:11 iot2040b-debian NetworkManager[274]: <info>
 [1571807171.4856] modem["ttyUSB1"]: modem state changed, 'connecting' -->
'unknown' (reason: user-requested)
Oct 23 05:06:11 iot2040b-debian NetworkManager[274]: <info>
 [1571807171.4857] device (ttyUSB1): state change: prepare -> disconnected
(reason 'user-requested', sys-iface-state: 'managed')
Oct 23 05:06:11 iot2040b-debian NetworkManager[274]: <info>
 [1571807171.4886] manager: NetworkManager state is now DISCONNECTED
Oct 23 05:06:11 iot2040b-debian NetworkManager[274]: <info>
 [1571807171.5153] modem["ttyUSB1"]: modem state changed, 'unknown' -->
'registered' (reason: unknown)

******************************************************************************************************************

4. The log of ModemManager is as follows:

root@debian:~#  cat /var/log/syslog | grep ModemManager

Oct 23 05:05:35 iot2040b-debian ModemManager[263]: <info>  ModemManager
(version 1.10.0) starting in system bus...
Oct 23 05:05:36 iot2040b-debian dbus-daemon[273]: [system] Activating via
systemd: service name='org.freedesktop.PolicyKit1' unit='polkit.service'
requested by ':1.4' (uid=0 pid=263 comm="/usr/sbin/ModemManager
--filter-policy=strict ")
Oct 23 05:05:37 iot2040b-debian NetworkManager[274]: <info>
 [1571807137.9752] modem-manager: ModemManager available
Oct 23 05:05:40 iot2040b-debian ModemManager[263]: <info>  Couldn't check
support for device
'/sys/devices/platform/interconnect@100000/4000000.dwc3/4010000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.4':
not supported by any plugin
Oct 23 05:05:40 iot2040b-debian ModemManager[263]: <info>  Couldn't check
support for device '/sys/devices/platform/pruss0_eth': not supported by any
plugin
Oct 23 05:06:04 iot2040b-debian ModemManager[263]: <info>  [device
/sys/devices/platform/interconnect@100000/4000000.dwc3/4010000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.2]
creating modem with plugin 'Huawei' and '6' ports
Oct 23 05:06:04 iot2040b-debian ModemManager[263]: <warn>  Could not grab
port (tty/ttyUSB5): 'Cannot add port 'tty/ttyUSB5', unhandled serial type'
Oct 23 05:06:04 iot2040b-debian ModemManager[263]: <warn>  Could not grab
port (tty/ttyUSB2): 'Cannot add port 'tty/ttyUSB2', unhandled serial type'
Oct 23 05:06:04 iot2040b-debian ModemManager[263]: <info>  Modem for device
'/sys/devices/platform/interconnect@100000/4000000.dwc3/4010000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.2'
successfully created
Oct 23 05:06:08 iot2040b-debian ModemManager[263]: <info>  Modem: state
changed (unknown -> disabled)
Oct 23 05:06:09 iot2040b-debian ModemManager[263]: <info>  Modem
/org/freedesktop/ModemManager1/Modem/0: state changed (disabled -> enabling)
Oct 23 05:06:09 iot2040b-debian ModemManager[263]: <info>  Simple connect
started...
Oct 23 05:06:09 iot2040b-debian ModemManager[263]: <info>  Simple connect
state (4/8): Wait to get fully enabled
Oct 23 05:06:11 iot2040b-debian ModemManager[263]: <info>  Modem
/org/freedesktop/ModemManager1/Modem/0: state changed (enabling -> enabled)
Oct 23 05:06:11 iot2040b-debian ModemManager[263]: <info>  Simple connect
state (5/8): Register
Oct 23 05:06:11 iot2040b-debian ModemManager[263]: <info>  Modem
/org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed
(unknown -> registering)
Oct 23 05:06:11 iot2040b-debian ModemManager[263]: <info>  Simple connect
state (6/8): Bearer
Oct 23 05:06:11 iot2040b-debian ModemManager[263]: <info>  Simple connect
state (7/8): Connect
Oct 23 05:06:11 iot2040b-debian ModemManager[263]: <info>  Modem
/org/freedesktop/ModemManager1/Modem/0: state changed (enabled ->
connecting)
Oct 23 05:06:11 iot2040b-debian ModemManager[263]: <warn>  Couldn't find
associated cdc-wdm port for 'net/wwan0'
Oct 23 05:06:11 iot2040b-debian ModemManager[263]: <info>  Modem
/org/freedesktop/ModemManager1/Modem/0: state changed (connecting ->
unknown)
Oct 23 05:06:11 iot2040b-debian ModemManager[263]: <info>  Modem
/org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed
(registering -> home)
Oct 23 05:06:11 iot2040b-debian ModemManager[263]: <info>  Modem
/org/freedesktop/ModemManager1/Modem/0: state changed (unknown ->
registered)

******************************************************************************************************************

5. The status of my GSM module is as follows:

root@debian:~# mmcli -m 0

  --------------------------------
  General  |            dbus path: /org/freedesktop/ModemManager1/Modem/0
           |            device id: 0d490040902fa7c16849164490dbad5b61fc4758
  --------------------------------
  Hardware |         manufacturer: Huawei Technologies Co., Ltd.
           |                model: ME909s-821
           |             revision: 11.617.00.00.00
           |            supported: gsm-umts
           |              current: gsm-umts
           |         equipment id: 867223021127691
  --------------------------------
  System   |               device: /sys/devices/platform/interconnect@100000
/4000000.dwc3/4010000.usb/xhci-hcd.0.auto/usb1/1-1/1-1.2
           |              drivers: option1, cdc_ether
           |               plugin: Huawei
           |         primary port: ttyUSB1
           |                ports: ttyUSB1 (at), ttyUSB3 (at), wwan0 (net),
ttyUSB4 (at)
  --------------------------------
  Numbers  |                  own: +8613699437296
  --------------------------------
  Status   |       unlock retries: sim-pin (3), sim-pin2 (3), sim-puk (10),
sim-puk2 (10)
           |                state: registered
           |          power state: on
           |          access tech: lte
           |       signal quality: 64% (recent)
  --------------------------------
  Modes    |            supported: allowed: 4g; preferred: none
           |                       allowed: 3g; preferred: none
           |                       allowed: 2g; preferred: none
           |                       allowed: 2g, 3g, 4g; preferred: none
           |              current: allowed: 2g, 3g, 4g; preferred: none
  --------------------------------
  IP       |            supported: ipv4, ipv6, ipv4v6
  --------------------------------
  3GPP     |                 imei: 867223021127691
           |          operator id: 46000
           |        operator name: CMCC
           |         registration: home
  --------------------------------
  3GPP EPS | ue mode of operation: csps-2
  --------------------------------
  SIM      |            dbus path: /org/freedesktop/ModemManager1/SIM/0
  --------------------------------
  Bearer   |            dbus path: /org/freedesktop/ModemManager1/Bearer/0
_______________________________________________
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to