Merge cros/upstream to cros/master

Part of an uprev that contains the following commits:

" da78eb4b build: unstable release version bump to 1.21.1 (Aleksander Morgado)"
" 02baf283 fcc-unlock: switch bash shell scripts to use sh (Christian Taedcke)"
" 4a2e13c1 test,modem-helpers-qmi: unit tests for NAS system info registration processing (Aleksander Morgado)"
" 55796d58 broadband-modem-qmi: use new system info processor helper (Aleksander Morgado)"
" ea160e3a modem-helpers-qmi: new helper to process System Info messages (Aleksander Morgado)"
" 7e0af1d9 modem-helpers: new method to check if reg state is registered (Aleksander Morgado)"
" f446bd9d broadband-modem-mbim: simplify caps loading logic by using autoptr (Aleksander Morgado)"
" e0fb1cb6 broadband-modem-mbim: use ms extensions, if available, for capabilities (Daniele Palmas)"
" ea275d05 broadband-modem-mbim: add supported modes from CustomDataClass (Daniele Palmas)"
" 24fd0026 iface-modem-3gpp: fix memory leak when processing PCOs (Aleksander Morgado)"
" 64c77e31 bearer-mbim: remove explicit packet service set during attempt (Aleksander Morgado)"
" 3e13044e broadband-modem-mbim: track uplink/downlink speeds only via indications (Aleksander Morgado)"
" c9bcaa33 broadband-modem-mbim: translate UNSUPPORTED error during packet attach (Aleksander Morgado)"
" 9f330da9 broadband-modem-mbim: return nw_error on packet service attach failure (Aleksander Morgado)"
" d28d00f0 broadband-modem-mbim: increase to 30s the packet service set timeout (Aleksander Morgado)"
" 179a800a iface-modem-simple: explicitly request packet service attach if needed (Aleksander Morgado)"
" cabb003d iface-modem-3gpp: allow internal request to set packet service (Aleksander Morgado)"
" 347c2544 mm-broadband-modem-mbim: ignore SIM related indications during SIM slot switch (Jack Song)"
" 1be8c2ed TODO: remove obsolete file, we keep pending tasks in gitlab (Aleksander Morgado)"
" f419f566 build: drop autotools (Aleksander Morgado)"
" 3c430ce2 ci: completely switch to meson (Aleksander Morgado)"
" 8142d7bc build: intel plugin depends on the XMM shared utils (Aleksander Morgado)"
" 634f6cbc build: disable Test interface in base manager if building without tests (Aleksander Morgado)"
" 7ea2452b build: fix building without tests support (Aleksander Morgado)"
" 30d77d37 build: fix building without MBIM support (Aleksander Morgado)"
" fb13be6e base-modem: log port names and types detected (Aleksander Morgado)"
" 815e7f7c bearer-qmi: improve logging of connection failures (Aleksander Morgado)"
" cd5c5d83 iface-modem-3gpp: decrease severity of logs that don't affect functionality (Aleksander Morgado)"
" fa0cfd4c base-sim: include GID1/GID2 loaded values in info level (Aleksander Morgado)"
" ceee8938 base-sim: decrease severity of logs that don't affect functionality (Aleksander Morgado)"
" a8725412 iface-modem: decrease severity of logs that don't affect functionality (Aleksander Morgado)"
" c7fcc2dc broadband-modem: improve logging during SIM swap check (Aleksander Morgado)"
" 20390488 base-sim: improve logging during initialization (Aleksander Morgado)"
" 15331121 iface-modem-signal: print signal quality under INFO verbosity (Pavan Holla)"
" ec5eb6c3 iface-modem-simple: improve logging of user request to disconnect modem (Aleksander Morgado)"
" 794386d4 iface-modem-simple: improve logging of user request to connect modem (Aleksander Morgado)"
" b5a727d0 iface-modem-sar: improve logging of user-requested actions (Aleksander Morgado)"
" 9d8e92b9 iface-modem-3gpp-profile-manager: improve logging of user request to delete profile (Aleksander Morgado)"
" f75be75e iface-modem-3gpp-profile-manager: improve logging of user request to set profile (Aleksander Morgado)"
" 4534d6bb iface-modem-3gpp-profile-manager: improve logging of user request to list profiles (Aleksander Morgado)"
" 3bf15120 iface-modem-3gpp: improve logging of user request to disable facility locks (Aleksander Morgado)"
" 58f4eefe iface-modem-3gpp: improve logging of user request to set packet service state (Aleksander Morgado)"
" e0c251fe iface-modem-3gpp: improve logging of user request to scan networks (Aleksander Morgado)"
" 856f6a8d iface-modem-3gpp: improve logging of user request to set EPS UE mode of operation (Aleksander Morgado)"
" 406338dc iface-modem-3gpp: improve logging of user request to set 5GNR registration settings (Aleksander Morgado)"
" 2571ab01 iface-modem-3gpp: improve logging of user request to set initial EPS bearer settings (Aleksander Morgado)"
" 11d881c0 iface-modem-3gpp: improve logging of user request to register in network (Aleksander Morgado)"
" c0f8d211 iface-modem-3gpp: log registration check results in INFO level (Aleksander Morgado)"
" 5c604d9d iface-modem: improve logging of user request to set current modes (Aleksander Morgado)"
" d4c0af91 iface-modem: improve logging of user request to set current bands (Aleksander Morgado)"
" 21d60de4 iface-modem: improve logging of user request to factory reset modem (Aleksander Morgado)"
" b82c89f4 iface-modem: improve logging of user request to reset modem (Aleksander Morgado)"
" 03528fbf iface-modem: improve logging of user request to set power state (Aleksander Morgado)"
" a86fb711 iface-modem: improve logging of user request to enable/disable modem (Aleksander Morgado)"
" 9fe16af1 iface-modem: improve logging of user request to get cell info (Aleksander Morgado)"
" 73696cab iface-modem: improve logging of user request to set primary SIM slot (Aleksander Morgado)"
" 4fa773d2 iface-modem: improve logging of user request to delete bearer (Aleksander Morgado)"
" aed53fe3 iface-modem: improve logging of user request to run AT command (Aleksander Morgado)"
" ac28a6a1 iface-modem: improve logging of user request to set current capabilities (Aleksander Morgado)"
" 98408187 iface-modem: improve logging of user request to create bearer (Aleksander Morgado)"
" f98bcd5f iface-modem: refactor user request to list bearers (Aleksander Morgado)"
" f1fa2eb8 iface-modem: improve logging in INFO level (Aleksander Morgado)"
" e7b225ab log-helpers: add helper to log simple connect properties (Aleksander Morgado)"
" f509e68f log-helpers: add helper to log 3gpp profile (Aleksander Morgado)"
" 8b6dc28e log-helpers: add helper to log bearer properties (Aleksander Morgado)"
" 5bfa677b libmm-glib,simple-connect-properties: new print() method (Aleksander Morgado)"
" 46af4524 libmm-glib,bearer-properties: new print() method (Aleksander Morgado)"
" a114e131 libmm-glib,3gpp-profile: new print() method (Aleksander Morgado)"
" 0e666002 libmm-glib,common: add helpers to build printable strings (Aleksander Morgado)"
" e6dcebf9 log: allow querying whether personal info should be shown or not (Aleksander Morgado)"
" 3592d98e log: new methods to check if a given logging level is enabled (Aleksander Morgado)"
" afb89bb7 log: new mm_obj_log() that allows specifying level explicitly (Aleksander Morgado)"
" f19aa4d9 log: new helper to allow printing or hiding personal info (Aleksander Morgado)"
" ddfdbf66 core,log: reduce the log level tag to 3 characters (Aleksander Morgado)"
" b3f315ad core,log: new 'MSG' log level between 'INFO' and 'WARN' (Aleksander Morgado)"
" 823f3e79 base-sim: fix length when reading GID1/GID2 (Aleksander Morgado)"
" 4bb601dd iface-modem-3gpp-profile-manager: Initialize autofreed string to NULL (Evangelos Ribeiro Tzaras)"
" c7afdc53 build: Warn about potentially uninitialized variables (Evangelos Ribeiro Tzaras)"
" db10975b build-aux: templates: make build reproducible (Arnaud Ferraris)"
" 82fd4a4b build: post-release version bump to 1.21.0 (Aleksander Morgado)"

BUG=b:257459511
FIXED=b:257459511

TEST=None

Cq-Depend: chromium:4023259,chromium:4023984,chromium:4023220
Change-Id: I94adb3c18f109757f22f0444f8d995497ce11a5d
diff --git a/.gitignore b/.gitignore
index 6b88d05..98af0c6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,189 +1,3 @@
 *~
-*.o
-*.lo
-*.la
-*.loT
-*.gcno
-*.gcda
-*.tar.xz
+*.bz2
 *.pyc
-*.dirstamp
-.deps
-.libs
-Makefile
-Makefile.in
-
-/INSTALL
-/aclocal.m4
-/autom4te.cache*
-/compile
-/config.*
-/configure
-/depcomp
-/install-sh
-/ltmain.sh
-/missing
-/stamp-h1
-/libtool
-/tags
-/TAGS
-/ABOUT-NLS
-/ChangeLog
-
-/include/ModemManager-version.h
-/include/ModemManager-names.h
-
-/libmm-glib/generated/mm-gdbus-*.[ch]
-/libmm-glib/generated/mm-enums-types.[ch]
-/libmm-glib/generated/mm-errors-types.[ch]
-/libmm-glib/generated/mm-errors-quarks.c
-/libmm-glib/generated/*.xml
-/libmm-glib/generated/tests/mm-gdbus-*.[ch]
-/libmm-glib/tests/test-common-helpers
-/libmm-glib/tests/test-pco
-/libmm-glib/*.gir
-/libmm-glib/*.typelib
-
-/src/ModemManager
-/src/mm-daemon-enums-types.c
-/src/mm-daemon-enums-types.h
-/src/mm-port-enums-types.c
-/src/mm-port-enums-types.h
-/src/mm-helper-enums-types.c
-/src/mm-helper-enums-types.h
-/src/mm-marshal.[ch]
-/src/tests/test-modem-helpers
-/src/tests/test-modem-helpers-qmi
-/src/tests/test-charsets
-/src/tests/test-qcdm-serial-port
-/src/tests/test-at-serial-port
-/src/tests/test-sms-part-3gpp
-/src/tests/test-sms-part-cdma
-/src/tests/test-udev-rules
-/src/tests/test-error-helpers
-/src/tests/test-kernel-device-helpers
-
-/cli/mmcli
-
-/vapi/libmm-glib.vapi
-
-/libqcdm/tests/test-qcdm
-/libqcdm/tests/modepref
-/libqcdm/tests/ipv6pref
-/libqcdm/tests/reset
-
-/data/org.freedesktop.ModemManager1.conf
-/data/org.freedesktop.ModemManager1.service
-/data/org.freedesktop.ModemManager1.policy
-/data/org.freedesktop.ModemManager1.policy.in
-/data/ModemManager.service
-/data/ModemManager.pc
-/data/mm-common.pc
-/data/mm-glib.pc
-/data/tests/org.freedesktop.ModemManager1.service
-
-/po/Makefile.in.in
-/po/POTFILES
-/po/stamp-it
-/po/ModemManager.pot
-/po/Makevars.template
-/po/Rules-quot
-/po/boldquot.sed
-/po/en@boldquot.header
-/po/en@quot.header
-/po/insert-header.sin
-/po/quot.sed
-/po/remove-potcdate.sin
-/po/remove-potcdate.sed
-/po/stamp-po
-/po/*.gmo
-
-/docs/reference/api/version.xml
-/docs/reference/api/ModemManager.args
-/docs/reference/api/ModemManager.hierarchy
-/docs/reference/api/ModemManager.interfaces
-/docs/reference/api/ModemManager.prerequisites
-/docs/reference/api/ModemManager.signals
-/docs/reference/api/ModemManager.actions
-/docs/reference/api/*.stamp
-/docs/reference/api/*.txt
-/docs/reference/api/html
-/docs/reference/api/tmpl
-/docs/reference/api/xml
-/docs/reference/api/*.png
-
-/docs/reference/libmm-glib/version.xml
-/docs/reference/libmm-glib/libmm-glib.args
-/docs/reference/libmm-glib/libmm-glib.hierarchy
-/docs/reference/libmm-glib/libmm-glib.interfaces
-/docs/reference/libmm-glib/libmm-glib.prerequisites
-/docs/reference/libmm-glib/libmm-glib.signals
-/docs/reference/libmm-glib/libmm-glib.actions
-/docs/reference/libmm-glib/libmm-glib.types
-/docs/reference/libmm-glib/*.stamp
-/docs/reference/libmm-glib/*.txt
-/docs/reference/libmm-glib/html
-/docs/reference/libmm-glib/tmpl
-/docs/reference/libmm-glib/xml
-
-/m4/gtk-doc.m4
-/m4/libtool.m4
-/m4/lt*.m4
-/m4/codeset.m4
-/m4/gettext.m4
-/m4/glibc2.m4
-/m4/glibc21.m4
-/m4/iconv.m4
-/m4/intdiv0.m4
-/m4/intl.m4
-/m4/intldir.m4
-/m4/intlmacosx.m4
-/m4/intmax.m4
-/m4/inttypes-pri.m4
-/m4/inttypes_h.m4
-/m4/lcmessage.m4
-/m4/lib-ld.m4
-/m4/lib-link.m4
-/m4/lib-prefix.m4
-/m4/lock.m4
-/m4/longlong.m4
-/m4/nls.m4
-/m4/po.m4
-/m4/printf-posix.m4
-/m4/progtest.m4
-/m4/size_max.m4
-/m4/stdint_h.m4
-/m4/uintmax_t.m4
-/m4/visibility.m4
-/m4/wchar_t.m4
-/m4/wint_t.m4
-/m4/xsize.m4
-/m4/extern-inline.m4
-/m4/fcntl-o.m4
-/m4/threadlib.m4
-
-/plugins/test-suite.log
-/plugins/test-udev-rules
-/plugins/test-keyfiles
-/plugins/test-modem-helpers-*
-/plugins/test-service-*
-
-/plugins/ublox/mm-ublox-enums-types.[ch]
-/plugins/telit/mm-telit-enums-types.[ch]
-/plugins/huawei/mm-huawei-enums-types.[ch]
-
-/test/lsudev
-/test/mmtty
-/test/mmrules
-/test/mmsmspdu
-/test/mmsmsmonitor
-
-/tools/tests/services/org.freedesktop.ModemManager1.service
-/tools/tests/test-stub
-/tools/tests/test-wrapper.sh
-
-/examples/sms-c/sms-c-sync
-/examples/sms-c/sms-c-async
-
-/ModemManager-*-coverage.info
-/ModemManager-*-coverage/
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fe4ca28..de125a6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -50,11 +50,9 @@
     - ninja -C build
     - ninja -C build install
     - popd
-    - NOCONFIGURE=1 ./autogen.sh
-    - ./configure --prefix=/usr --disable-gtk-doc --disable-introspection --without-qmi
-    - make
-    - make check
-    - make install
+    - meson setup build --prefix=/usr -Dgtk_doc=false -Dqmi=false -Dqrtr=false -Dmbim=true
+    - ninja -C build
+    - ninja -C build install
 
 build-qmi-qrtr-no-mbim:
   stage: build
@@ -79,11 +77,9 @@
     - ninja -C build
     - ninja -C build install
     - popd
-    - NOCONFIGURE=1 ./autogen.sh
-    - ./configure --prefix=/usr  --disable-gtk-doc --disable-introspection --without-mbim
-    - make
-    - make check
-    - make install
+    - meson setup build --prefix=/usr -Dgtk_doc=false -Dqmi=true -Dqrtr=true -Dmbim=false
+    - ninja -C build
+    - ninja -C build install
 
 build-qmi-no-qrtr-no-mbim:
   stage: build
@@ -102,11 +98,9 @@
     - ninja -C build
     - ninja -C build install
     - popd
-    - NOCONFIGURE=1 ./autogen.sh
-    - ./configure --prefix=/usr --disable-gtk-doc --disable-introspection --without-mbim
-    - make
-    - make check
-    - make install
+    - meson setup build --prefix=/usr -Dgtk_doc=false -Dqmi=true -Dqrtr=false -Dmbim=false
+    - ninja -C build
+    - ninja -C build install
 
 build-no-qmi-no-mbim:
   stage: build
@@ -119,11 +113,10 @@
     - tags
     - schedules
   script:
-    - NOCONFIGURE=1 ./autogen.sh
-    - ./configure --prefix=/usr --disable-gtk-doc --disable-introspection --without-qmi --without-mbim
-    - make
-    - make check
-    - make install
+    - meson setup build --prefix=/usr -Dgtk_doc=false -Dqmi=false -Dqrtr=false -Dmbim=false
+    - ninja -C build
+    - ninja -C build test
+    - ninja -C build install
 
 build-no-qmi-no-mbim-no-tests:
   stage: build
@@ -136,11 +129,9 @@
     - tags
     - schedules
   script:
-    - NOCONFIGURE=1 ./autogen.sh
-    - ./configure --prefix=/usr --disable-gtk-doc --disable-introspection --without-qmi --without-mbim --without-tests
-    - make
-    - make check
-    - make install
+    - meson setup build --prefix=/usr -Dgtk_doc=false -Dqmi=false -Dqrtr=false -Dmbim=false -Dtests=false
+    - ninja -C build
+    - ninja -C build install
 
 build-no-suspend-resume:
   stage: build
@@ -169,11 +160,9 @@
     - ninja -C build
     - ninja -C build install
     - popd
-    - NOCONFIGURE=1 ./autogen.sh
-    - ./configure --prefix=/usr --disable-introspection --without-systemd-suspend-resume --without-powerd-suspend-resume
-    - make
-    - make check
-    - make install
+    - meson setup build --prefix=/usr -Dgtk_doc=false -Dsystemd_suspend_resume=false -Dpowerd_suspend_resume=false
+    - ninja -C build
+    - ninja -C build install
 
 build-suspend-resume-powerd:
   stage: build
@@ -202,11 +191,9 @@
     - ninja -C build
     - ninja -C build install
     - popd
-    - NOCONFIGURE=1 ./autogen.sh
-    - ./configure --prefix=/usr --disable-introspection --without-systemd-suspend-resume --with-powerd-suspend-resume=yes
-    - make
-    - make check
-    - make install
+    - meson setup build --prefix=/usr -Dgtk_doc=false -Dsystemd_suspend_resume=false -Dpowerd_suspend_resume=true
+    - ninja -C build
+    - ninja -C build install
 
 build-single-plugins:
   stage: build
@@ -244,59 +231,7 @@
         ninja -C build_$plugin;
       done
 
-build-default:
-  stage: build
-  extends:
-  - .fdo.distribution-image@ubuntu
-  - .common_variables
-  only:
-    - merge_requests
-    - schedules
-  script:
-    - git clone --depth 1 https://gitlab.freedesktop.org/mobile-broadband/libmbim.git
-    - pushd libmbim
-    - meson setup build --prefix=/usr -Dgtk_doc=false -Dbash_completion=false
-    - ninja -C build
-    - ninja -C build install
-    - popd
-    - git clone --depth 1 https://gitlab.freedesktop.org/mobile-broadband/libqrtr-glib.git
-    - pushd libqrtr-glib
-    - meson setup build --prefix=/usr -Dgtk_doc=false
-    - ninja -C build
-    - ninja -C build install
-    - popd
-    - git clone --depth 1 https://gitlab.freedesktop.org/mobile-broadband/libqmi.git
-    - pushd libqmi
-    - meson setup build --prefix=/usr -Dgtk_doc=false -Dbash_completion=false -Dcollection=basic
-    - ninja -C build
-    - ninja -C build install
-    - popd
-    - NOCONFIGURE=1 ./autogen.sh
-    - ./configure --prefix=/usr --enable-gtk-doc --enable-introspection --with-polkit=strict --with-systemd-suspend-resume --with-systemdsystemunitdir=/lib/systemd/system
-    - make
-    - make check
-    - make install
-    - make distcheck
-
-build-default-artifacts:
-  stage: build
-  extends:
-  - .fdo.distribution-image@ubuntu
-  - .common_variables
-  only:
-    - main
-    - tags
-  script:
-    - !reference [build-default, script]
-    - sha256sum $CI_PROJECT_NAME-*.tar.xz | awk '{print $1;}' > pkg_hash.txt
-  artifacts:
-    name: "$CI_PROJECT_NAME-$CI_COMMIT_SHORT_SHA"
-    paths:
-      - /builds/$CI_PROJECT_ROOT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME-*.tar.xz
-      - /builds/$CI_PROJECT_ROOT_NAMESPACE/$CI_PROJECT_NAME/pkg_hash.txt
-    expire_in: 2 days
-
-build-meson-release:
+build-release:
   stage: build
   extends:
   - .fdo.distribution-image@ubuntu
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index 4263061..0000000
--- a/Makefile.am
+++ /dev/null
@@ -1,56 +0,0 @@
-
-SUBDIRS = \
-	. \
-	build-aux \
-	po \
-	data \
-	include \
-	libqcdm \
-	libmm-glib \
-	src \
-	plugins \
-	cli \
-	vapi \
-	introspection \
-	tools \
-	examples \
-	docs \
-	$(NULL)
-
-if WITH_TESTS
-SUBDIRS += test
-endif
-
-ChangeLog:
-	$(AM_V_GEN) if test -d "$(srcdir)/.git"; then \
-	  (GIT_DIR=$(top_srcdir)/.git $(top_srcdir)/missing --run git log --stat) | fmt --split-only > $@.tmp \
-	  && mv -f $@.tmp $@ \
-	  || ($(RM) $@.tmp; \
-	      echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
-	      (test -f $@ || echo git-log is required to generate this file >> $@)); \
-	else \
-	  test -f $@ || \
-	  (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
-	  echo A git checkout and git-log is required to generate this file >> $@); \
-	fi
-
-AM_DISTCHECK_CONFIGURE_FLAGS = \
-	--with-udev-base-dir="$$dc_install_base" \
-	--with-systemdsystemunitdir="$$dc_install_base/$(SYSTEMD_UNIT_DIR)" \
-	--enable-gtk-doc=yes \
-	$(NULL)
-
-EXTRA_DIST = \
-	autogen.sh \
-	gtester.make \
-	COPYING.LIB \
-	$(NULL)
-
-ACLOCAL_AMFLAGS = -I m4
-
-@CODE_COVERAGE_RULES@
-
-if CODE_COVERAGE_ENABLED
-clean-local:
-	-find $(top_builddir) -name "*.gcno" -delete
-endif
diff --git a/TODO b/TODO
deleted file mode 100644
index d0925b6..0000000
--- a/TODO
+++ /dev/null
@@ -1,106 +0,0 @@
-
---------------------------------------------------------------------------------
- * Contacts
-
-ModemManager should implement the Contacts interface if modems allow to query
-and manipulate the contacts information stored in SIM or device.
-
-
---------------------------------------------------------------------------------
- * Probing time mitigation
-
-Probing time may end up being quite long if we're checking support of a modem
-which exposes multiple ports. It is specially bad if the modem exports a port
-which is neither AT nor QCDM, as we use all our probing attempts before we can
-export the modem in DBus (we do wait to get all ports probed before running the
-initialization sequence, as we want to use the primary port for that always).
-
-Therefore, looking for ways to mitigate probing time in the specific bad cases
-is a good way of minimizing this problem. Some ideas:
-
-  ** If one AT probing succeeds, don't allow timeouts in remaining ports when
-     probing for AT.
-
-
---------------------------------------------------------------------------------
- * AT+CMUX & Serial multiplexing
-
-Some modes allow to use virtual channels set up over one single serial
-interface, as defined at 3G TS 27.010. This allows devices with one single port
-to get a virtual secondary port for AT commands while in connected mode, for
-example to update the signal quality value or check registration status.
-
-
---------------------------------------------------------------------------------
- * Additional minor enhancements, fixes and general brainstorm
-
-  ** Per-device log function? Something like mm_modem_log() and
-     mm_modem_port_log(), so that we include automatically the modem number
-     (and port name) in each log line.
-
-  ** Do we really need function name, filename and line in the debug log?
-
-  ** In the default MMBroadbandModem, check how we can know if we're sitting in
-     a rev0, revA or revB CDMA network. We need to expose the exact access
-     technology in the interface.
-
-  ** Fix object names to show proper inheritance? For example:
-     - MMPort, MMPortSerial, MMPortSerialAt, MMPortSerialQcdm
-     - MMModem (instead of MMBaseModem), MMModemBroadband, MMModemPots
-     - MMBearer, MMBearerBroadband, MMBearerPots
-
-  ** Test cases for CIEV responses.
-
-  ** When a 3GPP modem is disabled, we run AT+CREG=0. That will just disable the
-     automatic registration checks and unsolicited messages, the modem will
-     still be registered in the network. AT+COPS=2 is the one doing manual
-     unregistration from the network, and we should probably include such step
-     in the 3GPP disabling sequence.
-
-  ** serial-parsers: convert the v1 parser to a GObject.
-
-  ** MMBroadbandBearer: include additional step for authentication, with
-     retries.
-
-  ** MMBroadbandBearer: include additional step for waiting to get connected via
-     unsolicited messages.
-
-  ** Huawei plugin: Seems to me that whenever we update the allowed modes OR the
-     bands, we're actually also changing the other one. This is because we're
-     using hardcoded values in ^SYSCFG write operations; we should instead read
-     current mode or band when updating the other.
-
-  ** Huawei plugin: The K4505, at least, doesn't like the default command to
-     setup messaging related unsolicited messages:
-     > AT+CNMI=2,1,2,1,0
-     +CMS ERROR: 303
-
-  ** ZTE plugin: The MF637, at least, doesn't like the default command to setup
-     messaging related unsolicited messages:
-     > AT+CNMI=2,1,2,1,0
-     +CMS ERROR: 303
-
-  ** Pantech plugin: The UMW190 needs some time to settle down after sending the
-     PIN, or it will end up stuck if we ask too many PIN-related stuff one after
-     the other.
-
-  ** HSO plugin: shouldn't we have the same logic for unsolicited messages
-     handling in both connect and disconnect contexts? See Icera plugin for ref.
-
-  ** Icera plugin: retry authentication step in 3gpp dialling to 3 times with 1s
-     delay.
-
-  ** QMI: Gobi 2k devices don't like the SYNC command, which is supposed to
-     release all previously allocated clients. It gets worse, as if clients are
-     not cleanly released by ModemManager (e.g. a segfault), the device reaches
-     a point where it doesn't allow allocating more:
-       couldn't create client for the 'nas' service:
-         QMI protocol error (5): 'client-ids-exhausted'
-     This may force us to have something like a state file in /tmp with the IDs
-     currently allocated, so that ModemManager can re-use them if needed.
-
-  ** QMI: in NAS >= 1.8 we don't have the operator name given in the
-     registration status queries, we'll need to get it with "NAS Get PLMN Name".
-
-  ** QMI: mark the modem as invalid if we lose the QMI and/or WWAN ports. For
-     example, we should handle 'sudo rmmod qmi_wwan && sudo modprobe qmi_wwan'
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index 7460d25..0000000
--- a/autogen.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-# Run this to generate all the initial makefiles, etc.
-
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-REQUIRED_AUTOMAKE_VERSION=1.9
-PKG_NAME=ModemManager
-
-(test -f $srcdir/configure.ac \
-  && test -f $srcdir/src/main.c) || {
-    echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
-    echo " top-level $PKG_NAME directory"
-    exit 1
-}
-
-(cd $srcdir;
-    GTKDOCIZE="true" autoreconf --force --install --verbose
-)
-
-if test -z "$NOCONFIGURE"; then
-    $srcdir/configure --enable-maintainer-mode "$@"
-fi
diff --git a/build-aux/Makefile.am b/build-aux/Makefile.am
deleted file mode 100644
index acb7afe..0000000
--- a/build-aux/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-
-EXTRA_DIST = \
-	header-generator.xsl \
-	mm-enums-types.h.template \
-	mm-enums-types.c.template \
-	mm-errors-types.h.template \
-	mm-errors-types.c.template \
-	mm-errors-quarks.c.template
diff --git a/build-aux/mm-enums-types.h.template b/build-aux/mm-enums-types.h.template
index 652c53d..24d18a9 100644
--- a/build-aux/mm-enums-types.h.template
+++ b/build-aux/mm-enums-types.h.template
@@ -7,7 +7,7 @@
 
 /*** BEGIN file-production ***/
 
-/* enumerations from "@filename@" */
+/* enumerations from "@basename@" */
 /*** END file-production ***/
 
 /*** BEGIN value-header ***/
diff --git a/build-aux/mm-errors-types.h.template b/build-aux/mm-errors-types.h.template
index 72c90cf..5c80bee 100644
--- a/build-aux/mm-errors-types.h.template
+++ b/build-aux/mm-errors-types.h.template
@@ -7,7 +7,7 @@
 
 /*** BEGIN file-production ***/
 
-/* enumerations from "@filename@" */
+/* enumerations from "@basename@" */
 /*** END file-production ***/
 
 /*** BEGIN value-header ***/
diff --git a/cli/Makefile.am b/cli/Makefile.am
deleted file mode 100644
index 820d5d3..0000000
--- a/cli/Makefile.am
+++ /dev/null
@@ -1,63 +0,0 @@
-bin_PROGRAMS = mmcli
-
-mmcli_CPPFLAGS = \
-	$(WARN_CFLAGS) \
-	$(MMCLI_CFLAGS) \
-	-I$(top_srcdir) \
-	-I$(top_srcdir)/include \
-	-I$(top_builddir)/include \
-	-I$(top_srcdir)/libmm-glib \
-	-I${top_srcdir}/libmm-glib/generated \
-	-I${top_builddir}/libmm-glib/generated \
-	$(NULL)
-
-mmcli_SOURCES = \
-	mmcli.h \
-	mmcli.c \
-	mmcli-common.h mmcli-common.c \
-	mmcli-output.h mmcli-output.c \
-	mmcli-manager.c \
-	mmcli-modem.c \
-	mmcli-modem-3gpp.c \
-	mmcli-modem-3gpp-profile-manager.c \
-	mmcli-modem-3gpp-ussd.c \
-	mmcli-modem-cdma.c \
-	mmcli-modem-simple.c \
-	mmcli-modem-location.c \
-	mmcli-modem-messaging.c \
-	mmcli-modem-voice.c \
-	mmcli-modem-time.c \
-	mmcli-modem-firmware.c \
-	mmcli-modem-sar.c \
-	mmcli-modem-signal.c \
-	mmcli-modem-oma.c \
-	mmcli-bearer.c \
-	mmcli-sim.c \
-	mmcli-sms.c \
-	mmcli-call.c \
-	$(NULL)
-
-mmcli_LDADD = \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(NULL)
-
-mmcli_LDFLAGS = \
-	$(WARN_LDFLAGS) \
-	$(MMCLI_LIBS) \
-	$(NULL)
-
-if WITH_UDEV
-mmcli_CPPFLAGS += $(GUDEV_CFLAGS)
-mmcli_LDFLAGS  += $(GUDEV_LIBS)
-endif
-
-completiondir = $(datadir)/bash-completion/completions
-
-install-data-hook:
-	$(mkinstalldirs) $(DESTDIR)$(completiondir)
-	$(INSTALL_DATA) $(srcdir)/mmcli-completion $(DESTDIR)$(completiondir)/mmcli
-
-uninstall-hook:
-	rm -f $(DESTDIR)$(completiondir)/mmcli
-
-EXTRA_DIST = mmcli-completion
diff --git a/cli/mmcli-manager.c b/cli/mmcli-manager.c
index 70903f9..9cd7d7d 100644
--- a/cli/mmcli-manager.c
+++ b/cli/mmcli-manager.c
@@ -70,7 +70,7 @@
     },
     { "set-logging", 'G', 0, G_OPTION_ARG_STRING, &set_logging_str,
       "Set logging level in the ModemManager daemon",
-      "[ERR,WARN,INFO,DEBUG]",
+      "[ERR,WARN,MSG,INFO,DEBUG]",
     },
     { "list-modems", 'L', 0, G_OPTION_ARG_NONE, &list_modems_flag,
       "List available modems",
diff --git a/cli/mmcli-output.c b/cli/mmcli-output.c
index ef1c7cb..ac68f24 100644
--- a/cli/mmcli-output.c
+++ b/cli/mmcli-output.c
@@ -938,72 +938,17 @@
 build_profile_human (GPtrArray     *array,
                      MM3gppProfile *profile)
 {
-    const gchar                  *aux;
-    MMBearerAllowedAuth           allowed_auth;
-    MMBearerIpFamily              ip_type;
-    MMBearerApnType               apn_type;
-    MMBearerAccessTypePreference  access_type_preference;
-    MMBearerRoamingAllowance      roaming_allowance;
-    MMBearerProfileSource         profile_source;
+    g_autoptr(GPtrArray) profile_print = NULL;
+    guint                i;
 
-    g_ptr_array_add (array, g_strdup_printf ("profile-id: %u", mm_3gpp_profile_get_profile_id (profile)));
-    g_ptr_array_add (array, g_strdup_printf ("  profile enabled: %s",
-                                             mm_3gpp_profile_get_enabled (profile) ? "yes" : "no"));
-
-    if ((aux = mm_3gpp_profile_get_profile_name (profile)) != NULL)
-        g_ptr_array_add (array, g_strdup_printf ("  profile name: %s", aux));
-
-    if ((aux = mm_3gpp_profile_get_apn (profile)) != NULL)
-        g_ptr_array_add (array, g_strdup_printf ("  apn: %s", aux));
-
-    allowed_auth = mm_3gpp_profile_get_allowed_auth (profile);
-    if (allowed_auth != MM_BEARER_ALLOWED_AUTH_NONE) {
-        g_autofree gchar *allowed_auth_str = NULL;
-
-        allowed_auth_str = mm_bearer_allowed_auth_build_string_from_mask (allowed_auth);
-        g_ptr_array_add (array, g_strdup_printf ("  allowed auth: %s", allowed_auth_str));
-    }
-
-    if ((aux = mm_3gpp_profile_get_user (profile)) != NULL)
-        g_ptr_array_add (array, g_strdup_printf ("  user: %s", aux));
-
-    if ((aux = mm_3gpp_profile_get_password (profile)) != NULL)
-        g_ptr_array_add (array, g_strdup_printf ("  password: %s", aux));
-
-    ip_type = mm_3gpp_profile_get_ip_type (profile);
-    if (ip_type != MM_BEARER_IP_FAMILY_NONE) {
-        g_autofree gchar *ip_type_str = NULL;
-
-        ip_type_str = mm_bearer_ip_family_build_string_from_mask (ip_type);
-        g_ptr_array_add (array, g_strdup_printf ("  ip type: %s", ip_type_str));
-    }
-
-    apn_type = mm_3gpp_profile_get_apn_type (profile);
-    if (apn_type != MM_BEARER_APN_TYPE_NONE) {
-        g_autofree gchar *apn_type_str = NULL;
-
-        apn_type_str = mm_bearer_apn_type_build_string_from_mask (apn_type);
-        g_ptr_array_add (array, g_strdup_printf ("  apn type: %s", apn_type_str));
-    }
-
-    access_type_preference = mm_3gpp_profile_get_access_type_preference (profile);
-    if (access_type_preference != MM_BEARER_ACCESS_TYPE_PREFERENCE_NONE) {
-        aux = mm_bearer_access_type_preference_get_string (access_type_preference);
-        g_ptr_array_add (array, g_strdup_printf ("  access type preference: %s", aux));
-    }
-
-    roaming_allowance = mm_3gpp_profile_get_roaming_allowance (profile);
-    if (roaming_allowance != MM_BEARER_ROAMING_ALLOWANCE_NONE) {
-        g_autofree gchar *roaming_allowance_str = NULL;
-
-        roaming_allowance_str = mm_bearer_roaming_allowance_build_string_from_mask (roaming_allowance);
-        g_ptr_array_add (array, g_strdup_printf ("  roaming allowance: %s", roaming_allowance_str));
-    }
-
-    profile_source = mm_3gpp_profile_get_profile_source (profile);
-    if (profile_source != MM_BEARER_PROFILE_SOURCE_UNKNOWN) {
-        aux = mm_bearer_profile_source_get_string (profile_source);
-        g_ptr_array_add (array, g_strdup_printf ("  profile source: %s", aux));
+    profile_print = mm_3gpp_profile_print (profile, TRUE);
+    mm_common_str_array_human_keys (profile_print);
+    for (i = 0; i < profile_print->len; i++) {
+        /* First string is profile id always, all the remaining ones will be
+         * indented some whitespaces right */
+        g_ptr_array_add (array, g_strdup_printf ("%s%s",
+                                                 i == 0 ? "" : "  ",
+                                                 (const gchar *)g_ptr_array_index (profile_print, i)));
     }
 }
 
@@ -1011,67 +956,17 @@
 build_profile_keyvalue (GPtrArray     *array,
                         MM3gppProfile *profile)
 {
-    GString                      *str;
-    const gchar                  *aux;
-    MMBearerAllowedAuth           allowed_auth;
-    MMBearerIpFamily              ip_type;
-    MMBearerApnType               apn_type;
-    MMBearerAccessTypePreference  access_type_preference;
-    MMBearerRoamingAllowance      roaming_allowance;
+    g_autoptr(GPtrArray)  profile_print = NULL;
+    guint                 i;
+    GString              *str;
 
     str = g_string_new ("");
-    g_string_append_printf (str, "profile-id: %u", mm_3gpp_profile_get_profile_id (profile));
-
-    if ((aux = mm_3gpp_profile_get_profile_name (profile)) != NULL)
-        g_string_append_printf (str, ", profile-name: %s", aux);
-
-    if ((aux = mm_3gpp_profile_get_apn (profile)) != NULL)
-        g_string_append_printf (str, ", apn: %s", aux);
-
-    allowed_auth = mm_3gpp_profile_get_allowed_auth (profile);
-    if (allowed_auth != MM_BEARER_ALLOWED_AUTH_NONE) {
-        g_autofree gchar *allowed_auth_str = NULL;
-
-        allowed_auth_str = mm_bearer_allowed_auth_build_string_from_mask (allowed_auth);
-        g_string_append_printf (str, ", allowed-auth: %s", allowed_auth_str);
+    profile_print = mm_3gpp_profile_print (profile, TRUE);
+    for (i = 0; i < profile_print->len; i++) {
+        g_string_append_printf (str, "%s%s",
+                                i == 0 ? "" : ", ",
+                                (const gchar *)g_ptr_array_index (profile_print, i));
     }
-
-    if ((aux = mm_3gpp_profile_get_user (profile)) != NULL)
-        g_string_append_printf (str, ", user: %s", aux);
-
-    if ((aux = mm_3gpp_profile_get_password (profile)) != NULL)
-        g_string_append_printf (str, ", password: %s", aux);
-
-    ip_type = mm_3gpp_profile_get_ip_type (profile);
-    if (ip_type != MM_BEARER_IP_FAMILY_NONE) {
-        g_autofree gchar *ip_type_str = NULL;
-
-        ip_type_str = mm_bearer_ip_family_build_string_from_mask (ip_type);
-        g_string_append_printf (str, ", ip-type: %s", ip_type_str);
-    }
-
-    apn_type = mm_3gpp_profile_get_apn_type (profile);
-    if (apn_type != MM_BEARER_APN_TYPE_NONE) {
-        g_autofree gchar *apn_type_str = NULL;
-
-        apn_type_str = mm_bearer_apn_type_build_string_from_mask (apn_type);
-        g_string_append_printf (str, ", apn-type: %s", apn_type_str);
-    }
-
-    access_type_preference = mm_3gpp_profile_get_access_type_preference (profile);
-    if (access_type_preference != MM_BEARER_ACCESS_TYPE_PREFERENCE_NONE) {
-        aux = mm_bearer_access_type_preference_get_string (access_type_preference);
-        g_string_append_printf (str, ", access-type-preference: %s", aux);
-    }
-
-    roaming_allowance = mm_3gpp_profile_get_roaming_allowance (profile);
-    if (roaming_allowance != MM_BEARER_ROAMING_ALLOWANCE_NONE) {
-        g_autofree gchar *roaming_allowance_str = NULL;
-
-        roaming_allowance_str = mm_bearer_roaming_allowance_build_string_from_mask (roaming_allowance);
-        g_string_append_printf (str, ", roaming-allowance: %s", roaming_allowance_str);
-    }
-
     g_ptr_array_add (array, g_string_free (str, FALSE));
 }
 
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index 37121b0..0000000
--- a/configure.ac
+++ /dev/null
@@ -1,744 +0,0 @@
-AC_PREREQ([2.63])
-
-dnl-----------------------------------------------------------------------------
-dnl Package and library versioning support
-dnl
-
-m4_define([mm_major_version], [1])
-m4_define([mm_minor_version], [20])
-m4_define([mm_micro_version], [0])
-m4_define([mm_version],
-          [mm_major_version.mm_minor_version.mm_micro_version])
-
-dnl libtool versioning for libmm-glib (-version-info c:r:a)
-dnl    If the interface is unchanged, but the implementation has changed or
-dnl        been fixed, then increment r.
-dnl    Otherwise, increment c and zero r.
-dnl        If the interface has grown (that is, the new library is compatible
-dnl            with old code), increment a.
-dnl        If the interface has changed in an incompatible way (that is,
-dnl            functions have changed or been removed), then zero a.
-m4_define([mm_glib_lt_current],  [9])
-m4_define([mm_glib_lt_revision], [0])
-m4_define([mm_glib_lt_age],      [9])
-
-dnl-----------------------------------------------------------------------------
-dnl autoconf, automake, libtool initialization
-dnl
-AC_INIT([ModemManager],
-        [mm_version],
-        [https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues],
-        [ModemManager])
-AM_INIT_AUTOMAKE([1.11.2 subdir-objects tar-ustar no-dist-gzip dist-xz -Wno-portability])
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-
-AM_MAINTAINER_MODE([enable])
-
-AM_SILENT_RULES([yes])
-
-AC_CONFIG_MACRO_DIR([m4])
-
-AC_CONFIG_HEADERS(config.h)
-
-dnl Define system extensions for various things like strcasestr()
-AC_USE_SYSTEM_EXTENSIONS
-
-dnl Required programs
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_PROG_INSTALL
-AC_PROG_MKDIR_P
-AC_PROG_LN_S
-
-dnl Initialize libtool
-LT_PREREQ([2.2])
-LT_INIT([disable-static])
-
-dnl-----------------------------------------------------------------------------
-dnl Compiler warnings
-dnl
-
-dnl Make sure autoconf-archive is available
-m4_pattern_forbid([^AX_(COMPILER_FLAGS|COMPILER_FLAGS_(CFLAGS|GIR|LDFLAGS))\b],
-  [Unexpanded AX_ macro found. Please install GNU autoconf-archive])
-
-dnl Detect git or release builds
-AX_IS_RELEASE([git-directory])
-
-dnl Function type cast disabled: used throughout the code especially to
-dnl cast GAsyncReadyCallbacks with the real object type instead of GObject
-DISABLED_WARNINGS="${DISABLED_WARNINGS} -Wno-cast-function-type"
-
-dnl All message protocol structs are packed, never complain about it
-DISABLED_WARNINGS="${DISABLED_WARNINGS} -Wno-packed"
-
-dnl Setup compiler checks
-AX_COMPILER_FLAGS()
-AX_COMPILER_FLAGS_CFLAGS(,,,[${DISABLED_WARNINGS}])
-
-dnl Specify gnu89 mode
-if test "$GCC" = "yes"; then
-   CFLAGS="$CFLAGS -std=gnu89"
-fi
-
-dnl-----------------------------------------------------------------------------
-dnl Version definitions
-dnl
-
-dnl Version stuff
-MM_MAJOR_VERSION=mm_major_version
-MM_MINOR_VERSION=mm_minor_version
-MM_MICRO_VERSION=mm_micro_version
-MM_VERSION=mm_version
-AC_SUBST(MM_MAJOR_VERSION)
-AC_SUBST(MM_MINOR_VERSION)
-AC_SUBST(MM_MICRO_VERSION)
-AC_SUBST(MM_VERSION)
-
-dnl libtool version stuff
-MM_GLIB_LT_CURRENT=mm_glib_lt_current
-MM_GLIB_LT_REVISION=mm_glib_lt_revision
-MM_GLIB_LT_AGE=mm_glib_lt_age
-AC_SUBST(MM_GLIB_LT_CURRENT)
-AC_SUBST(MM_GLIB_LT_REVISION)
-AC_SUBST(MM_GLIB_LT_AGE)
-
-dnl-----------------------------------------------------------------------------
-dnl Documentation
-dnl
-
-GTK_DOC_CHECK(1.0)
-
-dnl-----------------------------------------------------------------------------
-dnl i18n
-dnl
-
-AM_GNU_GETTEXT([external])
-AM_GNU_GETTEXT_VERSION([0.19.8])
-
-GETTEXT_PACKAGE=ModemManager
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
-
-dnl-----------------------------------------------------------------------------
-dnl Build dependencies
-dnl
-
-GLIB_MIN_VERSION=2.56.0
-GLIB_BUILD_SYMBOLS="-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_56 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_56 -DGLIB_DISABLE_DEPRECATION_WARNINGS"
-
-PKG_CHECK_MODULES(MM,
-                  glib-2.0 >= $GLIB_MIN_VERSION
-                  gmodule-2.0
-                  gobject-2.0
-                  gio-2.0
-                  gio-unix-2.0)
-MM_CFLAGS="$MM_CFLAGS $GLIB_BUILD_SYMBOLS"
-AC_SUBST(MM_CFLAGS)
-AC_SUBST(MM_LIBS)
-
-PKG_CHECK_MODULES(LIBMM_GLIB,
-                  glib-2.0 >= $GLIB_MIN_VERSION
-                  gobject-2.0
-                  gio-2.0
-                  gio-unix-2.0)
-LIBMM_GLIB_CFLAGS="$LIBMM_GLIB_CFLAGS $GLIB_BUILD_SYMBOLS"
-AC_SUBST(LIBMM_GLIB_CFLAGS)
-AC_SUBST(LIBMM_GLIB_LIBS)
-
-PKG_CHECK_MODULES(MMCLI,
-                  glib-2.0 >= $GLIB_MIN_VERSION
-                  gobject-2.0
-                  gio-2.0)
-MMCLI_CFLAGS="$MMCLI_CFLAGS $GLIB_BUILD_SYMBOLS"
-AC_SUBST(MMCLI_CFLAGS)
-AC_SUBST(MMCLI_LIBS)
-
-dnl Some required utilities
-GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
-AC_SUBST(GLIB_MKENUMS)
-
-GDBUS_CODEGEN=`$PKG_CONFIG --variable=gdbus_codegen gio-2.0`
-AC_SUBST(GDBUS_CODEGEN)
-
-dnl xsltproc required in git builds only
-AC_CHECK_PROG(XSLTPROC_CHECK,xsltproc,yes)
-if test "x$ax_is_release" != "xyes" -a "x$XSLTPROC_CHECK" != "xyes"; then
-   AC_MSG_ERROR([Please install xsltproc before configuring.])
-fi
-
-dnl-----------------------------------------------------------------------------
-dnl Testing support
-dnl
-
-dnl Code coverage (disabled by default)
-AX_CODE_COVERAGE
-
-dnl-----------------------------------------------------------------------------
-dnl Introspection and bindings
-dnl
-
-dnl GObject Introspection
-GOBJECT_INTROSPECTION_CHECK([0.9.6])
-
-dnl Vala bindings
-VAPIGEN_CHECK(0.18)
-if test "x$enable_vala" = "xyes" -a ! -f "$VAPIGEN_MAKEFILE"; then
-  AC_MSG_ERROR([Vala bindings enabled but Makefile.vapigen not found. Install vala-devel, or pass --disable-vala])
-fi
-
-dnl-----------------------------------------------------------------------------
-dnl System paths
-dnl
-
-dnl ModemManager configuration directory
-pkgsysconfdir="${sysconfdir}/ModemManager"
-AC_SUBST(pkgsysconfdir)
-
-dnl DBus system directory
-AC_ARG_WITH(dbus-sys-dir, AS_HELP_STRING([--with-dbus-sys-dir=DIR], [where D-BUS system.d directory is]))
-if test -n "$with_dbus_sys_dir" ; then
-    DBUS_SYS_DIR="$with_dbus_sys_dir"
-else
-    DBUS_SYS_DIR="${sysconfdir}/dbus-1/system.d"
-fi
-AC_SUBST(DBUS_SYS_DIR)
-
-dnl udev base directory
-AC_ARG_WITH(udev-base-dir, AS_HELP_STRING([--with-udev-base-dir=DIR], [where udev base directory is]))
-if test -n "$with_udev_base_dir" ; then
-    UDEV_BASE_DIR="$with_udev_base_dir"
-else
-    UDEV_BASE_DIR="/lib/udev"
-fi
-AC_SUBST(UDEV_BASE_DIR)
-
-dnl systemd system unit directory
-AC_ARG_WITH([systemdsystemunitdir], AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [where systemd service files are]),
-            [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
-if test "x$with_systemdsystemunitdir" != xno; then
-    AC_SUBST([SYSTEMD_UNIT_DIR],  [$with_systemdsystemunitdir])
-fi
-AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$SYSTEMD_UNIT_DIR" -a "$SYSTEMD_UNIT_DIR" != xno ])
-
-
-dnl subdir where plugins are built w.r.t abs_top_builddir, just because it's
-dnl different to what meson does
-PLUGIN_BUILD_SUBDIR="plugins/.libs"
-AC_SUBST(PLUGIN_BUILD_SUBDIR)
-
-dnl-----------------------------------------------------------------------------
-dnl udev support (enabled by default)
-dnl
-
-GUDEV_VERSION=232
-
-AC_ARG_WITH(udev, AS_HELP_STRING([--without-udev], [Build without udev support]), [], [with_udev=yes])
-AM_CONDITIONAL(WITH_UDEV, test "x$with_udev" = "xyes")
-case $with_udev in
-    yes)
-        PKG_CHECK_MODULES(GUDEV, [gudev-1.0 >= $GUDEV_VERSION], [have_gudev=yes],[have_gudev=no])
-        if test "x$have_gudev" = "xno"; then
-            AC_MSG_ERROR([Couldn't find gudev >= $GUDEV_VERSION. Install it, or otherwise configure using --without-udev to disable udev support.])
-        else
-            AC_DEFINE(WITH_UDEV, 1, [Define if you want udev support])
-            AC_SUBST(GUDEV_CFLAGS)
-            AC_SUBST(GUDEV_LIBS)
-        fi
-        ;;
-    *)
-        with_udev=no
-        ;;
-esac
-
-dnl-----------------------------------------------------------------------------
-dnl build with tests (enabled by default)
-dnl
-
-AC_ARG_WITH(tests, AS_HELP_STRING([--without-tests], [Build without testcases]), [], [with_tests=yes])
-AM_CONDITIONAL(WITH_TESTS, test "x$with_tests" = "xyes")
-case $with_tests in
-    yes)
-        AC_DEFINE(WITH_TESTS, 1, [Define if you want to build all testcases])
-        ;;
-    *)
-        with_tests=no
-        ;;
-esac
-
-dnl-----------------------------------------------------------------------------
-dnl Suspend/resume support
-dnl
-
-PKG_CHECK_MODULES(LIBSYSTEMD, [libsystemd >= 209],[have_libsystemd=yes],[have_libsystemd=no])
-PKG_CHECK_MODULES(LIBSYSTEMD_LOGIN, [libsystemd-login >= 183],[have_libsystemd_login=yes],[have_libsystemd_login=no])
-PKG_CHECK_MODULES(LIBELOGIND, [libelogind >= 209], [have_elogind=yes], [have_elogind=no])
-AC_ARG_WITH(systemd-suspend-resume,
-            AS_HELP_STRING([--with-systemd-suspend-resume=no|yes],
-                           [Enable systemd suspend/resume support [[default=auto]]]),,
-            [with_systemd_suspend_resume=auto])
-AC_ARG_WITH(powerd-suspend-resume,
-            AS_HELP_STRING([--with-powerd-suspend-resume=no|yes],
-                           [Enable powerd suspend/resume support [[default=no]]]),,
-            [with_powerd_suspend_resume=no])
-
-if test "x$with_systemd_suspend_resume" = "xauto"; then
-    if test "x$have_libsystemd" = "xyes" || test "x$have_libsystemd_login" = "xyes" || test "x$have_elogind" = "xyes"; then
-        with_systemd_suspend_resume=yes
-    else
-        with_systemd_suspend_resume=no
-    fi
-fi
-
-case $with_systemd_suspend_resume in
-    yes)
-        if test "x$have_libsystemd" = "xno" && test "x$have_libsystemd_login" = "xno" && test "x$have_elogind" = "xno"; then
-		    AC_MSG_WARN(libsystemd, libsystemd-login or elogind must be available at runtime for suspend/resume support)
-        fi
-        ;;
-    *)
-        with_systemd_suspend_resume=no
-        ;;
-esac
-
-if test "x$with_systemd_suspend_resume" = "xyes" && test "x$with_powerd_suspend_resume" = "xyes"; then
-    AC_MSG_ERROR(--with_systemd_suspend_resume and --with_powerd_suspend_resume should not be selected at the same time)
-fi
-
-if test "x$with_systemd_suspend_resume" = "xyes" || test "x$with_powerd_suspend_resume" = "xyes"; then
-    AC_DEFINE(WITH_SUSPEND_RESUME, 1, [Define if you have systemd or powerd suspend-resume support])
-fi
-
-AM_CONDITIONAL(WITH_SYSTEMD_SUSPEND_RESUME, test "x$with_systemd_suspend_resume" = "xyes")
-AM_CONDITIONAL(WITH_POWERD_SUSPEND_RESUME, test "x$with_powerd_suspend_resume" = "xyes")
-
-dnl-----------------------------------------------------------------------------
-dnl systemd journal support
-dnl
-
-AC_ARG_WITH(systemd-journal,
-            AS_HELP_STRING([--with-systemd-journal=no|yes|auto],
-                           [Enable systemd journal support [[default=auto]]]),,
-            [with_systemd_journal=auto])
-
-if test "x$with_systemd_journal" = "xauto"; then
-    if test "x$have_libsystemd" = "xyes"; then
-        with_systemd_journal=yes
-    else
-        with_systemd_journal=no
-    fi
-fi
-
-case $with_systemd_journal in
-    yes)
-        if test "x$have_libsystemd" = "xno"; then
-            AC_MSG_ERROR(libsystemd development headers are required)
-        fi
-        AC_DEFINE(WITH_SYSTEMD_JOURNAL, 1, [Define if you want systemd journal support])
-        ;;
-    *)
-        with_systemd_journal=no
-        ;;
-esac
-
-AM_CONDITIONAL(WITH_SYSTEMD_JOURNAL, test "x$with_systemd_journal" = "xyes")
-
-dnl-----------------------------------------------------------------------------
-dnl PolicyKit
-dnl
-
-PKG_CHECK_MODULES(POLKIT, [polkit-gobject-1 >= 0.97], [have_polkit=yes],[have_polkit=no])
-AC_ARG_WITH(polkit,
-            AS_HELP_STRING([--with-polkit=(strict|permissive|no)],
-                           [Enable PolicyKit support [[default=auto]]]),,
-            [with_polkit=auto])
-
-if test "x$with_polkit" = "xauto"; then
-	if test "x$have_polkit" = "xno"; then
-        with_polkit="no"
-    else
-        with_polkit="strict"
-    fi
-elif test "x$with_polkit" = "xyes"; then
-    with_polkit=strict
-fi
-
-MM_POLKIT_SERVICE=""
-if test "x$with_polkit" != "xno"; then
-	if test "x$have_polkit" = "xno"; then
-		AC_MSG_ERROR(PolicyKit development headers are required)
-	fi
-
-    case "x$with_polkit" in
-        "xpermissive")
-            MM_DEFAULT_USER_POLICY="yes"
-            MM_POLKIT_SERVICE="polkit.service"
-            ;;
-        "xstrict")
-            MM_DEFAULT_USER_POLICY="auth_self_keep"
-            MM_POLKIT_SERVICE="polkit.service"
-            ;;
-        *)
-            AC_MSG_ERROR([Wrong value for --with-polkit: $with_polkit])
-            ;;
-    esac
-
-    AC_DEFINE(WITH_POLKIT, 1, [Define if you have PolicyKit support])
-    AC_SUBST(POLKIT_CFLAGS)
-    AC_SUBST(POLKIT_LIBS)
-    AC_SUBST(MM_DEFAULT_USER_POLICY)
-fi
-
-AC_SUBST(MM_POLKIT_SERVICE)
-AM_CONDITIONAL(WITH_POLKIT, [test "x$with_polkit" != "xno"])
-
-dnl-----------------------------------------------------------------------------
-dnl AT command via DBus support (disabled by default unless running in --debug)
-dnl
-dnl It is suggested that this option is only enabled in custom built systems and
-dnl only if truly required.
-dnl
-
-AC_ARG_WITH(at_command_via_dbus,
-            AS_HELP_STRING([--with-at-command-via-dbus],
-                           [Build with Modem.Command() interface enabled always]),
-            [],
-            [with_at_command_via_dbus=no])
-
-if test "x$with_at_command_via_dbus" = "xyes"; then
-    AC_DEFINE(WITH_AT_COMMAND_VIA_DBUS, 1, [Define if you want to enable AT commands via DBus])
-fi
-
-dnl-----------------------------------------------------------------------------
-dnl MBIM support (enabled by default)
-dnl
-
-LIBMBIM_VERSION=1.28.0
-
-AC_ARG_WITH(mbim, AS_HELP_STRING([--without-mbim], [Build without MBIM support]), [], [with_mbim=yes])
-AM_CONDITIONAL(WITH_MBIM, test "x$with_mbim" = "xyes")
-case $with_mbim in
-    yes)
-        PKG_CHECK_MODULES(MBIM, [mbim-glib >= $LIBMBIM_VERSION], [have_mbim=yes],[have_mbim=no])
-        if test "x$have_mbim" = "xno"; then
-            AC_MSG_ERROR([Couldn't find libmbim-glib >= $LIBMBIM_VERSION. Install it, or otherwise configure using --without-mbim to disable MBIM support.])
-        else
-            AC_DEFINE(WITH_MBIM, 1, [Define if you want MBIM support])
-            AC_SUBST(MBIM_CFLAGS)
-            AC_SUBST(MBIM_LIBS)
-        fi
-        ;;
-    *)
-        with_mbim=no
-        ;;
-esac
-
-dnl-----------------------------------------------------------------------------
-dnl QMI support (enabled by default)
-dnl
-
-LIBQMI_VERSION=1.32.0
-
-AC_ARG_WITH(qmi, AS_HELP_STRING([--without-qmi], [Build without QMI support]), [], [with_qmi=yes])
-AM_CONDITIONAL(WITH_QMI, test "x$with_qmi" = "xyes")
-case $with_qmi in
-    yes)
-        PKG_CHECK_MODULES(QMI, [qmi-glib >= $LIBQMI_VERSION], [have_qmi=yes],[have_qmi=no])
-        if test "x$have_qmi" = "xno"; then
-            AC_MSG_ERROR([Couldn't find libqmi-glib >= $LIBQMI_VERSION. Install it, or otherwise configure using --without-qmi to disable QMI support.])
-        else
-            AC_DEFINE(WITH_QMI, 1, [Define if you want QMI support])
-            AC_SUBST(QMI_CFLAGS)
-            AC_SUBST(QMI_LIBS)
-        fi
-        ;;
-    *)
-        with_qmi=no
-        ;;
-esac
-
-dnl-----------------------------------------------------------------------------
-dnl QRTR support (both as libqrtr-glib and libqmi-glib apis)
-dnl
-
-LIBQRTR_VERSION=1.0.0
-PKG_CHECK_MODULES(QRTR, [qrtr-glib >= $LIBQRTR_VERSION],[have_qrtr=yes],[have_qrtr=no])
-qmi_qrtr_supported=$($PKG_CONFIG --variable=qmi_qrtr_supported qmi-glib)
-
-AC_ARG_WITH(qrtr, AS_HELP_STRING([--without-qrtr], [Build without QRTR support]), [], [with_qrtr=auto])
-if test "x$with_qrtr" = "xauto"; then
-    if test "x$qmi_qrtr_supported" = "x1" && test "x$with_qmi" = "xyes" && test "x$have_qrtr" = "xyes"; then
-        with_qrtr=yes
-    else
-        with_qrtr=no
-    fi
-fi
-case $with_qrtr in
-    yes)
-        if test "x$with_qmi" = "xno"; then
-            AC_MSG_ERROR([QRTR support requires QMI enabled. Configure using --with-qmi, or otherwise configure using --without-qrtr to disable QRTR support.])
-        elif test "x$have_qrtr" = "xno"; then
-            AC_MSG_ERROR([Couldn't find libqrtr-glib >= $LIBQRTR_VERSION. Install it, or otherwise configure using --without-qrtr to disable QRTR support.])
-        elif test "x$qmi_qrtr_supported" != "x1"; then
-            AC_MSG_ERROR([Couldn't find QRTR support in libqmi-glib. Install it, or otherwise configure using --without-qrtr to disable QRTR support.])
-        else
-            AC_DEFINE(WITH_QRTR, 1, [Define if you want QRTR support])
-            AC_SUBST(QRTR_CFLAGS)
-            AC_SUBST(QRTR_LIBS)
-        fi
-        ;;
-    *)
-        with_qrtr=no
-        ;;
-esac
-AM_CONDITIONAL(WITH_QRTR, test "x$with_qrtr" = "xyes")
-
-dnl-----------------------------------------------------------------------------
-dnl Distribution version string
-dnl
-AC_ARG_WITH(dist-version, AS_HELP_STRING([--with-dist-version=<mm-dist-version>], [Define the custom version (like distribution package name and revision)]), ac_distver=$withval, ac_distver="")
-if ! test x"$ac_distver" = x""; then
-  AC_DEFINE_UNQUOTED(MM_DIST_VERSION, "$ac_distver", [Define the distribution version string])
-fi
-
-dnl-----------------------------------------------------------------------------
-dnl Protocol libs
-dnl
-
-AM_CONDITIONAL(QCDM_STANDALONE, test "yes" = "no")
-
-dnl-----------------------------------------------------------------------------
-dnl Plugins
-dnl
-dnl By default all plugins are built and installed. If the user wants to build only
-dnl some specific plugins, this can be done by disabling all first and then enabling
-dnl only the ones required, e.g.:
-dnl   $ ./configure               \
-dnl       --disable-all-plugins   \
-dnl       --enable-plugin-generic \
-dnl       --enable-plugin-zte ...
-dnl
-dnl If the user wants all plugins except for some specific ones, those can be
-dnl explicitly disabled, e.g.:
-dnl   $ ./configure \
-dnl       --disable-plugin-generic \
-dnl       --disable-plugin-zte ...
-dnl
-
-MM_ENABLE_ALL_PLUGINS
-
-MM_ENABLE_PLUGIN([generic])
-MM_ENABLE_PLUGIN([altair-lte])
-MM_ENABLE_PLUGIN([anydata])
-MM_ENABLE_PLUGIN([broadmobi])
-MM_ENABLE_PLUGIN([cinterion])
-MM_ENABLE_PLUGIN([dell],
-                 [with_shared_sierra,
-                  with_shared_novatel,
-                  with_shared_xmm,
-                  with_shared_telit,
-                  with_shared_foxconn])
-MM_ENABLE_PLUGIN([dlink])
-MM_ENABLE_PLUGIN([fibocom],
-                 [with_shared_fibocom,
-                  with_shared_xmm])
-MM_ENABLE_PLUGIN([foxconn],
-                 [with_shared_foxconn])
-MM_ENABLE_PLUGIN([gosuncn])
-MM_ENABLE_PLUGIN([haier])
-MM_ENABLE_PLUGIN([huawei])
-MM_ENABLE_PLUGIN([intel],
-                 [with_shared_xmm,
-                  with_shared_fibocom])
-MM_ENABLE_PLUGIN([iridium])
-MM_ENABLE_PLUGIN([linktop])
-MM_ENABLE_PLUGIN([longcheer])
-MM_ENABLE_PLUGIN([mbm])
-MM_ENABLE_PLUGIN([motorola])
-MM_ENABLE_PLUGIN([mtk])
-MM_ENABLE_PLUGIN([nokia])
-MM_ENABLE_PLUGIN([nokia-icera],
-                 [with_shared_icera])
-MM_ENABLE_PLUGIN([novatel],
-                 [with_shared_novatel])
-MM_ENABLE_PLUGIN([novatel-lte])
-MM_ENABLE_PLUGIN([option],
-                 [with_shared_option])
-MM_ENABLE_PLUGIN([option-hso],
-                 [with_shared_option])
-MM_ENABLE_PLUGIN([pantech])
-MM_ENABLE_PLUGIN([qcom-soc])
-MM_ENABLE_PLUGIN([quectel])
-MM_ENABLE_PLUGIN([samsung],
-                 [with_shared_icera])
-MM_ENABLE_PLUGIN([sierra-legacy],
-                 [with_shared_icera,
-                  with_shared_sierra])
-MM_ENABLE_PLUGIN([sierra],
-                 [with_shared_xmm])
-MM_ENABLE_PLUGIN([simtech])
-MM_ENABLE_PLUGIN([telit],
-                 [with_shared_telit])
-MM_ENABLE_PLUGIN([thuraya])
-MM_ENABLE_PLUGIN([tplink])
-MM_ENABLE_PLUGIN([ublox])
-MM_ENABLE_PLUGIN([via])
-MM_ENABLE_PLUGIN([wavecom])
-MM_ENABLE_PLUGIN([x22x])
-MM_ENABLE_PLUGIN([zte],
-                 [with_shared_icera])
-
-MM_BUILD_SHARED([icera])
-MM_BUILD_SHARED([sierra])
-MM_BUILD_SHARED([option])
-MM_BUILD_SHARED([novatel])
-MM_BUILD_SHARED([xmm])
-MM_BUILD_SHARED([telit])
-MM_BUILD_SHARED([foxconn])
-MM_BUILD_SHARED([fibocom])
-
-dnl-----------------------------------------------------------------------------
-dnl Output
-dnl
-
-AC_CONFIG_FILES([
-Makefile
-data/Makefile
-data/ModemManager.pc
-data/mm-glib.pc
-data/dispatcher-connection/Makefile
-data/dispatcher-fcc-unlock/Makefile
-data/tests/Makefile
-data/tests/org.freedesktop.ModemManager1.service
-include/Makefile
-include/ModemManager-version.h
-build-aux/Makefile
-libqcdm/Makefile
-libqcdm/src/Makefile
-libqcdm/tests/Makefile
-src/Makefile
-src/tests/Makefile
-plugins/Makefile
-test/Makefile
-tools/Makefile
-tools/tests/Makefile
-tools/tests/services/org.freedesktop.ModemManager1.service
-introspection/Makefile
-introspection/tests/Makefile
-po/Makefile.in
-docs/Makefile
-docs/man/Makefile
-docs/reference/Makefile
-docs/reference/api/Makefile
-docs/reference/api/version.xml
-docs/reference/libmm-glib/Makefile
-docs/reference/libmm-glib/version.xml
-libmm-glib/Makefile
-libmm-glib/generated/Makefile
-libmm-glib/generated/tests/Makefile
-libmm-glib/tests/Makefile
-vapi/Makefile
-cli/Makefile
-examples/Makefile
-examples/modem-watcher-python/Makefile
-examples/modem-watcher-javascript/Makefile
-examples/sms-python/Makefile
-examples/network-scan-python/Makefile
-examples/sms-c/Makefile
-])
-
-AC_OUTPUT
-
-echo "
-    ModemManager $VERSION
-    ==============================================
-
-    Build:
-      compiler:                ${CC}
-      cflags:                  ${CFLAGS}
-      ldflags:                 ${LDFLAGS}
-      warn cflags:             ${WARN_CFLAGS}
-      warn ldflags:            ${WARN_LDFLAGS}
-      maintainer mode:         ${USE_MAINTAINER_MODE}
-      release:                 ${ax_is_release}
-      tests:                   ${with_tests}
-
-    System paths:
-      prefix:                  ${prefix}
-      configuration directory: ${pkgsysconfdir}
-      D-Bus system directory:  ${DBUS_SYS_DIR}
-      udev base directory:     ${UDEV_BASE_DIR}
-      systemd unit directory:  ${with_systemdsystemunitdir}
-
-    Features:
-      udev:                    ${with_udev}
-      policykit:               ${with_polkit}
-      mbim:                    ${with_mbim}
-      qmi:                     ${with_qmi}
-      qrtr:                    ${with_qrtr}
-      systemd suspend/resume:  ${with_systemd_suspend_resume}
-      powerd suspend/resume:   ${with_powerd_suspend_resume}
-      systemd journal:         ${with_systemd_journal}
-      at command via dbus:     ${with_at_command_via_dbus}
-
-    Shared utils:
-      icera:                   ${with_shared_icera}
-      sierra:                  ${with_shared_sierra}
-      option:                  ${with_shared_option}
-      novatel:                 ${with_shared_novatel}
-      xmm:                     ${with_shared_xmm}
-      telit:                   ${with_shared_telit}
-      foxconn:                 ${with_shared_foxconn}
-      fibocom:                 ${with_shared_fibocom}
-
-    Plugins:
-      generic:                 ${enable_plugin_generic}
-      altair lte:              ${enable_plugin_altair_lte}
-      anydata:                 ${enable_plugin_anydata}
-      broadmobi:               ${enable_plugin_broadmobi}
-      cinterion:               ${enable_plugin_cinterion}
-      dell:                    ${enable_plugin_dell}
-      dlink:                   ${enable_plugin_dlink}
-      fibocom:                 ${enable_plugin_fibocom}
-      foxconn:                 ${enable_plugin_foxconn}
-      gosuncn:                 ${enable_plugin_gosuncn}
-      haier:                   ${enable_plugin_haier}
-      huawei:                  ${enable_plugin_huawei}
-      iridium:                 ${enable_plugin_iridium}
-      linktop:                 ${enable_plugin_linktop}
-      longcheer:               ${enable_plugin_longcheer}
-      mbm:                     ${enable_plugin_mbm}
-      motorola:                ${enable_plugin_motorola}
-      mtk:                     ${enable_plugin_mtk}
-      nokia:                   ${enable_plugin_nokia}
-      nokia icera:             ${enable_plugin_nokia_icera}
-      novatel:                 ${enable_plugin_novatel}
-      novatel lte:             ${enable_plugin_novatel_lte}
-      option:                  ${enable_plugin_option}
-      option hso:              ${enable_plugin_option_hso}
-      pantech:                 ${enable_plugin_pantech}
-      qcom-soc:                ${enable_plugin_qcom_soc}
-      quectel:                 ${enable_plugin_quectel}
-      samsung:                 ${enable_plugin_samsung}
-      sierra legacy:           ${enable_plugin_sierra_legacy}
-      sierra:                  ${enable_plugin_sierra}
-      simtech:                 ${enable_plugin_simtech}
-      telit:                   ${enable_plugin_telit}
-      thuraya:                 ${enable_plugin_thuraya}
-      tplink:                  ${enable_plugin_tplink}
-      ublox:                   ${enable_plugin_ublox}
-      via:                     ${enable_plugin_via}
-      wavecom:                 ${enable_plugin_wavecom}
-      x22x:                    ${enable_plugin_x22x}
-      zte:                     ${enable_plugin_zte}
-
-    Miscellaneous:
-      gobject introspection:   ${found_introspection}
-      vala bindings:           ${enable_vala}
-      documentation:           ${enable_gtk_doc}
-      code coverage:           ${CODE_COVERAGE_ENABLED}"
-if test "x${CODE_COVERAGE_ENABLED}" = "xyes"; then
-   echo "      code coverage cflags:    ${CODE_COVERAGE_CFLAGS}"
-   echo "      code coverage ldflags:   ${CODE_COVERAGE_LDFLAGS}"
-fi
-echo ""
diff --git a/data/Makefile.am b/data/Makefile.am
deleted file mode 100644
index 640d2b2..0000000
--- a/data/Makefile.am
+++ /dev/null
@@ -1,115 +0,0 @@
-
-SUBDIRS = \
-	. \
-	dispatcher-connection \
-	dispatcher-fcc-unlock
-
-if WITH_TESTS
-SUBDIRS += tests
-endif
-
-edit = @sed \
-       -e 's|@sbindir[@]|$(sbindir)|g' \
-       -e 's|@sysconfdir[@]|$(sysconfdir)|g' \
-       -e 's|@localstatedir[@]|$(localstatedir)|g' \
-       -e 's|@libexecdir[@]|$(libexecdir)|g' \
-       -e 's|@MM_POLKIT_SERVICE[@]|$(MM_POLKIT_SERVICE)|g'
-
-
-# DBus Service file
-dbusservicedir = $(DBUS_SYS_DIR)
-dbusservice_DATA = org.freedesktop.ModemManager1.conf
-dbusservice_file_polkit = org.freedesktop.ModemManager1.conf.polkit
-dbusservice_file_nopolkit = org.freedesktop.ModemManager1.conf.nopolkit
-
-if WITH_POLKIT
-org.freedesktop.ModemManager1.conf: $(top_srcdir)/data/$(dbusservice_file_polkit)
-	cp -f $(top_srcdir)/data/$(dbusservice_file_polkit) $(dbusservice_DATA)
-else
-org.freedesktop.ModemManager1.conf:  $(top_srcdir)/data/$(dbusservice_file_nopolkit)
-	cp -f $(top_srcdir)/data/$(dbusservice_file_nopolkit) $(dbusservice_DATA)
-endif
-
-
-# systemd unit file
-systemdsystemunitdir = $(SYSTEMD_UNIT_DIR)
-systemdsystemunit_in_files = ModemManager.service.in
-if HAVE_SYSTEMD
-systemdsystemunit_DATA = ModemManager.service
-ModemManager.service: ModemManager.service.in
-	$(edit) $< >$@
-endif
-
-
-# DBus Activation file
-dbusactivationdir = $(datadir)/dbus-1/system-services
-dbusactivation_DATA = org.freedesktop.ModemManager1.service
-dbusactivation_in_files = org.freedesktop.ModemManager1.service.in
-org.freedesktop.ModemManager1.service: org.freedesktop.ModemManager1.service.in
-	$(edit) $< >$@
-
-
-# Icon
-icondir=${datadir}/icons/hicolor/22x22/apps
-icon_DATA = ModemManager.png
-
-
-# Logos
-logos = \
-	ModemManager-logo-square.svg ModemManager-logo-square.png \
-	ModemManager-logo-wide.svg ModemManager-logo-wide.png \
-	ModemManager-logo-wide-text.svg ModemManager-logo-wide-text.png
-
-
-# Diagrams
-diagrams = \
-	ModemManager-states.png \
-	ModemManager-interface-initialization-sequence.png \
-	ModemManager-interface-initialization-sequence-subclassed.png
-
-# Polkit
-
-# build file with translations, which we will include in dist
-org.freedesktop.ModemManager1.policy.in: org.freedesktop.ModemManager1.policy.in.in
-	$(AM_V_GEN) GETTEXTDATADIR=$(top_srcdir)/data $(MSGFMT) --xml -d $(top_srcdir)/po/ -o $@ --template $<
-
-if WITH_POLKIT
-
-# build with requested user policy
-org.freedesktop.ModemManager1.policy: org.freedesktop.ModemManager1.policy.in
-	$(AM_V_GEN) sed -e s,@MM_DEFAULT_USER_POLICY\@,$(MM_DEFAULT_USER_POLICY), $< > $@.tmp && mv $@.tmp $@
-
-polkit_policydir = $(datadir)/polkit-1/actions
-polkit_policy_DATA = org.freedesktop.ModemManager1.policy
-
-endif
-
-# Set up pkg-config .pc files for exported libraries
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = \
-	ModemManager.pc \
-	mm-glib.pc
-
-MAINTAINERCLEANFILES = \
-	org.freedesktop.ModemManager1.policy.in
-
-DISTCLEANFILES = \
-	org.freedesktop.ModemManager1.policy \
-	$(dbusactivation_DATA) \
-	$(dbusservice_DATA)
-
-if HAVE_SYSTEMD
-DISTCLEANFILES += $(systemdsystemunit_DATA)
-endif
-
-EXTRA_DIST = \
-	its \
-	org.freedesktop.ModemManager1.policy.in.in \
-	org.freedesktop.ModemManager1.policy.in \
-	$(systemdsystemunit_in_files) \
-	$(dbusactivation_in_files) \
-	$(dbusservice_file_polkit) \
-	$(dbusservice_file_nopolkit) \
-	$(icon_DATA) \
-	$(logos) \
-	$(diagrams)
diff --git a/data/dispatcher-connection/Makefile.am b/data/dispatcher-connection/Makefile.am
deleted file mode 100644
index 3b86e7f..0000000
--- a/data/dispatcher-connection/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-
-# Directory for user-enabled tools
-connectionuser = $(pkgsysconfdir)/connection.d
-
-# Directory for package-enabled tools
-connectionpackage = $(pkglibdir)/connection.d
-
-# Shipped but disabled FCC unlock tools
-connectionavailabledir = $(pkgdatadir)/connection.available.d
-connectionavailable_SCRIPTS = \
-	99-log-event \
-	$(NULL)
-
-EXTRA_DIST = $(connectionavailable_SCRIPTS)
-
-install-data-hook:
-	$(MKDIR_P) $(DESTDIR)$(connectionuser); \
-	$(MKDIR_P) $(DESTDIR)$(connectionpackage); \
-	cd $(DESTDIR)$(connectionavailabledir); \
-	chmod go-rwx *; \
-	$(NULL)
diff --git a/data/dispatcher-fcc-unlock/2c7c b/data/dispatcher-fcc-unlock/2c7c
index 1161aec..fa37292 100644
--- a/data/dispatcher-fcc-unlock/2c7c
+++ b/data/dispatcher-fcc-unlock/2c7c
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # SPDX-License-Identifier: CC0-1.0
 # 2022 Leah Oswald <mail@leahoswald.de>
diff --git a/data/dispatcher-fcc-unlock/Makefile.am b/data/dispatcher-fcc-unlock/Makefile.am
deleted file mode 100644
index 7f6224c..0000000
--- a/data/dispatcher-fcc-unlock/Makefile.am
+++ /dev/null
@@ -1,34 +0,0 @@
-
-# Directory for user-enabled tools
-fccunlockuser = $(pkgsysconfdir)/fcc-unlock.d
-
-# Directory for package-enabled tools
-fccunlockpackage = $(pkglibdir)/fcc-unlock.d
-
-# Shipped but disabled FCC unlock tools
-fccunlockavailabledir = $(pkgdatadir)/fcc-unlock.available.d
-fccunlockavailable_SCRIPTS = \
-	105b \
-	1199 \
-	1eac \
-	2c7c \
-	$(NULL)
-
-EXTRA_DIST = $(fccunlockavailable_SCRIPTS)
-
-install-data-hook:
-	$(MKDIR_P) $(DESTDIR)$(fccunlockuser); \
-	$(MKDIR_P) $(DESTDIR)$(fccunlockpackage); \
-	cd $(DESTDIR)$(fccunlockavailabledir); \
-	chmod go-rwx *; \
-	$(LN_S) -f 105b 105b:e0ab; \
-	$(LN_S) -f 1199 03f0:4e1d; \
-	$(LN_S) -f 1199 1199:9079; \
-	$(LN_S) -f 1199 413c:81a3; \
-	$(LN_S) -f 1199 413c:81a8; \
-	$(LN_S) -f 1eac 1eac:1001; \
-	$(LN_S) -f 2c7c 2c7c:030a; \
-	$(NULL)
-
-uninstall-hook:
-	cd $(DESTDIR)$(fccunlockavailabledir) && rm -f *:*
diff --git a/data/tests/Makefile.am b/data/tests/Makefile.am
deleted file mode 100644
index 417cf83..0000000
--- a/data/tests/Makefile.am
+++ /dev/null
@@ -1,2 +0,0 @@
-
-EXTRA_DIST = org.freedesktop.ModemManager1.service.in
diff --git a/docs/Makefile.am b/docs/Makefile.am
deleted file mode 100644
index 71b71a7..0000000
--- a/docs/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-
-SUBDIRS = reference man
-
-# require gtk-doc when making dist
-#
-if ENABLE_GTK_DOC
-dist-check-gtk-doc:
-else
-dist-check-gtk-doc:
-	@echo "*** gtk-doc must be enabled in order to make dist"
-	@false
-endif
-
-dist-hook: dist-check-gtk-doc
diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am
deleted file mode 100644
index 9092246..0000000
--- a/docs/man/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-man_MANS = ModemManager.8 mmcli.1
-
-EXTRA_DIST = $(man_MANS)
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
deleted file mode 100644
index 4facd1f..0000000
--- a/docs/reference/Makefile.am
+++ /dev/null
@@ -1,2 +0,0 @@
-
-SUBDIRS = api libmm-glib
diff --git a/docs/reference/api/Makefile.am b/docs/reference/api/Makefile.am
deleted file mode 100644
index a641ead..0000000
--- a/docs/reference/api/Makefile.am
+++ /dev/null
@@ -1,114 +0,0 @@
-
-# Logos
-LOGOS_PNG = \
-	$(top_srcdir)/data/ModemManager-logo-square.png \
-	$(top_srcdir)/data/ModemManager-logo-wide.png \
-	$(top_srcdir)/data/ModemManager-logo-wide-text.png
-
-# Diagrams
-DIAGRAMS_PNG = \
-	$(top_srcdir)/data/ModemManager-states.png \
-	$(top_srcdir)/data/ModemManager-interface-initialization-sequence.png \
-	$(top_srcdir)/data/ModemManager-interface-initialization-sequence-subclassed.png
-
-# The name of the module.
-DOC_MODULE = ModemManager
-
-# The top-level SGML file.
-DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.xml
-
-# Extra options to supply to gtkdoc-scan
-SCAN_OPTIONS = --deprecated-guards="MM_DISABLE_DEPRECATED"
-
-# The directory containing the source code.
-DOC_SOURCE_DIR = $(top_srcdir)/include
-
-HFILE_GLOB =
-CFILE_GLOB =
-
-# Headers to ignore
-IGNORE_HFILES = \
-	ModemManager.h \
-	ModemManager-names.h \
-	$(NULL)
-
-# CFLAGS and LDFLAGS for compiling scan program. Only needed
-# if $(DOC_MODULE).types is non-empty.
-AM_CPPFLAGS = \
-	-I$(srcdir) \
-	-I$(top_srcdir) \
-	-I$(top_builddir) \
-	$(MM_CFLAGS) \
-	$(NULL)
-
-GTKDOC_LIBS = \
-	$(MM_LIBS) \
-	$(NULL)
-
-# Extra options to supply to gtkdoc-mkdb
-MKDB_OPTIONS = --output-format=xml --sgml-mode --name-space=mm
-
-# Images to copy into HTML directory
-HTML_IMAGES = \
-	$(DIAGRAMS_PNG) \
-	$(LOGOS_PNG) \
-	$(NULL)
-
-content_files =
-expand_content_files = \
-	ModemManager-overview.xml \
-	ModemManager-dbus-reference.xml \
-	ModemManager-migration-reference.xml \
-	$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.xml \
-	$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Sim.xml \
-	$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Sms.xml \
-	$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Bearer.xml \
-	$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.xml \
-	$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Messaging.xml \
-	$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Location.xml \
-	$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Time.xml \
-	$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Firmware.xml \
-	$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Oma.xml \
-	$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.ModemCdma.xml \
-	$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Modem3gpp.xml \
-	$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Modem3gpp.ProfileManager.xml \
-	$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd.xml \
-	$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Simple.xml \
-	$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Signal.xml \
-	$(top_builddir)/libmm-glib/generated/mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Sar.xml \
-	$(NULL)
-
-extra_files = \
-	$(NULL)
-
-if ENABLE_GTK_DOC
-include $(top_srcdir)/gtk-doc.make
-else
-EXTRA_DIST =
-CLEANFILES =
-endif
-
-EXTRA_DIST += \
-	ModemManager-overview.xml \
-	ModemManager-dbus-reference.xml \
-	ModemManager-migration-reference.xml \
-	version.xml.in \
-	$(DIAGRAMS) \
-	$(NULL)
-
-CLEANFILES += \
-	$(DOC_MODULE)-decl-list.txt \
-	$(DOC_MODULE)-decl.txt \
-	$(DOC_MODULE)-overrides.txt \
-	$(DOC_MODULE)-undeclared.txt \
-	$(DOC_MODULE)-undocumented.txt \
-	$(DOC_MODULE)-overrides.txt \
-	$(DOC_MODULE)-unused.txt \
-	$(DOC_MODULE).args \
-	$(DOC_MODULE).hierarchy \
-	$(DOC_MODULE).interfaces \
-	$(DOC_MODULE).prerequisites \
-	$(DOC_MODULE).signals \
-	*.stamp \
-	-rf xml html tmpl \
-	$(NULL)
diff --git a/docs/reference/libmm-glib/Makefile.am b/docs/reference/libmm-glib/Makefile.am
deleted file mode 100644
index db8c12b..0000000
--- a/docs/reference/libmm-glib/Makefile.am
+++ /dev/null
@@ -1,92 +0,0 @@
-
-# Logos
-LOGOS_PNG = \
-	$(top_srcdir)/data/ModemManager-logo-square.png \
-	$(top_srcdir)/data/ModemManager-logo-wide.png \
-	$(top_srcdir)/data/ModemManager-logo-wide-text.png
-
-# The name of the module.
-DOC_MODULE = libmm-glib
-
-# The top-level SGML file.
-DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.xml
-
-# Extra options to supply to gtkdoc-scan
-SCAN_OPTIONS = --rebuild-types --deprecated-guards="MM_DISABLE_DEPRECATED"
-
-# The directory containing the source code.
-DOC_SOURCE_DIR = \
-	$(top_srcdir)/libmm-glib \
-	$(top_srcdir)/libmm-glib/generated \
-	$(top_builddir)/libmm-glib/generated \
-	$(NULL)
-
-HFILE_GLOB =
-CFILE_GLOB =
-
-# Headers to ignore
-IGNORE_HFILES = \
-	mm-helpers.h \
-	mm-common-helpers.h \
-	mm-gdbus-test.h \
-	$(NULL)
-
-# CFLAGS and LDFLAGS for compiling scan program. Only needed
-# if $(DOC_MODULE).types is non-empty.
-AM_CPPFLAGS = \
-	-I$(srcdir) \
-	-I$(top_srcdir) \
-	-I$(top_builddir) \
-	$(MM_CFLAGS) \
-	$(NULL)
-
-GTKDOC_LIBS = \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(MM_LIBS) \
-	$(NULL)
-
-# Extra options to supply to gtkdoc-mkdb
-MKDB_OPTIONS = \
-	--output-format=xml \
-	--sgml-mode \
-	--name-space=mm \
-	--ignore-files=mm-gdbus-test.h \
-	--ignore-files=mm-gdbus-test.c \
-	$(NULL)
-
-# Images to copy into HTML directory
-HTML_IMAGES = \
-	$(LOGOS_PNG) \
-	$(NULL)
-
-content_files = \
-	$(NULL)
-
-if ENABLE_GTK_DOC
-include $(top_srcdir)/gtk-doc.make
-else
-EXTRA_DIST =
-CLEANFILES =
-endif
-
-EXTRA_DIST += \
-	version.xml.in \
-	$(NULL)
-
-CLEANFILES += \
-	$(DOC_MODULE)-decl-list.txt \
-	$(DOC_MODULE)-decl.txt \
-	$(DOC_MODULE)-overrides.txt \
-	$(DOC_MODULE)-undeclared.txt \
-	$(DOC_MODULE)-undocumented.txt \
-	$(DOC_MODULE)-overrides.txt \
-	$(DOC_MODULE)-unused.txt \
-	$(DOC_MODULE).args \
-	$(DOC_MODULE).hierarchy \
-	$(DOC_MODULE).interfaces \
-	$(DOC_MODULE).prerequisites \
-	$(DOC_MODULE).signals \
-	$(DOC_MODULE).actions \
-	*.stamp \
-	-rf xml html tmpl \
-	$(NULL)
diff --git a/examples/Makefile.am b/examples/Makefile.am
deleted file mode 100644
index 927d3a9..0000000
--- a/examples/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-SUBDIRS = \
-	modem-watcher-python \
-	modem-watcher-javascript \
-	sms-python \
-	network-scan-python \
-	sms-c \
-	$(NULL)
diff --git a/examples/modem-watcher-javascript/Makefile.am b/examples/modem-watcher-javascript/Makefile.am
deleted file mode 100644
index 2ab38b1..0000000
--- a/examples/modem-watcher-javascript/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-
-EXTRA_DIST = \
-	main.js \
-	modemWatcher.js \
-	modem-watcher-javascript
diff --git a/examples/modem-watcher-python/Makefile.am b/examples/modem-watcher-python/Makefile.am
deleted file mode 100644
index 52bff80..0000000
--- a/examples/modem-watcher-python/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-
-EXTRA_DIST = \
-	ModemWatcher.py \
-	modem-watcher-python
diff --git a/examples/network-scan-python/Makefile.am b/examples/network-scan-python/Makefile.am
deleted file mode 100644
index 70bdfb2..0000000
--- a/examples/network-scan-python/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-
-EXTRA_DIST = \
-	network-scan-python \
-	$(NULL)
diff --git a/examples/sms-c/Makefile.am b/examples/sms-c/Makefile.am
deleted file mode 100644
index c8c3c90..0000000
--- a/examples/sms-c/Makefile.am
+++ /dev/null
@@ -1,49 +0,0 @@
-noinst_PROGRAMS = sms-c-sync sms-c-async
-
-sms_c_sync_CPPFLAGS = \
-	$(WARN_CFLAGS) \
-	$(MMCLI_CFLAGS) \
-	-I$(top_srcdir) \
-	-I$(top_srcdir)/include \
-	-I$(top_builddir)/include \
-	-I$(top_srcdir)/libmm-glib \
-	-I${top_srcdir}/libmm-glib/generated \
-	-I${top_builddir}/libmm-glib/generated \
-	$(NULL)
-
-sms_c_sync_SOURCES = \
-	sms-c-sync.c \
-	$(NULL)
-
-sms_c_sync_LDADD = \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(NULL)
-
-sms_c_sync_LDFLAGS = \
-	$(WARN_LDFLAGS) \
-	$(MMCLI_LIBS) \
-	$(NULL)
-
-sms_c_async_CPPFLAGS = \
-	$(WARN_CFLAGS) \
-	$(MMCLI_CFLAGS) \
-	-I$(top_srcdir) \
-	-I$(top_srcdir)/include \
-	-I$(top_builddir)/include \
-	-I$(top_srcdir)/libmm-glib \
-	-I${top_srcdir}/libmm-glib/generated \
-	-I${top_builddir}/libmm-glib/generated \
-	$(NULL)
-
-sms_c_async_SOURCES = \
-	sms-c-async.c \
-	$(NULL)
-
-sms_c_async_LDADD = \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(NULL)
-
-sms_c_async_LDFLAGS = \
-	$(WARN_LDFLAGS) \
-	$(MMCLI_LIBS) \
-	$(NULL)
diff --git a/examples/sms-python/Makefile.am b/examples/sms-python/Makefile.am
deleted file mode 100644
index 8ecca80..0000000
--- a/examples/sms-python/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-
-EXTRA_DIST = \
-	sms-python \
-	$(NULL)
diff --git a/gtester.make b/gtester.make
deleted file mode 100644
index f9cb816..0000000
--- a/gtester.make
+++ /dev/null
@@ -1,71 +0,0 @@
-
-GTESTER = gtester
-GTESTER_REPORT = gtester-report
-
-# initialize variables for unconditional += appending
-EXTRA_DIST =
-TEST_PROGS =
-
-### testing rules
-
-# test: run all tests in cwd and subdirs
-test: test-nonrecursive
-	@ for subdir in $(SUBDIRS) . ; do \
-	    test "$$subdir" = "." -o "$$subdir" = "po" || \
-	    ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
-	  done
-
-# test-nonrecursive: run tests only in cwd
-test-nonrecursive: ${TEST_PROGS}
-	@test -z "${TEST_PROGS}" || G_DEBUG=gc-friendly MALLOC_CHECK_=2 MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256)) ${GTESTER} --verbose ${TEST_PROGS}
-
-# test-report: run tests in subdirs and generate report
-# perf-report: run tests in subdirs with -m perf and generate report
-# full-report: like test-report: with -m perf and -m slow
-test-report perf-report full-report:	${TEST_PROGS}
-	@test -z "${TEST_PROGS}" || { \
-	  case $@ in \
-	  test-report) test_options="-k";; \
-	  perf-report) test_options="-k -m=perf";; \
-	  full-report) test_options="-k -m=perf -m=slow";; \
-	  esac ; \
-	  if test -z "$$GTESTER_LOGDIR" ; then	\
-	    ${GTESTER} --verbose $$test_options -o test-report.xml ${TEST_PROGS} ; \
-	  elif test -n "${TEST_PROGS}" ; then \
-	    ${GTESTER} --verbose $$test_options -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ${TEST_PROGS} ; \
-	  fi ; \
-	}
-	@ ignore_logdir=true ; \
-	  if test -z "$$GTESTER_LOGDIR" ; then \
-	    GTESTER_LOGDIR=`mktemp -d "\`pwd\`/.testlogs-XXXXXX"`; export GTESTER_LOGDIR ; \
-	    ignore_logdir=false ; \
-	  fi ; \
-	  if test -d "$(top_srcdir)/.git" ; then \
-	    REVISION=`git describe` ; \
-	  else \
-	    REVISION=$(VERSION) ; \
-	  fi ; \
-	  for subdir in $(SUBDIRS) . ; do \
-	    test "$$subdir" = "." -o "$$subdir" = "po" || \
-	    ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
-	  done ; \
-	  $$ignore_logdir || { \
-	    echo '<?xml version="1.0"?>'              > $@.xml ; \
-	    echo '<report-collection>'               >> $@.xml ; \
-	    echo '<info>'                            >> $@.xml ; \
-	    echo '  <package>$(PACKAGE)</package>'   >> $@.xml ; \
-	    echo '  <version>$(VERSION)</version>'   >> $@.xml ; \
-	    echo "  <revision>$$REVISION</revision>" >> $@.xml ; \
-	    echo '</info>'                           >> $@.xml ; \
-	    for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \
-	      sed '1,1s/^<?xml\b[^>?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \
-	    done ; \
-	    echo >> $@.xml ; \
-	    echo '</report-collection>' >> $@.xml ; \
-	    rm -rf "$$GTESTER_LOGDIR"/ ; \
-	    ${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \
-	  }
-.PHONY: test test-report perf-report full-report test-nonrecursive
-
-# run tests in cwd as part of make check
-check-local: test-nonrecursive
diff --git a/gtk-doc.make b/gtk-doc.make
deleted file mode 100644
index 913aa4f..0000000
--- a/gtk-doc.make
+++ /dev/null
@@ -1,320 +0,0 @@
-# -*- mode: makefile -*-
-#
-# gtk-doc.make - make rules for gtk-doc
-# Copyright (C) 2003 James Henstridge
-#               2004-2007 Damon Chaplin
-#               2007-2017 Stefan Sauer
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-####################################
-# Everything below here is generic #
-####################################
-
-if GTK_DOC_USE_LIBTOOL
-GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
-GTKDOC_RUN = $(LIBTOOL) --mode=execute
-else
-GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
-GTKDOC_RUN =
-endif
-
-# We set GPATH here; this gives us semantics for GNU make
-# which are more like other make's VPATH, when it comes to
-# whether a source that is a target of one rule is then
-# searched for in VPATH/GPATH.
-#
-GPATH = $(srcdir)
-
-TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
-
-SETUP_FILES = \
-	$(content_files)		\
-	$(expand_content_files)		\
-	$(DOC_MAIN_SGML_FILE)		\
-	$(DOC_MODULE)-sections.txt	\
-	$(DOC_MODULE)-overrides.txt
-
-EXTRA_DIST = 				\
-	$(HTML_IMAGES)			\
-	$(SETUP_FILES)
-
-DOC_STAMPS=setup-build.stamp scan-build.stamp sgml-build.stamp \
-	html-build.stamp pdf-build.stamp \
-	sgml.stamp html.stamp pdf.stamp
-
-SCANOBJ_FILES = 		 \
-	$(DOC_MODULE).args 	 \
-	$(DOC_MODULE).hierarchy  \
-	$(DOC_MODULE).interfaces \
-	$(DOC_MODULE).prerequisites \
-	$(DOC_MODULE).signals
-
-REPORT_FILES = \
-	$(DOC_MODULE)-undocumented.txt \
-	$(DOC_MODULE)-undeclared.txt \
-	$(DOC_MODULE)-unused.txt
-
-gtkdoc-check.test: Makefile
-	$(AM_V_GEN)echo "#!/bin/sh -e" > $@; \
-		echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \
-		chmod +x $@
-
-CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test
-
-if GTK_DOC_BUILD_HTML
-HTML_BUILD_STAMP=html-build.stamp
-else
-HTML_BUILD_STAMP=
-endif
-if GTK_DOC_BUILD_PDF
-PDF_BUILD_STAMP=pdf-build.stamp
-else
-PDF_BUILD_STAMP=
-endif
-
-all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
-.PHONY: all-gtk-doc
-
-if ENABLE_GTK_DOC
-all-local: all-gtk-doc
-endif
-
-docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
-
-$(REPORT_FILES): sgml-build.stamp
-
-#### setup ####
-
-GTK_DOC_V_SETUP=$(GTK_DOC_V_SETUP_@AM_V@)
-GTK_DOC_V_SETUP_=$(GTK_DOC_V_SETUP_@AM_DEFAULT_V@)
-GTK_DOC_V_SETUP_0=@echo "  DOC   Preparing build";
-
-setup-build.stamp:
-	-$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
-	  files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \
-	  if test "x$$files" != "x" ; then \
-	    for file in $$files ; do \
-	      destdir=`dirname $(abs_builddir)/$$file`; \
-	      test -d "$$destdir" || mkdir -p "$$destdir"; \
-	      test -f $(abs_srcdir)/$$file && \
-	        cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \
-	    done; \
-	  fi; \
-	fi
-	$(AM_V_at)touch setup-build.stamp
-
-#### scan ####
-
-GTK_DOC_V_SCAN=$(GTK_DOC_V_SCAN_@AM_V@)
-GTK_DOC_V_SCAN_=$(GTK_DOC_V_SCAN_@AM_DEFAULT_V@)
-GTK_DOC_V_SCAN_0=@echo "  DOC   Scanning header files";
-
-GTK_DOC_V_INTROSPECT=$(GTK_DOC_V_INTROSPECT_@AM_V@)
-GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_@AM_DEFAULT_V@)
-GTK_DOC_V_INTROSPECT_0=@echo "  DOC   Introspecting gobjects";
-
-scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB)
-	$(GTK_DOC_V_SCAN)_source_dir='' ; \
-	for i in $(DOC_SOURCE_DIR) ; do \
-	  _source_dir="$${_source_dir} --source-dir=$$i" ; \
-	done ; \
-	gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES)
-	$(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \
-	  scanobj_options=""; \
-	  gtkdoc-scangobj 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
-	  if test "$$?" = "0"; then \
-	    if test "x$(V)" = "x1"; then \
-	      scanobj_options="--verbose"; \
-	    fi; \
-	  fi; \
-	  CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \
-	  gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \
-	else \
-	  for i in $(SCANOBJ_FILES) ; do \
-	    test -f $$i || touch $$i ; \
-	  done \
-	fi
-	$(AM_V_at)touch scan-build.stamp
-
-$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
-	@true
-
-#### xml ####
-
-GTK_DOC_V_XML=$(GTK_DOC_V_XML_@AM_V@)
-GTK_DOC_V_XML_=$(GTK_DOC_V_XML_@AM_DEFAULT_V@)
-GTK_DOC_V_XML_0=@echo "  DOC   Building XML";
-
-sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent
-	$(GTK_DOC_V_XML)_source_dir='' ; \
-	for i in $(DOC_SOURCE_DIR) ; do \
-	  _source_dir="$${_source_dir} --source-dir=$$i" ; \
-	done ; \
-	gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS)
-	$(AM_V_at)touch sgml-build.stamp
-
-sgml.stamp: sgml-build.stamp
-	@true
-
-$(DOC_MAIN_SGML_FILE): sgml-build.stamp
-	@true
-
-xml/gtkdocentities.ent: Makefile
-	$(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \
-		echo "<!ENTITY package \"$(PACKAGE)\">"; \
-		echo "<!ENTITY package_bugreport \"$(PACKAGE_BUGREPORT)\">"; \
-		echo "<!ENTITY package_name \"$(PACKAGE_NAME)\">"; \
-		echo "<!ENTITY package_string \"$(PACKAGE_STRING)\">"; \
-		echo "<!ENTITY package_tarname \"$(PACKAGE_TARNAME)\">"; \
-		echo "<!ENTITY package_url \"$(PACKAGE_URL)\">"; \
-		echo "<!ENTITY package_version \"$(PACKAGE_VERSION)\">"; \
-	) > $@
-
-#### html ####
-
-GTK_DOC_V_HTML=$(GTK_DOC_V_HTML_@AM_V@)
-GTK_DOC_V_HTML_=$(GTK_DOC_V_HTML_@AM_DEFAULT_V@)
-GTK_DOC_V_HTML_0=@echo "  DOC   Building HTML";
-
-GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_@AM_V@)
-GTK_DOC_V_XREF_=$(GTK_DOC_V_XREF_@AM_DEFAULT_V@)
-GTK_DOC_V_XREF_0=@echo "  DOC   Fixing cross-references";
-
-html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files)
-	$(GTK_DOC_V_HTML)rm -rf html && mkdir html && \
-	mkhtml_options=""; \
-	gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
-	if test "$$?" = "0"; then \
-	  if test "x$(V)" = "x1"; then \
-	    mkhtml_options="$$mkhtml_options --verbose"; \
-	  fi; \
-	fi; \
-	gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-path"; \
-	if test "$$?" = "0"; then \
-	  mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \
-	fi; \
-	cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
-	-@test "x$(HTML_IMAGES)" = "x" || \
-	for file in $(HTML_IMAGES) ; do \
-	  test -f $(abs_srcdir)/$$file && cp $(abs_srcdir)/$$file $(abs_builddir)/html; \
-	  test -f $(abs_builddir)/$$file && cp $(abs_builddir)/$$file $(abs_builddir)/html; \
-	  test -f $$file && cp $$file $(abs_builddir)/html; \
-	done;
-	$(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
-	$(AM_V_at)touch html-build.stamp
-
-#### pdf ####
-
-GTK_DOC_V_PDF=$(GTK_DOC_V_PDF_@AM_V@)
-GTK_DOC_V_PDF_=$(GTK_DOC_V_PDF_@AM_DEFAULT_V@)
-GTK_DOC_V_PDF_0=@echo "  DOC   Building PDF";
-
-pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files)
-	$(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \
-	mkpdf_options=""; \
-	gtkdoc-mkpdf 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
-	if test "$$?" = "0"; then \
-	  if test "x$(V)" = "x1"; then \
-	    mkpdf_options="$$mkpdf_options --verbose"; \
-	  fi; \
-	fi; \
-	if test "x$(HTML_IMAGES)" != "x"; then \
-	  for img in $(HTML_IMAGES); do \
-	    part=`dirname $$img`; \
-	    echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \
-	    if test $$? != 0; then \
-	      mkpdf_options="$$mkpdf_options --imgdir=$$part"; \
-	    fi; \
-	  done; \
-	fi; \
-	gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS)
-	$(AM_V_at)touch pdf-build.stamp
-
-##############
-
-clean-local:
-	@rm -f *~ *.bak
-	@rm -rf .libs
-	@if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \
-	  rm -f $(DOC_MODULE).types; \
-	fi
-	@if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \
-	  rm -f $(DOC_MODULE)-sections.txt; \
-	fi
-
-distclean-local:
-	@rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \
-	    $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
-	@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
-	    rm -f $(SETUP_FILES) $(DOC_MODULE).types; \
-	fi
-
-maintainer-clean-local:
-	@rm -rf xml html
-
-install-data-local:
-	@installfiles=`echo $(builddir)/html/*`; \
-	if test "$$installfiles" = '$(builddir)/html/*'; \
-	then echo 1>&2 'Nothing to install' ; \
-	else \
-	  if test -n "$(DOC_MODULE_VERSION)"; then \
-	    installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
-	  else \
-	    installdir="$(DESTDIR)$(TARGET_DIR)"; \
-	  fi; \
-	  $(mkinstalldirs) $${installdir} ; \
-	  for i in $$installfiles; do \
-	    echo ' $(INSTALL_DATA) '$$i ; \
-	    $(INSTALL_DATA) $$i $${installdir}; \
-	  done; \
-	  if test -n "$(DOC_MODULE_VERSION)"; then \
-	    mv -f $${installdir}/$(DOC_MODULE).devhelp2 \
-	      $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \
-	  fi; \
-	fi
-
-uninstall-local:
-	@if test -n "$(DOC_MODULE_VERSION)"; then \
-	  installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
-	else \
-	  installdir="$(DESTDIR)$(TARGET_DIR)"; \
-	fi; \
-	rm -rf $${installdir}
-
-#
-# Require gtk-doc when making dist
-#
-if HAVE_GTK_DOC
-dist-check-gtkdoc: docs
-else
-dist-check-gtkdoc:
-	@echo "*** gtk-doc is needed to run 'make dist'.         ***"
-	@echo "*** gtk-doc was not found when 'configure' ran.   ***"
-	@echo "*** please install gtk-doc and rerun 'configure'. ***"
-	@false
-endif
-
-dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local
-	@mkdir $(distdir)/html
-	@cp ./html/* $(distdir)/html
-	@-cp ./$(DOC_MODULE).pdf $(distdir)/
-	@-cp ./$(DOC_MODULE).types $(distdir)/
-	@-cp ./$(DOC_MODULE)-sections.txt $(distdir)/
-	@cd $(distdir) && rm -f $(DISTCLEANFILES)
-	@$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html
-
-.PHONY : dist-hook-local docs
diff --git a/include/Makefile.am b/include/Makefile.am
deleted file mode 100644
index cd44da5..0000000
--- a/include/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-XSLTPROC = xsltproc --xinclude --nonet
-
-XMLS = $(wildcard $(top_srcdir)/introspection/*.xml)
-
-includedir = @includedir@/ModemManager
-
-include_HEADERS = \
-	ModemManager-names.h \
-	ModemManager-enums.h \
-	ModemManager-errors.h \
-	ModemManager-compat.h \
-	ModemManager-version.h \
-	ModemManager.h
-
-ModemManager-names.h: $(XMLS) $(top_srcdir)/build-aux/header-generator.xsl
-	$(AM_V_GEN) $(XSLTPROC) $(top_srcdir)/build-aux/header-generator.xsl $(top_srcdir)/introspection/all.xml > $@
-
-MAINTAINERCLEANFILES = \
-	ModemManager-names.h
-
-EXTRA_DIST = \
-	ModemManager-tags.h \
-	ModemManager-version.h.in
diff --git a/introspection/Makefile.am b/introspection/Makefile.am
deleted file mode 100644
index c751577..0000000
--- a/introspection/Makefile.am
+++ /dev/null
@@ -1,31 +0,0 @@
-
-SUBDIRS = . tests
-
-# DBus Introspection files
-xmldir = $(datadir)/dbus-1/interfaces
-xml_DATA = \
-	org.freedesktop.ModemManager1.xml \
-	org.freedesktop.ModemManager1.Modem.xml \
-	org.freedesktop.ModemManager1.Modem.Modem3gpp.xml \
-	org.freedesktop.ModemManager1.Modem.ModemCdma.xml \
-	org.freedesktop.ModemManager1.Modem.Simple.xml \
-	org.freedesktop.ModemManager1.Sim.xml \
-	org.freedesktop.ModemManager1.Bearer.xml \
-	org.freedesktop.ModemManager1.Modem.Location.xml \
-	org.freedesktop.ModemManager1.Modem.Messaging.xml \
-	org.freedesktop.ModemManager1.Sms.xml \
-	org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd.xml \
-	org.freedesktop.ModemManager1.Modem.Firmware.xml \
-	org.freedesktop.ModemManager1.Modem.Oma.xml \
-	org.freedesktop.ModemManager1.Modem.Signal.xml \
-	org.freedesktop.ModemManager1.Modem.Time.xml \
-	org.freedesktop.ModemManager1.Modem.Voice.xml \
-	org.freedesktop.ModemManager1.Call.xml \
-	org.freedesktop.ModemManager1.Modem.Sar.xml \
-	org.freedesktop.ModemManager1.Modem.Modem3gpp.ProfileManager.xml \
-	$(NULL)
-
-EXTRA_DIST = \
-	$(xml_DATA) \
-	all.xml \
-	$(NULL)
diff --git a/introspection/org.freedesktop.ModemManager1.xml b/introspection/org.freedesktop.ModemManager1.xml
index e80e0cd..adaf592 100644
--- a/introspection/org.freedesktop.ModemManager1.xml
+++ b/introspection/org.freedesktop.ModemManager1.xml
@@ -31,7 +31,8 @@
 
     <!--
         SetLogging:
-        @level: One of <literal>"ERR"</literal>, <literal>"WARN"</literal>, <literal>"INFO"</literal>, <literal>"DEBUG"</literal>.
+        @level: One of <literal>"ERR"</literal>, <literal>"WARN"</literal>,
+          <literal>"MSG"</literal>, <literal>"INFO"</literal>, <literal>"DEBUG"</literal>.
 
         Set logging verbosity.
 
diff --git a/introspection/tests/Makefile.am b/introspection/tests/Makefile.am
deleted file mode 100644
index 4582933..0000000
--- a/introspection/tests/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-
-# DBus Introspection files
-EXTRA_DIST = org.freedesktop.ModemManager1.Test.xml
diff --git a/libmm-glib/Makefile.am b/libmm-glib/Makefile.am
deleted file mode 100644
index 08d5ee2..0000000
--- a/libmm-glib/Makefile.am
+++ /dev/null
@@ -1,280 +0,0 @@
-SUBDIRS = generated . tests
-
-AM_CFLAGS  = $(CODE_COVERAGE_CFLAGS)
-AM_LDFLAGS = $(CODE_COVERAGE_LDFLAGS)
-
-lib_LTLIBRARIES = libmm-glib.la
-
-libmm_glib_la_SOURCES = \
-	libmm-glib.h \
-	mm-helpers.h \
-	mm-helper-types.h \
-	mm-helper-types.c \
-	mm-manager.h \
-	mm-manager.c \
-	mm-object.h \
-	mm-object.c \
-	mm-modem.h \
-	mm-modem.c \
-	mm-modem-3gpp.h \
-	mm-modem-3gpp.c \
-	mm-modem-3gpp-profile-manager.h \
-	mm-modem-3gpp-profile-manager.c \
-	mm-modem-3gpp-ussd.h \
-	mm-modem-3gpp-ussd.c \
-	mm-modem-cdma.h \
-	mm-modem-cdma.c \
-	mm-modem-simple.h \
-	mm-modem-simple.c \
-	mm-modem-location.h \
-	mm-modem-location.c \
-	mm-modem-time.h \
-	mm-modem-time.c \
-	mm-modem-firmware.h \
-	mm-modem-firmware.c \
-	mm-modem-sar.h \
-	mm-modem-sar.c \
-	mm-modem-signal.h \
-	mm-modem-signal.c \
-	mm-modem-oma.h \
-	mm-modem-oma.c \
-	mm-sim.h \
-	mm-sim.c \
-	mm-sms.h \
-	mm-sms.c \
-	mm-modem-messaging.h \
-	mm-modem-messaging.c \
-	mm-modem-voice.h \
-	mm-modem-voice.c \
-	mm-call.h \
-	mm-call.c \
-	mm-bearer.h \
-	mm-bearer.c \
-	mm-common-helpers.h \
-	mm-common-helpers.c \
-	mm-simple-status.h \
-	mm-simple-status.c \
-	mm-simple-connect-properties.h \
-	mm-simple-connect-properties.c \
-	mm-bearer-properties.h \
-	mm-bearer-properties.c \
-	mm-sms-properties.h \
-	mm-sms-properties.c \
-	mm-call-properties.h \
-	mm-call-properties.c \
-	mm-bearer-ip-config.h \
-	mm-bearer-ip-config.c \
-	mm-bearer-stats.h \
-	mm-bearer-stats.c \
-	mm-location-common.h \
-	mm-location-3gpp.h \
-	mm-location-3gpp.c \
-	mm-location-gps-raw.h \
-	mm-location-gps-raw.c \
-	mm-location-gps-nmea.h \
-	mm-location-gps-nmea.c \
-	mm-location-cdma-bs.h \
-	mm-location-cdma-bs.c \
-	mm-unlock-retries.h \
-	mm-unlock-retries.c \
-	mm-network-timezone.h \
-	mm-network-timezone.c \
-	mm-firmware-properties.h \
-	mm-firmware-properties.c \
-	mm-firmware-update-settings.h \
-	mm-firmware-update-settings.c \
-	mm-cdma-manual-activation-properties.h \
-	mm-cdma-manual-activation-properties.c \
-	mm-signal.h \
-	mm-signal.c \
-	mm-kernel-event-properties.h \
-	mm-kernel-event-properties.c \
-	mm-pco.h \
-	mm-pco.c \
-	mm-call-audio-format.h \
-	mm-call-audio-format.c \
-	mm-sim-preferred-network.h \
-	mm-sim-preferred-network.c \
-	mm-3gpp-profile.h \
-	mm-3gpp-profile.c \
-	mm-signal-threshold-properties.h \
-	mm-signal-threshold-properties.c \
-	mm-nr5g-registration-settings.h \
-	mm-nr5g-registration-settings.c \
-	mm-cell-info.h \
-	mm-cell-info.c \
-	mm-cell-info-cdma.h \
-	mm-cell-info-cdma.c \
-	mm-cell-info-gsm.h \
-	mm-cell-info-gsm.c \
-	mm-cell-info-umts.h \
-	mm-cell-info-umts.c \
-	mm-cell-info-tdscdma.h \
-	mm-cell-info-tdscdma.c \
-	mm-cell-info-lte.h \
-	mm-cell-info-lte.c \
-	mm-cell-info-nr5g.h \
-	mm-cell-info-nr5g.c \
-	mm-compat.h \
-	mm-compat.c \
-	$(NULL)
-
-libmm_glib_la_CPPFLAGS = \
-	$(LIBMM_GLIB_CFLAGS) \
-	-I$(srcdir) \
-	-I$(top_srcdir) \
-	-I$(top_builddir) \
-	-I$(top_srcdir)/include \
-	-I$(top_builddir)/include \
-	-I${top_srcdir}/libmm-glib/generated \
-	-I${top_builddir}/libmm-glib/generated \
-	-DLIBMM_GLIB_COMPILATION \
-	$(NULL)
-
-libmm_glib_gla_CFLAGS = \
-	$(WARN_CFLAGS) \
-	$(NULL)
-
-libmm_glib_la_LIBADD = \
-	${top_builddir}/libmm-glib/generated/libmm-generated.la \
-	$(NULL)
-
-libmm_glib_la_LDFLAGS = \
-	-version-info $(MM_GLIB_LT_CURRENT):$(MM_GLIB_LT_REVISION):$(MM_GLIB_LT_AGE) \
-	$(WARN_LDFLAGS) \
-	$(LIBMM_GLIB_LIBS) \
-	$(NULL)
-
-includedir = @includedir@/libmm-glib
-include_HEADERS = \
-	libmm-glib.h \
-	mm-helper-types.h \
-	mm-manager.h \
-	mm-object.h \
-	mm-modem.h \
-	mm-modem-3gpp.h \
-	mm-modem-3gpp-profile-manager.h \
-	mm-modem-3gpp-ussd.h \
-	mm-modem-cdma.h \
-	mm-modem-messaging.h \
-	mm-modem-location.h \
-	mm-modem-time.h \
-	mm-modem-firmware.h \
-	mm-modem-sar.h \
-	mm-modem-signal.h \
-	mm-modem-oma.h \
-	mm-modem-simple.h \
-	mm-sim.h \
-	mm-sms.h \
-	mm-modem-voice.h \
-	mm-call.h \
-	mm-bearer.h \
-	mm-simple-status.h \
-	mm-simple-connect-properties.h \
-	mm-bearer-properties.h \
-	mm-sms-properties.h \
-	mm-call-properties.h \
-	mm-bearer-ip-config.h \
-	mm-bearer-stats.h \
-	mm-location-common.h \
-	mm-location-3gpp.h \
-	mm-location-gps-nmea.h \
-	mm-location-gps-raw.h \
-	mm-location-cdma-bs.h \
-	mm-unlock-retries.h \
-	mm-network-timezone.h \
-	mm-firmware-properties.h \
-	mm-firmware-update-settings.h \
-	mm-cdma-manual-activation-properties.h \
-	mm-signal.h \
-	mm-kernel-event-properties.h \
-	mm-pco.h \
-	mm-call-audio-format.h \
-	mm-sim-preferred-network.h \
-	mm-3gpp-profile.h \
-	mm-signal-threshold-properties.h \
-	mm-nr5g-registration-settings.h \
-	mm-cell-info.h \
-	mm-cell-info-cdma.h \
-	mm-cell-info-gsm.h \
-	mm-cell-info-umts.h \
-	mm-cell-info-tdscdma.h \
-	mm-cell-info-lte.h \
-	mm-cell-info-nr5g.h \
-	mm-compat.h \
-	$(NULL)
-
-CLEANFILES =
-
-# Introspection
-
-if HAVE_INTROSPECTION
-
-GENERATED_H = \
-	mm-enums-types.h \
-	mm-errors-types.h \
-	mm-gdbus-manager.h \
-	mm-gdbus-sim.h \
-	mm-gdbus-sms.h \
-	mm-gdbus-call.h \
-	mm-gdbus-bearer.h \
-	mm-gdbus-modem.h \
-	$(NULL)
-
-GENERATED_C = \
-	mm-enums-types.c \
-	mm-errors-types.c \
-	mm-errors-quarks.c \
-	mm-gdbus-manager.c \
-	mm-gdbus-sim.c \
-	mm-gdbus-sms.c \
-	mm-gdbus-call.c \
-	mm-gdbus-bearer.c \
-	mm-gdbus-modem.c \
-	$(NULL)
-
-PUBLIC_H = \
-	ModemManager-names.h \
-	ModemManager-version.h
-	ModemManager-enums.h \
-	ModemManager-errors.h \
-	ModemManager-compat.h \
-	ModemManager.h \
-	$(NULL)
-
-INTROSPECTION_GIRS = ModemManager-1.0.gir
-INTROSPECTION_SCANNER_ARGS = --warn-all
-INTROSPECTION_COMPILER_ARGS =
-
-ModemManager-1.0.gir: libmm-glib.la
-ModemManager_1_0_gir_INCLUDES = GLib-2.0 GObject-2.0 Gio-2.0
-ModemManager_1_0_gir_CFLAGS = $(libmm_glib_la_CPPFLAGS)
-ModemManager_1_0_gir_LIBS = libmm-glib.la
-ModemManager_1_0_gir_EXPORT_PACKAGES = libmm-glib
-ModemManager_1_0_gir_SCANNERFLAGS = \
-	$(WARN_SCANNERFLAGS) \
-	--c-include "libmm-glib.h" \
-	--identifier-prefix=MM \
-	--identifier-prefix=Mm \
-	--symbol-prefix=mm \
-	$(NULL)
-ModemManager_1_0_gir_FILES = \
-	$(include_HEADERS) \
-	$(filter-out %.h,$(libmm_glib_la_SOURCES)) \
-	$(filter %.c,$(libmm_glib_la_SOURCES)) \
-	$(addprefix generated/,$(GENERATED_H)) \
-	$(addprefix generated/,$(GENERATED_C)) \
-	$(addprefix ../include/,$(PUBLIC_H)) \
-	$(NULL)
-
-girdir = $(datadir)/gir-1.0
-nodist_gir_DATA = $(INTROSPECTION_GIRS)
-
-typelibdir = $(libdir)/girepository-1.0
-nodist_typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
-
-CLEANFILES += $(nodist_gir_DATA) $(nodist_typelib_DATA)
-
-endif # HAVE_INTROSPECTION
-
--include $(INTROSPECTION_MAKEFILE)
diff --git a/libmm-glib/generated/Makefile.am b/libmm-glib/generated/Makefile.am
deleted file mode 100644
index 5e17123..0000000
--- a/libmm-glib/generated/Makefile.am
+++ /dev/null
@@ -1,266 +0,0 @@
-
-SUBDIRS = . tests
-
-AM_CFLAGS  = $(CODE_COVERAGE_CFLAGS)
-AM_LDFLAGS = $(CODE_COVERAGE_LDFLAGS)
-
-noinst_LTLIBRARIES = libmm-generated.la
-
-GENERATED_H = \
-	mm-enums-types.h \
-	mm-errors-types.h \
-	mm-gdbus-manager.h \
-	mm-gdbus-sim.h \
-	mm-gdbus-sms.h \
-	mm-gdbus-call.h \
-	mm-gdbus-bearer.h \
-	mm-gdbus-modem.h \
-	$(NULL)
-
-GENERATED_C = \
-	mm-enums-types.c \
-	mm-errors-types.c \
-	mm-errors-quarks.c \
-	mm-gdbus-manager.c \
-	mm-gdbus-sim.c \
-	mm-gdbus-sms.c \
-	mm-gdbus-call.c \
-	mm-gdbus-bearer.c \
-	mm-gdbus-modem.c   \
-	$(NULL)
-
-GENERATED_DOC = \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Sim.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Sms.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Call.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Bearer.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Messaging.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Voice.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Location.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Time.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Firmware.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Oma.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.ModemCdma.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Modem3gpp.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Modem3gpp.ProfileManager.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Sar.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Simple.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Signal.xml \
-	$(NULL)
-
-BUILT_SOURCES = $(GENERATED_H) $(GENERATED_C) $(GENERATED_DOC)
-
-# Enum types
-mm-enums-types.h: Makefile.am $(top_srcdir)/include/ModemManager-enums.h $(top_srcdir)/build-aux/mm-enums-types.h.template
-	$(AM_V_GEN) $(GLIB_MKENUMS) \
-		--fhead "#include <ModemManager.h>\n#ifndef __MM_ENUMS_TYPES_H__\n#define __MM_ENUMS_TYPES_H__\n" \
-		--template $(top_srcdir)/build-aux/mm-enums-types.h.template \
-		--ftail "#endif /* __MM_ENUMS_TYPES_H__ */\n" \
-		$(top_srcdir)/include/ModemManager-enums.h > $@
-
-mm-enums-types.c: Makefile.am $(top_srcdir)/include/ModemManager-enums.h $(top_srcdir)/build-aux/mm-enums-types.c.template mm-enums-types.h
-	$(AM_V_GEN) $(GLIB_MKENUMS) \
-		--fhead "#include \"mm-enums-types.h\"\n" \
-		--template $(top_srcdir)/build-aux/mm-enums-types.c.template \
-		$(top_srcdir)/include/ModemManager-enums.h > $@
-
-# Error types & quarks
-mm-errors-types.h: Makefile.am $(top_srcdir)/include/ModemManager-errors.h $(top_srcdir)/build-aux/mm-errors-types.h.template
-	$(AM_V_GEN) $(GLIB_MKENUMS) \
-		--fhead "#ifndef __MM_ERRORS_TYPES_H__\n#define __MM_ERRORS_TYPES_H__\n" \
-		--template $(top_srcdir)/build-aux/mm-errors-types.h.template \
-		--ftail "#endif /* __MM_ERRORS_TYPES_H__ */\n" \
-		$(top_srcdir)/include/ModemManager-errors.h > $@
-
-mm-errors-types.c: Makefile.am $(top_srcdir)/include/ModemManager-errors.h $(top_srcdir)/build-aux/mm-errors-types.c.template mm-errors-types.h
-	$(AM_V_GEN) $(GLIB_MKENUMS) \
-		--fhead "#include <ModemManager.h>\n#include \"mm-errors-types.h\"\n" \
-		--template $(top_srcdir)/build-aux/mm-errors-types.c.template \
-		$(top_srcdir)/include/ModemManager-errors.h > $@
-
-mm-errors-quarks.c: Makefile.am $(top_srcdir)/include/ModemManager-errors.h $(top_srcdir)/build-aux/mm-errors-quarks.c.template $(top_builddir)/include/ModemManager-names.h mm-errors-types.h
-	$(AM_V_GEN) $(GLIB_MKENUMS) \
-		--fhead "#include <ModemManager.h>\n#include \"mm-errors-types.h\"\n" \
-		--template $(top_srcdir)/build-aux/mm-errors-quarks.c.template \
-		$(top_srcdir)/include/ModemManager-errors.h > $@
-
-# Manager interface
-mm_gdbus_manager_generated = \
-	mm-gdbus-manager.h \
-	mm-gdbus-manager.c \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.xml \
-	$(NULL)
-mm_gdbus_manager_deps = \
-	$(top_srcdir)/introspection/org.freedesktop.ModemManager1.xml \
-	$(NULL)
-mm-gdbus-manager.c: $(mm_gdbus_manager_deps)
-	$(AM_V_GEN) $(GDBUS_CODEGEN) \
-		--interface-prefix org.freedesktop.ModemManager1. \
-		--c-namespace=MmGdbus \
-		--generate-docbook mm-gdbus-doc \
-		--generate-c-code mm-gdbus-manager \
-		$< \
-		$(NULL)
-$(filter-out mm-gdbus-manager.c, $(mm_gdbus_manager_generated)): $(mm_gdbus_manager_deps) mm-gdbus-manager.c
-	@: # nothing to do, generated as a side-effect of the .c
-
-# Modem interfaces
-mm_gdbus_modem_generated = \
-	mm-gdbus-modem.h \
-	mm-gdbus-modem.c \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Messaging.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Voice.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Location.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Time.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Firmware.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Oma.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.ModemCdma.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Modem3gpp.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Modem3gpp.ProfileManager.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Sar.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Simple.xml \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Modem.Signal.xml \
-	$(NULL)
-mm_gdbus_modem_deps = \
-	$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.xml \
-	$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Messaging.xml \
-	$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Voice.xml \
-	$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Location.xml \
-	$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Time.xml \
-	$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Firmware.xml \
-	$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Oma.xml \
-	$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.ModemCdma.xml \
-	$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml \
-	$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.ProfileManager.xml \
-	$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd.xml \
-	$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Sar.xml \
-	$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Simple.xml \
-	$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Modem.Signal.xml \
-	$(NULL)
-mm-gdbus-modem.c: $(mm_gdbus_modem_deps)
-	$(AM_V_GEN) $(GDBUS_CODEGEN) \
-		--interface-prefix org.freedesktop.ModemManager1. \
-		--c-namespace=MmGdbus \
-		--generate-docbook mm-gdbus-doc \
-		--generate-c-code mm-gdbus-modem \
-		--c-generate-object-manager \
-		--annotate "org.freedesktop.ModemManager1.Modem.ModemCdma" org.gtk.GDBus.C.Name ModemCdma \
-		--annotate "org.freedesktop.ModemManager1.Modem.Modem3gpp" org.gtk.GDBus.C.Name Modem3gpp \
-		--annotate "org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd" org.gtk.GDBus.C.Name Modem3gppUssd \
-		--annotate "org.freedesktop.ModemManager1.Modem.Modem3gpp.ProfileManager" org.gtk.GDBus.C.Name Modem3gppProfileManager \
-		$^ \
-		$(NULL)
-$(filter-out mm-gdbus-modem.c, $(mm_gdbus_modem_generated)): $(mm_gdbus_modem_deps) mm-gdbus-modem.c
-	@: # nothing to do, generated as a side-effect of the .c
-
-# SIM interface
-mm_gdbus_sim_generated = \
-	mm-gdbus-sim.h \
-	mm-gdbus-sim.c \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Sim.xml \
-	$(NULL)
-mm_gdbus_sim_deps = \
-	$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Sim.xml \
-	$(NULL)
-mm-gdbus-sim.c: $(mm_gdbus_sim_deps)
-	$(AM_V_GEN) $(GDBUS_CODEGEN) \
-		--interface-prefix org.freedesktop.ModemManager1. \
-		--c-namespace=MmGdbus \
-		--generate-docbook mm-gdbus-doc \
-		--generate-c-code mm-gdbus-sim \
-		$< \
-		$(NULL)
-$(filter-out mm-gdbus-sim.c, $(mm_gdbus_sim_generated)): $(mm_gdbus_sim_deps) mm-gdbus-sim.c
-	@: # nothing to do, generated as a side-effect of the .c
-
-# Bearer interface
-mm_gdbus_bearer_generated = \
-	mm-gdbus-bearer.h \
-	mm-gdbus-bearer.c \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Bearer.xml \
-	$(NULL)
-mm_gdbus_bearer_deps = \
-	$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Bearer.xml \
-	$(NULL)
-mm-gdbus-bearer.c: $(mm_gdbus_bearer_deps)
-	$(AM_V_GEN) $(GDBUS_CODEGEN) \
-		--interface-prefix org.freedesktop.ModemManager1. \
-		--c-namespace=MmGdbus \
-		--generate-docbook mm-gdbus-doc \
-		--generate-c-code mm-gdbus-bearer \
-		$< \
-		$(NULL)
-$(filter-out mm-gdbus-bearer.c, $(mm_gdbus_bearer_generated)): $(mm_gdbus_bearer_deps) mm-gdbus-bearer.c
-	@: # nothing to do, generated as a side-effect of the .c
-
-# SMS interface
-mm_gdbus_sms_generated = \
-	mm-gdbus-sms.h \
-	mm-gdbus-sms.c \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Sms.xml \
-	$(NULL)
-mm_gdbus_sms_deps = \
-	$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Sms.xml \
-	$(NULL)
-mm-gdbus-sms.c: $(mm_gdbus_sms_deps)
-	$(AM_V_GEN) $(GDBUS_CODEGEN) \
-		--interface-prefix org.freedesktop.ModemManager1. \
-		--c-namespace=MmGdbus \
-		--generate-docbook mm-gdbus-doc \
-		--generate-c-code mm-gdbus-sms \
-		--annotate "org.freedesktop.ModemManager1.Sms:Data" org.gtk.GDBus.C.ForceGVariant True \
-		$< \
-		$(NULL)
-$(filter-out mm-gdbus-sms.c, $(mm_gdbus_sms_generated)): $(mm_gdbus_sms_deps) mm-gdbus-sms.c
-	@: # nothing to do, generated as a side-effect of the .c
-
-# Call interface
-mm_gdbus_call_generated = \
-	mm-gdbus-call.h \
-	mm-gdbus-call.c \
-	mm-gdbus-doc-org.freedesktop.ModemManager1.Call.xml \
-	$(NULL)
-mm_gdbus_call_deps = \
-	$(top_srcdir)/introspection/org.freedesktop.ModemManager1.Call.xml \
-	$(NULL)
-mm-gdbus-call.c: $(mm_gdbus_call_deps)
-	$(AM_V_GEN) $(GDBUS_CODEGEN) \
-		--interface-prefix org.freedesktop.ModemManager1. \
-		--c-namespace=MmGdbus \
-		--generate-docbook mm-gdbus-doc \
-		--generate-c-code mm-gdbus-call \
-		$< \
-		$(NULL)
-$(filter-out mm-gdbus-call.c, $(mm_gdbus_call_generated)): $(mm_gdbus_call_deps) mm-gdbus-call.c
-	@: # nothing to do, generated as a side-effect of the .c
-
-nodist_libmm_generated_la_SOURCES = $(GENERATED_H) $(GENERATED_C)
-
-libmm_generated_la_CPPFLAGS = \
-	$(LIBMM_GLIB_CFLAGS) \
-	-I$(top_srcdir) \
-	-I$(top_srcdir)/include \
-	-I$(top_builddir)/include \
-	-Wno-unused-function \
-	-Wno-float-equal \
-	-Wno-shadow \
-	$(NULL)
-
-libmm_generated_la_CFLAGS = \
-	$(WARN_CFLAGS) \
-	$(NULL)
-
-libmm_generated_la_LDFLAGS = \
-	$(WARN_LDFLAGS) \
-	$(LIBMM_GLIB_LIBS) \
-	$(NULL)
-
-includedir = @includedir@/libmm-glib
-nodist_include_HEADERS = $(GENERATED_H)
-
-CLEANFILES = $(GENERATED_H) $(GENERATED_C) $(GENERATED_DOC)
diff --git a/libmm-glib/generated/meson.build b/libmm-glib/generated/meson.build
index 798fd24..218afa4 100644
--- a/libmm-glib/generated/meson.build
+++ b/libmm-glib/generated/meson.build
@@ -124,4 +124,6 @@
   link_whole: libmm_generated,
 )
 
-subdir('tests')
+if enable_tests
+  subdir('tests')
+endif
diff --git a/libmm-glib/generated/tests/Makefile.am b/libmm-glib/generated/tests/Makefile.am
deleted file mode 100644
index 0cebb72..0000000
--- a/libmm-glib/generated/tests/Makefile.am
+++ /dev/null
@@ -1,39 +0,0 @@
-AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
-AM_LDFLAGS = $(CODE_COVERAGE_LDFLAGS)
-
-noinst_LTLIBRARIES = libmm-test-generated.la
-
-GENERATED_H = mm-gdbus-test.h
-GENERATED_C = mm-gdbus-test.c
-
-BUILT_SOURCES = $(GENERATED_H) $(GENERATED_C)
-
-# Test interface
-mm_gdbus_test_generated = \
-	mm-gdbus-test.h \
-	mm-gdbus-test.c
-$(mm_gdbus_test_generated): $(top_srcdir)/introspection/tests/org.freedesktop.ModemManager1.Test.xml
-	$(AM_V_GEN) $(GDBUS_CODEGEN) \
-		--interface-prefix org.freedesktop.ModemManager1. \
-		--c-namespace=MmGdbus \
-		--generate-c-code mm-gdbus-test \
-		$< \
-		$(NULL)
-
-nodist_libmm_test_generated_la_SOURCES = \
-	$(GENERATED_H) \
-	$(GENERATED_C)
-
-libmm_test_generated_la_CPPFLAGS = \
-	$(LIBMM_GLIB_CFLAGS) \
-	-I$(top_srcdir) \
-	-I$(top_srcdir)/include \
-	-I$(top_builddir)/include \
-	-Wno-unused-function \
-	-Wno-float-equal \
-	-Wno-shadow
-
-libmm_test_generated_la_LIBADD = \
-	$(LIBMM_GLIB_LIBS)
-
-CLEANFILES = $(GENERATED_H) $(GENERATED_C)
diff --git a/libmm-glib/mm-3gpp-profile.c b/libmm-glib/mm-3gpp-profile.c
index cc22182..88c4175 100644
--- a/libmm-glib/mm-3gpp-profile.c
+++ b/libmm-glib/mm-3gpp-profile.c
@@ -17,11 +17,13 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  *
- * Copyright (C) 2021 Aleksander Morgado <aleksander@aleksander.es>
+ * Copyright (C) 2021-2022 Aleksander Morgado <aleksander@aleksander.es>
+ * Copyright (C) 2022 Google, Inc.
  */
 
 #include <string.h>
 
+#include "mm-enums-types.h"
 #include "mm-errors-types.h"
 #include "mm-common-helpers.h"
 #include "mm-3gpp-profile.h"
@@ -939,6 +941,64 @@
 /*****************************************************************************/
 
 /**
+ * mm_3gpp_profile_print: (skip)
+ */
+GPtrArray *
+mm_3gpp_profile_print (MM3gppProfile *self,
+                       gboolean       show_personal_info)
+{
+    GPtrArray        *array;
+    g_autofree gchar *ip_type_str = NULL;
+    g_autofree gchar *apn_type_str = NULL;
+    g_autofree gchar *roaming_allowance_str = NULL;
+    g_autofree gchar *allowed_auth_str = NULL;
+    const gchar      *aux;
+
+    array = g_ptr_array_new_with_free_func ((GDestroyNotify)g_free);
+    if (self->priv->profile_id != MM_3GPP_PROFILE_ID_UNKNOWN)
+        g_ptr_array_add (array, g_strdup_printf (PROPERTY_ID ": %d", self->priv->profile_id));
+    if (self->priv->profile_name)
+        g_ptr_array_add (array, g_strdup_printf (PROPERTY_NAME ": %s", self->priv->profile_name));
+    if (self->priv->enabled_set) {
+        aux = mm_common_str_boolean (self->priv->enabled);
+        g_ptr_array_add (array, g_strdup_printf (PROPERTY_ENABLED ": %s", aux));
+    }
+    if (self->priv->apn)
+        g_ptr_array_add (array, g_strdup_printf (PROPERTY_APN ": %s", self->priv->apn));
+    if (self->priv->ip_type != MM_BEARER_IP_FAMILY_NONE) {
+        ip_type_str = mm_bearer_ip_family_build_string_from_mask (self->priv->ip_type);
+        g_ptr_array_add (array, g_strdup_printf (PROPERTY_IP_TYPE ": %s", ip_type_str));
+    }
+    if (self->priv->apn_type != MM_BEARER_APN_TYPE_NONE) {
+        apn_type_str = mm_bearer_apn_type_build_string_from_mask (self->priv->apn_type);
+        g_ptr_array_add (array, g_strdup_printf (PROPERTY_APN_TYPE ": %s", apn_type_str));
+    }
+    if (self->priv->access_type_preference != MM_BEARER_ACCESS_TYPE_PREFERENCE_NONE) {
+        aux = mm_bearer_access_type_preference_get_string (self->priv->access_type_preference);
+        g_ptr_array_add (array, g_strdup_printf (PROPERTY_ACCESS_TYPE_PREFERENCE ": %s", aux));
+    }
+    if (self->priv->roaming_allowance != MM_BEARER_ROAMING_ALLOWANCE_NONE) {
+        roaming_allowance_str = mm_bearer_roaming_allowance_build_string_from_mask (self->priv->roaming_allowance);
+        g_ptr_array_add (array, g_strdup_printf (PROPERTY_ROAMING_ALLOWANCE ": %s", roaming_allowance_str));
+    }
+    if (self->priv->profile_source != MM_BEARER_PROFILE_SOURCE_UNKNOWN) {
+        aux = mm_bearer_profile_source_get_string (self->priv->profile_source);
+        g_ptr_array_add (array, g_strdup_printf (PROPERTY_SOURCE ": %s", aux));
+    }
+    if (self->priv->allowed_auth != MM_BEARER_ALLOWED_AUTH_NONE) {
+        allowed_auth_str = mm_bearer_allowed_auth_build_string_from_mask (self->priv->allowed_auth);
+        g_ptr_array_add (array, g_strdup_printf (PROPERTY_ALLOWED_AUTH ": %s", allowed_auth_str));
+    }
+    if (self->priv->user)
+        g_ptr_array_add (array, g_strdup_printf (PROPERTY_USER ": %s", mm_common_str_personal_info (self->priv->user, show_personal_info)));
+    if (self->priv->password)
+        g_ptr_array_add (array, g_strdup_printf (PROPERTY_PASSWORD ": %s", mm_common_str_personal_info (self->priv->password, show_personal_info)));
+    return array;
+}
+
+/*****************************************************************************/
+
+/**
  * mm_3gpp_profile_new:
  *
  * Creates a new empty #MM3gppProfile.
diff --git a/libmm-glib/mm-3gpp-profile.h b/libmm-glib/mm-3gpp-profile.h
index 7b45b55..6dc4f99 100644
--- a/libmm-glib/mm-3gpp-profile.h
+++ b/libmm-glib/mm-3gpp-profile.h
@@ -17,7 +17,8 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  *
- * Copyright (C) 2021 Aleksander Morgado <aleksander@aleksander.es>
+ * Copyright (C) 2021-2022 Aleksander Morgado <aleksander@aleksander.es>
+ * Copyright (C) 2022 Google, Inc.
  */
 
 #ifndef MM_3GPP_PROFILE_H
@@ -151,6 +152,8 @@
                               GEqualFunc             cmp_apn,
                               MM3gppProfileCmpFlags  flags);
 
+GPtrArray *mm_3gpp_profile_print (MM3gppProfile *self,
+                                  gboolean       show_personal_info);
 #endif
 
 G_END_DECLS
diff --git a/libmm-glib/mm-bearer-properties.c b/libmm-glib/mm-bearer-properties.c
index 0d2d1a7..6d0750b 100644
--- a/libmm-glib/mm-bearer-properties.c
+++ b/libmm-glib/mm-bearer-properties.c
@@ -17,12 +17,14 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  *
- * Copyright (C) 2011-2021 Aleksander Morgado <aleksander@aleksander.es>
+ * Copyright (C) 2011-2022 Aleksander Morgado <aleksander@aleksander.es>
+ * Copyright (C) 2022 Google, Inc.
  */
 
 #include <string.h>
 
 #include "mm-errors-types.h"
+#include "mm-enums-types.h"
 #include "mm-common-helpers.h"
 #include "mm-bearer-properties.h"
 
@@ -936,6 +938,34 @@
 /*****************************************************************************/
 
 /**
+ * mm_bearer_properties_print: (skip)
+ */
+GPtrArray *
+mm_bearer_properties_print (MMBearerProperties *self,
+                            gboolean            show_personal_info)
+{
+    GPtrArray   *array;
+    const gchar *aux;
+
+    array = mm_3gpp_profile_print (self->priv->profile, show_personal_info);
+    if (self->priv->allow_roaming_set) {
+        aux = mm_common_str_boolean (self->priv->allow_roaming);
+        g_ptr_array_add (array, g_strdup_printf (PROPERTY_ALLOW_ROAMING ": %s", aux));
+    }
+    if (self->priv->multiplex != MM_BEARER_MULTIPLEX_SUPPORT_UNKNOWN) {
+        aux = mm_bearer_multiplex_support_get_string (self->priv->multiplex);
+        g_ptr_array_add (array, g_strdup_printf (PROPERTY_MULTIPLEX ": %s", aux));
+    }
+    if (self->priv->rm_protocol != MM_MODEM_CDMA_RM_PROTOCOL_UNKNOWN) {
+        aux = mm_modem_cdma_rm_protocol_get_string (self->priv->rm_protocol);
+        g_ptr_array_add (array, g_strdup_printf (PROPERTY_RM_PROTOCOL ": %s", aux));
+    }
+    return array;
+}
+
+/*****************************************************************************/
+
+/**
  * mm_bearer_properties_new_from_profile: (skip)
  */
 MMBearerProperties *
diff --git a/libmm-glib/mm-bearer-properties.h b/libmm-glib/mm-bearer-properties.h
index 0e6a347..9e52202 100644
--- a/libmm-glib/mm-bearer-properties.h
+++ b/libmm-glib/mm-bearer-properties.h
@@ -17,7 +17,8 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.o
  *
- * Copyright (C) 2011-2021 Aleksander Morgado <aleksander@aleksander.es>
+ * Copyright (C) 2011-2022 Aleksander Morgado <aleksander@aleksander.es>
+ * Copyright (C) 2022 Google, Inc.
  */
 
 #ifndef MM_BEARER_PROPERTIES_H
@@ -151,6 +152,9 @@
                                    MMBearerProperties         *b,
                                    MMBearerPropertiesCmpFlags  flags);
 
+GPtrArray *mm_bearer_properties_print (MMBearerProperties *self,
+                                       gboolean            show_personal_info);
+
 #endif
 
 G_END_DECLS
diff --git a/libmm-glib/mm-common-helpers.c b/libmm-glib/mm-common-helpers.c
index 5f3af4a..de49136 100644
--- a/libmm-glib/mm-common-helpers.c
+++ b/libmm-glib/mm-common-helpers.c
@@ -1999,6 +1999,45 @@
 }
 
 /*****************************************************************************/
+
+const gchar *
+mm_common_str_boolean (gboolean value)
+{
+    return value ? "yes" : "no";
+}
+
+const gchar *
+mm_common_str_personal_info (const gchar *str,
+                             gboolean     show_personal_info)
+{
+    static const gchar *hidden_personal_info = "###";
+
+    return show_personal_info ? str : hidden_personal_info;
+}
+
+void
+mm_common_str_array_human_keys (GPtrArray *array)
+{
+    guint i;
+
+    /* Transforms from:
+     *   strings-as-keys: value...
+     * Into:
+     *   strings as keys: value...
+     */
+    for (i = 0; i < array->len; i++) {
+        gchar *str;
+        guint j;
+
+        str = g_ptr_array_index (array, i);
+        for (j = 0; str[j] && str[j] != ':'; j++) {
+            if (str[j] == '-')
+                str[j] = ' ';
+        }
+    }
+}
+
+/*****************************************************************************/
 /* DBus error handling */
 
 gboolean
diff --git a/libmm-glib/mm-common-helpers.h b/libmm-glib/mm-common-helpers.h
index a92d5b5..6ff89e2 100644
--- a/libmm-glib/mm-common-helpers.h
+++ b/libmm-glib/mm-common-helpers.h
@@ -165,6 +165,13 @@
 GVariant *mm_common_build_oma_pending_network_initiated_sessions_default     (void);
 
 /******************************************************************************/
+
+const gchar *mm_common_str_boolean          (gboolean     value);
+const gchar *mm_common_str_personal_info    (const gchar *str,
+                                             gboolean     show_personal_info);
+void         mm_common_str_array_human_keys (GPtrArray   *array);
+
+/******************************************************************************/
 /* Common parsers */
 
 typedef gboolean (* MMParseKeyValueForeachFn)        (const gchar               *key,
diff --git a/libmm-glib/mm-signal.c b/libmm-glib/mm-signal.c
index 38142af..e71cd24 100644
--- a/libmm-glib/mm-signal.c
+++ b/libmm-glib/mm-signal.c
@@ -364,6 +364,35 @@
     self->priv->error_rate = value;
 }
 
+/**
+ * mm_signal_get_string: (skip)
+ */
+gchar *
+mm_signal_get_string (MMSignal *self)
+{
+    GString *printable;
+
+    printable = g_string_new ("");
+    if (self->priv->ecio != MM_SIGNAL_UNKNOWN)
+        g_string_append_printf (printable, "Ec/Io: %3.0e dB", self->priv->ecio);
+    if (self->priv->error_rate != MM_SIGNAL_UNKNOWN)
+        g_string_append_printf (printable, "%serror rate: %f %%", printable->len ? ", " : "", self->priv->error_rate);
+    if (self->priv->rscp != MM_SIGNAL_UNKNOWN)
+        g_string_append_printf (printable, "%sRSCP: %f dBm", printable->len ? ", " : "", self->priv->rscp);
+    if (self->priv->rscp != MM_SIGNAL_UNKNOWN)
+        g_string_append_printf (printable, "%sRSRP: %f dBm", printable->len ? ", " : "", self->priv->rsrp);
+    if (self->priv->rsrq != MM_SIGNAL_UNKNOWN)
+        g_string_append_printf (printable, "%sRSRQ: %f dB", printable->len ? ", " : "", self->priv->rsrq);
+    if (self->priv->rssi != MM_SIGNAL_UNKNOWN)
+        g_string_append_printf (printable, "%sRSSI: %f dBm", printable->len ? ", " : "", self->priv->rssi);
+    if (self->priv->sinr != MM_SIGNAL_UNKNOWN)
+        g_string_append_printf (printable, "%sSINR: %f dB", printable->len ? ", " : "", self->priv->sinr);
+    if (self->priv->snr != MM_SIGNAL_UNKNOWN)
+        g_string_append_printf (printable, "%sSNR: %f dB", printable->len ? ", " : "", self->priv->snr);
+
+    return g_string_free (printable, FALSE);
+}
+
 /*****************************************************************************/
 
 /**
diff --git a/libmm-glib/mm-signal.h b/libmm-glib/mm-signal.h
index 161e28e..084d746 100644
--- a/libmm-glib/mm-signal.h
+++ b/libmm-glib/mm-signal.h
@@ -106,6 +106,8 @@
 void mm_signal_set_snr        (MMSignal *self, gdouble value);
 void mm_signal_set_error_rate (MMSignal *self, gdouble value);
 
+gchar *mm_signal_get_string (MMSignal *self);
+
 #endif
 
 G_END_DECLS
diff --git a/libmm-glib/mm-simple-connect-properties.c b/libmm-glib/mm-simple-connect-properties.c
index b560939..c2f75aa 100644
--- a/libmm-glib/mm-simple-connect-properties.c
+++ b/libmm-glib/mm-simple-connect-properties.c
@@ -17,7 +17,8 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  *
- * Copyright (C) 2011 Aleksander Morgado <aleksander@gnu.org>
+ * Copyright (C) 2011-2022 Aleksander Morgado <aleksander@aleksander.es>
+ * Copyright (C) 2022 Google, Inc.
  */
 
 #include <string.h>
@@ -731,6 +732,26 @@
 /*****************************************************************************/
 
 /**
+ * mm_simple_connect_properties_print: (skip)
+ */
+GPtrArray *
+mm_simple_connect_properties_print (MMSimpleConnectProperties *self,
+                                    gboolean                   show_personal_info)
+{
+    GPtrArray *array;
+
+    array = mm_bearer_properties_print (self->priv->bearer_properties, show_personal_info);
+    if (self->priv->pin)
+        g_ptr_array_add (array, g_strdup_printf (PROPERTY_PIN ": %s", mm_common_str_personal_info (self->priv->pin, show_personal_info)));
+    if (self->priv->operator_id)
+        g_ptr_array_add (array, g_strdup_printf (PROPERTY_OPERATOR_ID ": %s", self->priv->operator_id));
+
+    return array;
+}
+
+/*****************************************************************************/
+
+/**
  * mm_simple_connect_properties_new:
  *
  * Creates a new empty #MMSimpleConnectProperties.
diff --git a/libmm-glib/mm-simple-connect-properties.h b/libmm-glib/mm-simple-connect-properties.h
index 0ee4125..196dec736 100644
--- a/libmm-glib/mm-simple-connect-properties.h
+++ b/libmm-glib/mm-simple-connect-properties.h
@@ -17,7 +17,8 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  *
- * Copyright (C) 2011 Aleksander Morgado <aleksander@gnu.org>
+ * Copyright (C) 2011-2022 Aleksander Morgado <aleksander@aleksander.es>
+ * Copyright (C) 2022 Google, Inc.
  */
 
 #ifndef MM_SIMPLE_CONNECT_PROPERTIES_H
@@ -120,6 +121,10 @@
 MMBearerProperties *mm_simple_connect_properties_get_bearer_properties (MMSimpleConnectProperties *self);
 
 GVariant *mm_simple_connect_properties_get_dictionary (MMSimpleConnectProperties *self);
+
+GPtrArray *mm_simple_connect_properties_print (MMSimpleConnectProperties *self,
+                                               gboolean                   show_personal_info);
+
 #endif
 
 
diff --git a/libmm-glib/tests/Makefile.am b/libmm-glib/tests/Makefile.am
deleted file mode 100644
index 8984d08..0000000
--- a/libmm-glib/tests/Makefile.am
+++ /dev/null
@@ -1,32 +0,0 @@
-include $(top_srcdir)/gtester.make
-
-AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
-AM_LDFLAGS = $(CODE_COVERAGE_LDFLAGS)
-
-LIBMM_GLIB_TESTS_COMMON_CPPFLAGS = \
-	$(MM_CFLAGS) \
-	-I$(top_srcdir) \
-	-I$(top_srcdir)/include \
-	-I$(top_builddir)/include \
-	-I$(top_srcdir)/libmm-glib \
-	-I$(top_builddir)/libmm-glib \
-	-I${top_srcdir}/libmm-glib/generated \
-	-I${top_builddir}/libmm-glib/generated \
-	-DLIBMM_GLIB_COMPILATION
-
-LIBMM_GLIB_TESTS_COMMON_LDADD = \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(MM_LIBS)
-
-noinst_PROGRAMS = \
-	test-common-helpers \
-	test-pco
-TEST_PROGS += $(noinst_PROGRAMS)
-
-test_common_helpers_SOURCES = test-common-helpers.c
-test_common_helpers_CPPFLAGS = $(LIBMM_GLIB_TESTS_COMMON_CPPFLAGS)
-test_common_helpers_LDADD = $(LIBMM_GLIB_TESTS_COMMON_LDADD)
-
-test_pco_SOURCES = test-pco.c
-test_pco_CPPFLAGS = $(LIBMM_GLIB_TESTS_COMMON_CPPFLAGS)
-test_pco_LDADD = $(LIBMM_GLIB_TESTS_COMMON_LDADD)
diff --git a/libqcdm/AUTHORS b/libqcdm/AUTHORS
deleted file mode 100644
index e69de29..0000000
--- a/libqcdm/AUTHORS
+++ /dev/null
diff --git a/libqcdm/ChangeLog b/libqcdm/ChangeLog
deleted file mode 100644
index e69de29..0000000
--- a/libqcdm/ChangeLog
+++ /dev/null
diff --git a/libqcdm/Makefile.am b/libqcdm/Makefile.am
deleted file mode 100644
index 77f28d7..0000000
--- a/libqcdm/Makefile.am
+++ /dev/null
@@ -1,2 +0,0 @@
-SUBDIRS=src tests
-
diff --git a/libqcdm/NEWS b/libqcdm/NEWS
deleted file mode 100644
index e69de29..0000000
--- a/libqcdm/NEWS
+++ /dev/null
diff --git a/libqcdm/README b/libqcdm/README
deleted file mode 100644
index e69de29..0000000
--- a/libqcdm/README
+++ /dev/null
diff --git a/libqcdm/autogen.sh b/libqcdm/autogen.sh
deleted file mode 100755
index e3b537c..0000000
--- a/libqcdm/autogen.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-# Run this to generate all the initial makefiles, etc.
-# NOTE
-# This autogen.sh is only used when building libqcdm separately from ModemManager
-
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-REQUIRED_AUTOMAKE_VERSION=1.7
-PKG_NAME=libqcdm
-
-(test -f $srcdir/configure.ac \
-  && test -f $srcdir/src/com.c) || {
-    echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
-    echo " top-level $PKG_NAME directory"
-    exit 1
-}
-
-(cd $srcdir;
-    autoreconf --install --symlink &&
-    autoreconf &&
-    ./configure --enable-maintainer-mode $@
-)
diff --git a/libqcdm/configure.ac b/libqcdm/configure.ac
deleted file mode 100644
index cc9acee..0000000
--- a/libqcdm/configure.ac
+++ /dev/null
@@ -1,48 +0,0 @@
-# NOTE
-# This configure.ac is only used when building libqcdm separately from
-# ModemManager.
-#
-
-AC_PREREQ(2.52)
-
-AC_INIT(libqcdm, 0.1, dcbw@redhat.com, libqcdm)
-AM_INIT_AUTOMAKE([1.9 subdir-objects tar-ustar no-dist-gzip dist-bzip2])
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
-AM_MAINTAINER_MODE
-
-AC_CONFIG_MACRO_DIR([m4])
-
-AC_CONFIG_HEADERS(config.h)
-
-dnl Define _GNU_SOURCE for various things like strcasestr()
-AC_GNU_SOURCE
-
-dnl Required programs
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_PROG_INSTALL
-AC_PROG_LIBTOOL
-
-dnl
-dnl Tests
-dnl
-AC_ARG_WITH(tests, AS_HELP_STRING([--with-tests], [Build libqcdm tests]))
-AM_CONDITIONAL(WITH_TESTS, test "x$with_tests" = "xyes")
-case $with_tests in
-    yes)
-        PKG_CHECK_MODULES(MM, glib-2.0 >= 2.18)
-	AC_SUBST(MM_CFLAGS)
-	AC_SUBST(MM_LIBS)
-        ;;
-    *) ;;
-esac
-
-AM_CONDITIONAL(QCDM_STANDALONE, test "yes" = "yes")
-
-AC_CONFIG_FILES([
-Makefile
-src/Makefile
-tests/Makefile
-])
-AC_OUTPUT
-
diff --git a/libqcdm/src/Makefile.am b/libqcdm/src/Makefile.am
deleted file mode 100644
index 69143bd..0000000
--- a/libqcdm/src/Makefile.am
+++ /dev/null
@@ -1,51 +0,0 @@
-
-AM_CFLAGS = \
-	$(WARN_CFLAGS) \
-	$(CODE_COVERAGE_CFLAGS) \
-	$(NULL)
-
-AM_LDFLAGS = \
-	$(WARN_LDFLAGS) \
-	$(CODE_COVERAGE_LDFLAGS) \
-	$(NULL)
-
-noinst_LTLIBRARIES = libqcdm.la libqcdm-test.la
-
-libqcdm_la_CPPFLAGS = \
-	$(MM_CFLAGS)
-
-libqcdm_la_SOURCES = \
-	dm-commands.h \
-	nv-items.h \
-	log-items.h \
-	com.c \
-	com.h \
-	commands.c \
-	commands.h \
-	errors.c \
-	errors.h \
-	logs.c \
-	logs.h \
-	result.c \
-	result.h \
-	result-private.h \
-	utils.c \
-	utils.h
-
-libqcdm_la_LIBADD = \
-	$(MM_LIBS)
-
-
-###########################################
-# Test library without symbol versioning
-###########################################
-
-libqcdm_test_la_CPPFLAGS = \
-	$(MM_CFLAGS)
-
-libqcdm_test_la_SOURCES = \
-	utils.c \
-	utils.h
-
-libqcdm_test_la_LIBADD = \
-	$(MM_LIBS)
diff --git a/libqcdm/tests/Makefile.am b/libqcdm/tests/Makefile.am
deleted file mode 100644
index 961c5e1..0000000
--- a/libqcdm/tests/Makefile.am
+++ /dev/null
@@ -1,65 +0,0 @@
-include $(top_srcdir)/gtester.make
-
-AM_CFLAGS = \
-	$(WARN_CFLAGS) \
-	$(CODE_COVERAGE_CFLAGS) \
-	$(NULL)
-
-AM_LDFLAGS = \
-	$(WARN_LDFLAGS) \
-	$(CODE_COVERAGE_LDFLAGS) \
-	$(NULL)
-
-noinst_PROGRAMS = test-qcdm modepref ipv6pref reset
-TEST_PROGS += test-qcdm
-
-test_qcdm_SOURCES = \
-	test-qcdm-crc.c \
-	test-qcdm-crc.h \
-	test-qcdm-escaping.c \
-	test-qcdm-escaping.h \
-	test-qcdm-utils.c \
-	test-qcdm-utils.h \
-	test-qcdm-com.c \
-	test-qcdm-com.h \
-	test-qcdm-result.c \
-	test-qcdm-result.h \
-	test-qcdm.c
-test_qcdm_CPPFLAGS = \
-	$(MM_CFLAGS) \
-	-I$(top_srcdir)/libqcdm/src \
-	-I$(top_srcdir)/src
-test_qcdm_LDADD = $(MM_LIBS)
-
-modepref_SOURCES = modepref.c
-modepref_CPPFLAGS = \
-	$(MM_CFLAGS) \
-	-I$(top_srcdir)/libqcdm/src \
-	-I$(top_srcdir)/src
-modepref_LDADD = $(MM_LIBS)
-
-ipv6pref_SOURCES = ipv6pref.c
-ipv6pref_CPPFLAGS = \
-	$(MM_CFLAGS) \
-	-I$(top_srcdir)/libqcdm/src \
-	-I$(top_srcdir)/src
-ipv6pref_LDADD = $(MM_LIBS)
-
-reset_SOURCES = reset.c
-reset_CPPFLAGS = \
-	$(MM_CFLAGS) \
-	-I$(top_srcdir)/libqcdm/src \
-	-I$(top_srcdir)/src
-reset_LDADD = $(MM_LIBS)
-
-if QCDM_STANDALONE
-test_qcdm_LDADD += $(top_builddir)/src/libqcdm.la
-modepref_LDADD += $(top_builddir)/src/libqcdm.la
-ipv6pref_LDADD += $(top_builddir)/src/libqcdm.la
-reset_LDADD +=  $(top_builddir)/src/libqcdm.la
-else
-test_qcdm_LDADD += $(top_builddir)/libqcdm/src/libqcdm.la
-modepref_LDADD += $(top_builddir)/libqcdm/src/libqcdm.la
-ipv6pref_LDADD += $(top_builddir)/libqcdm/src/libqcdm.la
-reset_LDADD += $(top_builddir)/libqcdm/src/libqcdm.la
-endif
diff --git a/m4/ax_append_compile_flags.m4 b/m4/ax_append_compile_flags.m4
deleted file mode 100644
index 9c85635..0000000
--- a/m4/ax_append_compile_flags.m4
+++ /dev/null
@@ -1,46 +0,0 @@
-# ============================================================================
-#  https://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html
-# ============================================================================
-#
-# SYNOPSIS
-#
-#   AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT])
-#
-# DESCRIPTION
-#
-#   For every FLAG1, FLAG2 it is checked whether the compiler works with the
-#   flag.  If it does, the flag is added FLAGS-VARIABLE
-#
-#   If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
-#   CFLAGS) is used.  During the check the flag is always added to the
-#   current language's flags.
-#
-#   If EXTRA-FLAGS is defined, it is added to the current language's default
-#   flags (e.g. CFLAGS) when the check is done.  The check is thus made with
-#   the flags: "CFLAGS EXTRA-FLAGS FLAG".  This can for example be used to
-#   force the compiler to issue an error when a bad flag is given.
-#
-#   INPUT gives an alternative input source to AC_COMPILE_IFELSE.
-#
-#   NOTE: This macro depends on the AX_APPEND_FLAG and
-#   AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with
-#   AX_APPEND_LINK_FLAGS.
-#
-# LICENSE
-#
-#   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved.  This file is offered as-is, without any
-#   warranty.
-
-#serial 7
-
-AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
-[AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
-AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
-for flag in $1; do
-  AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3], [$4])
-done
-])dnl AX_APPEND_COMPILE_FLAGS
diff --git a/m4/ax_append_flag.m4 b/m4/ax_append_flag.m4
deleted file mode 100644
index dd6d8b6..0000000
--- a/m4/ax_append_flag.m4
+++ /dev/null
@@ -1,50 +0,0 @@
-# ===========================================================================
-#      https://www.gnu.org/software/autoconf-archive/ax_append_flag.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
-#
-# DESCRIPTION
-#
-#   FLAG is appended to the FLAGS-VARIABLE shell variable, with a space
-#   added in between.
-#
-#   If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
-#   CFLAGS) is used.  FLAGS-VARIABLE is not changed if it already contains
-#   FLAG.  If FLAGS-VARIABLE is unset in the shell, it is set to exactly
-#   FLAG.
-#
-#   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION.
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
-#   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved.  This file is offered as-is, without any
-#   warranty.
-
-#serial 8
-
-AC_DEFUN([AX_APPEND_FLAG],
-[dnl
-AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF
-AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])
-AS_VAR_SET_IF(FLAGS,[
-  AS_CASE([" AS_VAR_GET(FLAGS) "],
-    [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
-    [
-     AS_VAR_APPEND(FLAGS,[" $1"])
-     AC_RUN_LOG([: FLAGS="$FLAGS"])
-    ])
-  ],
-  [
-  AS_VAR_SET(FLAGS,[$1])
-  AC_RUN_LOG([: FLAGS="$FLAGS"])
-  ])
-AS_VAR_POPDEF([FLAGS])dnl
-])dnl AX_APPEND_FLAG
diff --git a/m4/ax_append_link_flags.m4 b/m4/ax_append_link_flags.m4
deleted file mode 100644
index 99b9fa5..0000000
--- a/m4/ax_append_link_flags.m4
+++ /dev/null
@@ -1,44 +0,0 @@
-# ===========================================================================
-#   https://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT])
-#
-# DESCRIPTION
-#
-#   For every FLAG1, FLAG2 it is checked whether the linker works with the
-#   flag.  If it does, the flag is added FLAGS-VARIABLE
-#
-#   If FLAGS-VARIABLE is not specified, the linker's flags (LDFLAGS) is
-#   used. During the check the flag is always added to the linker's flags.
-#
-#   If EXTRA-FLAGS is defined, it is added to the linker's default flags
-#   when the check is done.  The check is thus made with the flags: "LDFLAGS
-#   EXTRA-FLAGS FLAG".  This can for example be used to force the linker to
-#   issue an error when a bad flag is given.
-#
-#   INPUT gives an alternative input source to AC_COMPILE_IFELSE.
-#
-#   NOTE: This macro depends on the AX_APPEND_FLAG and AX_CHECK_LINK_FLAG.
-#   Please keep this macro in sync with AX_APPEND_COMPILE_FLAGS.
-#
-# LICENSE
-#
-#   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved.  This file is offered as-is, without any
-#   warranty.
-
-#serial 7
-
-AC_DEFUN([AX_APPEND_LINK_FLAGS],
-[AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
-AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
-for flag in $1; do
-  AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3], [$4])
-done
-])dnl AX_APPEND_LINK_FLAGS
diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4
deleted file mode 100644
index bd753b3..0000000
--- a/m4/ax_check_compile_flag.m4
+++ /dev/null
@@ -1,53 +0,0 @@
-# ===========================================================================
-#  https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
-#
-# DESCRIPTION
-#
-#   Check whether the given FLAG works with the current language's compiler
-#   or gives an error.  (Warnings, however, are ignored)
-#
-#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
-#   success/failure.
-#
-#   If EXTRA-FLAGS is defined, it is added to the current language's default
-#   flags (e.g. CFLAGS) when the check is done.  The check is thus made with
-#   the flags: "CFLAGS EXTRA-FLAGS FLAG".  This can for example be used to
-#   force the compiler to issue an error when a bad flag is given.
-#
-#   INPUT gives an alternative input source to AC_COMPILE_IFELSE.
-#
-#   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
-#   macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
-#   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved.  This file is offered as-is, without any
-#   warranty.
-
-#serial 6
-
-AC_DEFUN([AX_CHECK_COMPILE_FLAG],
-[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
-AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
-AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
-  ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
-  _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
-  AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
-    [AS_VAR_SET(CACHEVAR,[yes])],
-    [AS_VAR_SET(CACHEVAR,[no])])
-  _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
-AS_VAR_IF(CACHEVAR,yes,
-  [m4_default([$2], :)],
-  [m4_default([$3], :)])
-AS_VAR_POPDEF([CACHEVAR])dnl
-])dnl AX_CHECK_COMPILE_FLAGS
diff --git a/m4/ax_check_link_flag.m4 b/m4/ax_check_link_flag.m4
deleted file mode 100644
index 03a30ce..0000000
--- a/m4/ax_check_link_flag.m4
+++ /dev/null
@@ -1,53 +0,0 @@
-# ===========================================================================
-#    https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
-#
-# DESCRIPTION
-#
-#   Check whether the given FLAG works with the linker or gives an error.
-#   (Warnings, however, are ignored)
-#
-#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
-#   success/failure.
-#
-#   If EXTRA-FLAGS is defined, it is added to the linker's default flags
-#   when the check is done.  The check is thus made with the flags: "LDFLAGS
-#   EXTRA-FLAGS FLAG".  This can for example be used to force the linker to
-#   issue an error when a bad flag is given.
-#
-#   INPUT gives an alternative input source to AC_LINK_IFELSE.
-#
-#   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
-#   macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG.
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
-#   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved.  This file is offered as-is, without any
-#   warranty.
-
-#serial 6
-
-AC_DEFUN([AX_CHECK_LINK_FLAG],
-[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
-AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
-AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
-  ax_check_save_flags=$LDFLAGS
-  LDFLAGS="$LDFLAGS $4 $1"
-  AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
-    [AS_VAR_SET(CACHEVAR,[yes])],
-    [AS_VAR_SET(CACHEVAR,[no])])
-  LDFLAGS=$ax_check_save_flags])
-AS_VAR_IF(CACHEVAR,yes,
-  [m4_default([$2], :)],
-  [m4_default([$3], :)])
-AS_VAR_POPDEF([CACHEVAR])dnl
-])dnl AX_CHECK_LINK_FLAGS
diff --git a/m4/ax_code_coverage.m4 b/m4/ax_code_coverage.m4
deleted file mode 100644
index 2751459..0000000
--- a/m4/ax_code_coverage.m4
+++ /dev/null
@@ -1,229 +0,0 @@
-# ===========================================================================
-#     http://www.gnu.org/software/autoconf-archive/ax_code_coverage.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_CODE_COVERAGE()
-#
-# DESCRIPTION
-#
-#   Defines CODE_COVERAGE_CFLAGS and CODE_COVERAGE_LDFLAGS which should be
-#   included in the CFLAGS and LIBS/LDFLAGS variables of every build target
-#   (program or library) which should be built with code coverage support.
-#   Also defines CODE_COVERAGE_RULES which should be substituted in your
-#   Makefile; and $enable_code_coverage which can be used in subsequent
-#   configure output. CODE_COVERAGE_ENABLED is defined and substituted, and
-#   corresponds to the value of the --enable-code-coverage option, which
-#   defaults to being disabled.
-#
-#   Test also for gcov program and create GCOV variable that could be
-#   substituted.
-#
-#   Note that all optimisation flags in CFLAGS must be disabled when code
-#   coverage is enabled.
-#
-#   Usage example:
-#
-#   configure.ac:
-#
-#     AX_CODE_COVERAGE
-#
-#   Makefile.am:
-#
-#     @CODE_COVERAGE_RULES@
-#     my_program_LIBS = ... $(CODE_COVERAGE_LDFLAGS) ...
-#     my_program_CFLAGS = ... $(CODE_COVERAGE_CFLAGS) ...
-#
-#   This results in a "check-code-coverage" rule being added to any
-#   Makefile.am which includes "@CODE_COVERAGE_RULES@" (assuming the module
-#   has been configured with --enable-code-coverage). Running `make
-#   check-code-coverage` in that directory will run the module's test suite
-#   (`make check`) and build a code coverage report detailing the code which
-#   was touched, then print the URI for the report.
-#
-#   This code was derived from Makefile.decl in GLib, originally licenced
-#   under LGPLv2.1+.
-#
-# LICENSE
-#
-#   Copyright (c) 2012 Philip Withnall
-#   Copyright (c) 2012 Xan Lopez
-#   Copyright (c) 2012 Christian Persch
-#   Copyright (c) 2012 Paolo Borelli
-#   Copyright (c) 2012 Dan Winship
-#   Copyright (c) 2015 Bastien ROUCARIES
-#
-#   This library is free software; you can redistribute it and/or modify it
-#   under the terms of the GNU Lesser General Public License as published by
-#   the Free Software Foundation; either version 2.1 of the License, or (at
-#   your option) any later version.
-#
-#   This library is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
-#   General Public License for more details.
-#
-#   You should have received a copy of the GNU Lesser General Public License
-#   along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#serial 5
-
-AC_DEFUN([AX_CODE_COVERAGE],[
-	dnl Check for --enable-code-coverage
-	AC_REQUIRE([AC_PROG_SED])
-
-	# allow to override gcov location
-	AC_ARG_WITH([gcov],
-	  [AS_HELP_STRING([--with-gcov[=GCOV]], [use given GCOV for coverage (GCOV=gcov).])],
-	  [_AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov],
-	  [_AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov])
-
-	AC_MSG_CHECKING([whether to build with code coverage support])
-	AC_ARG_ENABLE([code-coverage],
-	  AS_HELP_STRING([--enable-code-coverage],
-	  [Whether to enable code coverage support]),,
-	  enable_code_coverage=no)
-
-	AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test x$enable_code_coverage = xyes])
-	AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage])
-	AC_MSG_RESULT($enable_code_coverage)
-
-	AS_IF([ test "$enable_code_coverage" = "yes" ], [
-		# check for gcov
-		AC_CHECK_TOOL([GCOV],
-		  [$_AX_CODE_COVERAGE_GCOV_PROG_WITH],
-		  [:])
-		AS_IF([test "X$GCOV" = "X:"],
-		  [AC_MSG_ERROR([gcov is needed to do coverage])])
-		AC_SUBST([GCOV])
-
-		dnl Check if gcc is being used
-		AS_IF([ test "$GCC" = "no" ], [
-			AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage])
-		])
-
-		# List of supported lcov versions.
-		lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11"
-
-		AC_CHECK_PROG([LCOV], [lcov], [lcov])
-		AC_CHECK_PROG([GENHTML], [genhtml], [genhtml])
-
-		AS_IF([ test "$LCOV" ], [
-			AC_CACHE_CHECK([for lcov version], ax_cv_lcov_version, [
-				ax_cv_lcov_version=invalid
-				lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'`
-				for lcov_check_version in $lcov_version_list; do
-					if test "$lcov_version" = "$lcov_check_version"; then
-						ax_cv_lcov_version="$lcov_check_version (ok)"
-					fi
-				done
-			])
-		], [
-			lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list"
-			AC_MSG_ERROR([$lcov_msg])
-		])
-
-		case $ax_cv_lcov_version in
-			""|invalid[)]
-				lcov_msg="You must have one of the following versions of lcov: $lcov_version_list (found: $lcov_version)."
-				AC_MSG_ERROR([$lcov_msg])
-				LCOV="exit 0;"
-			;;
-		esac
-
-		AS_IF([ test -z "$GENHTML" ], [
-			AC_MSG_ERROR([Could not find genhtml from the lcov package])
-		])
-
-		dnl Build the code coverage flags
-		CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
-		CODE_COVERAGE_LDFLAGS="-lgcov"
-
-		AC_SUBST([CODE_COVERAGE_CFLAGS])
-		AC_SUBST([CODE_COVERAGE_LDFLAGS])
-	])
-
-CODE_COVERAGE_RULES='
-# Code coverage
-#
-# Optional:
-#  - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting.
-#    (Default: $(top_builddir))
-#  - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated
-#    by lcov for code coverage. (Default:
-#    $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info)
-#  - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage
-#    reports to be created. (Default:
-#    $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage)
-#  - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov
-#  - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the lcov instance.
-#    (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH)
-#  - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the lcov instance.
-#    (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
-#  - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml
-#    instance. (Default: empty)
-#  - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore
-#
-# The generated report will be titled using the $(PACKAGE_NAME) and
-# $(PACKAGE_VERSION). In order to add the current git hash to the title,
-# use the git-version-gen script, available online.
-
-# Optional variables
-CODE_COVERAGE_DIRECTORY ?= $(top_builddir)
-CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info
-CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage
-CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)"
-CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH)
-CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)
-CODE_COVERAGE_GENHTML_OPTIONS ?=
-CODE_COVERAGE_IGNORE_PATTERN ?=
-
-code_coverage_quiet = $(code_coverage_quiet_$(V))
-code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY))
-code_coverage_quiet_0 = --quiet
-
-# Use recursive makes in order to ignore errors during check
-check-code-coverage:
-ifeq ($(CODE_COVERAGE_ENABLED),yes)
-	-$(MAKE) $(AM_MAKEFLAGS) -k check
-	$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture
-else
-	@echo "Need to reconfigure with --enable-code-coverage"
-endif
-
-# Capture code coverage data
-code-coverage-capture: code-coverage-capture-hook
-ifeq ($(CODE_COVERAGE_ENABLED),yes)
-	$(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_OPTIONS)
-	$(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)"
-	-@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp
-	LANG=C $(GENHTML) $(code_coverage_quiet) --prefix $(CODE_COVERAGE_DIRECTORY) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS)
-	@echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html"
-else
-	@echo "Need to reconfigure with --enable-code-coverage"
-endif
-
-# Hook rule executed before code-coverage-capture, overridable by the user
-code-coverage-capture-hook:
-
-ifeq ($(CODE_COVERAGE_ENABLED),yes)
-clean: code-coverage-clean
-code-coverage-clean:
-	-$(LCOV) --directory $(top_builddir) -z
-	-rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY)
-	-find . -name "*.gcda" -o -name "*.gcov" -delete
-endif
-
-GITIGNOREFILES ?=
-GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
-
-DISTCHECK_CONFIGURE_FLAGS ?=
-DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage
-
-.PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean
-'
-
-	AC_SUBST([CODE_COVERAGE_RULES])
-	m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([CODE_COVERAGE_RULES])])
-])
diff --git a/m4/ax_compiler_flags.m4 b/m4/ax_compiler_flags.m4
deleted file mode 100644
index ddb0456..0000000
--- a/m4/ax_compiler_flags.m4
+++ /dev/null
@@ -1,158 +0,0 @@
-# ===========================================================================
-#    https://www.gnu.org/software/autoconf-archive/ax_compiler_flags.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_COMPILER_FLAGS([CFLAGS-VARIABLE], [LDFLAGS-VARIABLE], [IS-RELEASE], [EXTRA-BASE-CFLAGS], [EXTRA-YES-CFLAGS], [UNUSED], [UNUSED], [UNUSED], [EXTRA-BASE-LDFLAGS], [EXTRA-YES-LDFLAGS], [UNUSED], [UNUSED], [UNUSED])
-#
-# DESCRIPTION
-#
-#   Check for the presence of an --enable-compile-warnings option to
-#   configure, defaulting to "error" in normal operation, or "yes" if
-#   IS-RELEASE is equal to "yes".  Return the value in the variable
-#   $ax_enable_compile_warnings.
-#
-#   Depending on the value of --enable-compile-warnings, different compiler
-#   warnings are checked to see if they work with the current compiler and,
-#   if so, are appended to CFLAGS-VARIABLE and LDFLAGS-VARIABLE.  This
-#   allows a consistent set of baseline compiler warnings to be used across
-#   a code base, irrespective of any warnings enabled locally by individual
-#   developers.  By standardising the warnings used by all developers of a
-#   project, the project can commit to a zero-warnings policy, using -Werror
-#   to prevent compilation if new warnings are introduced.  This makes
-#   catching bugs which are flagged by warnings a lot easier.
-#
-#   By providing a consistent --enable-compile-warnings argument across all
-#   projects using this macro, continuous integration systems can easily be
-#   configured the same for all projects.  Automated systems or build
-#   systems aimed at beginners may want to pass the --disable-Werror
-#   argument to unconditionally prevent warnings being fatal.
-#
-#   --enable-compile-warnings can take the values:
-#
-#    * no:      Base compiler warnings only; not even -Wall.
-#    * yes:     The above, plus a broad range of useful warnings.
-#    * error:   The above, plus -Werror so that all warnings are fatal.
-#               Use --disable-Werror to override this and disable fatal
-#               warnings.
-#
-#   The set of base and enabled flags can be augmented using the
-#   EXTRA-*-CFLAGS and EXTRA-*-LDFLAGS variables, which are tested and
-#   appended to the output variable if --enable-compile-warnings is not
-#   "no". Flags should not be disabled using these arguments, as the entire
-#   point of AX_COMPILER_FLAGS is to enforce a consistent set of useful
-#   compiler warnings on code, using warnings which have been chosen for low
-#   false positive rates.  If a compiler emits false positives for a
-#   warning, a #pragma should be used in the code to disable the warning
-#   locally. See:
-#
-#     https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas
-#
-#   The EXTRA-* variables should only be used to supply extra warning flags,
-#   and not general purpose compiler flags, as they are controlled by
-#   configure options such as --disable-Werror.
-#
-#   IS-RELEASE can be used to disable -Werror when making a release, which
-#   is useful for those hairy moments when you just want to get the release
-#   done as quickly as possible.  Set it to "yes" to disable -Werror. By
-#   default, it uses the value of $ax_is_release, so if you are using the
-#   AX_IS_RELEASE macro, there is no need to pass this parameter. For
-#   example:
-#
-#     AX_IS_RELEASE([git-directory])
-#     AX_COMPILER_FLAGS()
-#
-#   CFLAGS-VARIABLE defaults to WARN_CFLAGS, and LDFLAGS-VARIABLE defaults
-#   to WARN_LDFLAGS.  Both variables are AC_SUBST-ed by this macro, but must
-#   be manually added to the CFLAGS and LDFLAGS variables for each target in
-#   the code base.
-#
-#   If C++ language support is enabled with AC_PROG_CXX, which must occur
-#   before this macro in configure.ac, warning flags for the C++ compiler
-#   are AC_SUBST-ed as WARN_CXXFLAGS, and must be manually added to the
-#   CXXFLAGS variables for each target in the code base.  EXTRA-*-CFLAGS can
-#   be used to augment the base and enabled flags.
-#
-#   Warning flags for g-ir-scanner (from GObject Introspection) are
-#   AC_SUBST-ed as WARN_SCANNERFLAGS.  This variable must be manually added
-#   to the SCANNERFLAGS variable for each GIR target in the code base.  If
-#   extra g-ir-scanner flags need to be enabled, the AX_COMPILER_FLAGS_GIR
-#   macro must be invoked manually.
-#
-#   AX_COMPILER_FLAGS may add support for other tools in future, in addition
-#   to the compiler and linker.  No extra EXTRA-* variables will be added
-#   for those tools, and all extra support will still use the single
-#   --enable-compile-warnings configure option.  For finer grained control
-#   over the flags for individual tools, use AX_COMPILER_FLAGS_CFLAGS,
-#   AX_COMPILER_FLAGS_LDFLAGS and AX_COMPILER_FLAGS_* for new tools.
-#
-#   The UNUSED variables date from a previous version of this macro, and are
-#   automatically appended to the preceding non-UNUSED variable. They should
-#   be left empty in new uses of the macro.
-#
-# LICENSE
-#
-#   Copyright (c) 2014, 2015 Philip Withnall <philip@tecnocode.co.uk>
-#   Copyright (c) 2015 David King <amigadave@amigadave.com>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved.  This file is offered as-is, without any
-#   warranty.
-
-#serial 14
-
-# _AX_COMPILER_FLAGS_LANG([LANGNAME])
-m4_defun([_AX_COMPILER_FLAGS_LANG],
-[m4_ifdef([_AX_COMPILER_FLAGS_LANG_]$1[_enabled], [],
-          [m4_define([_AX_COMPILER_FLAGS_LANG_]$1[_enabled], [])dnl
-           AX_REQUIRE_DEFINED([AX_COMPILER_FLAGS_]$1[FLAGS])])dnl
-])
-
-AC_DEFUN([AX_COMPILER_FLAGS],[
-    # C support is enabled by default.
-    _AX_COMPILER_FLAGS_LANG([C])
-    # Only enable C++ support if AC_PROG_CXX is called. The redefinition of
-    # AC_PROG_CXX is so that a fatal error is emitted if this macro is called
-    # before AC_PROG_CXX, which would otherwise cause no C++ warnings to be
-    # checked.
-    AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                      [_AX_COMPILER_FLAGS_LANG([CXX])],
-                      [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AX_COMPILER_FLAGS_LANG([CXX])])])
-    AX_REQUIRE_DEFINED([AX_COMPILER_FLAGS_LDFLAGS])
-
-    # Default value for IS-RELEASE is $ax_is_release
-    ax_compiler_flags_is_release=m4_tolower(m4_normalize(ifelse([$3],,
-                                                                [$ax_is_release],
-                                                                [$3])))
-
-    AC_ARG_ENABLE([compile-warnings],
-                  AS_HELP_STRING([--enable-compile-warnings=@<:@no/yes/error@:>@],
-                                 [Enable compiler warnings and errors]),,
-                  [AS_IF([test "$ax_compiler_flags_is_release" = "yes"],
-                         [enable_compile_warnings="yes"],
-                         [enable_compile_warnings="error"])])
-    AC_ARG_ENABLE([Werror],
-                  AS_HELP_STRING([--disable-Werror],
-                                 [Unconditionally make all compiler warnings non-fatal]),,
-                  [enable_Werror=maybe])
-
-    # Return the user's chosen warning level
-    AS_IF([test "$enable_Werror" = "no" -a \
-                "$enable_compile_warnings" = "error"],[
-        enable_compile_warnings="yes"
-    ])
-
-    ax_enable_compile_warnings=$enable_compile_warnings
-
-    AX_COMPILER_FLAGS_CFLAGS([$1],[$ax_compiler_flags_is_release],
-                             [$4],[$5 $6 $7 $8])
-    m4_ifdef([_AX_COMPILER_FLAGS_LANG_CXX_enabled],
-             [AX_COMPILER_FLAGS_CXXFLAGS([WARN_CXXFLAGS],
-                                         [$ax_compiler_flags_is_release],
-                                         [$4],[$5 $6 $7 $8])])
-    AX_COMPILER_FLAGS_LDFLAGS([$2],[$ax_compiler_flags_is_release],
-                              [$9],[$10 $11 $12 $13])
-    AX_COMPILER_FLAGS_GIR([WARN_SCANNERFLAGS],[$ax_compiler_flags_is_release])
-])dnl AX_COMPILER_FLAGS
diff --git a/m4/ax_compiler_flags_cflags.m4 b/m4/ax_compiler_flags_cflags.m4
deleted file mode 100644
index 916f918..0000000
--- a/m4/ax_compiler_flags_cflags.m4
+++ /dev/null
@@ -1,161 +0,0 @@
-# =============================================================================
-#  https://www.gnu.org/software/autoconf-archive/ax_compiler_flags_cflags.html
-# =============================================================================
-#
-# SYNOPSIS
-#
-#   AX_COMPILER_FLAGS_CFLAGS([VARIABLE], [IS-RELEASE], [EXTRA-BASE-FLAGS], [EXTRA-YES-FLAGS])
-#
-# DESCRIPTION
-#
-#   Add warning flags for the C compiler to VARIABLE, which defaults to
-#   WARN_CFLAGS.  VARIABLE is AC_SUBST-ed by this macro, but must be
-#   manually added to the CFLAGS variable for each target in the code base.
-#
-#   This macro depends on the environment set up by AX_COMPILER_FLAGS.
-#   Specifically, it uses the value of $ax_enable_compile_warnings to decide
-#   which flags to enable.
-#
-# LICENSE
-#
-#   Copyright (c) 2014, 2015 Philip Withnall <philip@tecnocode.co.uk>
-#   Copyright (c) 2017, 2018 Reini Urban <rurban@cpan.org>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved.  This file is offered as-is, without any
-#   warranty.
-
-#serial 17
-
-AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[
-    AC_REQUIRE([AC_PROG_SED])
-    AX_REQUIRE_DEFINED([AX_APPEND_COMPILE_FLAGS])
-    AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
-    AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
-
-    # Variable names
-    m4_define([ax_warn_cflags_variable],
-              [m4_normalize(ifelse([$1],,[WARN_CFLAGS],[$1]))])
-
-    AC_LANG_PUSH([C])
-
-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
-      [#ifndef __cplusplus
-       #error "no C++"
-       #endif]])],
-      [ax_compiler_cxx=yes;],
-      [ax_compiler_cxx=no;])
-
-    # Always pass -Werror=unknown-warning-option to get Clang to fail on bad
-    # flags, otherwise they are always appended to the warn_cflags variable, and
-    # Clang warns on them for every compilation unit.
-    # If this is passed to GCC, it will explode, so the flag must be enabled
-    # conditionally.
-    AX_CHECK_COMPILE_FLAG([-Werror=unknown-warning-option],[
-        ax_compiler_flags_test="-Werror=unknown-warning-option"
-    ],[
-        ax_compiler_flags_test=""
-    ])
-
-    # Check that -Wno-suggest-attribute=format is supported
-    AX_CHECK_COMPILE_FLAG([-Wno-suggest-attribute=format],[
-        ax_compiler_no_suggest_attribute_flags="-Wno-suggest-attribute=format"
-    ],[
-        ax_compiler_no_suggest_attribute_flags=""
-    ])
-
-    # Base flags
-    AX_APPEND_COMPILE_FLAGS([ dnl
-        -fno-strict-aliasing dnl
-        $3 dnl
-    ],ax_warn_cflags_variable,[$ax_compiler_flags_test])
-
-    AS_IF([test "$ax_enable_compile_warnings" != "no"],[
-        if test "$ax_compiler_cxx" = "no" ; then
-            # C-only flags. Warn in C++
-            AX_APPEND_COMPILE_FLAGS([ dnl
-                -Wnested-externs dnl
-                -Wmissing-prototypes dnl
-                -Wstrict-prototypes dnl
-                -Wdeclaration-after-statement dnl
-                -Wimplicit-function-declaration dnl
-                -Wold-style-definition dnl
-                -Wjump-misses-init dnl
-            ],ax_warn_cflags_variable,[$ax_compiler_flags_test])
-        fi
-
-        # "yes" flags
-        AX_APPEND_COMPILE_FLAGS([ dnl
-            -Wall dnl
-            -Wextra dnl
-            -Wundef dnl
-            -Wwrite-strings dnl
-            -Wpointer-arith dnl
-            -Wmissing-declarations dnl
-            -Wredundant-decls dnl
-            -Wno-unused-parameter dnl
-            -Wno-missing-field-initializers dnl
-            -Wformat=2 dnl
-            -Wcast-align dnl
-            -Wformat-nonliteral dnl
-            -Wformat-security dnl
-            -Wsign-compare dnl
-            -Wstrict-aliasing dnl
-            -Wshadow dnl
-            -Winline dnl
-            -Wpacked dnl
-            -Wmissing-format-attribute dnl
-            -Wmissing-noreturn dnl
-            -Winit-self dnl
-            -Wredundant-decls dnl
-            -Wmissing-include-dirs dnl
-            -Wunused-but-set-variable dnl
-            -Warray-bounds dnl
-            -Wreturn-type dnl
-            -Wswitch-enum dnl
-            -Wswitch-default dnl
-            -Wduplicated-cond dnl
-            -Wduplicated-branches dnl
-            -Wlogical-op dnl
-            -Wrestrict dnl
-            -Wnull-dereference dnl
-            -Wdouble-promotion dnl
-            $4 dnl
-            $5 dnl
-            $6 dnl
-            $7 dnl
-        ],ax_warn_cflags_variable,[$ax_compiler_flags_test])
-    ])
-    AS_IF([test "$ax_enable_compile_warnings" = "error"],[
-        # "error" flags; -Werror has to be appended unconditionally because
-        # it's not possible to test for
-        #
-        # suggest-attribute=format is disabled because it gives too many false
-        # positives
-        AX_APPEND_FLAG([-Werror],ax_warn_cflags_variable)
-
-        AX_APPEND_COMPILE_FLAGS([ dnl
-            [$ax_compiler_no_suggest_attribute_flags] dnl
-        ],ax_warn_cflags_variable,[$ax_compiler_flags_test])
-    ])
-
-    # In the flags below, when disabling specific flags, always add *both*
-    # -Wno-foo and -Wno-error=foo. This fixes the situation where (for example)
-    # we enable -Werror, disable a flag, and a build bot passes CFLAGS=-Wall,
-    # which effectively turns that flag back on again as an error.
-    for flag in $ax_warn_cflags_variable; do
-        AS_CASE([$flag],
-                [-Wno-*=*],[],
-                [-Wno-*],[
-                    AX_APPEND_COMPILE_FLAGS([-Wno-error=$(AS_ECHO([$flag]) | $SED 's/^-Wno-//')],
-                                            ax_warn_cflags_variable,
-                                            [$ax_compiler_flags_test])
-                ])
-    done
-
-    AC_LANG_POP([C])
-
-    # Substitute the variables
-    AC_SUBST(ax_warn_cflags_variable)
-])dnl AX_COMPILER_FLAGS
diff --git a/m4/ax_compiler_flags_gir.m4 b/m4/ax_compiler_flags_gir.m4
deleted file mode 100644
index 5b4924a..0000000
--- a/m4/ax_compiler_flags_gir.m4
+++ /dev/null
@@ -1,60 +0,0 @@
-# ===========================================================================
-#  https://www.gnu.org/software/autoconf-archive/ax_compiler_flags_gir.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_COMPILER_FLAGS_GIR([VARIABLE], [IS-RELEASE], [EXTRA-BASE-FLAGS], [EXTRA-YES-FLAGS])
-#
-# DESCRIPTION
-#
-#   Add warning flags for the g-ir-scanner (from GObject Introspection) to
-#   VARIABLE, which defaults to WARN_SCANNERFLAGS.  VARIABLE is AC_SUBST-ed
-#   by this macro, but must be manually added to the SCANNERFLAGS variable
-#   for each GIR target in the code base.
-#
-#   This macro depends on the environment set up by AX_COMPILER_FLAGS.
-#   Specifically, it uses the value of $ax_enable_compile_warnings to decide
-#   which flags to enable.
-#
-# LICENSE
-#
-#   Copyright (c) 2015 Philip Withnall <philip@tecnocode.co.uk>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved.  This file is offered as-is, without any
-#   warranty.
-
-#serial 6
-
-AC_DEFUN([AX_COMPILER_FLAGS_GIR],[
-    AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
-
-    # Variable names
-    m4_define([ax_warn_scannerflags_variable],
-              [m4_normalize(ifelse([$1],,[WARN_SCANNERFLAGS],[$1]))])
-
-    # Base flags
-    AX_APPEND_FLAG([$3],ax_warn_scannerflags_variable)
-
-    AS_IF([test "$ax_enable_compile_warnings" != "no"],[
-        # "yes" flags
-        AX_APPEND_FLAG([ dnl
-            --warn-all dnl
-            $4 dnl
-            $5 dnl
-            $6 dnl
-            $7 dnl
-        ],ax_warn_scannerflags_variable)
-    ])
-    AS_IF([test "$ax_enable_compile_warnings" = "error"],[
-        # "error" flags
-        AX_APPEND_FLAG([ dnl
-            --warn-error dnl
-        ],ax_warn_scannerflags_variable)
-    ])
-
-    # Substitute the variables
-    AC_SUBST(ax_warn_scannerflags_variable)
-])dnl AX_COMPILER_FLAGS
diff --git a/m4/ax_compiler_flags_ldflags.m4 b/m4/ax_compiler_flags_ldflags.m4
deleted file mode 100644
index 976d119..0000000
--- a/m4/ax_compiler_flags_ldflags.m4
+++ /dev/null
@@ -1,111 +0,0 @@
-# ==============================================================================
-#  https://www.gnu.org/software/autoconf-archive/ax_compiler_flags_ldflags.html
-# ==============================================================================
-#
-# SYNOPSIS
-#
-#   AX_COMPILER_FLAGS_LDFLAGS([VARIABLE], [IS-RELEASE], [EXTRA-BASE-FLAGS], [EXTRA-YES-FLAGS])
-#
-# DESCRIPTION
-#
-#   Add warning flags for the linker to VARIABLE, which defaults to
-#   WARN_LDFLAGS.  VARIABLE is AC_SUBST-ed by this macro, but must be
-#   manually added to the LDFLAGS variable for each target in the code base.
-#
-#   This macro depends on the environment set up by AX_COMPILER_FLAGS.
-#   Specifically, it uses the value of $ax_enable_compile_warnings to decide
-#   which flags to enable.
-#
-# LICENSE
-#
-#   Copyright (c) 2014, 2015 Philip Withnall <philip@tecnocode.co.uk>
-#   Copyright (c) 2017, 2018 Reini Urban <rurban@cpan.org>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved.  This file is offered as-is, without any
-#   warranty.
-
-#serial 9
-
-AC_DEFUN([AX_COMPILER_FLAGS_LDFLAGS],[
-    AX_REQUIRE_DEFINED([AX_APPEND_LINK_FLAGS])
-    AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
-    AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
-    AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
-
-    # Variable names
-    m4_define([ax_warn_ldflags_variable],
-              [m4_normalize(ifelse([$1],,[WARN_LDFLAGS],[$1]))])
-
-    # Always pass -Werror=unknown-warning-option to get Clang to fail on bad
-    # flags, otherwise they are always appended to the warn_ldflags variable,
-    # and Clang warns on them for every compilation unit.
-    # If this is passed to GCC, it will explode, so the flag must be enabled
-    # conditionally.
-    AX_CHECK_COMPILE_FLAG([-Werror=unknown-warning-option],[
-        ax_compiler_flags_test="-Werror=unknown-warning-option"
-    ],[
-        ax_compiler_flags_test=""
-    ])
-
-    AX_CHECK_LINK_FLAG([-Wl,--as-needed], [
-        AX_APPEND_LINK_FLAGS([-Wl,--as-needed],
-          [AM_LDFLAGS],[$ax_compiler_flags_test])
-    ])
-    AX_CHECK_LINK_FLAG([-Wl,-z,relro], [
-        AX_APPEND_LINK_FLAGS([-Wl,-z,relro],
-          [AM_LDFLAGS],[$ax_compiler_flags_test])
-    ])
-    AX_CHECK_LINK_FLAG([-Wl,-z,now], [
-        AX_APPEND_LINK_FLAGS([-Wl,-z,now],
-          [AM_LDFLAGS],[$ax_compiler_flags_test])
-    ])
-    AX_CHECK_LINK_FLAG([-Wl,-z,noexecstack], [
-        AX_APPEND_LINK_FLAGS([-Wl,-z,noexecstack],
-          [AM_LDFLAGS],[$ax_compiler_flags_test])
-    ])
-    # textonly, retpolineplt not yet
-
-    # macOS and cygwin linker do not have --as-needed
-    AX_CHECK_LINK_FLAG([-Wl,--no-as-needed], [
-        ax_compiler_flags_as_needed_option="-Wl,--no-as-needed"
-    ], [
-        ax_compiler_flags_as_needed_option=""
-    ])
-
-    # macOS linker speaks with a different accent
-    ax_compiler_flags_fatal_warnings_option=""
-    AX_CHECK_LINK_FLAG([-Wl,--fatal-warnings], [
-        ax_compiler_flags_fatal_warnings_option="-Wl,--fatal-warnings"
-    ])
-    AX_CHECK_LINK_FLAG([-Wl,-fatal_warnings], [
-        ax_compiler_flags_fatal_warnings_option="-Wl,-fatal_warnings"
-    ])
-
-    # Base flags
-    AX_APPEND_LINK_FLAGS([ dnl
-        $ax_compiler_flags_as_needed_option dnl
-        $3 dnl
-    ],ax_warn_ldflags_variable,[$ax_compiler_flags_test])
-
-    AS_IF([test "$ax_enable_compile_warnings" != "no"],[
-        # "yes" flags
-        AX_APPEND_LINK_FLAGS([$4 $5 $6 $7],
-                                ax_warn_ldflags_variable,
-                                [$ax_compiler_flags_test])
-    ])
-    AS_IF([test "$ax_enable_compile_warnings" = "error"],[
-        # "error" flags; -Werror has to be appended unconditionally because
-        # it's not possible to test for
-        #
-        # suggest-attribute=format is disabled because it gives too many false
-        # positives
-        AX_APPEND_LINK_FLAGS([ dnl
-            $ax_compiler_flags_fatal_warnings_option dnl
-        ],ax_warn_ldflags_variable,[$ax_compiler_flags_test])
-    ])
-
-    # Substitute the variables
-    AC_SUBST(ax_warn_ldflags_variable)
-])dnl AX_COMPILER_FLAGS
diff --git a/m4/ax_is_release.m4 b/m4/ax_is_release.m4
deleted file mode 100644
index 9097ddb..0000000
--- a/m4/ax_is_release.m4
+++ /dev/null
@@ -1,80 +0,0 @@
-# ===========================================================================
-#      https://www.gnu.org/software/autoconf-archive/ax_is_release.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_IS_RELEASE(POLICY)
-#
-# DESCRIPTION
-#
-#   Determine whether the code is being configured as a release, or from
-#   git. Set the ax_is_release variable to 'yes' or 'no'.
-#
-#   If building a release version, it is recommended that the configure
-#   script disable compiler errors and debug features, by conditionalising
-#   them on the ax_is_release variable.  If building from git, these
-#   features should be enabled.
-#
-#   The POLICY parameter specifies how ax_is_release is determined. It can
-#   take the following values:
-#
-#    * git-directory:  ax_is_release will be 'no' if a '.git' directory exists
-#    * minor-version:  ax_is_release will be 'no' if the minor version number
-#                      in $PACKAGE_VERSION is odd; this assumes
-#                      $PACKAGE_VERSION follows the 'major.minor.micro' scheme
-#    * micro-version:  ax_is_release will be 'no' if the micro version number
-#                      in $PACKAGE_VERSION is odd; this assumes
-#                      $PACKAGE_VERSION follows the 'major.minor.micro' scheme
-#    * dash-version:   ax_is_release will be 'no' if there is a dash '-'
-#                      in $PACKAGE_VERSION, for example 1.2-pre3, 1.2.42-a8b9
-#                      or 2.0-dirty (in particular this is suitable for use
-#                      with git-version-gen)
-#    * always:         ax_is_release will always be 'yes'
-#    * never:          ax_is_release will always be 'no'
-#
-#   Other policies may be added in future.
-#
-# LICENSE
-#
-#   Copyright (c) 2015 Philip Withnall <philip@tecnocode.co.uk>
-#   Copyright (c) 2016 Collabora Ltd.
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved.
-
-#serial 7
-
-AC_DEFUN([AX_IS_RELEASE],[
-    AC_BEFORE([AC_INIT],[$0])
-
-    m4_case([$1],
-      [git-directory],[
-        # $is_release = (.git directory does not exist)
-        AS_IF([test -d ${srcdir}/.git],[ax_is_release=no],[ax_is_release=yes])
-      ],
-      [minor-version],[
-        # $is_release = ($minor_version is even)
-        minor_version=`echo "$PACKAGE_VERSION" | sed 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'`
-        AS_IF([test "$(( $minor_version % 2 ))" -ne 0],
-              [ax_is_release=no],[ax_is_release=yes])
-      ],
-      [micro-version],[
-        # $is_release = ($micro_version is even)
-        micro_version=`echo "$PACKAGE_VERSION" | sed 's/[[^.]]*\.[[^.]]*\.\([[^.]]*\).*/\1/'`
-        AS_IF([test "$(( $micro_version % 2 ))" -ne 0],
-              [ax_is_release=no],[ax_is_release=yes])
-      ],
-      [dash-version],[
-        # $is_release = ($PACKAGE_VERSION has a dash)
-        AS_CASE([$PACKAGE_VERSION],
-                [*-*], [ax_is_release=no],
-                [*], [ax_is_release=yes])
-      ],
-      [always],[ax_is_release=yes],
-      [never],[ax_is_release=no],
-      [
-        AC_MSG_ERROR([Invalid policy. Valid policies: git-directory, minor-version, micro-version, dash-version, always, never.])
-      ])
-])
diff --git a/m4/ax_require_defined.m4 b/m4/ax_require_defined.m4
deleted file mode 100644
index 17c3eab..0000000
--- a/m4/ax_require_defined.m4
+++ /dev/null
@@ -1,37 +0,0 @@
-# ===========================================================================
-#    https://www.gnu.org/software/autoconf-archive/ax_require_defined.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_REQUIRE_DEFINED(MACRO)
-#
-# DESCRIPTION
-#
-#   AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
-#   been defined and thus are available for use.  This avoids random issues
-#   where a macro isn't expanded.  Instead the configure script emits a
-#   non-fatal:
-#
-#     ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
-#
-#   It's like AC_REQUIRE except it doesn't expand the required macro.
-#
-#   Here's an example:
-#
-#     AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
-#
-# LICENSE
-#
-#   Copyright (c) 2014 Mike Frysinger <vapier@gentoo.org>
-#
-#   Copying and distribution of this file, with or without modification, are
-#   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved. This file is offered as-is, without any
-#   warranty.
-
-#serial 2
-
-AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
-  m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
-])dnl AX_REQUIRE_DEFINED
diff --git a/m4/gtk-doc.m4 b/m4/gtk-doc.m4
deleted file mode 100644
index 2d12f01..0000000
--- a/m4/gtk-doc.m4
+++ /dev/null
@@ -1,113 +0,0 @@
-# -*- mode: autoconf -*-
-#
-# gtk-doc.m4 - configure macro to check for gtk-doc
-# Copyright (C) 2003 James Henstridge
-#               2007-2017  Stefan Sauer
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception, the above copyright owner gives unlimited
-# permission to copy, distribute and modify the configure scripts that
-# are the output of Autoconf when processing the Macro. You need not
-# follow the terms of the GNU General Public License when using or
-# distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-
-# serial 2
-
-dnl Usage:
-dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
-AC_DEFUN([GTK_DOC_CHECK],
-[
-  AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-  AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
-  AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
-
-  ifelse([$1],[],[gtk_doc_requires="gtk-doc"],[gtk_doc_requires="gtk-doc >= $1"])
-  AC_MSG_CHECKING([for gtk-doc])
-  PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no])
-  AC_MSG_RESULT($have_gtk_doc)
-
-  if test "$have_gtk_doc" = "no"; then
-      AC_MSG_WARN([
-  You will not be able to create source packages with 'make dist'
-  because $gtk_doc_requires is not found.])
-  fi
-
-  dnl check for tools we added during development
-  dnl Use AC_CHECK_PROG to avoid the check target using an absolute path that
-  dnl may not be writable by the user. Currently, automake requires that the
-  dnl test name must end in '.test'.
-  dnl https://bugzilla.gnome.org/show_bug.cgi?id=701638
-  AC_CHECK_PROG([GTKDOC_CHECK],[gtkdoc-check],[gtkdoc-check.test])
-  AC_PATH_PROG([GTKDOC_CHECK_PATH],[gtkdoc-check])
-  AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
-  AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
-
-  dnl for overriding the documentation installation directory
-  AC_ARG_WITH([html-dir],
-    AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
-    [with_html_dir='${datadir}/gtk-doc/html'])
-  HTML_DIR="$with_html_dir"
-  AC_SUBST([HTML_DIR])
-
-  dnl enable/disable documentation building
-  AC_ARG_ENABLE([gtk-doc],
-    AS_HELP_STRING([--enable-gtk-doc],
-                   [use gtk-doc to build documentation [[default=no]]]),,
-    [enable_gtk_doc=no])
-
-  AC_MSG_CHECKING([whether to build gtk-doc documentation])
-  AC_MSG_RESULT($enable_gtk_doc)
-
-  if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then
-    AC_MSG_ERROR([
-  You must have $gtk_doc_requires installed to build documentation for
-  $PACKAGE_NAME. Please install gtk-doc or disable building the
-  documentation by adding '--disable-gtk-doc' to '[$]0'.])
-  fi
-
-  dnl don't check for glib if we build glib
-  if test "x$PACKAGE_NAME" != "xglib"; then
-    dnl don't fail if someone does not have glib
-    PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,[:])
-  fi
-
-  dnl enable/disable output formats
-  AC_ARG_ENABLE([gtk-doc-html],
-    AS_HELP_STRING([--enable-gtk-doc-html],
-                   [build documentation in html format [[default=yes]]]),,
-    [enable_gtk_doc_html=yes])
-    AC_ARG_ENABLE([gtk-doc-pdf],
-      AS_HELP_STRING([--enable-gtk-doc-pdf],
-                     [build documentation in pdf format [[default=no]]]),,
-      [enable_gtk_doc_pdf=no])
-
-  if test -z "$GTKDOC_MKPDF"; then
-    enable_gtk_doc_pdf=no
-  fi
-
-  if test -z "$AM_DEFAULT_VERBOSITY"; then
-    AM_DEFAULT_VERBOSITY=1
-  fi
-  AC_SUBST([AM_DEFAULT_VERBOSITY])
-
-  AM_CONDITIONAL([HAVE_GTK_DOC], [test x$have_gtk_doc = xyes])
-  AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
-  AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
-  AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
-  AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
-  AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
-])
diff --git a/m4/introspection.m4 b/m4/introspection.m4
deleted file mode 100644
index b0ccd68..0000000
--- a/m4/introspection.m4
+++ /dev/null
@@ -1,142 +0,0 @@
-dnl -*- mode: autoconf -*-
-dnl Copyright 2009 Johan Dahlin
-dnl
-dnl This file is free software; the author(s) gives unlimited
-dnl permission to copy and/or distribute it, with or without
-dnl modifications, as long as this notice is preserved.
-dnl
-
-# serial 1
-
-dnl This is a copy of AS_AC_EXPAND
-dnl
-dnl (C) 2003, 2004, 2005 Thomas Vander Stichele <thomas at apestaart dot org>
-dnl Copying and distribution of this file, with or without modification,
-dnl are permitted in any medium without royalty provided the copyright
-dnl notice and this notice are preserved.
-m4_define([_GOBJECT_INTROSPECTION_AS_AC_EXPAND],
-[
-  EXP_VAR=[$1]
-  FROM_VAR=[$2]
-
-  dnl first expand prefix and exec_prefix if necessary
-  prefix_save=$prefix
-  exec_prefix_save=$exec_prefix
-
-  dnl if no prefix given, then use /usr/local, the default prefix
-  if test "x$prefix" = "xNONE"; then
-    prefix="$ac_default_prefix"
-  fi
-  dnl if no exec_prefix given, then use prefix
-  if test "x$exec_prefix" = "xNONE"; then
-    exec_prefix=$prefix
-  fi
-
-  full_var="$FROM_VAR"
-  dnl loop until it doesn't change anymore
-  while true; do
-    new_full_var="`eval echo $full_var`"
-    if test "x$new_full_var" = "x$full_var"; then break; fi
-    full_var=$new_full_var
-  done
-
-  dnl clean up
-  full_var=$new_full_var
-  AC_SUBST([$1], "$full_var")
-
-  dnl restore prefix and exec_prefix
-  prefix=$prefix_save
-  exec_prefix=$exec_prefix_save
-])
-
-m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
-[
-    AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
-    AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
-    AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
-
-    dnl enable/disable introspection
-    m4_if([$2], [require],
-    [dnl
-        enable_introspection=yes
-    ],[dnl
-        AC_ARG_ENABLE(introspection,
-                  AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
-                                 [Enable introspection for this build]),, 
-                                 [enable_introspection=auto])
-    ])dnl
-
-    AC_MSG_CHECKING([for gobject-introspection])
-
-    dnl presence/version checking
-    AS_CASE([$enable_introspection],
-    [no], [dnl
-        found_introspection="no (disabled, use --enable-introspection to enable)"
-    ],dnl
-    [yes],[dnl
-        PKG_CHECK_EXISTS([gobject-introspection-1.0],,
-                         AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
-        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
-                         found_introspection=yes,
-                         AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
-    ],dnl
-    [auto],[dnl
-        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
-	dnl Canonicalize enable_introspection
-	enable_introspection=$found_introspection
-    ],dnl
-    [dnl	
-        AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
-    ])dnl
-
-    AC_MSG_RESULT([$found_introspection])
-
-    dnl expand datadir/libdir so we can pass them to pkg-config
-    dnl and get paths relative to our target directories
-    _GOBJECT_INTROSPECTION_AS_AC_EXPAND(_GI_EXP_DATADIR, "$datadir")
-    _GOBJECT_INTROSPECTION_AS_AC_EXPAND(_GI_EXP_LIBDIR, "$libdir")
-
-    INTROSPECTION_SCANNER=
-    INTROSPECTION_COMPILER=
-    INTROSPECTION_GENERATE=
-    INTROSPECTION_GIRDIR=
-    INTROSPECTION_TYPELIBDIR=
-    if test "x$found_introspection" = "xyes"; then
-       INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
-       INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
-       INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
-       INTROSPECTION_GIRDIR=`$PKG_CONFIG --define-variable=datadir="${_GI_EXP_DATADIR}" --variable=girdir gobject-introspection-1.0`
-       INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --define-variable=libdir="${_GI_EXP_LIBDIR}" --variable=typelibdir gobject-introspection-1.0)"
-       INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
-       INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
-       INTROSPECTION_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
-    fi
-    AC_SUBST(INTROSPECTION_SCANNER)
-    AC_SUBST(INTROSPECTION_COMPILER)
-    AC_SUBST(INTROSPECTION_GENERATE)
-    AC_SUBST(INTROSPECTION_GIRDIR)
-    AC_SUBST(INTROSPECTION_TYPELIBDIR)
-    AC_SUBST(INTROSPECTION_CFLAGS)
-    AC_SUBST(INTROSPECTION_LIBS)
-    AC_SUBST(INTROSPECTION_MAKEFILE)
-
-    AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
-])
-
-
-dnl Usage:
-dnl   GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
-
-AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
-[
-  _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
-])
-
-dnl Usage:
-dnl   GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
-
-
-AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
-[
-  _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
-])
diff --git a/m4/mm-enable-plugin.m4 b/m4/mm-enable-plugin.m4
deleted file mode 100644
index 774c881..0000000
--- a/m4/mm-enable-plugin.m4
+++ /dev/null
@@ -1,71 +0,0 @@
-dnl -*- mode: autoconf -*-
-dnl Copyright 2019 Aleksander Morgado
-dnl
-dnl This file is free software; the author(s) gives unlimited
-dnl permission to copy and/or distribute it, with or without
-dnl modifications, as long as this notice is preserved.
-dnl
-
-# serial 1
-
-dnl Usage:
-dnl  MM_ENABLE_ALL_PLUGINS
-AC_DEFUN([MM_ENABLE_ALL_PLUGINS],
-[dnl
-AC_ARG_ENABLE(all-plugins,
-              AS_HELP_STRING([--enable-all-plugins],
-              [Build all plugins [[default=yes]]]),
-              [],
-              [enable_all_plugins=yes])
-])
-
-dnl Usage:
-dnl  MM_ENABLE_PLUGIN_FULL([NAME],[DEFAULT],[WITH_SHARED_NAME_1,WITH_SHARED_NAME_2,...])
-AC_DEFUN([MM_ENABLE_PLUGIN_FULL],
-[dnl
-m4_pushdef([var_enable_plugin], patsubst([enable_plugin_$1], -, _))dnl
-m4_pushdef([VAR_ENABLE_PLUGIN], patsubst(translit([enable_plugin_$1], [a-z], [A-Z]), -, _))dnl
-AC_ARG_ENABLE(plugin-$1,
-              AS_HELP_STRING([--enable-plugin-$1], [Build $1 plugin]),
-              [],
-              [var_enable_plugin=$2])
-if test "x$var_enable_plugin" = "xyes"; then
-  AC_DEFINE([VAR_ENABLE_PLUGIN], 1, [Define if $1 plugin is enabled])
-m4_ifval([$3],[m4_foreach(with_shared,[$3],[dnl
-  with_shared="yes"
-])])dnl
-fi
-AM_CONDITIONAL(VAR_ENABLE_PLUGIN, [test "x$var_enable_plugin" = "xyes"])
-m4_popdef([VAR_ENABLE_PLUGIN])dnl
-m4_popdef([var_enable_plugin])dnl
-])
-
-dnl Usage:
-dnl  MM_ENABLE_PLUGIN([NAME],[WITH_SHARED_NAME_1,WITH_SHARED_NAME_2,...])
-AC_DEFUN([MM_ENABLE_PLUGIN],
-[dnl
-MM_ENABLE_PLUGIN_FULL([$1],[$enable_all_plugins],[$2])
-])
-
-dnl Usage:
-dnl  MM_ENABLE_PLUGIN_DISABLED([NAME],[WITH_SHARED_NAME_1,WITH_SHARED_NAME_2,...])
-AC_DEFUN([MM_ENABLE_PLUGIN_DISABLED],
-[dnl
-MM_ENABLE_PLUGIN_FULL([$1],["no"],[$2])
-])
-
-dnl Usage:
-dnl  MM_BUILD_SHARED([NAME])
-AC_DEFUN([MM_BUILD_SHARED],
-[dnl
-m4_pushdef([with_shared], patsubst([with_shared_$1], -, _))dnl
-m4_pushdef([WITH_SHARED], patsubst(translit([with_shared_$1], [a-z], [A-Z]), -, _))dnl
-AM_CONDITIONAL(WITH_SHARED, test "x$with_shared" = "xyes")
-if test "x$with_shared" = "xyes"; then
-  AC_DEFINE([WITH_SHARED], 1, [Define if $1 utils are built])
-else
-  with_shared="no"
-fi
-m4_popdef([WITH_SHARED])dnl
-m4_popdef([with_shared])dnl
-])
diff --git a/m4/vapigen.m4 b/m4/vapigen.m4
deleted file mode 100644
index 2c435e7..0000000
--- a/m4/vapigen.m4
+++ /dev/null
@@ -1,101 +0,0 @@
-dnl vapigen.m4
-dnl
-dnl Copyright 2012 Evan Nemerson
-dnl
-dnl This library is free software; you can redistribute it and/or
-dnl modify it under the terms of the GNU Lesser General Public
-dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License, or (at your option) any later version.
-dnl
-dnl This library is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-dnl Lesser General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU Lesser General Public
-dnl License along with this library; if not, write to the Free Software
-dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
-
-# VAPIGEN_CHECK([VERSION], [API_VERSION], [FOUND_INTROSPECTION], [DEFAULT])
-# --------------------------------------
-# Check vapigen existence and version
-#
-# See http://live.gnome.org/Vala/UpstreamGuide for detailed documentation
-AC_DEFUN([VAPIGEN_CHECK],
-[
-  AS_IF([test "x$3" != "xyes"], [
-      m4_provide_if([GOBJECT_INTROSPECTION_CHECK], [], [
-          m4_provide_if([GOBJECT_INTROSPECTION_REQUIRE], [], [
-              AC_MSG_ERROR([[You must call GOBJECT_INTROSPECTION_CHECK or GOBJECT_INTROSPECTION_REQUIRE before using VAPIGEN_CHECK unless using the FOUND_INTROSPECTION argument is "yes"]])
-            ])
-        ])
-    ])
-
-  AC_ARG_ENABLE([vala],
-    [AS_HELP_STRING([--enable-vala[=@<:@no/auto/yes@:>@]],[build Vala bindings @<:@default=]ifelse($4,,auto,$4)[@:>@])],,[
-      AS_IF([test "x$4" = "x"], [
-          enable_vala=auto
-        ], [
-          enable_vala=$4
-        ])
-    ])
-
-  AS_CASE([$enable_vala], [no], [enable_vala=no],
-      [yes], [
-        AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [
-            AC_MSG_ERROR([Vala bindings require GObject Introspection])
-          ])
-      ], [auto], [
-        AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [
-            enable_vala=no
-          ])
-      ], [
-        AC_MSG_ERROR([Invalid argument passed to --enable-vala, should be one of @<:@no/auto/yes@:>@])
-      ])
-
-  AS_IF([test "x$2" = "x"], [
-      vapigen_pkg_name=vapigen
-    ], [
-      vapigen_pkg_name=vapigen-$2
-    ])
-  AS_IF([test "x$1" = "x"], [
-      vapigen_pkg="$vapigen_pkg_name"
-    ], [
-      vapigen_pkg="$vapigen_pkg_name >= $1"
-    ])
-
-  PKG_PROG_PKG_CONFIG
-
-  PKG_CHECK_EXISTS([$vapigen_pkg], [
-      AS_IF([test "$enable_vala" = "auto"], [
-          enable_vala=yes
-        ])
-    ], [
-      AS_CASE([$enable_vala], [yes], [
-          AC_MSG_ERROR([$vapigen_pkg not found])
-        ], [auto], [
-          enable_vala=no
-        ])
-    ])
-
-  AC_MSG_CHECKING([for vapigen])
-
-  AS_CASE([$enable_vala],
-    [yes], [
-      VAPIGEN=`$PKG_CONFIG --variable=vapigen $vapigen_pkg_name`
-      VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir $vapigen_pkg_name`/vala/Makefile.vapigen
-      AS_IF([test "x$2" = "x"], [
-          VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir $vapigen_pkg_name`
-        ], [
-          VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned $vapigen_pkg_name`
-        ])
-    ])
-
-  AC_MSG_RESULT([$enable_vala])
-
-  AC_SUBST([VAPIGEN])
-  AC_SUBST([VAPIGEN_VAPIDIR])
-  AC_SUBST([VAPIGEN_MAKEFILE])
-
-  AM_CONDITIONAL(ENABLE_VAPIGEN, test "x$enable_vala" = "xyes")
-])
diff --git a/meson.build b/meson.build
index 8cfa0d2..8c2cd3d 100644
--- a/meson.build
+++ b/meson.build
@@ -3,7 +3,7 @@
 
 project(
   'ModemManager', 'c',
-  version: '1.20.0',
+  version: '1.21.1',
   license: 'GPL2',
   default_options: [
     'buildtype=debugoptimized',
@@ -90,6 +90,7 @@
 
 # tests are enabled by default
 enable_tests = get_option('tests')
+config_h.set('WITH_TESTS', enable_tests)
 
 # strict flags to use in debug builds
 if get_option('buildtype').contains('debug')
@@ -109,6 +110,7 @@
     '-Wjump-misses-init',
     '-Wlogical-op',
     '-Wnested-externs',
+    '-Wmaybe-uninitialized',
     '-Wmissing-declarations',
     '-Wmissing-format-attribute',
     '-Wmissing-include-dirs',
@@ -298,15 +300,23 @@
   'xmm': true,
 }
 
+
+fibocom_shared_reqs = ['xmm']
+dell_shared_reqs = ['novatel', 'sierra', 'telit', 'xmm']
+if enable_mbim
+  fibocom_shared_reqs += ['fibocom']
+  dell_shared_reqs += ['foxconn']
+endif
+
 plugins_options_reqs = {
   'altair-lte': {'available': true, 'shared': []},
   'anydata': {'available': true, 'shared': []},
   'broadmobi': {'available': true, 'shared': []},
   'cinterion': {'available': true, 'shared': []},
-  'dell': {'available': true, 'shared': ['foxconn', 'novatel', 'sierra', 'telit', 'xmm']},
+  'dell': {'available': true, 'shared': dell_shared_reqs},
   'dlink': {'available': true, 'shared': []},
-  'fibocom': {'available': true, 'shared': ['fibocom', 'xmm']},
-  'foxconn': {'available': true, 'shared': ['foxconn']},
+  'fibocom': {'available': true, 'shared': fibocom_shared_reqs},
+  'foxconn': {'available': enable_mbim, 'shared': ['foxconn']},
   'generic': {'available': true, 'shared': []},
   'gosuncn': {'available': true, 'shared': []},
   'haier': {'available': true, 'shared': []},
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
deleted file mode 100644
index a003201..0000000
--- a/plugins/Makefile.am
+++ /dev/null
@@ -1,1810 +0,0 @@
-
-include $(top_srcdir)/gtester.make
-
-################################################################################
-# common
-################################################################################
-
-AM_CFLAGS = \
-	$(WARN_CFLAGS) \
-	$(MM_CFLAGS) \
-	$(CODE_COVERAGE_CFLAGS) \
-	$(GUDEV_CFLAGS)	\
-	-DPKGDATADIR=\"${pkgdatadir}\" \
-	-I$(top_srcdir) \
-	-I$(top_srcdir)/src \
-	-I$(top_builddir)/src \
-	-I$(top_srcdir)/src/kerneldevice \
-	-I$(top_srcdir)/include \
-	-I$(top_builddir)/include \
-	-I$(top_srcdir)/libmm-glib \
-	-I$(top_srcdir)/libmm-glib/generated \
-	-I$(top_builddir)/libmm-glib/generated \
-	$(NULL)
-
-AM_LDFLAGS = \
-	$(WARN_LDFLAGS) \
-	$(MM_LIBS)               \
-	$(CODE_COVERAGE_LDFLAGS) \
-	$(GUDEV_LIBS)            \
-	$(NULL)
-
-if WITH_QMI
-AM_CFLAGS  += $(QMI_CFLAGS)
-AM_LDFLAGS += $(QMI_LIBS)
-endif
-
-if WITH_MBIM
-AM_CFLAGS  += $(MBIM_CFLAGS)
-AM_LDFLAGS += $(MBIM_LIBS)
-endif
-
-# Common compiler/linker flags for shared utils
-SHARED_COMMON_COMPILER_FLAGS = \
-	$(NULL)
-SHARED_COMMON_LINKER_FLAGS = \
-	-module        \
-	-avoid-version \
-	$(NULL)
-
-# Common compiler/linker flags for plugins
-PLUGIN_COMMON_COMPILER_FLAGS = \
-	$(NULL)
-PLUGIN_COMMON_LINKER_FLAGS = \
-	-module        \
-	-avoid-version \
-	-export-symbols-regex '^mm_plugin_major_version$$|^mm_plugin_minor_version$$|^mm_plugin_create$$' \
-	$(NULL)
-
-# UDev rules
-udevrulesdir = $(UDEV_BASE_DIR)/rules.d
-dist_udevrules_DATA =
-
-# Unit tests
-noinst_PROGRAMS =
-
-# Helper libs
-noinst_LTLIBRARIES =
-
-# Plugins
-pkglib_LTLIBRARIES =
-
-# Built sources
-BUILT_SOURCES =
-
-# Clean files
-CLEANFILES =
-
-# Data files
-dist_pkgdata_DATA =
-
-################################################################################
-# common service test support
-################################################################################
-
-noinst_LTLIBRARIES += libmm-test-common.la
-libmm_test_common_la_SOURCES = \
-	tests/test-fixture.h \
-	tests/test-fixture.c \
-	tests/test-port-context.h \
-	tests/test-port-context.c \
-	tests/test-helpers.h \
-	tests/test-helpers.c \
-	$(NULL)
-libmm_test_common_la_CPPFLAGS = \
-	-I$(top_builddir)/libmm-glib/generated/tests \
-	-DTEST_SERVICES=\""$(abs_top_builddir)/data/tests"\" \
-	$(NULL)
-libmm_test_common_la_LIBADD = \
-	${top_builddir}/libmm-glib/generated/tests/libmm-test-generated.la \
-	$(top_builddir)/libmm-glib/libmm-glib.la
-
-EXTRA_DIST += tests/gsm-port.conf
-
-TEST_COMMON_COMPILER_FLAGS = \
-	$(MM_CFLAGS) \
-	-I$(top_srcdir)/plugins/tests \
-	-I$(top_srcdir)/include \
-	-I$(top_builddir)/include \
-	-I$(top_srcdir)/libmm-glib \
-	-I$(top_srcdir)/libmm-glib/generated \
-	-I$(top_builddir)/libmm-glib/generated \
-	-I$(top_builddir)/libmm-glib/generated/tests \
-	-DCOMMON_GSM_PORT_CONF=\""$(abs_top_srcdir)/plugins/tests/gsm-port.conf"\" \
-	$(NULL)
-
-TEST_COMMON_LIBADD_FLAGS = \
-	$(builddir)/libmm-test-common.la \
-	$(NULL)
-
-################################################################################
-# common icera support
-################################################################################
-
-if WITH_SHARED_ICERA
-
-noinst_LTLIBRARIES += libhelpers-icera.la
-libhelpers_icera_la_SOURCES = \
-	icera/mm-modem-helpers-icera.c \
-	icera/mm-modem-helpers-icera.h \
-	$(NULL)
-libhelpers_icera_la_CPPFLAGS = \
-	-DMM_MODULE_NAME=\"shared-icera\" \
-	$(NULL)
-
-noinst_PROGRAMS += test-modem-helpers-icera
-test_modem_helpers_icera_SOURCES = \
-	icera/tests/test-modem-helpers-icera.c \
-	$(NULL)
-test_modem_helpers_icera_CPPFLAGS = \
-	-I$(top_srcdir)/plugins/icera \
-	$(NULL)
-test_modem_helpers_icera_LDADD = \
-	$(builddir)/libhelpers-icera.la  \
-	$(top_builddir)/src/libhelpers.la \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(NULL)
-
-pkglib_LTLIBRARIES += libmm-shared-icera.la
-libmm_shared_icera_la_SOURCES = \
-	icera/mm-shared.c \
-	icera/mm-broadband-modem-icera.h \
-	icera/mm-broadband-modem-icera.c \
-	icera/mm-broadband-bearer-icera.h \
-	icera/mm-broadband-bearer-icera.c \
-	$(NULL)
-libmm_shared_icera_la_CPPFLAGS = \
-	$(SHARED_COMMON_COMPILER_FLAGS)
-	-DMM_MODULE_NAME=\"shared-icera\" \
-	$(NULL)
-libmm_shared_icera_la_LDFLAGS = $(SHARED_COMMON_LINKER_FLAGS)
-libmm_shared_icera_la_LIBADD = \
-	$(builddir)/libhelpers-icera.la \
-	$(NULL)
-
-ICERA_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/icera
-
-endif
-
-################################################################################
-# common sierra support
-################################################################################
-
-if WITH_SHARED_SIERRA
-
-noinst_LTLIBRARIES += libhelpers-sierra.la
-libhelpers_sierra_la_SOURCES = \
-	sierra/mm-modem-helpers-sierra.c \
-	sierra/mm-modem-helpers-sierra.h \
-	$(NULL)
-libhelpers_sierra_la_CPPFLAGS = \
-	-DMM_MODULE_NAME=\"shared-sierra\" \
-	$(NULL)
-
-noinst_PROGRAMS += test-modem-helpers-sierra
-test_modem_helpers_sierra_SOURCES = \
-	sierra/tests/test-modem-helpers-sierra.c \
-	$(NULL)
-test_modem_helpers_sierra_CPPFLAGS = \
-	-I$(top_srcdir)/plugins/sierra \
-	$(NULL)
-test_modem_helpers_sierra_LDADD = \
-	$(builddir)/libhelpers-sierra.la \
-	$(top_builddir)/src/libhelpers.la \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(NULL)
-
-pkglib_LTLIBRARIES += libmm-shared-sierra.la
-libmm_shared_sierra_la_SOURCES = \
-	sierra/mm-shared.c \
-	sierra/mm-common-sierra.c \
-	sierra/mm-common-sierra.h \
-	sierra/mm-sim-sierra.c \
-	sierra/mm-sim-sierra.h \
-	sierra/mm-broadband-bearer-sierra.c \
-	sierra/mm-broadband-bearer-sierra.h \
-	sierra/mm-broadband-modem-sierra.c  \
-	sierra/mm-broadband-modem-sierra.h  \
-	$(NULL)
-libmm_shared_sierra_la_CPPFLAGS = \
-	$(SHARED_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"shared-sierra\" \
-	$(NULL)
-libmm_shared_sierra_la_LDFLAGS = $(SHARED_COMMON_LINKER_FLAGS)
-libmm_shared_sierra_la_LIBADD = \
-	$(builddir)/libhelpers-sierra.la \
-	$(NULL)
-
-SIERRA_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/sierra
-
-endif
-
-################################################################################
-# common option support
-################################################################################
-
-if WITH_SHARED_OPTION
-
-pkglib_LTLIBRARIES += libmm-shared-option.la
-libmm_shared_option_la_SOURCES = \
-	option/mm-shared.c \
-	option/mm-shared-option.h \
-	option/mm-shared-option.c \
-	option/mm-sim-option.c \
-	option/mm-sim-option.h \
-	option/mm-broadband-modem-option.c \
-	option/mm-broadband-modem-option.h \
-	$(NULL)
-libmm_shared_option_la_CPPFLAGS = $(SHARED_COMMON_COMPILER_FLAGS)
-libmm_shared_option_la_LDFLAGS = $(SHARED_COMMON_LINKER_FLAGS)
-
-OPTION_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/option
-
-endif
-
-################################################################################
-# common novatel support
-################################################################################
-
-if WITH_SHARED_NOVATEL
-
-# Common Novatel modem support library
-pkglib_LTLIBRARIES += libmm-shared-novatel.la
-libmm_shared_novatel_la_SOURCES = \
-	novatel/mm-shared.c \
-	novatel/mm-common-novatel.c \
-	novatel/mm-common-novatel.h \
-	novatel/mm-broadband-modem-novatel.c \
-	novatel/mm-broadband-modem-novatel.h \
-	$(NULL)
-libmm_shared_novatel_la_CPPFLAGS = \
-	$(SHARED_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"shared-novatel\" \
-	$(NULL)
-libmm_shared_novatel_la_LDFLAGS = $(SHARED_COMMON_LINKER_FLAGS)
-
-NOVATEL_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/novatel
-
-endif
-
-################################################################################
-# common xmm support
-################################################################################
-
-if WITH_SHARED_XMM
-
-noinst_LTLIBRARIES += libhelpers-xmm.la
-libhelpers_xmm_la_SOURCES = \
-	xmm/mm-modem-helpers-xmm.c \
-	xmm/mm-modem-helpers-xmm.h \
-	$(NULL)
-libhelpers_xmm_la_CPPFLAGS = \
-	-DMM_MODULE_NAME=\"shared-xmm\" \
-	$(NULL)
-
-noinst_PROGRAMS += test-modem-helpers-xmm
-test_modem_helpers_xmm_SOURCES = \
-	xmm/tests/test-modem-helpers-xmm.c \
-	$(NULL)
-test_modem_helpers_xmm_CPPFLAGS = \
-	-I$(top_srcdir)/plugins/xmm \
-	$(NULL)
-test_modem_helpers_xmm_LDADD = \
-	$(builddir)/libhelpers-xmm.la  \
-	$(top_builddir)/src/libhelpers.la \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(NULL)
-
-pkglib_LTLIBRARIES += libmm-shared-xmm.la
-libmm_shared_xmm_la_SOURCES = \
-	xmm/mm-shared.c \
-	xmm/mm-shared-xmm.h \
-	xmm/mm-shared-xmm.c \
-	xmm/mm-broadband-modem-xmm.h \
-	xmm/mm-broadband-modem-xmm.c \
-	$(NULL)
-
-if WITH_MBIM
-libmm_shared_xmm_la_SOURCES += \
-	xmm/mm-broadband-modem-mbim-xmm.h \
-	xmm/mm-broadband-modem-mbim-xmm.c \
-	$(NULL)
-endif
-
-libmm_shared_xmm_la_CPPFLAGS = \
-	$(SHARED_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"shared-xmm\" \
-	$(NULL)
-libmm_shared_xmm_la_LDFLAGS = $(SHARED_COMMON_LINKER_FLAGS)
-libmm_shared_xmm_la_LIBADD = \
-	$(builddir)/libhelpers-xmm.la \
-	$(NULL)
-
-XMM_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/xmm
-
-endif
-
-################################################################################
-# common telit support
-################################################################################
-
-if WITH_SHARED_TELIT
-
-TELIT_ENUMS_INPUTS = \
-	$(top_srcdir)/plugins/telit/mm-modem-helpers-telit.h \
-	$(NULL)
-
-TELIT_ENUMS_GENERATED = \
-	telit/mm-telit-enums-types.h \
-	telit/mm-telit-enums-types.c \
-	$(NULL)
-
-BUILT_SOURCES += $(TELIT_ENUMS_GENERATED)
-CLEANFILES    += $(TELIT_ENUMS_GENERATED)
-
-telit/mm-telit-enums-types.h: Makefile.am $(TELIT_ENUMS_INPUTS) $(top_srcdir)/build-aux/mm-enums-types.h.template
-	$(AM_V_GEN) \
-		$(MKDIR_P) telit; \
-		$(GLIB_MKENUMS) \
-			--fhead "#include \"mm-modem-helpers-telit.h\"\n#ifndef __MM_TELIT_ENUMS_TYPES_H__\n#define __MM_TELIT_ENUMS_TYPES_H__\n" \
-			--template $(top_srcdir)/build-aux/mm-enums-types.h.template \
-			--ftail "#endif /* __MM_TELIT_ENUMS_TYPES_H__ */\n" \
-			$(TELIT_ENUMS_INPUTS) > $@
-
-telit/mm-telit-enums-types.c: Makefile.am $(top_srcdir)/build-aux/mm-enums-types.c.template telit/mm-telit-enums-types.h
-	$(AM_V_GEN) \
-		$(MKDIR_P) telit; \
-		$(GLIB_MKENUMS) \
-			--fhead "#include \"mm-telit-enums-types.h\"" \
-			--template $(top_srcdir)/build-aux/mm-enums-types.c.template \
-			$(TELIT_ENUMS_INPUTS) > $@
-
-noinst_LTLIBRARIES += libhelpers-telit.la
-libhelpers_telit_la_SOURCES = \
-	telit/mm-modem-helpers-telit.c \
-	telit/mm-modem-helpers-telit.h \
-	$(NULL)
-libhelpers_telit_la_CPPFLAGS = \
-	-DMM_MODULE_NAME=\"shared-telit\" \
-	-I$(top_srcdir)/plugins/telit \
-	-I$(top_builddir)/plugins/telit \
-	$(NULL)
-nodist_libhelpers_telit_la_SOURCES = $(TELIT_ENUMS_GENERATED)
-
-noinst_PROGRAMS += test-modem-helpers-telit
-test_modem_helpers_telit_SOURCES = \
-	telit/tests/test-mm-modem-helpers-telit.c \
-	$(NULL)
-test_modem_helpers_telit_CPPFLAGS = \
-	-I$(top_srcdir)/plugins/telit \
-	-I$(top_builddir)/plugins/telit \
-	$(TEST_COMMON_COMPILER_FLAGS) \
-	$(NULL)
-test_modem_helpers_telit_LDADD = \
-	$(TEST_COMMON_LIBADD_FLAGS) \
-	$(builddir)/libhelpers-telit.la \
-	$(top_builddir)/src/libhelpers.la \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(NULL)
-
-# Common telit modem support library
-pkglib_LTLIBRARIES += libmm-shared-telit.la
-libmm_shared_telit_la_SOURCES = \
-	telit/mm-shared.c \
-	telit/mm-common-telit.c \
-	telit/mm-common-telit.h \
-	telit/mm-shared-telit.c \
-	telit/mm-shared-telit.h \
-	telit/mm-broadband-modem-telit.c \
-	telit/mm-broadband-modem-telit.h \
-	$(NULL)
-if WITH_MBIM
-libmm_shared_telit_la_SOURCES += \
-	telit/mm-broadband-modem-mbim-telit.h \
-	telit/mm-broadband-modem-mbim-telit.c \
-	$(NULL)
-endif
-
-libmm_shared_telit_la_CPPFLAGS = \
-	-I$(top_srcdir)/plugins/telit \
-	-I$(top_builddir)/plugins/telit \
-	$(SHARED_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"shared-telit\" \
-	$(NULL)
-libmm_shared_telit_la_LDFLAGS = $(SHARED_COMMON_LINKER_FLAGS)
-libmm_shared_telit_la_LIBADD = \
-	$(builddir)/libhelpers-telit.la \
-	$(NULL)
-
-TELIT_COMMON_COMPILER_FLAGS = \
-	-I$(top_srcdir)/plugins/telit \
-	-I$(top_builddir)/plugins/telit \
-	$(NULL)
-
-endif
-
-################################################################################
-# common foxconn support
-################################################################################
-
-# Common Foxconn modem support library (MBIM only)
-if WITH_SHARED_FOXCONN
-if WITH_MBIM
-pkglib_LTLIBRARIES += libmm-shared-foxconn.la
-libmm_shared_foxconn_la_SOURCES = \
-	foxconn/mm-shared.c \
-	foxconn/mm-broadband-modem-mbim-foxconn.c \
-	foxconn/mm-broadband-modem-mbim-foxconn.h \
-	$(NULL)
-libmm_shared_foxconn_la_CPPFLAGS = \
-	$(SHARED_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"shared-foxconn\" \
-	$(NULL)
-libmm_shared_foxconn_la_LDFLAGS = $(SHARED_COMMON_LINKER_FLAGS)
-
-FOXCONN_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/foxconn
-endif
-endif
-
-################################################################################
-# common fibocom support
-################################################################################
-
-# Common Fibocom modem support library (MBIM only)
-if WITH_SHARED_FIBOCOM
-if WITH_MBIM
-pkglib_LTLIBRARIES += libmm-shared-fibocom.la
-libmm_shared_fibocom_la_SOURCES = \
-	fibocom/mm-shared.c \
-	fibocom/mm-shared-fibocom.h \
-	fibocom/mm-shared-fibocom.c \
-	$(NULL)
-
-libmm_shared_fibocom_la_CPPFLAGS = \
-	$(SHARED_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"shared-fibocom\" \
-	$(NULL)
-libmm_shared_fibocom_la_LDFLAGS = $(SHARED_COMMON_LINKER_FLAGS)
-libmm_shared_fibocom_la_LIBADD = $(NULL)
-
-FIBOCOM_COMMON_COMPILER_FLAGS = -I$(top_srcdir)/plugins/fibocom
-endif
-endif
-
-################################################################################
-# plugin: generic
-################################################################################
-
-if ENABLE_PLUGIN_GENERIC
-
-pkglib_LTLIBRARIES += libmm-plugin-generic.la
-libmm_plugin_generic_la_SOURCES = \
-	generic/mm-plugin-generic.c \
-	generic/mm-plugin-generic.h \
-	$(NULL)
-libmm_plugin_generic_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"generic\" \
-	$(NULL)
-libmm_plugin_generic_la_LDFLAGS  = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-noinst_PROGRAMS += test-service-generic
-test_service_generic_SOURCES  = generic/tests/test-service-generic.c
-test_service_generic_CPPFLAGS = $(TEST_COMMON_COMPILER_FLAGS)
-test_service_generic_LDADD    = \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(TEST_COMMON_LIBADD_FLAGS) \
-	$(NULL)
-
-endif
-
-################################################################################
-# plugin: altair lte
-################################################################################
-
-if ENABLE_PLUGIN_ALTAIR_LTE
-
-noinst_LTLIBRARIES += libhelpers-altair-lte.la
-libhelpers_altair_lte_la_SOURCES = \
-	altair/mm-modem-helpers-altair-lte.c \
-	altair/mm-modem-helpers-altair-lte.h \
-	$(NULL)
-libhelpers_altair_lte_la_CPPFLAGS = \
-	-DMM_MODULE_NAME=\"altair-lte\" \
-	$(NULL)
-
-noinst_PROGRAMS += test-modem-helpers-altair-lte
-test_modem_helpers_altair_lte_SOURCES = \
-	altair/tests/test-modem-helpers-altair-lte.c \
-	$(NULL)
-test_modem_helpers_altair_lte_CPPFLAGS = \
-	-I$(top_srcdir)/plugins/altair \
-	$(NULL)
-test_modem_helpers_altair_lte_LDADD   = \
-	$(builddir)/libhelpers-altair-lte.la \
-	$(top_builddir)/src/libhelpers.la \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(NULL)
-
-pkglib_LTLIBRARIES += libmm-plugin-altair-lte.la
-libmm_plugin_altair_lte_la_SOURCES = \
-	altair/mm-plugin-altair-lte.c \
-	altair/mm-plugin-altair-lte.h \
-	altair/mm-broadband-modem-altair-lte.c \
-	altair/mm-broadband-modem-altair-lte.h \
-	altair/mm-broadband-bearer-altair-lte.c \
-	altair/mm-broadband-bearer-altair-lte.h \
-	$(NULL)
-libmm_plugin_altair_lte_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"altair-lte\" \
-	$(NULL)
-libmm_plugin_altair_lte_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-libmm_plugin_altair_lte_la_LIBADD = $(builddir)/libhelpers-altair-lte.la
-
-endif
-
-################################################################################
-# plugin: anydata
-################################################################################
-
-if ENABLE_PLUGIN_ANYDATA
-
-pkglib_LTLIBRARIES += libmm-plugin-anydata.la
-libmm_plugin_anydata_la_SOURCES = \
-	anydata/mm-plugin-anydata.c \
-	anydata/mm-plugin-anydata.h \
-	anydata/mm-broadband-modem-anydata.h \
-	anydata/mm-broadband-modem-anydata.c \
-	$(NULL)
-libmm_plugin_anydata_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"anydata\" \
-	$(NULL)
-libmm_plugin_anydata_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-endif
-
-################################################################################
-# plugin: broadmobi
-################################################################################
-
-if ENABLE_PLUGIN_BROADMOBI
-
-pkglib_LTLIBRARIES += libmm-plugin-broadmobi.la
-libmm_plugin_broadmobi_la_SOURCES = \
-	broadmobi/mm-plugin-broadmobi.c \
-	broadmobi/mm-plugin-broadmobi.h \
-	$(NULL)
-libmm_plugin_broadmobi_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"broadmobi\" \
-	$(NULL)
-libmm_plugin_broadmobi_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-dist_udevrules_DATA += broadmobi/77-mm-broadmobi-port-types.rules
-
-AM_CFLAGS += -DTESTUDEVRULESDIR_BROADMOBI=\"${srcdir}/broadmobi\"
-
-endif
-
-################################################################################
-# plugin: cinterion (previously siemens)
-################################################################################
-
-if ENABLE_PLUGIN_CINTERION
-
-noinst_LTLIBRARIES += libhelpers-cinterion.la
-libhelpers_cinterion_la_SOURCES = \
-	cinterion/mm-modem-helpers-cinterion.c \
-	cinterion/mm-modem-helpers-cinterion.h \
-	$(NULL)
-libhelpers_cinterion_la_CPPFLAGS = \
-	-DMM_MODULE_NAME=\"cinterion\" \
-	$(NULL)
-
-noinst_PROGRAMS += test-modem-helpers-cinterion
-test_modem_helpers_cinterion_SOURCES = \
-	cinterion/tests/test-modem-helpers-cinterion.c \
-	$(NULL)
-test_modem_helpers_cinterion_CPPFLAGS = \
-	-I$(top_srcdir)/plugins/cinterion \
-	$(NULL)
-test_modem_helpers_cinterion_LDADD = \
-	$(builddir)/libhelpers-cinterion.la \
-	$(top_builddir)/src/libport.la \
-	$(top_builddir)/src/libhelpers.la \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(NULL)
-
-pkglib_LTLIBRARIES += libmm-plugin-cinterion.la
-libmm_plugin_cinterion_la_SOURCES = \
-	cinterion/mm-plugin-cinterion.c \
-	cinterion/mm-plugin-cinterion.h \
-	cinterion/mm-shared-cinterion.c \
-	cinterion/mm-shared-cinterion.h \
-	cinterion/mm-broadband-modem-cinterion.c \
-	cinterion/mm-broadband-modem-cinterion.h \
-	cinterion/mm-broadband-bearer-cinterion.c \
-	cinterion/mm-broadband-bearer-cinterion.h \
-	$(NULL)
-if WITH_QMI
-libmm_plugin_cinterion_la_SOURCES += \
-	cinterion/mm-broadband-modem-qmi-cinterion.c \
-	cinterion/mm-broadband-modem-qmi-cinterion.h \
-	$(NULL)
-endif
-if WITH_MBIM
-libmm_plugin_cinterion_la_SOURCES += \
-	cinterion/mm-broadband-modem-mbim-cinterion.c \
-	cinterion/mm-broadband-modem-mbim-cinterion.h \
-	$(NULL)
-endif
-libmm_plugin_cinterion_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"cinterion\" \
-	$(NULL)
-libmm_plugin_cinterion_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-libmm_plugin_cinterion_la_LIBADD = $(builddir)/libhelpers-cinterion.la
-
-dist_udevrules_DATA += cinterion/77-mm-cinterion-port-types.rules
-
-AM_CFLAGS += -DTESTUDEVRULESDIR_CINTERION=\"${srcdir}/cinterion\"
-
-endif
-
-################################################################################
-# plugin: dell (novatel, sierra, telit or foxconn)
-################################################################################
-
-if ENABLE_PLUGIN_DELL
-
-pkglib_LTLIBRARIES += libmm-plugin-dell.la
-libmm_plugin_dell_la_SOURCES = \
-	dell/mm-plugin-dell.c \
-	dell/mm-plugin-dell.h \
-	$(NULL)
-
-libmm_plugin_dell_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	$(NOVATEL_COMMON_COMPILER_FLAGS) \
-	$(SIERRA_COMMON_COMPILER_FLAGS) \
-	$(TELIT_COMMON_COMPILER_FLAGS) \
-	$(XMM_COMMON_COMPILER_FLAGS) \
-	$(FOXCONN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"dell\" \
-	$(NULL)
-libmm_plugin_dell_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-dist_udevrules_DATA += dell/77-mm-dell-port-types.rules
-
-AM_CFLAGS += \
-	-DTESTUDEVRULESDIR_DELL=\"${srcdir}/dell\" \
-	$(NULL)
-
-endif
-
-################################################################################
-# plugin: dlink
-################################################################################
-
-if ENABLE_PLUGIN_DLINK
-
-pkglib_LTLIBRARIES += libmm-plugin-dlink.la
-libmm_plugin_dlink_la_SOURCES = \
-	dlink/mm-plugin-dlink.c \
-	dlink/mm-plugin-dlink.h \
-	$(NULL)
-libmm_plugin_dlink_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"d-link\" \
-	$(NULL)
-libmm_plugin_dlink_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-dist_udevrules_DATA += dlink/77-mm-dlink-port-types.rules
-
-AM_CFLAGS += -DTESTUDEVRULESDIR_DLINK=\"${srcdir}/dlink\"
-
-endif
-
-################################################################################
-# plugin: fibocom
-################################################################################
-
-if ENABLE_PLUGIN_FIBOCOM
-
-pkglib_LTLIBRARIES += libmm-plugin-fibocom.la
-libmm_plugin_fibocom_la_SOURCES = \
-	fibocom/mm-broadband-bearer-fibocom-ecm.c \
-	fibocom/mm-broadband-bearer-fibocom-ecm.h \
-	fibocom/mm-broadband-modem-fibocom.c \
-	fibocom/mm-broadband-modem-fibocom.h \
-	fibocom/mm-plugin-fibocom.c \
-	fibocom/mm-plugin-fibocom.h \
-	$(NULL)
-if WITH_MBIM
-libmm_plugin_fibocom_la_SOURCES += \
-	fibocom/mm-broadband-modem-mbim-xmm-fibocom.c \
-	fibocom/mm-broadband-modem-mbim-xmm-fibocom.h \
-	fibocom/mm-broadband-modem-mbim-fibocom.c \
-	fibocom/mm-broadband-modem-mbim-fibocom.h \
-	$(NULL)
-endif
-libmm_plugin_fibocom_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	$(XMM_COMMON_COMPILER_FLAGS) \
-	$(FIBOCOM_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"fibocom\" \
-	$(NULL)
-libmm_plugin_fibocom_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-dist_udevrules_DATA += fibocom/77-mm-fibocom-port-types.rules
-
-AM_CFLAGS += -DTESTUDEVRULESDIR_FIBOCOM=\"${srcdir}/fibocom\"
-
-endif
-
-################################################################################
-# plugin: foxconn
-################################################################################
-
-if ENABLE_PLUGIN_FOXCONN
-
-pkglib_LTLIBRARIES += libmm-plugin-foxconn.la
-libmm_plugin_foxconn_la_SOURCES = \
-	foxconn/mm-plugin-foxconn.c \
-	foxconn/mm-plugin-foxconn.h \
-	$(NULL)
-libmm_plugin_foxconn_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	$(FOXCONN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"foxconn\" \
-	$(NULL)
-libmm_plugin_foxconn_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-dist_udevrules_DATA += foxconn/77-mm-foxconn-port-types.rules
-
-dist_pkgdata_DATA += \
-	foxconn/mm-foxconn-t77w968-carrier-mapping.conf \
-	$(NULL)
-
-AM_CFLAGS += \
-	-DTESTUDEVRULESDIR_FOXCONN=\"${srcdir}/foxconn\" \
-	-DTESTKEYFILE_FOXCONN_T77W968=\"${srcdir}/foxconn/mm-foxconn-t77w968-carrier-mapping.conf\" \
-	$(NULL)
-
-endif
-
-################################################################################
-# plugin: gosuncn
-################################################################################
-
-if ENABLE_PLUGIN_GOSUNCN
-
-pkglib_LTLIBRARIES += libmm-plugin-gosuncn.la
-libmm_plugin_gosuncn_la_SOURCES = \
-	gosuncn/mm-plugin-gosuncn.c \
-	gosuncn/mm-plugin-gosuncn.h \
-	$(NULL)
-libmm_plugin_gosuncn_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"gosuncn\" \
-	$(NULL)
-libmm_plugin_gosuncn_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-dist_udevrules_DATA += gosuncn/77-mm-gosuncn-port-types.rules
-
-AM_CFLAGS += -DTESTUDEVRULESDIR_GOSUNCN=\"${srcdir}/gosuncn\"
-
-endif
-
-################################################################################
-# plugin: haier
-################################################################################
-
-if ENABLE_PLUGIN_HAIER
-
-pkglib_LTLIBRARIES += libmm-plugin-haier.la
-libmm_plugin_haier_la_SOURCES = \
-	haier/mm-plugin-haier.c \
-	haier/mm-plugin-haier.h \
-	$(NULL)
-libmm_plugin_haier_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"haier\" \
-	$(NULL)
-libmm_plugin_haier_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-dist_udevrules_DATA += haier/77-mm-haier-port-types.rules
-
-AM_CFLAGS += -DTESTUDEVRULESDIR_HAIER=\"${srcdir}/haier\"
-
-endif
-
-################################################################################
-# plugin: huawei
-################################################################################
-
-if ENABLE_PLUGIN_HUAWEI
-
-HUAWEI_ENUMS_INPUTS = \
-	$(top_srcdir)/plugins/huawei/mm-modem-helpers-huawei.h \
-	$(NULL)
-
-HUAWEI_ENUMS_GENERATED = \
-	huawei/mm-huawei-enums-types.h \
-	huawei/mm-huawei-enums-types.c \
-	$(NULL)
-
-BUILT_SOURCES += $(HUAWEI_ENUMS_GENERATED)
-CLEANFILES    += $(HUAWEI_ENUMS_GENERATED)
-
-huawei/mm-huawei-enums-types.h: Makefile.am $(HUAWEI_ENUMS_INPUTS) $(top_srcdir)/build-aux/mm-enums-types.h.template
-	$(AM_V_GEN) \
-		$(MKDIR_P) huawei; \
-		$(GLIB_MKENUMS) \
-			--fhead "#include \"mm-modem-helpers-huawei.h\"\n#ifndef __MM_HUAWEI_ENUMS_TYPES_H__\n#define __MM_HUAWEI_ENUMS_TYPES_H__\n" \
-			--template $(top_srcdir)/build-aux/mm-enums-types.h.template \
-			--ftail "#endif /* __MM_HUAWEI_ENUMS_TYPES_H__ */\n" \
-			$(HUAWEI_ENUMS_INPUTS) > $@
-
-huawei/mm-huawei-enums-types.c: Makefile.am $(top_srcdir)/build-aux/mm-enums-types.c.template huawei/mm-huawei-enums-types.h
-	$(AM_V_GEN) \
-		$(MKDIR_P) huawei; \
-		$(GLIB_MKENUMS) \
-			--fhead "#include \"mm-huawei-enums-types.h\"" \
-			--template $(top_srcdir)/build-aux/mm-enums-types.c.template \
-			$(HUAWEI_ENUMS_INPUTS) > $@
-
-noinst_LTLIBRARIES += libhelpers-huawei.la
-libhelpers_huawei_la_SOURCES = \
-	huawei/mm-modem-helpers-huawei.c \
-	huawei/mm-modem-helpers-huawei.h \
-	$(NULL)
-libhelpers_huawei_la_CPPFLAGS = \
-	-DMM_MODULE_NAME=\"huawei\" \
-	-I$(top_srcdir)/plugins/huawei \
-	-I$(top_builddir)/plugins/huawei \
-	$(NULL)
-nodist_libhelpers_huawei_la_SOURCES = $(HUAWEI_ENUMS_GENERATED)
-
-noinst_PROGRAMS += test-modem-helpers-huawei
-test_modem_helpers_huawei_SOURCES = \
-	huawei/tests/test-modem-helpers-huawei.c \
-	$(NULL)
-test_modem_helpers_huawei_CPPFLAGS = \
-	-I$(top_srcdir)/plugins/huawei \
-	-I$(top_builddir)/plugins/huawei \
-	$(NULL)
-test_modem_helpers_huawei_LDADD = \
-	$(builddir)/libhelpers-huawei.la \
-	$(top_builddir)/src/libhelpers.la \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(NULL)
-
-pkglib_LTLIBRARIES += libmm-plugin-huawei.la
-libmm_plugin_huawei_la_SOURCES = \
-	huawei/mm-plugin-huawei.c \
-	huawei/mm-plugin-huawei.h \
-	huawei/mm-sim-huawei.c \
-	huawei/mm-sim-huawei.h \
-	huawei/mm-broadband-modem-huawei.c \
-	huawei/mm-broadband-modem-huawei.h \
-	huawei/mm-broadband-bearer-huawei.c \
-	huawei/mm-broadband-bearer-huawei.h \
-	$(NULL)
-libmm_plugin_huawei_la_CPPFLAGS = \
-	-I$(top_srcdir)/plugins/huawei \
-	-I$(top_builddir)/plugins/huawei \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"huawei\" \
-	$(NULL)
-libmm_plugin_huawei_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-libmm_plugin_huawei_la_LIBADD = $(builddir)/libhelpers-huawei.la
-
-dist_udevrules_DATA += huawei/77-mm-huawei-net-port-types.rules
-
-AM_CFLAGS += -DTESTUDEVRULESDIR_HUAWEI=\"${srcdir}/huawei\"
-
-endif
-
-################################################################################
-# plugin: intel
-################################################################################
-
-if ENABLE_PLUGIN_INTEL
-
-pkglib_LTLIBRARIES += libmm-plugin-intel.la
-libmm_plugin_intel_la_SOURCES = \
-    intel/mm-plugin-intel.c \
-    intel/mm-plugin-intel.h \
-    $(NULL)
-if WITH_MBIM
-libmm_plugin_intel_la_SOURCES += \
-    intel/mm-broadband-modem-mbim-intel.h \
-    intel/mm-broadband-modem-mbim-intel.c \
-    $(NULL)
-endif
-
-libmm_plugin_intel_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	$(XMM_COMMON_COMPILER_FLAGS) \
-	$(FIBOCOM_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"intel\" \
-	$(NULL)
-libmm_plugin_intel_la_LDFLAGS  = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-endif
-
-################################################################################
-# plugin: iridium
-################################################################################
-
-if ENABLE_PLUGIN_IRIDIUM
-
-pkglib_LTLIBRARIES += libmm-plugin-iridium.la
-libmm_plugin_iridium_la_SOURCES = \
-	iridium/mm-plugin-iridium.c \
-	iridium/mm-plugin-iridium.h \
-	iridium/mm-broadband-modem-iridium.c \
-	iridium/mm-broadband-modem-iridium.h \
-	iridium/mm-bearer-iridium.c \
-	iridium/mm-bearer-iridium.h \
-	iridium/mm-sim-iridium.c \
-	iridium/mm-sim-iridium.h \
-	$(NULL)
-libmm_plugin_iridium_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"iridium\" \
-	$(NULL)
-libmm_plugin_iridium_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-endif
-
-################################################################################
-# plugin: linktop
-################################################################################
-
-if ENABLE_PLUGIN_LINKTOP
-
-noinst_LTLIBRARIES += libhelpers-linktop.la
-libhelpers_linktop_la_SOURCES = \
-	linktop/mm-modem-helpers-linktop.c \
-	linktop/mm-modem-helpers-linktop.h \
-	$(NULL)
-libhelpers_linktop_la_CPPFLAGS = \
-	-DMM_MODULE_NAME=\"linktop\" \
-	$(NULL)
-
-noinst_PROGRAMS += test-modem-helpers-linktop
-test_modem_helpers_linktop_SOURCES = \
-	linktop/tests/test-modem-helpers-linktop.c \
-	$(NULL)
-test_modem_helpers_linktop_CPPFLAGS = \
-	-I$(top_srcdir)/plugins/linktop \
-	$(NULL)
-test_modem_helpers_linktop_LDADD = \
-	$(builddir)/libhelpers-linktop.la \
-	$(top_builddir)/src/libhelpers.la \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(NULL)
-
-pkglib_LTLIBRARIES += libmm-plugin-linktop.la
-libmm_plugin_linktop_la_SOURCES = \
-	linktop/mm-plugin-linktop.c \
-	linktop/mm-plugin-linktop.h \
-	linktop/mm-broadband-modem-linktop.h \
-	linktop/mm-broadband-modem-linktop.c \
-	$(NULL)
-libmm_plugin_linktop_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"linktop\" \
-	$(NULL)
-libmm_plugin_linktop_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-libmm_plugin_linktop_la_LIBADD = $(builddir)/libhelpers-linktop.la
-
-dist_udevrules_DATA += linktop/77-mm-linktop-port-types.rules
-
-AM_CFLAGS += -DTESTUDEVRULESDIR_LINKTOP=\"${srcdir}/linktop\"
-
-endif
-
-################################################################################
-# plugin: longcheer (and rebranded dongles)
-################################################################################
-
-if ENABLE_PLUGIN_LONGCHEER
-
-pkglib_LTLIBRARIES += libmm-plugin-longcheer.la
-libmm_plugin_longcheer_la_SOURCES = \
-	longcheer/mm-plugin-longcheer.c \
-	longcheer/mm-plugin-longcheer.h \
-	longcheer/mm-broadband-modem-longcheer.h \
-	longcheer/mm-broadband-modem-longcheer.c \
-	$(NULL)
-libmm_plugin_longcheer_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"longcheer\" \
-	$(NULL)
-libmm_plugin_longcheer_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-dist_udevrules_DATA += longcheer/77-mm-longcheer-port-types.rules
-
-AM_CFLAGS += -DTESTUDEVRULESDIR_LONGCHEER=\"${srcdir}/longcheer\"
-
-endif
-
-################################################################################
-# plugin: ericsson mbm
-################################################################################
-
-if ENABLE_PLUGIN_MBM
-
-noinst_LTLIBRARIES += libhelpers-mbm.la
-libhelpers_mbm_la_SOURCES = \
-	mbm/mm-modem-helpers-mbm.c \
-	mbm/mm-modem-helpers-mbm.h \
-	$(NULL)
-libhelpers_mbm_la_CPPFLAGS = \
-	-DMM_MODULE_NAME=\"ericsson-mbm\" \
-	$(NULL)
-
-noinst_PROGRAMS += test-modem-helpers-mbm
-test_modem_helpers_mbm_SOURCES = \
-	mbm/tests/test-modem-helpers-mbm.c \
-	$(NULL)
-test_modem_helpers_mbm_CPPFLAGS = \
-	-I$(top_srcdir)/plugins/mbm \
-	$(NULL)
-test_modem_helpers_mbm_LDADD = \
-	$(builddir)/libhelpers-mbm.la \
-	$(top_builddir)/src/libhelpers.la \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(NULL)
-
-pkglib_LTLIBRARIES += libmm-plugin-ericsson-mbm.la
-libmm_plugin_ericsson_mbm_la_SOURCES = \
-	mbm/mm-broadband-modem-mbm.c \
-	mbm/mm-broadband-modem-mbm.h \
-	mbm/mm-broadband-bearer-mbm.c \
-	mbm/mm-broadband-bearer-mbm.h \
-	mbm/mm-sim-mbm.c \
-	mbm/mm-sim-mbm.h \
-	mbm/mm-plugin-mbm.c \
-	mbm/mm-plugin-mbm.h \
-	$(NULL)
-libmm_plugin_ericsson_mbm_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"ericsson-mbm\" \
-	$(NULL)
-libmm_plugin_ericsson_mbm_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-libmm_plugin_ericsson_mbm_la_LIBADD = $(builddir)/libhelpers-mbm.la
-
-dist_udevrules_DATA += mbm/77-mm-ericsson-mbm.rules
-
-AM_CFLAGS += -DTESTUDEVRULESDIR_MBM=\"${srcdir}/mbm\"
-
-endif
-
-################################################################################
-# plugin: motorola
-################################################################################
-
-if ENABLE_PLUGIN_MOTOROLA
-
-pkglib_LTLIBRARIES += libmm-plugin-motorola.la
-libmm_plugin_motorola_la_SOURCES = \
-	motorola/mm-plugin-motorola.c \
-	motorola/mm-plugin-motorola.h \
-	motorola/mm-broadband-modem-motorola.c \
-	motorola/mm-broadband-modem-motorola.h \
-	$(NULL)
-libmm_plugin_motorola_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"motorola\" \
-	$(NULL)
-libmm_plugin_motorola_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-endif
-
-################################################################################
-# plugin: mtk
-################################################################################
-
-if ENABLE_PLUGIN_MTK
-
-pkglib_LTLIBRARIES += libmm-plugin-mtk.la
-libmm_plugin_mtk_la_SOURCES = \
-	mtk/mm-plugin-mtk.c \
-	mtk/mm-plugin-mtk.h \
-	mtk/mm-broadband-modem-mtk.h \
-	mtk/mm-broadband-modem-mtk.c \
-	$(NULL)
-libmm_plugin_mtk_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"mtk\" \
-	$(NULL)
-libmm_plugin_mtk_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-dist_udevrules_DATA += mtk/77-mm-mtk-port-types.rules
-
-AM_CFLAGS += -DTESTUDEVRULESDIR_MTK=\"${srcdir}/mtk\"
-
-endif
-
-################################################################################
-# plugin: nokia
-################################################################################
-
-if ENABLE_PLUGIN_NOKIA
-
-pkglib_LTLIBRARIES += libmm-plugin-nokia.la
-libmm_plugin_nokia_la_SOURCES = \
-	nokia/mm-plugin-nokia.c \
-	nokia/mm-plugin-nokia.h \
-	nokia/mm-sim-nokia.c \
-	nokia/mm-sim-nokia.h \
-	nokia/mm-broadband-modem-nokia.c \
-	nokia/mm-broadband-modem-nokia.h \
-	$(NULL)
-libmm_plugin_nokia_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"nokia\" \
-	$(NULL)
-libmm_plugin_nokia_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-endif
-
-################################################################################
-# plugin: nokia (icera)
-################################################################################
-
-if ENABLE_PLUGIN_NOKIA_ICERA
-
-pkglib_LTLIBRARIES += libmm-plugin-nokia-icera.la
-libmm_plugin_nokia_icera_la_SOURCES = \
-	nokia/mm-plugin-nokia-icera.c \
-	nokia/mm-plugin-nokia-icera.h \
-	$(NULL)
-libmm_plugin_nokia_icera_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	$(ICERA_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"nokia-icera\" \
-	$(NULL)
-libmm_plugin_nokia_icera_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-dist_udevrules_DATA += nokia/77-mm-nokia-port-types.rules
-
-AM_CFLAGS += -DTESTUDEVRULESDIR_NOKIA_ICERA=\"${srcdir}/nokia\"
-
-endif
-
-################################################################################
-# plugin: novatel non-lte
-################################################################################
-
-if ENABLE_PLUGIN_NOVATEL
-
-pkglib_LTLIBRARIES += libmm-plugin-novatel.la
-libmm_plugin_novatel_la_SOURCES = \
-	novatel/mm-plugin-novatel.c \
-	novatel/mm-plugin-novatel.h \
-	$(NULL)
-libmm_plugin_novatel_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	$(NOVATEL_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"novatel\" \
-	$(NULL)
-libmm_plugin_novatel_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-endif
-
-################################################################################
-# plugin: novatel lte
-################################################################################
-
-if ENABLE_PLUGIN_NOVATEL_LTE
-
-pkglib_LTLIBRARIES += libmm-plugin-novatel-lte.la
-libmm_plugin_novatel_lte_la_SOURCES = \
-	novatel/mm-plugin-novatel-lte.c \
-	novatel/mm-plugin-novatel-lte.h \
-	novatel/mm-broadband-modem-novatel-lte.c \
-	novatel/mm-broadband-modem-novatel-lte.h \
-	novatel/mm-broadband-bearer-novatel-lte.c \
-	novatel/mm-broadband-bearer-novatel-lte.h \
-	novatel/mm-sim-novatel-lte.c \
-	novatel/mm-sim-novatel-lte.h \
-	$(NULL)
-libmm_plugin_novatel_lte_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"novatel-lte\" \
-	$(NULL)
-libmm_plugin_novatel_lte_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-endif
-
-################################################################################
-# plugin: option
-################################################################################
-
-if ENABLE_PLUGIN_OPTION
-
-pkglib_LTLIBRARIES += libmm-plugin-option.la
-libmm_plugin_option_la_SOURCES = \
-	option/mm-plugin-option.c \
-	option/mm-plugin-option.h \
-	$(NULL)
-libmm_plugin_option_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	$(OPTION_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"option\" \
-	$(NULL)
-libmm_plugin_option_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-endif
-
-################################################################################
-# plugin: option hso
-################################################################################
-
-if ENABLE_PLUGIN_OPTION_HSO
-
-pkglib_LTLIBRARIES += libmm-plugin-option-hso.la
-libmm_plugin_option_hso_la_SOURCES = \
-	option/mm-plugin-hso.c \
-	option/mm-plugin-hso.h \
-	option/mm-broadband-bearer-hso.c \
-	option/mm-broadband-bearer-hso.h \
-	option/mm-broadband-modem-hso.c \
-	option/mm-broadband-modem-hso.h \
-	$(NULL)
-libmm_plugin_option_hso_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	$(OPTION_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"option-hso\" \
-	$(NULL)
-libmm_plugin_option_hso_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-endif
-
-################################################################################
-# plugin: pantech
-################################################################################
-
-if ENABLE_PLUGIN_PANTECH
-
-pkglib_LTLIBRARIES += libmm-plugin-pantech.la
-libmm_plugin_pantech_la_SOURCES = \
-	pantech/mm-plugin-pantech.c \
-	pantech/mm-plugin-pantech.h \
-	pantech/mm-sim-pantech.c \
-	pantech/mm-sim-pantech.h \
-	pantech/mm-broadband-modem-pantech.c \
-	pantech/mm-broadband-modem-pantech.h \
-	$(NULL)
-libmm_plugin_pantech_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"pantech\" \
-	$(NULL)
-libmm_plugin_pantech_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-endif
-
-################################################################################
-# plugin: qcom-soc
-################################################################################
-
-if ENABLE_PLUGIN_QCOM_SOC
-if WITH_QMI
-pkglib_LTLIBRARIES += libmm-plugin-qcom-soc.la
-libmm_plugin_qcom_soc_la_SOURCES = \
-	qcom-soc/mm-plugin-qcom-soc.c \
-	qcom-soc/mm-plugin-qcom-soc.h \
-	qcom-soc/mm-broadband-modem-qmi-qcom-soc.c \
-	qcom-soc/mm-broadband-modem-qmi-qcom-soc.h \
-	$(NULL)
-libmm_plugin_qcom_soc_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"qcom-soc\" \
-	$(NULL)
-libmm_plugin_qcom_soc_la_LDFLAGS  = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-dist_udevrules_DATA += qcom-soc/77-mm-qcom-soc.rules
-
-AM_CFLAGS += -DTESTUDEVRULESDIR_QCOM_SOC=\"${srcdir}/qcom-soc/\"
-endif
-endif
-
-################################################################################
-# plugin: quectel
-################################################################################
-
-if ENABLE_PLUGIN_QUECTEL
-
-noinst_LTLIBRARIES += libhelpers-quectel.la
-libhelpers_quectel_la_SOURCES = \
-	quectel/mm-modem-helpers-quectel.c \
-	quectel/mm-modem-helpers-quectel.h \
-	$(NULL)
-libhelpers_quectel_la_CPPFLAGS = \
-	-DMM_MODULE_NAME=\"quectel\" \
-	$(NULL)
-
-noinst_PROGRAMS += test-modem-helpers-quectel
-test_modem_helpers_quectel_SOURCES = \
-	quectel/tests/test-modem-helpers-quectel.c \
-	$(NULL)
-test_modem_helpers_quectel_CPPFLAGS = \
-	-I$(top_srcdir)/plugins/quectel \
-	$(NULL)
-test_modem_helpers_quectel_LDADD = \
-	$(builddir)/libhelpers-quectel.la  \
-	$(top_builddir)/src/libhelpers.la \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(NULL)
-
-pkglib_LTLIBRARIES += libmm-plugin-quectel.la
-libmm_plugin_quectel_la_SOURCES = \
-	quectel/mm-plugin-quectel.c \
-	quectel/mm-plugin-quectel.h \
-	quectel/mm-shared-quectel.c \
-	quectel/mm-shared-quectel.h \
-	quectel/mm-broadband-modem-quectel.c \
-	quectel/mm-broadband-modem-quectel.h \
-	$(NULL)
-if WITH_QMI
-libmm_plugin_quectel_la_SOURCES += \
-	quectel/mm-broadband-modem-qmi-quectel.c \
-	quectel/mm-broadband-modem-qmi-quectel.h \
-	$(NULL)
-endif
-if WITH_MBIM
-libmm_plugin_quectel_la_SOURCES += \
-	quectel/mm-broadband-modem-mbim-quectel.c \
-	quectel/mm-broadband-modem-mbim-quectel.h \
-	$(NULL)
-endif
-libmm_plugin_quectel_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"quectel\" \
-	$(NULL)
-libmm_plugin_quectel_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-libmm_plugin_quectel_la_LIBADD = $(builddir)/libhelpers-quectel.la
-
-dist_udevrules_DATA += quectel/77-mm-quectel-port-types.rules
-AM_CFLAGS += -DTESTUDEVRULESDIR_QUECTEL=\"${srcdir}/quectel\"
-
-endif
-
-################################################################################
-# plugin: samsung
-################################################################################
-
-if ENABLE_PLUGIN_SAMSUNG
-
-pkglib_LTLIBRARIES += libmm-plugin-samsung.la
-libmm_plugin_samsung_la_SOURCES = \
-	samsung/mm-plugin-samsung.c \
-	samsung/mm-plugin-samsung.h \
-	samsung/mm-broadband-modem-samsung.c \
-	samsung/mm-broadband-modem-samsung.h \
-	$(NULL)
-libmm_plugin_samsung_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	$(ICERA_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"samsung\" \
-	$(NULL)
-libmm_plugin_samsung_la_LDFLAGS  = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-endif
-
-################################################################################
-# plugin: sierra (legacy)
-################################################################################
-
-if ENABLE_PLUGIN_SIERRA_LEGACY
-
-pkglib_LTLIBRARIES += libmm-plugin-sierra-legacy.la
-libmm_plugin_sierra_legacy_la_SOURCES = \
-	sierra/mm-plugin-sierra-legacy.c \
-	sierra/mm-plugin-sierra-legacy.h \
-	sierra/mm-broadband-modem-sierra-icera.c \
-	sierra/mm-broadband-modem-sierra-icera.h \
-	$(NULL)
-libmm_plugin_sierra_legacy_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	$(ICERA_COMMON_COMPILER_FLAGS) \
-	$(SIERRA_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"sierra-legacy\" \
-	$(NULL)
-libmm_plugin_sierra_legacy_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-endif
-
-################################################################################
-# plugin: sierra (new QMI or MBIM modems)
-################################################################################
-
-if ENABLE_PLUGIN_SIERRA
-
-dist_udevrules_DATA += sierra/77-mm-sierra.rules
-
-pkglib_LTLIBRARIES += libmm-plugin-sierra.la
-libmm_plugin_sierra_la_SOURCES = \
-	sierra/mm-plugin-sierra.c \
-	sierra/mm-plugin-sierra.h \
-	$(NULL)
-libmm_plugin_sierra_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	$(XMM_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"sierra\" \
-	$(NULL)
-libmm_plugin_sierra_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-endif
-
-################################################################################
-# plugin: simtech
-################################################################################
-
-if ENABLE_PLUGIN_SIMTECH
-
-noinst_LTLIBRARIES += libhelpers-simtech.la
-libhelpers_simtech_la_SOURCES = \
-	simtech/mm-modem-helpers-simtech.c \
-	simtech/mm-modem-helpers-simtech.h \
-	$(NULL)
-libhelpers_simtech_la_CPPFLAGS = \
-	-DMM_MODULE_NAME=\"simtech\" \
-	$(NULL)
-
-noinst_PROGRAMS += test-modem-helpers-simtech
-test_modem_helpers_simtech_SOURCES = \
-	simtech/tests/test-modem-helpers-simtech.c \
-	$(NULL)
-test_modem_helpers_simtech_CPPFLAGS = \
-	-I$(top_srcdir)/plugins/simtech \
-	$(NULL)
-test_modem_helpers_simtech_LDADD = \
-	$(builddir)/libhelpers-simtech.la \
-	$(top_builddir)/src/libhelpers.la \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(NULL)
-
-pkglib_LTLIBRARIES += libmm-plugin-simtech.la
-libmm_plugin_simtech_la_SOURCES = \
-	simtech/mm-plugin-simtech.c \
-	simtech/mm-plugin-simtech.h \
-	simtech/mm-shared-simtech.c \
-	simtech/mm-shared-simtech.h \
-	simtech/mm-broadband-modem-simtech.h \
-	simtech/mm-broadband-modem-simtech.c \
-	$(NULL)
-if WITH_QMI
-libmm_plugin_simtech_la_SOURCES += \
-	simtech/mm-broadband-modem-qmi-simtech.c \
-	simtech/mm-broadband-modem-qmi-simtech.h \
-	$(NULL)
-endif
-libmm_plugin_simtech_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"simtech\" \
-	$(NULL)
-libmm_plugin_simtech_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-libmm_plugin_simtech_la_LIBADD = $(builddir)/libhelpers-simtech.la
-
-dist_udevrules_DATA += simtech/77-mm-simtech-port-types.rules
-
-AM_CFLAGS += -DTESTUDEVRULESDIR_SIMTECH=\"${srcdir}/simtech\"
-
-endif
-
-################################################################################
-# plugin: telit
-################################################################################
-
-if ENABLE_PLUGIN_TELIT
-
-pkglib_LTLIBRARIES += libmm-plugin-telit.la
-libmm_plugin_telit_la_SOURCES = \
-	telit/mm-plugin-telit.c \
-	telit/mm-plugin-telit.h \
-	$(NULL)
-libmm_plugin_telit_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	$(TELIT_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"telit\" \
-	$(NULL)
-libmm_plugin_telit_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-dist_udevrules_DATA += telit/77-mm-telit-port-types.rules
-
-AM_CFLAGS += -DTESTUDEVRULESDIR_TELIT=\"${srcdir}/telit\"
-
-endif
-
-################################################################################
-# plugin: thuraya xt
-################################################################################
-
-if ENABLE_PLUGIN_THURAYA
-
-noinst_LTLIBRARIES += libhelpers-thuraya.la
-libhelpers_thuraya_la_SOURCES = \
-	thuraya/mm-modem-helpers-thuraya.c \
-	thuraya/mm-modem-helpers-thuraya.h \
-	$(NULL)
-libhelpers_thuraya_la_CPPFLAGS = \
-	-DMM_MODULE_NAME=\"thuraya\" \
-	$(NULL)
-
-noinst_PROGRAMS += test-modem-helpers-thuraya
-test_modem_helpers_thuraya_SOURCES = \
-	thuraya/tests/test-mm-modem-helpers-thuraya.c \
-	$(NULL)
-test_modem_helpers_thuraya_CPPFLAGS = \
-	-I$(top_srcdir)/plugins/thuraya \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	$(NULL)
-test_modem_helpers_thuraya_LDADD = \
-	$(builddir)/libhelpers-thuraya.la \
-	$(top_builddir)/src/libhelpers.la \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(NULL)
-
-pkglib_LTLIBRARIES += libmm-plugin-thuraya.la
-libmm_plugin_thuraya_la_SOURCES = \
-	thuraya/mm-plugin-thuraya.c \
-	thuraya/mm-plugin-thuraya.h \
-	thuraya/mm-broadband-modem-thuraya.c \
-	thuraya/mm-broadband-modem-thuraya.h \
-	$(NULL)
-libmm_plugin_thuraya_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"thuraya\" \
-	$(NULL)
-libmm_plugin_thuraya_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-libmm_plugin_thuraya_la_LIBADD = $(builddir)/libhelpers-thuraya.la
-
-endif
-
-################################################################################
-# plugin: tplink
-################################################################################
-
-if ENABLE_PLUGIN_TPLINK
-
-pkglib_LTLIBRARIES += libmm-plugin-tplink.la
-libmm_plugin_tplink_la_SOURCES = \
-	tplink/mm-plugin-tplink.c \
-	tplink/mm-plugin-tplink.h \
-	$(NULL)
-libmm_plugin_tplink_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"tp-link\" \
-	$(NULL)
-libmm_plugin_tplink_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-dist_udevrules_DATA += tplink/77-mm-tplink-port-types.rules
-
-AM_CFLAGS += -DTESTUDEVRULESDIR_TPLINK=\"${srcdir}/tplink\"
-
-endif
-
-################################################################################
-# plugin: u-blox
-################################################################################
-
-if ENABLE_PLUGIN_UBLOX
-
-dist_udevrules_DATA += ublox/77-mm-ublox-port-types.rules
-
-PLUGIN_UBLOX_COMPILER_FLAGS = \
-	-I$(top_srcdir)/plugins/ublox \
-	-I$(top_builddir)/plugins/ublox \
-	$(NULL)
-
-noinst_LTLIBRARIES += libhelpers-ublox.la
-
-UBLOX_ENUMS_INPUTS = \
-	$(top_srcdir)/plugins/ublox/mm-modem-helpers-ublox.h \
-	$(NULL)
-
-UBLOX_ENUMS_GENERATED = \
-	ublox/mm-ublox-enums-types.h \
-	ublox/mm-ublox-enums-types.c \
-	$(NULL)
-
-ublox/mm-ublox-enums-types.h: Makefile.am $(UBLOX_ENUMS_INPUTS) $(top_srcdir)/build-aux/mm-enums-types.h.template
-	$(AM_V_GEN) \
-		$(MKDIR_P) ublox; \
-		$(GLIB_MKENUMS) \
-			--fhead "#include \"mm-modem-helpers-ublox.h\"\n#ifndef __MM_UBLOX_ENUMS_TYPES_H__\n#define __MM_UBLOX_ENUMS_TYPES_H__\n" \
-			--template $(top_srcdir)/build-aux/mm-enums-types.h.template \
-			--ftail "#endif /* __MM_UBLOX_ENUMS_TYPES_H__ */\n" \
-			$(UBLOX_ENUMS_INPUTS) > $@
-
-ublox/mm-ublox-enums-types.c: Makefile.am $(top_srcdir)/build-aux/mm-enums-types.c.template ublox/mm-ublox-enums-types.h
-	$(AM_V_GEN) \
-		$(MKDIR_P) ublox; \
-		$(GLIB_MKENUMS) \
-			--fhead "#include \"mm-ublox-enums-types.h\"" \
-			--template $(top_srcdir)/build-aux/mm-enums-types.c.template \
-			$(UBLOX_ENUMS_INPUTS) > $@
-
-libhelpers_ublox_la_SOURCES = \
-	ublox/mm-modem-helpers-ublox.c \
-	ublox/mm-modem-helpers-ublox.h \
-	$(NULL)
-
-nodist_libhelpers_ublox_la_SOURCES = $(UBLOX_ENUMS_GENERATED)
-
-libhelpers_ublox_la_CPPFLAGS = \
-	$(PLUGIN_UBLOX_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"u-blox\" \
-	$(NULL)
-
-BUILT_SOURCES += $(UBLOX_ENUMS_GENERATED)
-CLEANFILES    += $(UBLOX_ENUMS_GENERATED)
-
-noinst_PROGRAMS += test-modem-helpers-ublox
-test_modem_helpers_ublox_SOURCES = \
-	ublox/tests/test-modem-helpers-ublox.c \
-	$(NULL)
-test_modem_helpers_ublox_CPPFLAGS = \
-	$(PLUGIN_UBLOX_COMPILER_FLAGS) \
-	$(TEST_COMMON_COMPILER_FLAGS) \
-	$(NULL)
-test_modem_helpers_ublox_LDADD = \
-	$(TEST_COMMON_LIBADD_FLAGS) \
-	$(builddir)/libhelpers-ublox.la \
-	$(top_builddir)/src/libhelpers.la \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(NULL)
-
-pkglib_LTLIBRARIES += libmm-plugin-ublox.la
-libmm_plugin_ublox_la_SOURCES = \
-	ublox/mm-plugin-ublox.c \
-	ublox/mm-plugin-ublox.h \
-	ublox/mm-broadband-bearer-ublox.h \
-	ublox/mm-broadband-bearer-ublox.c \
-	ublox/mm-broadband-modem-ublox.h \
-	ublox/mm-broadband-modem-ublox.c \
-	ublox/mm-sim-ublox.c \
-	ublox/mm-sim-ublox.h \
-	$(NULL)
-libmm_plugin_ublox_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	$(PLUGIN_UBLOX_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"u-blox\" \
-	$(NULL)
-libmm_plugin_ublox_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-libmm_plugin_ublox_la_LIBADD = $(builddir)/libhelpers-ublox.la
-
-endif
-
-################################################################################
-# plugin: via
-################################################################################
-
-if ENABLE_PLUGIN_VIA
-
-pkglib_LTLIBRARIES += libmm-plugin-via.la
-libmm_plugin_via_la_SOURCES = \
-	via/mm-plugin-via.c \
-	via/mm-plugin-via.h \
-	via/mm-broadband-modem-via.c \
-	via/mm-broadband-modem-via.h \
-	$(NULL)
-libmm_plugin_via_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"via\" \
-	$(NULL)
-libmm_plugin_via_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-endif
-
-################################################################################
-# plugin: wavecom (now sierra airlink)
-################################################################################
-
-if ENABLE_PLUGIN_WAVECOM
-
-pkglib_LTLIBRARIES += libmm-plugin-wavecom.la
-libmm_plugin_wavecom_la_SOURCES = \
-	wavecom/mm-plugin-wavecom.c \
-	wavecom/mm-plugin-wavecom.h \
-	wavecom/mm-broadband-modem-wavecom.c \
-	wavecom/mm-broadband-modem-wavecom.h \
-	$(NULL)
-libmm_plugin_wavecom_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"wavecom\" \
-	$(NULL)
-libmm_plugin_wavecom_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-endif
-
-################################################################################
-# plugin: alcatel/TCT/JRD x220D and possibly others
-################################################################################
-
-if ENABLE_PLUGIN_X22X
-
-pkglib_LTLIBRARIES += libmm-plugin-x22x.la
-libmm_plugin_x22x_la_SOURCES = \
-	x22x/mm-plugin-x22x.c \
-	x22x/mm-plugin-x22x.h \
-	x22x/mm-broadband-modem-x22x.h \
-	x22x/mm-broadband-modem-x22x.c \
-	$(NULL)
-libmm_plugin_x22x_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"x22x\" \
-	$(NULL)
-libmm_plugin_x22x_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-dist_udevrules_DATA += x22x/77-mm-x22x-port-types.rules
-
-AM_CFLAGS += -DTESTUDEVRULESDIR_X22X=\"${srcdir}/x22x\"
-
-endif
-
-################################################################################
-# plugin: zte
-################################################################################
-
-if ENABLE_PLUGIN_ZTE
-
-pkglib_LTLIBRARIES += libmm-plugin-zte.la
-libmm_plugin_zte_la_SOURCES = \
-	zte/mm-plugin-zte.c \
-	zte/mm-plugin-zte.h \
-	zte/mm-common-zte.h \
-	zte/mm-common-zte.c \
-	zte/mm-broadband-modem-zte.h \
-	zte/mm-broadband-modem-zte.c \
-	zte/mm-broadband-modem-zte-icera.h \
-	zte/mm-broadband-modem-zte-icera.c \
-	$(NULL)
-libmm_plugin_zte_la_CPPFLAGS = \
-	$(PLUGIN_COMMON_COMPILER_FLAGS) \
-	$(ICERA_COMMON_COMPILER_FLAGS) \
-	-DMM_MODULE_NAME=\"zte\" \
-	$(NULL)
-libmm_plugin_zte_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-
-dist_udevrules_DATA += zte/77-mm-zte-port-types.rules
-
-AM_CFLAGS += -DTESTUDEVRULESDIR_ZTE=\"${srcdir}/zte\"
-
-endif
-
-################################################################################
-# udev rules tester
-################################################################################
-
-noinst_PROGRAMS += test-udev-rules
-test_udev_rules_SOURCES = \
-	tests/test-udev-rules.c \
-	$(NULL)
-test_udev_rules_LDADD = \
-	$(top_builddir)/src/libkerneldevice.la \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(NULL)
-
-################################################################################
-# keyfile tester
-################################################################################
-
-noinst_PROGRAMS += test-keyfiles
-test_keyfiles_SOURCES = \
-	tests/test-keyfiles.c \
-	$(NULL)
-test_keyfiles_LDADD = \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(NULL)
-
-################################################################################
-
-TEST_PROGS += $(noinst_PROGRAMS)
diff --git a/plugins/cinterion/mm-broadband-modem-cinterion.c b/plugins/cinterion/mm-broadband-modem-cinterion.c
index 9079135..b063d45 100644
--- a/plugins/cinterion/mm-broadband-modem-cinterion.c
+++ b/plugins/cinterion/mm-broadband-modem-cinterion.c
@@ -2851,16 +2851,16 @@
 
     switch (scks) {
         case 0:
-            mm_obj_info (self, "SIM removal detected");
+            mm_obj_msg (self, "SIM removal detected");
             break;
         case 1:
-            mm_obj_info (self, "SIM insertion detected");
+            mm_obj_msg (self, "SIM insertion detected");
             break;
         case 2:
-            mm_obj_info (self, "SIM interface hardware deactivated (Potentially non-electrically compatible SIM inserted)");
+            mm_obj_msg (self, "SIM interface hardware deactivated (potentially non-electrically compatible SIM inserted)");
             break;
         case 3:
-            mm_obj_info (self, "SIM interface hardware deactivated (Technical problem, no precise diagnosis)");
+            mm_obj_msg (self, "SIM interface hardware deactivated (technical problem, no precise diagnosis)");
             break;
         default:
             g_assert_not_reached ();
diff --git a/plugins/meson.build b/plugins/meson.build
index 105b2e8..098848b 100644
--- a/plugins/meson.build
+++ b/plugins/meson.build
@@ -5,30 +5,35 @@
 ldflags = cc.get_supported_link_arguments('-Wl,--version-script,@0@'.format(symbol_map))
 
 # common service test support
-sources = files(
-  'tests/test-fixture.c',
-  'tests/test-helpers.c',
-  'tests/test-port-context.c',
-)
+plugins_common_test_dep = []
+if enable_tests
+  sources = files(
+    'tests/test-fixture.c',
+    'tests/test-helpers.c',
+    'tests/test-port-context.c',
+  )
 
-deps = [
-  libhelpers_dep,
-  libmm_test_generated_dep,
-]
+  deps = [
+    libhelpers_dep,
+    libmm_test_generated_dep
+  ]
 
-libmm_test_common = shared_library(
-  'mm-test-common',
-  sources: sources,
-  include_directories: top_inc,
-  dependencies: deps + [gio_unix_dep],
-  c_args: '-DTEST_SERVICES="@0@"'.format(build_root / 'data/tests'),
-)
+  libmm_test_common = shared_library(
+    'mm-test-common',
+    sources: sources,
+    include_directories: top_inc,
+    dependencies: deps + [gio_unix_dep],
+    c_args: '-DTEST_SERVICES="@0@"'.format(build_root / 'data/tests'),
+  )
 
-libmm_test_common_dep = declare_dependency(
-  include_directories: 'tests',
-  dependencies: deps,
-  link_with: libmm_test_common,
-)
+  libmm_test_common_dep = declare_dependency(
+    include_directories: 'tests',
+    dependencies: deps,
+    link_with: libmm_test_common,
+  )
+
+  plugins_common_test_dep += [ libmm_test_common_dep ]
+endif
 
 # plugins
 plugins = {}
@@ -205,7 +210,7 @@
     'plugin': false,
     'helper': {'sources': files('telit/mm-modem-helpers-telit.c'), 'include_directories': plugins_incs, 'c_args': common_c_args},
     'module': {'sources': sources + daemon_enums_sources, 'include_directories': plugins_incs + [telit_inc], 'c_args': common_c_args},
-    'test': {'sources': files('telit/tests/test-mm-modem-helpers-telit.c'), 'include_directories': telit_inc, 'dependencies': libmm_test_common_dep},
+    'test': {'sources': files('telit/tests/test-mm-modem-helpers-telit.c'), 'include_directories': telit_inc, 'dependencies': plugins_common_test_dep},
   }}
 endif
 
@@ -315,13 +320,16 @@
   plugins_test_udev_rules_dir_c_args += test_udev_rules_dir_c_args
 
   incs = plugins_incs + [
-    foxconn_inc,
     novatel_inc,
     sierra_inc,
     telit_inc,
     xmm_inc,
   ]
 
+  if enable_mbim
+    incs += [foxconn_inc]
+  endif
+
   plugins += {'plugin-dell': {
     'plugin': true,
     'module': {'sources': files('dell/mm-plugin-dell.c'), 'include_directories': incs, 'c_args': test_udev_rules_dir_c_args + ['-DMM_MODULE_NAME="dell"']},
@@ -348,12 +356,16 @@
   test_udev_rules_dir_c_args = ['-DTESTUDEVRULESDIR_FIBOCOM="@0@"'.format(plugins_dir / 'fibocom')]
   plugins_test_udev_rules_dir_c_args += test_udev_rules_dir_c_args
 
+  incs = plugins_incs + [xmm_inc]
+
   sources = files(
     'fibocom/mm-broadband-bearer-fibocom-ecm.c',
     'fibocom/mm-broadband-modem-fibocom.c',
     'fibocom/mm-plugin-fibocom.c',
   )
   if enable_mbim
+    incs += [fibocom_inc]
+
     sources += files(
       'fibocom/mm-broadband-modem-mbim-xmm-fibocom.c',
       'fibocom/mm-broadband-modem-mbim-fibocom.c',
@@ -361,7 +373,7 @@
   endif
   plugins += {'plugin-fibocom': {
     'plugin': true,
-    'module': {'sources': sources, 'include_directories': plugins_incs + [xmm_inc] + [fibocom_inc], 'c_args': test_udev_rules_dir_c_args + ['-DMM_MODULE_NAME="fibocom"']},
+    'module': {'sources': sources, 'include_directories': incs, 'c_args': test_udev_rules_dir_c_args + ['-DMM_MODULE_NAME="fibocom"']},
   }}
 
   plugins_udev_rules += files('fibocom/77-mm-fibocom-port-types.rules')
@@ -393,7 +405,7 @@
   plugins += {'plugin-generic': {
     'plugin': true,
     'module': {'sources': files('generic/mm-plugin-generic.c'), 'include_directories': plugins_incs, 'c_args': '-DMM_MODULE_NAME="generic"'},
-    'test': {'sources': files('generic/tests/test-service-generic.c'), 'include_directories': include_directories('generic'), 'dependencies': libmm_test_common_dep, 'c_args': '-DCOMMON_GSM_PORT_CONF="@0@"'.format(plugins_dir / 'tests/gsm-port.conf')},
+    'test': {'sources': files('generic/tests/test-service-generic.c'), 'include_directories': include_directories('generic'), 'dependencies': plugins_common_test_dep, 'c_args': '-DCOMMON_GSM_PORT_CONF="@0@"'.format(plugins_dir / 'tests/gsm-port.conf')},
   }}
 endif
 
@@ -874,7 +886,7 @@
     'plugin': true,
     'helper': {'sources': files('ublox/mm-modem-helpers-ublox.c'), 'include_directories': plugins_incs, 'c_args': common_c_args},
     'module': {'sources': sources + daemon_enums_sources, 'include_directories': plugins_incs + [ublox_inc], 'c_args': common_c_args},
-    'test': {'sources': files('ublox/tests/test-modem-helpers-ublox.c'), 'include_directories': ublox_inc, 'dependencies': libmm_test_common_dep},
+    'test': {'sources': files('ublox/tests/test-modem-helpers-ublox.c'), 'include_directories': ublox_inc, 'dependencies': plugins_common_test_dep},
   }}
 
   plugins_udev_rules += files('ublox/77-mm-ublox-port-types.rules')
@@ -971,16 +983,18 @@
     install_dir: mm_pkglibdir,
   )
 
-  if plugin_data.has_key('test')
-    test_unit = 'test-' + plugin_name
+  if enable_tests
+    if plugin_data.has_key('test')
+      test_unit = 'test-' + plugin_name
 
-    exe = executable(
-      test_unit,
-      link_with: libpluginhelpers,
-      kwargs: plugin_data['test'],
-    )
+      exe = executable(
+        test_unit,
+        link_with: libpluginhelpers,
+        kwargs: plugin_data['test'],
+      )
 
-    test(test_unit, exe)
+      test(test_unit, exe)
+    endif
   endif
 endforeach
 
diff --git a/plugins/novatel/mm-broadband-modem-novatel.c b/plugins/novatel/mm-broadband-modem-novatel.c
index 46bf438..cd8e567 100644
--- a/plugins/novatel/mm-broadband-modem-novatel.c
+++ b/plugins/novatel/mm-broadband-modem-novatel.c
@@ -1043,7 +1043,7 @@
     case CDMA_ACTIVATION_STEP_REQUEST_ACTIVATION: {
         gchar *command;
 
-        mm_obj_info (self, "activation step [1/5]: setting up activation details");
+        mm_obj_msg (self, "activation step [1/5]: setting up activation details");
         command = g_strdup_printf ("$NWACTIVATION=%s,%s,%s",
                                    mm_cdma_manual_activation_properties_get_spc (ctx->properties),
                                    mm_cdma_manual_activation_properties_get_mdn (ctx->properties),
@@ -1059,7 +1059,7 @@
     }
 
     case CDMA_ACTIVATION_STEP_OTA_UPDATE:
-        mm_obj_info (self, "activation step [2/5]: starting OTA activation");
+        mm_obj_msg (self, "activation step [2/5]: starting OTA activation");
         mm_base_modem_at_command (MM_BASE_MODEM (self),
                                   "+IOTA=1",
                                   20,
@@ -1069,7 +1069,7 @@
         return;
 
     case CDMA_ACTIVATION_STEP_PRL_UPDATE:
-        mm_obj_info (self, "activation step [3/5]: starting PRL update");
+        mm_obj_msg (self, "activation step [3/5]: starting PRL update");
         mm_base_modem_at_command (MM_BASE_MODEM (self),
                                   "+IOTA=2",
                                   20,
@@ -1079,7 +1079,7 @@
         return;
 
     case CDMA_ACTIVATION_STEP_WAIT_UNTIL_FINISHED:
-        mm_obj_info (self, "activation step [4/5]: checking activation process status");
+        mm_obj_msg (self, "activation step [4/5]: checking activation process status");
         mm_base_modem_at_command (MM_BASE_MODEM (self),
                                   "+IOTA?",
                                   20,
@@ -1089,7 +1089,7 @@
         return;
 
     case CDMA_ACTIVATION_STEP_LAST:
-        mm_obj_info (self, "activation step [5/5]: activation process finished");
+        mm_obj_msg (self, "activation step [5/5]: activation process finished");
         g_task_return_boolean (task, TRUE);
         g_object_unref (task);
         return;
diff --git a/plugins/sierra/mm-broadband-modem-sierra.c b/plugins/sierra/mm-broadband-modem-sierra.c
index bae8e34..83611f6 100644
--- a/plugins/sierra/mm-broadband-modem-sierra.c
+++ b/plugins/sierra/mm-broadband-modem-sierra.c
@@ -1400,7 +1400,7 @@
         /* fall-through */
 
     case CDMA_AUTOMATIC_ACTIVATION_STEP_UNLOCK:
-        mm_obj_info (self, "activation step [1/4]: unlocking device");
+        mm_obj_msg (self, "activation step [1/4]: unlocking device");
         mm_base_modem_at_command (MM_BASE_MODEM (self),
                                   "~NAMLCK=000000",
                                   20,
@@ -1412,7 +1412,7 @@
     case CDMA_AUTOMATIC_ACTIVATION_STEP_CDV: {
         gchar *command;
 
-        mm_obj_info (self, "activation step [2/4]: requesting OTASP");
+        mm_obj_msg (self, "activation step [2/4]: requesting OTASP");
         command = g_strdup_printf ("+CDV%s", ctx->carrier_code);
         mm_base_modem_at_command (MM_BASE_MODEM (self),
                                   command,
@@ -1425,7 +1425,7 @@
     }
 
     case CDMA_AUTOMATIC_ACTIVATION_STEP_CHECK:
-        mm_obj_info (self, "activation step [3/4]: checking activation info");
+        mm_obj_msg (self, "activation step [3/4]: checking activation info");
         mm_base_modem_at_command (MM_BASE_MODEM (self),
                                   "~NAMVAL?0",
                                   3,
@@ -1435,7 +1435,7 @@
         return;
 
     case CDMA_AUTOMATIC_ACTIVATION_STEP_LAST:
-        mm_obj_info (self, "activation step [4/4]: activation process finished");
+        mm_obj_msg (self, "activation step [4/4]: activation process finished");
         g_task_return_boolean (task, TRUE);
         g_object_unref (task);
         return;
@@ -1532,7 +1532,7 @@
     case CDMA_MANUAL_ACTIVATION_STEP_SPC: {
         gchar *command;
 
-        mm_obj_info (self, "activation step [1/5]: unlocking device");
+        mm_obj_msg (self, "activation step [1/5]: unlocking device");
         command = g_strdup_printf ("~NAMLCK=%s",
                                    mm_cdma_manual_activation_properties_get_spc (ctx->properties));
         mm_base_modem_at_command (MM_BASE_MODEM (self),
@@ -1548,7 +1548,7 @@
     case CDMA_MANUAL_ACTIVATION_STEP_MDN_MIN: {
         gchar *command;
 
-        mm_obj_info (self, "activation step [2/5]: setting MDN/MIN/SID");
+        mm_obj_msg (self, "activation step [2/5]: setting MDN/MIN/SID");
         command = g_strdup_printf ("~NAMVAL=0,%s,%s,%" G_GUINT16_FORMAT ",65535",
                                    mm_cdma_manual_activation_properties_get_mdn (ctx->properties),
                                    mm_cdma_manual_activation_properties_get_min (ctx->properties),
@@ -1564,7 +1564,7 @@
     }
 
     case CDMA_MANUAL_ACTIVATION_STEP_OTASP:
-        mm_obj_info (self, "activation step [3/5]: requesting OTASP");
+        mm_obj_msg (self, "activation step [3/5]: requesting OTASP");
         mm_base_modem_at_command (MM_BASE_MODEM (self),
                                   "!IOTASTART",
                                   20,
@@ -1574,7 +1574,7 @@
         return;
 
     case CDMA_MANUAL_ACTIVATION_STEP_CHECK:
-        mm_obj_info (self, "activation step [4/5]: checking activation info");
+        mm_obj_msg (self, "activation step [4/5]: checking activation info");
         mm_base_modem_at_command (MM_BASE_MODEM (self),
                                   "~NAMVAL?0",
                                   20,
@@ -1584,7 +1584,7 @@
         return;
 
     case CDMA_MANUAL_ACTIVATION_STEP_LAST:
-        mm_obj_info (self, "activation step [5/5]: activation process finished");
+        mm_obj_msg (self, "activation step [5/5]: activation process finished");
         g_task_return_boolean (task, TRUE);
         g_object_unref (task);
         return;
diff --git a/plugins/telit/mm-broadband-modem-telit.c b/plugins/telit/mm-broadband-modem-telit.c
index 3254eef..1683d38 100644
--- a/plugins/telit/mm-broadband-modem-telit.c
+++ b/plugins/telit/mm-broadband-modem-telit.c
@@ -472,7 +472,7 @@
 
     if ((prev_qss_status == QSS_STATUS_SIM_REMOVED && cur_qss_status != QSS_STATUS_SIM_REMOVED) ||
         (prev_qss_status > QSS_STATUS_SIM_REMOVED && cur_qss_status == QSS_STATUS_SIM_REMOVED)) {
-        mm_obj_info (self, "QSS handler: SIM swap detected");
+        mm_obj_msg (self, "QSS handler: SIM swap detected");
         mm_iface_modem_process_sim_event (MM_IFACE_MODEM (self));
     }
 }
diff --git a/plugins/ublox/mm-broadband-modem-ublox.c b/plugins/ublox/mm-broadband-modem-ublox.c
index e070b75..12be08c 100644
--- a/plugins/ublox/mm-broadband-modem-ublox.c
+++ b/plugins/ublox/mm-broadband-modem-ublox.c
@@ -1107,7 +1107,7 @@
         return;
     }
 
-    mm_obj_info (self, "CIEV: sim hot swap detected '%d'", sim_insert_status);
+    mm_obj_msg (self, "CIEV: sim hot swap detected '%d'", sim_insert_status);
     if (sim_insert_status == CIEV_SIM_STATUS_INSERTED ||
         sim_insert_status == CIEV_SIM_STATUS_REMOVED) {
         mm_iface_modem_process_sim_event (MM_IFACE_MODEM (self));
@@ -1167,7 +1167,7 @@
         return;
     }
 
-    mm_obj_info (self, "CIND unsolicited response codes processing verbosity configured successfully");
+    mm_obj_dbg (self, "CIND unsolicited response codes processing verbosity configured successfully");
 
     if (!mm_broadband_modem_sim_hot_swap_ports_context_init (MM_BROADBAND_MODEM (self), &error))
         mm_obj_warn (self, "failed to initialize SIM hot swap ports context: %s", error->message);
diff --git a/po/Makevars b/po/Makevars
deleted file mode 100644
index a7d0775..0000000
--- a/po/Makevars
+++ /dev/null
@@ -1,78 +0,0 @@
-# Makefile variables for PO directory in any package using GNU gettext.
-
-# Usually the message domain is the same as the package name.
-DOMAIN = $(PACKAGE)
-
-# These two variables depend on the location of this directory.
-subdir = po
-top_builddir = ..
-
-# These options get passed to xgettext.
-XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3
-
-# This is the copyright holder that gets inserted into the header of the
-# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
-# package.  (Note that the msgstr strings, extracted from the package's
-# sources, belong to the copyright holder of the package.)  Translators are
-# expected to transfer the copyright for their translations to this person
-# or entity, or to disclaim their copyright.  The empty string stands for
-# the public domain; in this case the translators are expected to disclaim
-# their copyright.
-COPYRIGHT_HOLDER = The ModemManager developers.
-
-# This tells whether or not to prepend "GNU " prefix to the package
-# name that gets inserted into the header of the $(DOMAIN).pot file.
-# Possible values are "yes", "no", or empty.  If it is empty, try to
-# detect it automatically by scanning the files in $(top_srcdir) for
-# "GNU packagename" string.
-PACKAGE_GNU = no
-
-# This is the email address or URL to which the translators shall report
-# bugs in the untranslated strings:
-# - Strings which are not entire sentences, see the maintainer guidelines
-#   in the GNU gettext documentation, section 'Preparing Strings'.
-# - Strings which use unclear terms or require additional context to be
-#   understood.
-# - Strings which make invalid assumptions about notation of date, time or
-#   money.
-# - Pluralisation problems.
-# - Incorrect English spelling.
-# - Incorrect formatting.
-# It can be your email address, or a mailing list address where translators
-# can write to without being subscribed, or the URL of a web page through
-# which the translators can contact you.
-MSGID_BUGS_ADDRESS =
-
-# This is the list of locale categories, beyond LC_MESSAGES, for which the
-# message catalogs shall be used.  It is usually empty.
-EXTRA_LOCALE_CATEGORIES =
-
-# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
-# context.  Possible values are "yes" and "no".  Set this to yes if the
-# package uses functions taking also a message context, like pgettext(), or
-# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
-USE_MSGCTXT = no
-
-# These options get passed to msgmerge.
-# Useful options are in particular:
-#   --previous            to keep previous msgids of translated messages,
-#   --quiet               to reduce the verbosity.
-MSGMERGE_OPTIONS = --quiet
-
-# These options get passed to msginit.
-# If you want to disable line wrapping when writing PO files, add
-# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
-# MSGINIT_OPTIONS.
-MSGINIT_OPTIONS =
-
-# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
-# has changed.  Possible values are "yes" and "no".  Set this to no if
-# the POT file is checked in the repository and the version control
-# program ignores timestamps.
-PO_DEPENDS_ON_POT = yes
-
-# This tells whether or not to forcibly update $(DOMAIN).pot and
-# regenerate PO files on "make dist".  Possible values are "yes" and
-# "no".  Set this to no if the POT file and PO files are maintained
-# externally.
-DIST_DEPENDS_ON_UPDATE_PO = no
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644
index 2a2c30d..0000000
--- a/src/Makefile.am
+++ /dev/null
@@ -1,445 +0,0 @@
-
-SUBDIRS = . tests
-
-################################################################################
-# common
-################################################################################
-
-sbin_PROGRAMS =
-noinst_LTLIBRARIES =
-EXTRA_DIST =
-BUILT_SOURCES =
-CLEANFILES =
-
-AM_CFLAGS = \
-	$(WARN_CFLAGS) \
-	$(MM_CFLAGS) \
-	$(CODE_COVERAGE_CFLAGS) \
-	$(GUDEV_CFLAGS) \
-	-I$(top_srcdir) \
-	-I$(top_srcdir)/include \
-	-I$(top_builddir)/include \
-	-I$(top_srcdir)/libqcdm/src \
-	-I$(top_srcdir)/libmm-glib \
-	-I${top_builddir}/libmm-glib/generated \
-	-I${top_builddir}/libmm-glib/generated/tests \
-	-I$(srcdir)/kerneldevice \
-	$(NULL)
-
-AM_LDFLAGS = \
-	$(WARN_LDFLAGS) \
-	$(MM_LIBS) \
-	$(CODE_COVERAGE_LDFLAGS) \
-	$(GUDEV_LIBS) \
-	$(NULL)
-
-if WITH_QRTR
-AM_CFLAGS  += $(QRTR_CFLAGS)
-AM_LDFLAGS += $(QRTR_LIBS)
-endif
-
-if WITH_QMI
-AM_CFLAGS  += $(QMI_CFLAGS)
-AM_LDFLAGS += $(QMI_LIBS)
-endif
-
-if WITH_MBIM
-AM_CFLAGS  += $(MBIM_CFLAGS)
-AM_LDFLAGS += $(MBIM_LIBS)
-endif
-
-if WITH_POLKIT
-AM_CFLAGS  += $(POLKIT_CFLAGS)
-AM_LDFLAGS += $(POLKIT_LIBS)
-endif
-
-if WITH_SYSTEMD_JOURNAL
-AM_CFLAGS += $(LIBSYSTEMD_CFLAGS)
-AM_LDFLAGS += $(LIBSYSTEMD_LIBS)
-endif
-
-################################################################################
-# generic udev rules
-################################################################################
-
-udevrulesdir = $(UDEV_BASE_DIR)/rules.d
-udevrules_DATA = \
-	80-mm-candidate.rules \
-	$(NULL)
-
-EXTRA_DIST += $(udevrules_DATA)
-
-################################################################################
-# helpers library
-################################################################################
-
-noinst_LTLIBRARIES += libhelpers.la
-
-HELPER_ENUMS_INPUTS = \
-	$(srcdir)/mm-sms-part.h \
-	$(srcdir)/mm-modem-helpers.h \
-	$(NULL)
-
-HELPER_ENUMS_GENERATED = \
-	mm-helper-enums-types.h \
-	mm-helper-enums-types.c \
-	$(NULL)
-
-mm-helper-enums-types.h: Makefile.am $(HELPER_ENUMS_INPUTS) $(top_srcdir)/build-aux/mm-enums-types.h.template
-	$(AM_V_GEN) $(GLIB_MKENUMS) \
-		--fhead "#include \"mm-sms-part.h\"\n#include \"mm-modem-helpers.h\"\n#ifndef __MM_HELPER_ENUMS_TYPES_H__\n#define __MM_HELPER_ENUMS_TYPES_H__\n" \
-		--template $(top_srcdir)/build-aux/mm-enums-types.h.template \
-		--ftail "#endif /* __MM_HELPER_ENUMS_TYPES_H__ */\n" \
-		$(HELPER_ENUMS_INPUTS) > $@
-
-mm-helper-enums-types.c: Makefile.am $(top_srcdir)/build-aux/mm-enums-types.c.template mm-helper-enums-types.h
-	$(AM_V_GEN) $(GLIB_MKENUMS) \
-		--fhead "#include \"mm-helper-enums-types.h\"" \
-		--template $(top_srcdir)/build-aux/mm-enums-types.c.template \
-		$(HELPER_ENUMS_INPUTS) > $@
-
-libhelpers_la_SOURCES = \
-	mm-log-object.h \
-	mm-log-object.c \
-	mm-log.c \
-	mm-log.h \
-	mm-log-test.h \
-	mm-error-helpers.c \
-	mm-error-helpers.h \
-	mm-modem-helpers.c \
-	mm-modem-helpers.h \
-	mm-charsets.c \
-	mm-charsets.h \
-	mm-sms-part.h \
-	mm-sms-part.c \
-	mm-sms-part-3gpp.h \
-	mm-sms-part-3gpp.c \
-	mm-sms-part-cdma.h \
-	mm-sms-part-cdma.c \
-	$(NULL)
-
-nodist_libhelpers_la_SOURCES = $(HELPER_ENUMS_GENERATED)
-
-if WITH_QMI
-libhelpers_la_SOURCES += \
-	mm-modem-helpers-qmi.c \
-	mm-modem-helpers-qmi.h \
-	$(NULL)
-endif
-
-if WITH_MBIM
-libhelpers_la_SOURCES += \
-	mm-modem-helpers-mbim.c \
-	mm-modem-helpers-mbim.h \
-	$(NULL)
-endif
-
-# Request to build enum types before anything else
-BUILT_SOURCES += $(HELPER_ENUMS_GENERATED)
-CLEANFILES    += $(HELPER_ENUMS_GENERATED)
-
-################################################################################
-# kerneldevice library
-################################################################################
-
-noinst_LTLIBRARIES += libkerneldevice.la
-
-libkerneldevice_la_CPPFLAGS = \
-	-DUDEVRULESDIR=\"$(udevrulesdir)\" \
-	$(NULL)
-
-libkerneldevice_la_SOURCES = \
-	kerneldevice/mm-kernel-device.h \
-	kerneldevice/mm-kernel-device.c \
-	kerneldevice/mm-kernel-device-helpers.h \
-	kerneldevice/mm-kernel-device-helpers.c \
-	kerneldevice/mm-kernel-device-generic.h \
-	kerneldevice/mm-kernel-device-generic.c \
-	kerneldevice/mm-kernel-device-generic-rules.h \
-	kerneldevice/mm-kernel-device-generic-rules.c \
-	$(NULL)
-
-if WITH_QRTR
-libkerneldevice_la_SOURCES += \
-	kerneldevice/mm-kernel-device-qrtr.h \
-	kerneldevice/mm-kernel-device-qrtr.c \
-	$(NULL)
-endif
-
-if WITH_UDEV
-libkerneldevice_la_SOURCES += \
-	kerneldevice/mm-kernel-device-udev.h \
-	kerneldevice/mm-kernel-device-udev.c \
-	$(NULL)
-endif
-
-libkerneldevice_la_LIBADD = \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(builddir)/libhelpers.la \
-	$(NULL)
-
-################################################################################
-# ports library
-################################################################################
-
-noinst_LTLIBRARIES += libport.la
-
-PORT_ENUMS_INPUTS = \
-	$(srcdir)/mm-port.h \
-	$(srcdir)/mm-port-serial-at.h \
-	$(NULL)
-
-if WITH_QMI
-PORT_ENUMS_INPUTS += $(srcdir)/mm-port-qmi.h
-endif
-
-PORT_ENUMS_GENERATED = \
-	mm-port-enums-types.h \
-	mm-port-enums-types.c \
-	$(NULL)
-
-mm-port-enums-types.h: Makefile.am $(PORT_ENUMS_INPUTS) $(top_srcdir)/build-aux/mm-enums-types.h.template
-	$(AM_V_GEN) $(GLIB_MKENUMS) \
-		--fhead "#include \"config.h\"\n#include \"mm-port.h\"\n#include \"mm-port-serial-at.h\"\n#if defined WITH_QMI\n#include \"mm-port-qmi.h\"\n#endif\n#ifndef __MM_PORT_ENUMS_TYPES_H__\n#define __MM_PORT_ENUMS_TYPES_H__\n" \
-		--template $(top_srcdir)/build-aux/mm-enums-types.h.template \
-		--ftail "#endif /* __MM_PORT_ENUMS_TYPES_H__ */\n" \
-		$(PORT_ENUMS_INPUTS) > $@
-
-mm-port-enums-types.c: Makefile.am $(top_srcdir)/build-aux/mm-enums-types.c.template mm-port-enums-types.h
-	$(AM_V_GEN) $(GLIB_MKENUMS) \
-		--fhead "#include \"mm-port-enums-types.h\"" \
-		--template $(top_srcdir)/build-aux/mm-enums-types.c.template \
-		$(PORT_ENUMS_INPUTS) > $@
-
-libport_la_SOURCES = \
-	mm-port.c \
-	mm-port.h \
-	mm-port-net.c \
-	mm-port-net.h \
-	mm-port-serial.c \
-	mm-port-serial.h \
-	mm-port-serial-at.c \
-	mm-port-serial-at.h \
-	mm-port-serial-qcdm.c \
-	mm-port-serial-qcdm.h \
-	mm-port-serial-gps.c \
-	mm-port-serial-gps.h \
-	mm-serial-parsers.c \
-	mm-serial-parsers.h \
-	mm-netlink.h \
-	mm-netlink.c \
-	$(NULL)
-
-nodist_libport_la_SOURCES = $(PORT_ENUMS_GENERATED)
-
-if WITH_QMI
-libport_la_SOURCES += \
-	mm-port-qmi.c \
-	mm-port-qmi.h \
-	$(NULL)
-endif
-
-if WITH_MBIM
-libport_la_SOURCES += \
-	mm-port-mbim.c \
-	mm-port-mbim.h \
-	$(NULL)
-endif
-
-libport_la_LIBADD = \
-	$(top_builddir)/libqcdm/src/libqcdm.la \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(builddir)/libkerneldevice.la \
-	$(NULL)
-
-# Request to build enum types before anything else
-BUILT_SOURCES += $(PORT_ENUMS_GENERATED)
-CLEANFILES    += $(PORT_ENUMS_GENERATED)
-
-################################################################################
-# ModemManager daemon
-################################################################################
-
-sbin_PROGRAMS += ModemManager
-
-DAEMON_ENUMS_INPUTS = \
-	$(srcdir)/mm-filter.h \
-	$(srcdir)/mm-base-bearer.h \
-	$(srcdir)/mm-port-probe.h  \
-	$(NULL)
-
-DAEMON_ENUMS_GENERATED = \
-	mm-daemon-enums-types.h \
-	mm-daemon-enums-types.c \
-	$(NULL)
-
-mm-daemon-enums-types.h: Makefile.am $(DAEMON_ENUMS_INPUTS) $(top_srcdir)/build-aux/mm-enums-types.h.template
-	$(AM_V_GEN) $(GLIB_MKENUMS) \
-		--fhead "#include \"mm-filter.h\"\n#include \"mm-base-bearer.h\"\n#include \"mm-port-probe.h\"\n#ifndef __MM_DAEMON_ENUMS_TYPES_H__\n#define __MM_DAEMON_ENUMS_TYPES_H__\n" \
-		--template $(top_srcdir)/build-aux/mm-enums-types.h.template \
-		--ftail "#endif /* __MM_DAEMON_ENUMS_TYPES_H__ */\n" \
-		$(DAEMON_ENUMS_INPUTS) > $@
-
-mm-daemon-enums-types.c: Makefile.am $(top_srcdir)/build-aux/mm-enums-types.c.template mm-daemon-enums-types.h
-	$(AM_V_GEN) $(GLIB_MKENUMS) \
-		--fhead "#include \"mm-daemon-enums-types.h\"" \
-		--template $(top_srcdir)/build-aux/mm-enums-types.c.template \
-		$(DAEMON_ENUMS_INPUTS) > $@
-
-# Request to build enum types before anything else
-BUILT_SOURCES += $(DAEMON_ENUMS_GENERATED)
-CLEANFILES    += $(DAEMON_ENUMS_GENERATED)
-
-ModemManager_CPPFLAGS = \
-	-DPLUGINDIR=\"$(pkglibdir)\" \
-	-DFCCUNLOCKDIRPACKAGE=\"${pkglibdir}/fcc-unlock.d\" \
-	-DFCCUNLOCKDIRUSER=\"${pkgsysconfdir}/fcc-unlock.d\" \
-	-DCONNECTIONDIRPACKAGE=\"${pkglibdir}/connection.d\" \
-	-DCONNECTIONDIRUSER=\"${pkgsysconfdir}/connection.d\" \
-	-DMM_COMPILATION \
-	$(NULL)
-
-ModemManager_LDADD = \
-	$(top_builddir)/libqcdm/src/libqcdm.la \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(top_builddir)/libmm-glib/generated/tests/libmm-test-generated.la \
-	$(builddir)/libport.la \
-	$(NULL)
-
-ModemManager_SOURCES = \
-	main.c \
-	mm-context.h \
-	mm-context.c \
-	mm-utils.h \
-	mm-private-boxed-types.h \
-	mm-private-boxed-types.c \
-	mm-auth-provider.h \
-	mm-auth-provider.c \
-	mm-dispatcher.h \
-	mm-dispatcher.c \
-	mm-dispatcher-connection.h \
-	mm-dispatcher-connection.c \
-	mm-dispatcher-fcc-unlock.h \
-	mm-dispatcher-fcc-unlock.c \
-	mm-filter.h \
-	mm-filter.c \
-	mm-base-manager.c \
-	mm-base-manager.h \
-	mm-device.c \
-	mm-device.h \
-	mm-plugin-manager.c \
-	mm-plugin-manager.h \
-	mm-base-sim.h \
-	mm-base-sim.c \
-	mm-base-bearer.h \
-	mm-base-bearer.c \
-	mm-broadband-bearer.h \
-	mm-broadband-bearer.c \
-	mm-bearer-list.h \
-	mm-bearer-list.c \
-	mm-base-modem-at.h \
-	mm-base-modem-at.c \
-	mm-base-modem.h \
-	mm-base-modem.c \
-	mm-base-sms.h \
-	mm-base-sms.c \
-	mm-base-call.h \
-	mm-base-call.c \
-	mm-sms-list.h \
-	mm-sms-list.c \
-	mm-call-list.h \
-	mm-call-list.c \
-	mm-iface-modem.h \
-	mm-iface-modem.c \
-	mm-iface-modem-3gpp.h \
-	mm-iface-modem-3gpp.c \
-	mm-iface-modem-3gpp-profile-manager.h \
-	mm-iface-modem-3gpp-profile-manager.c \
-	mm-iface-modem-3gpp-ussd.h \
-	mm-iface-modem-3gpp-ussd.c \
-	mm-iface-modem-cdma.h \
-	mm-iface-modem-cdma.c \
-	mm-iface-modem-simple.h \
-	mm-iface-modem-simple.c \
-	mm-iface-modem-location.h \
-	mm-iface-modem-location.c \
-	mm-iface-modem-messaging.h \
-	mm-iface-modem-messaging.c \
-	mm-iface-modem-voice.h \
-	mm-iface-modem-voice.c \
-	mm-iface-modem-time.h \
-	mm-iface-modem-time.c \
-	mm-iface-modem-firmware.h \
-	mm-iface-modem-firmware.c \
-	mm-iface-modem-sar.h \
-	mm-iface-modem-sar.c \
-	mm-iface-modem-signal.h \
-	mm-iface-modem-signal.c \
-	mm-iface-modem-oma.h \
-	mm-iface-modem-oma.c \
-	mm-broadband-modem.h \
-	mm-broadband-modem.c \
-	mm-port-probe.h \
-	mm-port-probe.c \
-	mm-port-probe-at.h \
-	mm-port-probe-at.c \
-	mm-plugin.c \
-	mm-plugin.h \
-	mm-shared.h \
-	$(NULL)
-
-if WITH_QRTR
-ModemManager_SOURCES += \
-	mm-qrtr-bus-watcher.h \
-	mm-qrtr-bus-watcher.c \
-	$(NULL)
-endif
-
-nodist_ModemManager_SOURCES = $(DAEMON_ENUMS_GENERATED)
-
-# Additional suspend/resume support via systemd
-if WITH_SYSTEMD_SUSPEND_RESUME
-ModemManager_SOURCES += \
-	mm-sleep-monitor.h \
-	mm-sleep-monitor-systemd.c \
-	$(NULL)
-endif
-
-if WITH_POWERD_SUSPEND_RESUME
-ModemManager_SOURCES += \
-	mm-sleep-monitor.h \
-	mm-sleep-monitor-powerd.c \
-	$(NULL)
-endif
-
-# Additional QMI support in ModemManager
-if WITH_QMI
-ModemManager_SOURCES += \
-	mm-shared-qmi.h \
-	mm-shared-qmi.c \
-	mm-sms-qmi.h \
-	mm-sms-qmi.c \
-	mm-sim-qmi.h \
-	mm-sim-qmi.c \
-	mm-call-qmi.h \
-	mm-call-qmi.c \
-	mm-bearer-qmi.h \
-	mm-bearer-qmi.c \
-	mm-broadband-modem-qmi.h \
-	mm-broadband-modem-qmi.c \
-	$(NULL)
-endif
-
-# Additional MBIM support in ModemManager
-if WITH_MBIM
-ModemManager_SOURCES += \
-	mm-sms-mbim.h \
-	mm-sms-mbim.c \
-	mm-sim-mbim.h \
-	mm-sim-mbim.c \
-	mm-bearer-mbim.h \
-	mm-bearer-mbim.c \
-	mm-broadband-modem-mbim.h \
-	mm-broadband-modem-mbim.c \
-	$(NULL)
-endif
diff --git a/src/main.c b/src/main.c
index 368df7a..3c74039 100644
--- a/src/main.c
+++ b/src/main.c
@@ -44,7 +44,7 @@
 static gboolean
 quit_cb (gpointer user_data)
 {
-    mm_info ("caught signal, shutting down...");
+    mm_msg ("caught signal, shutting down...");
 
     if (manager)
         g_object_set (manager, MM_BASE_MANAGER_CONNECTION, NULL, NULL);
@@ -97,7 +97,9 @@
                                    !mm_context_get_no_auto_scan (),
                                    mm_context_get_filter_policy (),
                                    mm_context_get_initial_kernel_events (),
+#if defined WITH_TESTS
                                    mm_context_get_test_enable (),
+#endif
                                    &error);
     if (!manager) {
         mm_warn ("could not create manager: %s", error->message);
@@ -178,8 +180,8 @@
     /* Early register all known errors */
     register_dbus_errors ();
 
-    mm_info ("ModemManager (version " MM_DIST_VERSION ") starting in %s bus...",
-             mm_context_get_test_session () ? "session" : "system");
+    mm_msg ("ModemManager (version " MM_DIST_VERSION ") starting in %s bus...",
+            mm_context_get_test_session () ? "session" : "system");
 
     /* Detect runtime charset conversion support */
     mm_modem_charsets_init ();
@@ -250,7 +252,7 @@
 
     g_bus_unown_name (name_id);
 
-    mm_info ("ModemManager is shut down");
+    mm_msg ("ModemManager is shut down");
 
     mm_log_shutdown ();
 
diff --git a/src/meson.build b/src/meson.build
index fdcfdeb..30aedbe 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -218,6 +218,7 @@
   'mm-iface-modem-simple.c',
   'mm-iface-modem-time.c',
   'mm-iface-modem-voice.c',
+  'mm-log-helpers.c',
   'mm-plugin.c',
   'mm-plugin-manager.c',
   'mm-port-probe.c',
@@ -246,11 +247,14 @@
 
 deps = [
   gmodule_dep,
-  libmm_test_generated_dep,
   libport_dep,
   libqcdm_dep,
 ]
 
+if enable_tests
+  deps += [libmm_test_generated_dep]
+endif
+
 c_args = [
   '-DMM_COMPILATION',
   '-DPLUGINDIR="@0@"'.format(mm_prefix / mm_pkglibdir),
diff --git a/src/mm-base-bearer.c b/src/mm-base-bearer.c
index 64a19a9..5217b66 100644
--- a/src/mm-base-bearer.c
+++ b/src/mm-base-bearer.c
@@ -571,7 +571,7 @@
                                     ", tx: %" G_GUINT64_FORMAT " bytes, rx: %" G_GUINT64_FORMAT " bytes",
                                     mm_bearer_stats_get_tx_bytes (self->priv->stats),
                                     mm_bearer_stats_get_rx_bytes (self->priv->stats));
-        mm_obj_info (self, "%s", report->str);
+        mm_obj_msg (self, "%s", report->str);
     }
 }
 
@@ -979,11 +979,11 @@
                               GTask        *task)
 {
     if (MM_BASE_BEARER_GET_CLASS (self)->reload_stats_finish (self, NULL, NULL, res, NULL)) {
-        mm_obj_info (self, "reloading stats is supported by the device");
+        mm_obj_dbg (self, "reloading stats is supported by the device");
         self->priv->reload_stats_supported = TRUE;
         mm_gdbus_bearer_set_reload_stats_supported (MM_GDBUS_BEARER (self), self->priv->reload_stats_supported);
     } else
-        mm_obj_info (self, "reloading stats is not supported by the device");
+        mm_obj_dbg (self, "reloading stats is not supported by the device");
 
     if (connect_check_cancel (self, task))
         return;
diff --git a/src/mm-base-call.c b/src/mm-base-call.c
index 149cfbd..69ce898 100644
--- a/src/mm-base-call.c
+++ b/src/mm-base-call.c
@@ -97,7 +97,7 @@
 incoming_timeout_cb (MMBaseCall *self)
 {
     self->priv->incoming_timeout = 0;
-    mm_obj_info (self, "incoming call timed out: no response");
+    mm_obj_msg (self, "incoming call timed out: no response");
     mm_base_call_change_state (self, MM_CALL_STATE_TERMINATED, MM_CALL_STATE_REASON_TERMINATED);
     return G_SOURCE_REMOVE;
 }
@@ -187,7 +187,7 @@
         return;
     }
 
-    mm_obj_info (self, "call is started");
+    mm_obj_msg (self, "call is started");
 
     /* If dialing to ringing supported, leave it dialing */
     if (!ctx->self->priv->supports_dialing_to_ringing) {
@@ -229,7 +229,7 @@
         return;
     }
 
-    mm_obj_info (ctx->self, "user request to start call");
+    mm_obj_msg (ctx->self, "user request to start call");
 
     /* Disallow non-emergency calls when in emergency-only state */
     if (!mm_iface_modem_voice_authorize_outgoing_call (MM_IFACE_MODEM_VOICE (modem), ctx->self, &error)) {
@@ -316,7 +316,7 @@
         return;
     }
 
-    mm_obj_info (self, "call is accepted");
+    mm_obj_msg (self, "call is accepted");
 
     if (ctx->self->priv->incoming_timeout) {
         g_source_remove (ctx->self->priv->incoming_timeout);
@@ -353,7 +353,7 @@
         return;
     }
 
-    mm_obj_info (ctx->self, "user request to accept call");
+    mm_obj_msg (ctx->self, "user request to accept call");
 
     /* Check if we do support doing it */
     if (!MM_BASE_CALL_GET_CLASS (ctx->self)->accept ||
@@ -426,7 +426,7 @@
         return;
     }
 
-    mm_obj_info (self, "call is deflected to '%s'", ctx->number);
+    mm_obj_msg (self, "call is deflected to '%s'", ctx->number);
     mm_base_call_change_state (ctx->self, MM_CALL_STATE_TERMINATED, MM_CALL_STATE_REASON_DEFLECTED);
     mm_gdbus_call_complete_deflect (MM_GDBUS_CALL (ctx->self), ctx->invocation);
     handle_deflect_context_free (ctx);
@@ -458,7 +458,7 @@
         return;
     }
 
-    mm_obj_info (ctx->self, "user request to deflect call");
+    mm_obj_msg (ctx->self, "user request to deflect call");
 
     /* Check if we do support doing it */
     if (!MM_BASE_CALL_GET_CLASS (ctx->self)->deflect ||
@@ -715,7 +715,7 @@
         return;
     }
 
-    mm_obj_info (ctx->self, "user request to hangup call");
+    mm_obj_msg (ctx->self, "user request to hangup call");
 
     /* Check if we do support doing it */
     if (!MM_BASE_CALL_GET_CLASS (ctx->self)->hangup ||
@@ -991,10 +991,10 @@
     if (old_state == new_state)
         return;
 
-    mm_obj_info (self, "call state changed: %s -> %s (%s)",
-                 mm_call_state_get_string (old_state),
-                 mm_call_state_get_string (new_state),
-                 mm_call_state_reason_get_string (reason));
+    mm_obj_msg (self, "call state changed: %s -> %s (%s)",
+                mm_call_state_get_string (old_state),
+                mm_call_state_get_string (new_state),
+                mm_call_state_reason_get_string (reason));
 
     /* Setup/cleanup unsolicited events  based on state transitions to/from ACTIVE */
     if (new_state == MM_CALL_STATE_TERMINATED) {
diff --git a/src/mm-base-manager.c b/src/mm-base-manager.c
index 13a98eb..6cdc4ae 100644
--- a/src/mm-base-manager.c
+++ b/src/mm-base-manager.c
@@ -41,7 +41,9 @@
 
 #include <mm-errors-types.h>
 #include <mm-gdbus-manager.h>
-#include <mm-gdbus-test.h>
+#if defined WITH_TESTS
+# include <mm-gdbus-test.h>
+#endif
 
 #include "mm-context.h"
 #include "mm-base-manager.h"
@@ -66,9 +68,11 @@
     PROP_CONNECTION,
     PROP_AUTO_SCAN,
     PROP_FILTER_POLICY,
-    PROP_ENABLE_TEST,
     PROP_PLUGIN_DIR,
     PROP_INITIAL_KERNEL_EVENTS,
+#if defined WITH_TESTS
+    PROP_ENABLE_TEST,
+#endif
     LAST_PROP
 };
 
@@ -79,8 +83,6 @@
     gboolean auto_scan;
     /* Filter policy (mask of enabled rules) */
     MMFilterRule filter_policy;
-    /* Whether the test interface is enabled */
-    gboolean enable_test;
     /* Path to look for plugins */
     gchar *plugin_dir;
     /* Path to the list of initial kernel events */
@@ -99,8 +101,12 @@
     /* The map of inhibited devices */
     GHashTable *inhibited_devices;
 
+#if defined WITH_TESTS
+    /* Whether the test interface is enabled */
+    gboolean enable_test;
     /* The Test interface support */
     MmGdbusTest *test_skeleton;
+#endif
 
 #if defined WITH_UDEV
     /* The UDev client */
@@ -204,8 +210,8 @@
     /* Receive plugin result from the plugin manager */
     plugin = mm_plugin_manager_device_support_check_finish (plugin_manager, res, &error);
     if (!plugin) {
-        mm_obj_info (ctx->self, "couldn't check support for device '%s': %s",
-                     mm_device_get_uid (ctx->device), error->message);
+        mm_obj_msg (ctx->self, "couldn't check support for device '%s': %s",
+                    mm_device_get_uid (ctx->device), error->message);
         g_error_free (error);
         g_hash_table_remove (ctx->self->priv->devices, mm_device_get_uid (ctx->device));
         find_device_support_context_free (ctx);
@@ -226,8 +232,8 @@
     }
 
     /* Modem now created */
-    mm_obj_info (ctx->self, "modem for device '%s' successfully created",
-                 mm_device_get_uid (ctx->device));
+    mm_obj_msg (ctx->self, "modem for device '%s' successfully created",
+                mm_device_get_uid (ctx->device));
     find_device_support_context_free (ctx);
 }
 
@@ -267,7 +273,7 @@
      * ourselves. */
     g_object_ref (device);
 
-    mm_obj_info (self, "port %s released by device '%s'", name, mm_device_get_uid (device));
+    mm_obj_msg (self, "port %s released by device '%s'", name, mm_device_get_uid (device));
     mm_device_release_port_name (device, subsystem, name);
 
     /* If port probe list gets empty, remove the device object iself */
@@ -741,7 +747,7 @@
         mm_obj_warn (self, "synchronization failed: %s", error->message);
         return;
     }
-    mm_obj_info (self, "synchronization finished");
+    mm_obj_msg (self, "synchronization finished");
 }
 
 void
@@ -798,7 +804,7 @@
     else if (!mm_log_set_level (ctx->level, &error))
         g_dbus_method_invocation_take_error (ctx->invocation, error);
     else {
-        mm_obj_info (ctx->self, "logging: level '%s'", ctx->level);
+        mm_obj_msg (ctx->self, "logging: level '%s'", ctx->level);
         mm_gdbus_org_freedesktop_modem_manager1_complete_set_logging (
             MM_GDBUS_ORG_FREEDESKTOP_MODEM_MANAGER1 (ctx->self),
             ctx->invocation);
@@ -1139,7 +1145,7 @@
                      const gchar              *sender_name,
                      InhibitSenderLostContext *lost_ctx)
 {
-    mm_obj_info (lost_ctx->self, "device inhibition teardown for uid '%s' (owner disappeared from bus)", lost_ctx->uid);
+    mm_obj_msg (lost_ctx->self, "device inhibition teardown for uid '%s' (owner disappeared from bus)", lost_ctx->uid);
     remove_device_inhibition (lost_ctx->self, lost_ctx->uid);
 }
 
@@ -1194,7 +1200,7 @@
 
     g_hash_table_insert (ctx->self->priv->inhibited_devices, g_strdup (ctx->uid), info);
 
-    mm_obj_info (ctx->self, "device inhibition setup for uid '%s'", ctx->uid);
+    mm_obj_msg (ctx->self, "device inhibition setup for uid '%s'", ctx->uid);
 
     mm_gdbus_org_freedesktop_modem_manager1_complete_inhibit_device (
         MM_GDBUS_ORG_FREEDESKTOP_MODEM_MANAGER1 (ctx->self),
@@ -1243,7 +1249,7 @@
         return;
     }
 
-    mm_obj_info (ctx->self, "device inhibition teardown for uid '%s'", ctx->uid);
+    mm_obj_msg (ctx->self, "device inhibition teardown for uid '%s'", ctx->uid);
     remove_device_inhibition (ctx->self, ctx->uid);
 
     mm_gdbus_org_freedesktop_modem_manager1_complete_inhibit_device (
@@ -1297,6 +1303,8 @@
 /*****************************************************************************/
 /* Test profile setup */
 
+#if defined WITH_TESTS
+
 static gboolean
 handle_set_profile (MmGdbusTest *skeleton,
                     GDBusMethodInvocation *invocation,
@@ -1310,7 +1318,7 @@
     gchar *physdev_uid;
     GError *error = NULL;
 
-    mm_obj_info (self, "test profile set to: '%s'", id);
+    mm_obj_msg (self, "test profile set to: '%s'", id);
 
     /* Create device and keep it listed in the Manager */
     physdev_uid = g_strdup_printf ("/virtual/%s", id);
@@ -1342,8 +1350,8 @@
         goto out;
     }
 
-    mm_obj_info (self, "modem for virtual device '%s' successfully created",
-                 mm_device_get_uid (device));
+    mm_obj_msg (self, "modem for virtual device '%s' successfully created",
+                mm_device_get_uid (device));
 
 out:
 
@@ -1358,6 +1366,8 @@
     return TRUE;
 }
 
+#endif
+
 /*****************************************************************************/
 
 static gchar *
@@ -1374,7 +1384,9 @@
                      gboolean          auto_scan,
                      MMFilterRule      filter_policy,
                      const gchar      *initial_kernel_events,
+#if defined WITH_TESTS
                      gboolean          enable_test,
+#endif
                      GError          **error)
 {
     g_return_val_if_fail (G_IS_DBUS_CONNECTION (connection), NULL);
@@ -1387,8 +1399,10 @@
                            MM_BASE_MANAGER_AUTO_SCAN,             auto_scan,
                            MM_BASE_MANAGER_FILTER_POLICY,         filter_policy,
                            MM_BASE_MANAGER_INITIAL_KERNEL_EVENTS, initial_kernel_events,
-                           MM_BASE_MANAGER_ENABLE_TEST,           enable_test,
                            "version",                             MM_DIST_VERSION,
+#if defined WITH_TESTS
+                           MM_BASE_MANAGER_ENABLE_TEST,           enable_test,
+#endif
                            NULL);
 }
 
@@ -1415,11 +1429,13 @@
                 mm_obj_dbg (self, "stopping connection in object manager server");
                 g_dbus_object_manager_server_set_connection (self->priv->object_manager, NULL);
             }
+#if defined WITH_TESTS
             if (self->priv->test_skeleton &&
                 g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (self->priv->test_skeleton))) {
                 mm_obj_dbg (self, "stopping connection in test skeleton");
                 g_dbus_interface_skeleton_unexport (G_DBUS_INTERFACE_SKELETON (self->priv->test_skeleton));
             }
+#endif
         }
         break;
     }
@@ -1429,9 +1445,6 @@
     case PROP_FILTER_POLICY:
         self->priv->filter_policy = g_value_get_flags (value);
         break;
-    case PROP_ENABLE_TEST:
-        self->priv->enable_test = g_value_get_boolean (value);
-        break;
     case PROP_PLUGIN_DIR:
         g_free (self->priv->plugin_dir);
         self->priv->plugin_dir = g_value_dup_string (value);
@@ -1440,6 +1453,11 @@
         g_free (self->priv->initial_kernel_events);
         self->priv->initial_kernel_events = g_value_dup_string (value);
         break;
+#if defined WITH_TESTS
+    case PROP_ENABLE_TEST:
+        self->priv->enable_test = g_value_get_boolean (value);
+        break;
+#endif
     default:
         G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
         break;
@@ -1464,15 +1482,17 @@
     case PROP_FILTER_POLICY:
         g_value_set_flags (value, self->priv->filter_policy);
         break;
-    case PROP_ENABLE_TEST:
-        g_value_set_boolean (value, self->priv->enable_test);
-        break;
     case PROP_PLUGIN_DIR:
         g_value_set_string (value, self->priv->plugin_dir);
         break;
     case PROP_INITIAL_KERNEL_EVENTS:
         g_value_set_string (value, self->priv->initial_kernel_events);
         break;
+#if defined WITH_TESTS
+    case PROP_ENABLE_TEST:
+        g_value_set_boolean (value, self->priv->enable_test);
+        break;
+#endif
     default:
         G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
         break;
@@ -1498,8 +1518,10 @@
     /* By default, enable autoscan */
     self->priv->auto_scan = TRUE;
 
+#if defined WITH_TESTS
     /* By default, no test interface */
     self->priv->enable_test = FALSE;
+#endif
 
     /* Setup Object Manager Server */
     self->priv->object_manager = g_dbus_object_manager_server_new (MM_DBUS_PATH);
@@ -1565,6 +1587,7 @@
     g_dbus_object_manager_server_set_connection (self->priv->object_manager,
                                                  self->priv->connection);
 
+#if defined WITH_TESTS
     /* Setup the Test skeleton and export the interface */
     if (self->priv->enable_test) {
         self->priv->test_skeleton = mm_gdbus_test_skeleton_new ();
@@ -1578,6 +1601,7 @@
                                                error))
             return FALSE;
     }
+#endif
 
     /* All good */
     return TRUE;
@@ -1613,8 +1637,10 @@
     if (self->priv->object_manager)
         g_object_unref (self->priv->object_manager);
 
+#if defined WITH_TESTS
     if (self->priv->test_skeleton)
         g_object_unref (self->priv->test_skeleton);
+#endif
 
     if (self->priv->connection)
         g_object_unref (self->priv->connection);
@@ -1679,14 +1705,6 @@
                             G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
 
     g_object_class_install_property
-        (object_class, PROP_ENABLE_TEST,
-         g_param_spec_boolean (MM_BASE_MANAGER_ENABLE_TEST,
-                               "Enable tests",
-                               "Enable the Test interface",
-                               FALSE,
-                               G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
-    g_object_class_install_property
         (object_class, PROP_PLUGIN_DIR,
          g_param_spec_string (MM_BASE_MANAGER_PLUGIN_DIR,
                               "Plugin directory",
@@ -1701,4 +1719,14 @@
                               "Path to a file with the list of initial kernel events",
                               NULL,
                               G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
+#if defined WITH_TESTS
+    g_object_class_install_property
+        (object_class, PROP_ENABLE_TEST,
+         g_param_spec_boolean (MM_BASE_MANAGER_ENABLE_TEST,
+                               "Enable tests",
+                               "Enable the Test interface",
+                               FALSE,
+                               G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+#endif
 }
diff --git a/src/mm-base-manager.h b/src/mm-base-manager.h
index e913f49..881555c 100644
--- a/src/mm-base-manager.h
+++ b/src/mm-base-manager.h
@@ -18,6 +18,8 @@
 #ifndef MM_BASE_MANAGER_H
 #define MM_BASE_MANAGER_H
 
+#include <config.h>
+
 #include <glib-object.h>
 #include <gio/gio.h>
 
@@ -34,9 +36,11 @@
 #define MM_BASE_MANAGER_CONNECTION            "connection"            /* Construct-only */
 #define MM_BASE_MANAGER_AUTO_SCAN             "auto-scan"             /* Construct-only */
 #define MM_BASE_MANAGER_FILTER_POLICY         "filter-policy"         /* Construct-only */
-#define MM_BASE_MANAGER_ENABLE_TEST           "enable-test"           /* Construct-only */
 #define MM_BASE_MANAGER_PLUGIN_DIR            "plugin-dir"            /* Construct-only */
 #define MM_BASE_MANAGER_INITIAL_KERNEL_EVENTS "initial-kernel-events" /* Construct-only */
+#if defined WITH_TESTS
+#define MM_BASE_MANAGER_ENABLE_TEST           "enable-test"           /* Construct-only */
+#endif
 
 typedef struct _MMBaseManagerPrivate MMBaseManagerPrivate;
 
@@ -57,7 +61,9 @@
                                               gboolean          auto_scan,
                                               MMFilterRule      filter_policy,
                                               const gchar      *initial_kernel_events,
+#if defined WITH_TESTS
                                               gboolean          enable_test,
+#endif
                                               GError          **error);
 
 void             mm_base_manager_start       (MMBaseManager *manager,
diff --git a/src/mm-base-modem.c b/src/mm-base-modem.c
index 13b6589..cf304fe 100644
--- a/src/mm-base-modem.c
+++ b/src/mm-base-modem.c
@@ -1277,14 +1277,17 @@
 }
 
 static inline void
-log_port (MMBaseModem *self, MMPort *port, const char *desc)
+log_port (MMBaseModem *self,
+          MMPort      *port,
+          const gchar *desc)
 {
-    if (port) {
-        mm_obj_dbg (self, "%s/%s %s",
-                    mm_port_subsys_get_string (mm_port_get_subsys (port)),
-                    mm_port_get_device (port),
-                    desc);
-    }
+    if (!port)
+        return;
+
+    mm_obj_info (self, "%s/%s: %s",
+                 mm_port_subsys_get_string (mm_port_get_subsys (port)),
+                 mm_port_get_device (port),
+                 desc);
 }
 
 gboolean
diff --git a/src/mm-base-sim.c b/src/mm-base-sim.c
index 4dd5ab1..765422b 100644
--- a/src/mm-base-sim.c
+++ b/src/mm-base-sim.c
@@ -960,7 +960,7 @@
         mm_gdbus_sim_complete_send_puk (MM_GDBUS_SIM (self), ctx->invocation);
 
     if (sim_error) {
-        mm_obj_info (self, "Received critical sim error. SIM might be permanently blocked. Reprobing...");
+        mm_obj_msg (self, "received critical sim error: SIM might be permanently blocked, reprobing...");
         mm_iface_modem_process_sim_event (MM_IFACE_MODEM (self->priv->modem));
     }
 
@@ -1147,17 +1147,15 @@
                                      GAsyncResult *res,
                                      GTask        *task)
 {
-    GError                      *error = NULL;
+    g_autoptr(GError)            error = NULL;
     GList                       *preferred_nets_list;
     SetPreferredNetworksContext *ctx;
 
     ctx = g_task_get_task_data (task);
 
     preferred_nets_list = MM_BASE_SIM_GET_CLASS (self)->load_preferred_networks_finish (self, res, &error);
-    if (error) {
-        mm_obj_warn (self, "couldn't load list of preferred networks: %s", error->message);
-        g_error_free (error);
-    }
+    if (error)
+        mm_obj_dbg (self, "couldn't load list of preferred networks: %s", error->message);
 
     mm_gdbus_sim_set_preferred_networks (MM_GDBUS_SIM (self),
                                          mm_sim_preferred_network_list_get_variant (preferred_nets_list));
@@ -2459,55 +2457,63 @@
     return g_task_propagate_boolean (G_TASK (result), error);
 }
 
+#undef COMMON_STR_REPLY_READY_FN
+#define COMMON_STR_REPLY_READY_FN(NAME,DISPLAY,VALUE_FORMAT)                              \
+    static void                                                                           \
+    init_load_##NAME##_ready (MMBaseSim    *self,                                         \
+                              GAsyncResult *res,                                          \
+                              GTask        *task)                                         \
+    {                                                                                     \
+        InitAsyncContext  *ctx;                                                           \
+        g_autoptr(GError)  error = NULL;                                                  \
+        g_autofree gchar  *val = NULL;                                                    \
+                                                                                          \
+        val = MM_BASE_SIM_GET_CLASS (self)->load_##NAME##_finish (self, res, &error);     \
+        mm_gdbus_sim_set_##NAME (MM_GDBUS_SIM (self), val);                               \
+                                                                                          \
+        if (error)                                                                        \
+            mm_obj_dbg (self, "couldn't load %s: %s", DISPLAY, error->message);           \
+        else                                                                              \
+            mm_obj_info (self, "loaded %s: %s", DISPLAY, VALUE_FORMAT (val));             \
+                                                                                          \
+        /* Go on to next step */                                                          \
+        ctx = g_task_get_task_data (task);                                                \
+        ctx->step++;                                                                      \
+        interface_initialization_step (task);                                             \
+    }
+
 #undef STR_REPLY_READY_FN
-#define STR_REPLY_READY_FN(NAME,DISPLAY)                                \
-    static void                                                         \
-    init_load_##NAME##_ready (MMBaseSim *self,                          \
-                              GAsyncResult *res,                        \
-                              GTask *task)                              \
-    {                                                                   \
-        InitAsyncContext *ctx;                                          \
-        GError *error = NULL;                                           \
-        gchar *val;                                                     \
-                                                                        \
+#define STR_REPLY_READY_FN(NAME,DISPLAY) COMMON_STR_REPLY_READY_FN (NAME, DISPLAY, (const gchar *))
+
+#undef PERSONAL_STR_REPLY_READY_FN
+#define PERSONAL_STR_REPLY_READY_FN(NAME,DISPLAY) COMMON_STR_REPLY_READY_FN (NAME, DISPLAY, mm_log_str_personal_info)
+
+#undef ENUM_REPLY_READY_FN
+#define ENUM_REPLY_READY_FN(NAME,DISPLAY,ENUM_TYPE,ENUM_GET_STRING)                   \
+    static void                                                                       \
+    init_load_##NAME##_ready (MMBaseSim    *self,                                     \
+                              GAsyncResult *res,                                      \
+                              GTask        *task)                                     \
+    {                                                                                 \
+        InitAsyncContext  *ctx;                                                       \
+        g_autoptr(GError)  error = NULL;                                              \
+        ENUM_TYPE          val;                                                       \
+                                                                                      \
         val = MM_BASE_SIM_GET_CLASS (self)->load_##NAME##_finish (self, res, &error); \
-        mm_gdbus_sim_set_##NAME (MM_GDBUS_SIM (self), val);             \
-        g_free (val);                                                   \
-                                                                        \
-        if (error) {                                                    \
-            mm_obj_warn (self, "couldn't load %s: %s", DISPLAY, error->message); \
-            g_error_free (error);                                       \
-        }                                                               \
-                                                                        \
-        /* Go on to next step */                                        \
-        ctx = g_task_get_task_data (task);                              \
-        ctx->step++;                                                    \
-        interface_initialization_step (task);                           \
+        mm_gdbus_sim_set_##NAME (MM_GDBUS_SIM (self), (guint) val);                   \
+                                                                                      \
+        if (error)                                                                    \
+            mm_obj_dbg (self, "couldn't load %s: %s", DISPLAY, error->message);       \
+        else                                                                          \
+            mm_obj_info (self, "loaded %s: %s", DISPLAY, ENUM_GET_STRING (val));      \
+                                                                                      \
+        /* Go on to next step */                                                      \
+        ctx = g_task_get_task_data (task);                                            \
+        ctx->step++;                                                                  \
+        interface_initialization_step (task);                                         \
     }
 
-#undef UINT_REPLY_READY_FN
-#define UINT_REPLY_READY_FN(NAME,DISPLAY)                               \
-    static void                                                         \
-    init_load_##NAME##_ready (MMBaseSim    *self,                       \
-                              GAsyncResult *res,                        \
-                              GTask        *task)                       \
-    {                                                                   \
-        InitAsyncContext  *ctx;                                         \
-        g_autoptr(GError)  error = NULL;                                \
-        guint              val;                                         \
-                                                                        \
-        val = (guint) MM_BASE_SIM_GET_CLASS (self)->load_##NAME##_finish (self, res, &error); \
-        mm_gdbus_sim_set_##NAME (MM_GDBUS_SIM (self), val);             \
-                                                                        \
-        if (error)                                                      \
-            mm_obj_warn (self, "couldn't load %s: %s", DISPLAY, error->message); \
-                                                                        \
-        /* Go on to next step */                                        \
-        ctx = g_task_get_task_data (task);                              \
-        ctx->step++;                                                    \
-        interface_initialization_step (task);                           \
-    }
-
+#undef BYTEARRAY_REPLY_READY_FN
 #define BYTEARRAY_REPLY_READY_FN(NAME,DISPLAY)                                    \
     static void                                                                   \
     init_load_##NAME##_ready (MMBaseSim    *self,                                 \
@@ -2528,7 +2534,13 @@
                                   NULL));                                         \
                                                                                   \
         if (error)                                                                \
-            mm_obj_warn (self, "couldn't load %s: %s", DISPLAY, error->message);  \
+            mm_obj_dbg (self, "couldn't load %s: %s", DISPLAY, error->message);   \
+        else {                                                                    \
+            g_autofree gchar *bytearray_str = NULL;                               \
+                                                                                  \
+            bytearray_str = mm_utils_bin2hexstr (bytearray->data, bytearray->len); \
+            mm_obj_info (self, "loaded %s: %s", DISPLAY, bytearray_str);          \
+        }                                                                         \
                                                                                   \
         /* Go on to next step */                                                  \
         ctx = g_task_get_task_data (task);                                        \
@@ -2536,28 +2548,43 @@
         interface_initialization_step (task);                                     \
     }
 
-UINT_REPLY_READY_FN (removability, "removability")
-STR_REPLY_READY_FN  (eid, "EID")
-BYTEARRAY_REPLY_READY_FN (gid2, "GID2")
-BYTEARRAY_REPLY_READY_FN (gid1, "GID1")
+ENUM_REPLY_READY_FN         (removability, "removability", MMSimRemovability, mm_sim_removability_get_string)
+PERSONAL_STR_REPLY_READY_FN (eid,          "EID")
+BYTEARRAY_REPLY_READY_FN    (gid2,         "GID2")
+BYTEARRAY_REPLY_READY_FN    (gid1,         "GID1")
 
 static void
 init_load_preferred_networks_ready (MMBaseSim    *self,
                                     GAsyncResult *res,
                                     GTask        *task)
 {
-    InitAsyncContext *ctx;
-    GError           *error = NULL;
-    GList            *preferred_nets_list;
+    InitAsyncContext  *ctx;
+    g_autoptr(GError)  error = NULL;
+    GList             *preferred_nets_list;
 
     preferred_nets_list = MM_BASE_SIM_GET_CLASS (self)->load_preferred_networks_finish (self, res, &error);
-    if (error) {
-        mm_obj_warn (self, "couldn't load list of preferred networks: %s", error->message);
-        g_error_free (error);
+    if (error)
+        mm_obj_dbg (self, "couldn't load list of preferred networks: %s", error->message);
+    else {
+        g_autoptr(GString)  str = NULL;
+        GList              *l;
+
+        str = g_string_new ("");
+        for (l = preferred_nets_list; l; l = g_list_next (l)) {
+            MMSimPreferredNetwork *item;
+            g_autofree gchar      *access_tech_str = NULL;
+
+            item = (MMSimPreferredNetwork *)(l->data);
+            access_tech_str = mm_modem_access_technology_build_string_from_mask (mm_sim_preferred_network_get_access_technology (item));
+            g_string_append_printf (str, "%s%s (%s)", str->len ? ", " : "", mm_sim_preferred_network_get_operator_code (item), access_tech_str);
+        }
+
+        mm_obj_info (self, "loaded list of preferred networks: %s", str->str);
     }
 
     mm_gdbus_sim_set_preferred_networks (MM_GDBUS_SIM (self),
                                          mm_sim_preferred_network_list_get_variant (preferred_nets_list));
+
     g_list_free_full (preferred_nets_list, (GDestroyNotify) mm_sim_preferred_network_free);
 
     /* Go on to next step */
@@ -2571,20 +2598,24 @@
                                    GAsyncResult *res,
                                    GTask        *task)
 {
-    InitAsyncContext *ctx;
-    GError           *error = NULL;
-    GStrv             str_list;
+    InitAsyncContext  *ctx;
+    g_autoptr(GError)  error = NULL;
+    g_auto(GStrv)      str_list = NULL;
 
     str_list = MM_BASE_SIM_GET_CLASS (self)->load_emergency_numbers_finish (self, res, &error);
-    if (error) {
-        mm_obj_warn (self, "couldn't load list of emergency numbers: %s", error->message);
-        g_error_free (error);
+    if (error)
+        mm_obj_dbg (self, "couldn't load list of emergency numbers: %s", error->message);
+    else {
+        g_autoptr(GString) str = NULL;
+        guint              i;
+
+        str = g_string_new ("");
+        for (i = 0; str_list && str_list[i]; i++)
+            g_string_append_printf (str, "%s%s", str->len ? ", " : "", str_list[i]);
+        mm_obj_info (self, "loaded list of emergency numbers: %s", str->str);
     }
 
-    if (str_list) {
-        mm_gdbus_sim_set_emergency_numbers (MM_GDBUS_SIM (self), (const gchar *const *) str_list);
-        g_strfreev (str_list);
-    }
+    mm_gdbus_sim_set_emergency_numbers (MM_GDBUS_SIM (self), (const gchar *const *) str_list);
 
     /* Go on to next step */
     ctx = g_task_get_task_data (task);
@@ -2592,9 +2623,9 @@
     interface_initialization_step (task);
 }
 
-STR_REPLY_READY_FN (operator_name, "operator name")
-STR_REPLY_READY_FN (operator_identifier, "operator identifier")
-STR_REPLY_READY_FN (imsi, "IMSI")
+STR_REPLY_READY_FN          (operator_name,       "operator name")
+STR_REPLY_READY_FN          (operator_identifier, "operator identifier")
+PERSONAL_STR_REPLY_READY_FN (imsi,                "IMSI")
 
 static void
 init_load_sim_identifier_ready (MMBaseSim *self,
@@ -2622,7 +2653,8 @@
 
         mm_obj_warn (self, "couldn't load SIM identifier: %s", error ? error->message : "unknown error");
         g_clear_error (&error);
-    }
+    } else
+        mm_obj_info (self, "loaded SIM identifier: %s", mm_log_str_personal_info (simid));
 
     mm_gdbus_sim_set_sim_identifier (MM_GDBUS_SIM (self), simid);
     g_free (simid);
@@ -2632,8 +2664,8 @@
     interface_initialization_step (task);
 }
 
-UINT_REPLY_READY_FN (esim_status,  "esim status")
-UINT_REPLY_READY_FN (sim_type,     "sim type")
+ENUM_REPLY_READY_FN (esim_status, "esim status", MMSimEsimStatus, mm_sim_esim_status_get_string)
+ENUM_REPLY_READY_FN (sim_type,    "sim type",    MMSimType,       mm_sim_type_get_string)
 
 static void
 init_wait_sim_ready (MMBaseSim    *self,
@@ -2644,7 +2676,7 @@
     g_autoptr(GError)  error = NULL;
 
     if (!MM_BASE_SIM_GET_CLASS (self)->wait_sim_ready_finish (self, res, &error))
-        mm_obj_warn (self, "couldn't wait for SIM to be ready: %s", error->message);
+        mm_obj_dbg (self, "couldn't wait for SIM to be ready: %s", error->message);
 
     /* Go on to next step */
     ctx = g_task_get_task_data (task);
diff --git a/src/mm-bearer-mbim.c b/src/mm-bearer-mbim.c
index b11ee20..289691c 100644
--- a/src/mm-bearer-mbim.c
+++ b/src/mm-bearer-mbim.c
@@ -234,7 +234,6 @@
 typedef enum {
     CONNECT_STEP_FIRST,
     CONNECT_STEP_LOAD_PROFILE_SETTINGS,
-    CONNECT_STEP_PACKET_SERVICE,
     CONNECT_STEP_SETUP_LINK,
     CONNECT_STEP_SETUP_LINK_MAIN_UP,
     CONNECT_STEP_CHECK_DISCONNECTED,
@@ -251,8 +250,6 @@
     MMPort                *data;
     MMBearerConnectResult *connect_result;
     MbimMessage           *abort_on_failure;
-    guint64                uplink_speed;
-    guint64                downlink_speed;
     /* settings to use */
     gint                   profile_id;
     gchar                 *apn;
@@ -362,6 +359,8 @@
         g_autofree gchar            *ipv6configurationavailable_str = NULL;
         g_autoptr(MMBearerIpConfig)  ipv4_config = NULL;
         g_autoptr(MMBearerIpConfig)  ipv6_config = NULL;
+        guint64                      uplink_speed = 0;
+        guint64                      downlink_speed = 0;
 
         /* IPv4 info */
 
@@ -632,8 +631,10 @@
         if (ctx->profile_id != MM_3GPP_PROFILE_ID_UNKNOWN)
             mm_bearer_connect_result_set_profile_id (ctx->connect_result, ctx->profile_id);
 
-        mm_bearer_connect_result_set_uplink_speed (ctx->connect_result, ctx->uplink_speed);
-        mm_bearer_connect_result_set_downlink_speed (ctx->connect_result, ctx->downlink_speed);
+        /* Propagate speeds from modem object */
+        mm_broadband_modem_mbim_get_speeds (ctx->modem, &uplink_speed, &downlink_speed);
+        mm_bearer_connect_result_set_uplink_speed (ctx->connect_result, uplink_speed);
+        mm_bearer_connect_result_set_downlink_speed (ctx->connect_result, downlink_speed);
     }
 
     if (error) {
@@ -888,7 +889,7 @@
 
     /* From now on link_name will be set, and we'll use that to know
      * whether we should cleanup the link upon a connection failure */
-    mm_obj_info (self, "net link %s created (session id %u)", ctx->link_name, ctx->session_id);
+    mm_obj_msg (self, "net link %s created (session id %u)", ctx->link_name, ctx->session_id);
 
     /* Wait for the data port with the given interface name, which will be
      * added asynchronously */
@@ -905,121 +906,6 @@
                                   task);
 }
 
-static void
-packet_service_set_ready (MbimDevice *device,
-                          GAsyncResult *res,
-                          GTask *task)
-{
-    MMBearerMbim           *self;
-    ConnectContext         *ctx;
-    GError                 *error = NULL;
-    g_autoptr(MbimMessage)  response = NULL;
-    guint32                 nw_error;
-    MbimPacketServiceState  packet_service_state;
-    MbimDataClass           data_class = 0;
-    MbimDataClassV3         data_class_v3 = 0;
-    MbimDataSubclass        data_subclass = 0;
-    guint64                 uplink_speed = 0;
-    guint64                 downlink_speed = 0;
-    MbimFrequencyRange      frequency_range = MBIM_FREQUENCY_RANGE_UNKNOWN;
-
-    self = g_task_get_source_object (task);
-    ctx  = g_task_get_task_data (task);
-
-    response = mbim_device_command_finish (device, res, &error);
-    if (response &&
-        (mbim_message_response_get_result (response, MBIM_MESSAGE_TYPE_COMMAND_DONE, &error) ||
-         error->code == MBIM_STATUS_ERROR_FAILURE)) {
-        g_autoptr(GError) inner_error = NULL;
-
-        if (mbim_device_check_ms_mbimex_version (device, 3, 0)) {
-            mbim_message_ms_basic_connect_v3_packet_service_response_parse (
-                response,
-                &nw_error,
-                &packet_service_state,
-                &data_class_v3,
-                &uplink_speed,
-                &downlink_speed,
-                &frequency_range,
-                &data_subclass,
-                NULL, /* tai */
-                &inner_error);
-        } else if (mbim_device_check_ms_mbimex_version (device, 2, 0)) {
-            mbim_message_ms_basic_connect_v2_packet_service_response_parse (
-                response,
-                &nw_error,
-                &packet_service_state,
-                &data_class,
-                &uplink_speed,
-                &downlink_speed,
-                &frequency_range,
-                &inner_error);
-        } else {
-            mbim_message_packet_service_response_parse (
-                response,
-                &nw_error,
-                &packet_service_state,
-                &data_class,
-                &uplink_speed,
-                &downlink_speed,
-                &inner_error);
-        }
-
-        if (!inner_error) {
-            if (nw_error) {
-                g_clear_error (&error);
-                error = mm_mobile_equipment_error_from_mbim_nw_error (nw_error, self);
-            } else {
-                g_autofree gchar *data_class_str = NULL;
-                g_autofree gchar *data_subclass_str = NULL;
-                g_autofree gchar *frequency_range_str = NULL;
-
-                if (data_class_v3) {
-                    data_class_str = mbim_data_class_v3_build_string_from_mask (data_class_v3);
-                    data_subclass_str = mbim_data_subclass_build_string_from_mask (data_subclass);
-                } else
-                    data_class_str = mbim_data_class_build_string_from_mask (data_class);
-
-                frequency_range_str = mbim_frequency_range_build_string_from_mask (frequency_range);
-                mm_obj_dbg (self, "packet service update:");
-                mm_obj_dbg (self, "           state: '%s'", mbim_packet_service_state_get_string (packet_service_state));
-                mm_obj_dbg (self, "      data class: '%s'", data_class_str);
-                if (data_subclass_str)
-                    mm_obj_dbg (self, "   data subclass: '%s'", data_subclass_str);
-                mm_obj_dbg (self, "          uplink: '%" G_GUINT64_FORMAT "' bps", uplink_speed);
-                mm_obj_dbg (self, "        downlink: '%" G_GUINT64_FORMAT "' bps", downlink_speed);
-                mm_obj_dbg (self, " frequency range: '%s'", frequency_range_str);
-            }
-        } else {
-            /* Prefer the error from the result to the parsing error */
-            if (!error)
-                error = g_steal_pointer (&inner_error);
-        }
-    }
-
-    if (error) {
-        /* Don't make NoDeviceSupport errors fatal; just try to keep on the
-         * connection sequence even with this error. */
-        if (g_error_matches (error, MBIM_STATUS_ERROR, MBIM_STATUS_ERROR_NO_DEVICE_SUPPORT)) {
-            mm_obj_dbg (self, "device doesn't support packet service attach");
-            g_error_free (error);
-        } else {
-            /* All other errors are fatal */
-            g_task_return_error (task, error);
-            g_object_unref (task);
-            return;
-        }
-    }
-
-    /* store speeds to include in the connection result later on */
-    ctx->uplink_speed = uplink_speed;
-    ctx->downlink_speed = downlink_speed;
-
-    /* Keep on */
-    ctx->step++;
-    connect_context_step (task);
-}
-
 static gboolean
 load_settings_from_profile (MMBearerMbim    *self,
                             ConnectContext  *ctx,
@@ -1147,17 +1033,6 @@
         ctx->step++;
         /* Fall through */
 
-    case CONNECT_STEP_PACKET_SERVICE:
-        mm_obj_dbg (self, "activating packet service...");
-        message = mbim_message_packet_service_set_new (MBIM_PACKET_SERVICE_ACTION_ATTACH, NULL);
-        mbim_device_command (mm_port_mbim_peek_device (ctx->mbim),
-                             message,
-                             30,
-                             g_task_get_cancellable (task),
-                             (GAsyncReadyCallback)packet_service_set_ready,
-                             task);
-        return;
-
     case CONNECT_STEP_SETUP_LINK:
         /* if a link prefix hint is available, it's because we should be doing
          * multiplexing */
diff --git a/src/mm-bearer-qmi.c b/src/mm-bearer-qmi.c
index 942f7ab..d934003 100644
--- a/src/mm-bearer-qmi.c
+++ b/src/mm-bearer-qmi.c
@@ -853,7 +853,7 @@
         return NULL;
     }
 
-    mm_obj_info (self, "QMI IPv4 Settings:");
+    mm_obj_msg (self, "QMI IPv4 Settings:");
 
     config = mm_bearer_ip_config_new ();
     mm_bearer_ip_config_set_method (config, ip_method);
@@ -862,15 +862,15 @@
     qmi_inet4_ntop (addr, buf, sizeof (buf));
     mm_bearer_ip_config_set_address (config, buf);
     mm_bearer_ip_config_set_prefix (config, prefix);
-    mm_obj_info (self, "    address: %s/%d", buf, prefix);
+    mm_obj_msg (self, "    address: %s/%d", buf, prefix);
 
     /* IPv4 gateway address */
     if (qmi_message_wds_get_current_settings_output_get_ipv4_gateway_address (output, &addr, &error)) {
         qmi_inet4_ntop (addr, buf, sizeof (buf));
         mm_bearer_ip_config_set_gateway (config, buf);
-        mm_obj_info (self, "    gateway: %s", buf);
+        mm_obj_msg (self, "    gateway: %s", buf);
     } else {
-        mm_obj_info (self, "    gateway: failed (%s)", error->message);
+        mm_obj_msg (self, "    gateway: failed (%s)", error->message);
         g_clear_error (&error);
     }
 
@@ -878,9 +878,9 @@
     if (qmi_message_wds_get_current_settings_output_get_primary_ipv4_dns_address (output, &addr, &error)) {
         qmi_inet4_ntop (addr, buf, sizeof (buf));
         dns[dns_idx++] = buf;
-        mm_obj_info (self, "    DNS #1: %s", buf);
+        mm_obj_msg (self, "    DNS #1: %s", buf);
     } else {
-        mm_obj_info (self, "    DNS #1: failed (%s)", error->message);
+        mm_obj_msg (self, "    DNS #1: failed (%s)", error->message);
         g_clear_error (&error);
     }
 
@@ -888,9 +888,9 @@
     if (qmi_message_wds_get_current_settings_output_get_secondary_ipv4_dns_address (output, &addr, &error)) {
         qmi_inet4_ntop (addr, buf2, sizeof (buf2));
         dns[dns_idx++] = buf2;
-        mm_obj_info (self, "    DNS #2: %s", buf2);
+        mm_obj_msg (self, "    DNS #2: %s", buf2);
     } else {
-        mm_obj_info (self, "    DNS #2: failed (%s)", error->message);
+        mm_obj_msg (self, "    DNS #2: failed (%s)", error->message);
         g_clear_error (&error);
     }
 
@@ -899,7 +899,7 @@
 
     if (mtu) {
         mm_bearer_ip_config_set_mtu (config, mtu);
-        mm_obj_info (self, "       MTU: %d", mtu);
+        mm_obj_msg (self, "       MTU: %d", mtu);
     }
 
     return config;
@@ -946,7 +946,7 @@
         return NULL;
     }
 
-    mm_obj_info (self, "QMI IPv6 Settings:");
+    mm_obj_msg (self, "QMI IPv6 Settings:");
 
     config = mm_bearer_ip_config_new ();
     mm_bearer_ip_config_set_method (config, ip_method);
@@ -956,15 +956,15 @@
 
     mm_bearer_ip_config_set_address (config, buf);
     mm_bearer_ip_config_set_prefix (config, prefix);
-    mm_obj_info (self, "    address: %s/%d", buf, prefix);
+    mm_obj_msg (self, "    address: %s/%d", buf, prefix);
 
     /* IPv6 gateway address */
     if (qmi_message_wds_get_current_settings_output_get_ipv6_gateway_address (output, &array, &prefix, &error)) {
         qmi_inet6_ntop (array, buf, sizeof (buf));
         mm_bearer_ip_config_set_gateway (config, buf);
-        mm_obj_info (self, "    gateway: %s/%d", buf, prefix);
+        mm_obj_msg (self, "    gateway: %s/%d", buf, prefix);
     } else {
-        mm_obj_info (self, "    gateway: failed (%s)", error->message);
+        mm_obj_msg (self, "    gateway: failed (%s)", error->message);
         g_clear_error (&error);
     }
 
@@ -972,9 +972,9 @@
     if (qmi_message_wds_get_current_settings_output_get_ipv6_primary_dns_address (output, &array, &error)) {
         qmi_inet6_ntop (array, buf, sizeof (buf));
         dns[dns_idx++] = buf;
-        mm_obj_info (self, "    DNS #1: %s", buf);
+        mm_obj_msg (self, "    DNS #1: %s", buf);
     } else {
-        mm_obj_info (self, "    DNS #1: failed (%s)", error->message);
+        mm_obj_msg (self, "    DNS #1: failed (%s)", error->message);
         g_clear_error (&error);
     }
 
@@ -982,9 +982,9 @@
     if (qmi_message_wds_get_current_settings_output_get_ipv6_secondary_dns_address (output, &array, &error)) {
         qmi_inet6_ntop (array, buf2, sizeof (buf2));
         dns[dns_idx++] = buf2;
-        mm_obj_info (self, "    DNS #2: %s", buf2);
+        mm_obj_msg (self, "    DNS #2: %s", buf2);
     } else {
-        mm_obj_info (self, "    DNS #2: failed (%s)", error->message);
+        mm_obj_msg (self, "    DNS #2: failed (%s)", error->message);
         g_clear_error (&error);
     }
 
@@ -993,7 +993,7 @@
 
     if (mtu) {
         mm_bearer_ip_config_set_mtu (config, mtu);
-        mm_obj_info (self, "       MTU: %d", mtu);
+        mm_obj_msg (self, "       MTU: %d", mtu);
     }
 
     return config;
@@ -1190,7 +1190,7 @@
     } else {
         client = ctx->client_ipv6;
         mm_obj_dbg (self, "registering for wds extended ip V6 info indication");
-    }		
+    }
     qmi_message_wds_indication_register_input_set_report_extended_ip_configuration_change (input, TRUE, NULL);
     qmi_client_wds_indication_register (
         client,
@@ -1220,11 +1220,11 @@
 
         verbose_cer_type_str = qmi_wds_verbose_call_end_reason_type_get_string (verbose_cer_type);
         verbose_cer_reason_str = qmi_wds_verbose_call_end_reason_get_string (verbose_cer_type, verbose_cer_reason);
-        mm_obj_info (self, "verbose call end reason (%u,%d): [%s] %s",
-                     verbose_cer_type,
-                     verbose_cer_reason,
-                     verbose_cer_type_str,
-                     verbose_cer_reason_str);
+        mm_obj_msg (self, "  verbose call end reason (%u,%d): [%s] %s",
+                    verbose_cer_type,
+                    verbose_cer_reason,
+                    verbose_cer_type_str,
+                    verbose_cer_reason_str);
 
         /* If we have a 3GPP verbose call end reason, we try to build an error
          * with the exact error code and message */
@@ -1242,7 +1242,7 @@
         const gchar *cer_str;
 
         cer_str = qmi_wds_call_end_reason_get_string (cer);
-        mm_obj_info (self, "call end reason (%u): %s", cer, cer_str);
+        mm_obj_msg (self, "  call end reason (%u): %s", cer, cer_str);
 
         return g_error_new (MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_UNKNOWN,
                             "Call failed: %s", cer_str);
@@ -1282,7 +1282,7 @@
                 ctx->packet_data_handle_ipv6 = GLOBAL_PACKET_DATA_HANDLE;
             /* Fall down to a successful connection */
         } else {
-            mm_obj_info (self, "couldn't start network: %s", error->message);
+            mm_obj_msg (self, "couldn't start %s network: %s", ctx->running_ipv4 ? "IPv4" : "IPv6", error->message);
             if (g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_CALL_FAILED)) {
                 g_clear_error (&error);
                 error = mobile_equipment_error_from_start_network_output (self, output);
@@ -1387,11 +1387,11 @@
 
             verbose_cer_type_str = qmi_wds_verbose_call_end_reason_type_get_string (verbose_cer_type);
             verbose_cer_reason_str = qmi_wds_verbose_call_end_reason_get_string (verbose_cer_type, verbose_cer_reason);
-            mm_obj_info (self, "verbose call end reason (%u,%d): [%s] %s",
-                         verbose_cer_type,
-                         verbose_cer_reason,
-                         verbose_cer_type_str,
-                         verbose_cer_reason_str);
+            mm_obj_msg (self, "verbose call end reason (%u,%d): [%s] %s",
+                        verbose_cer_type,
+                        verbose_cer_reason,
+                        verbose_cer_type_str,
+                        verbose_cer_reason_str);
 
             /* If we have a 3GPP verbose call end reason, we try to build an error
              * with the exact error code and message */
@@ -1407,7 +1407,7 @@
             const gchar *cer_str;
 
             cer_str = qmi_wds_call_end_reason_get_string (cer);
-            mm_obj_info (self, "call end reason (%u): %s", cer, cer_str);
+            mm_obj_msg (self, "call end reason (%u): %s", cer, cer_str);
 
             connection_error = g_error_new (MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_UNKNOWN,
                                             "Call failed: %s", cer_str);
@@ -1766,7 +1766,7 @@
 
     /* From now on link_name will be set, and we'll use that to know
      * whether we should cleanup the link upon a connection failure */
-    mm_obj_info (ctx->self, "net link %s created (mux id %u)", ctx->link_name, ctx->mux_id);
+    mm_obj_msg (ctx->self, "net link %s created (mux id %u)", ctx->link_name, ctx->mux_id);
 
     /* Wait for the data port with the given interface name, which will be
      * added asynchronously */
diff --git a/src/mm-broadband-modem-mbim.c b/src/mm-broadband-modem-mbim.c
index 644aaee..682039a 100644
--- a/src/mm-broadband-modem-mbim.c
+++ b/src/mm-broadband-modem-mbim.c
@@ -155,6 +155,8 @@
     MbimDataClass highest_available_data_class;
     MbimRegisterState reg_state;
     MbimPacketServiceState packet_service_state;
+    guint64 packet_service_uplink_speed;
+    guint64 packet_service_downlink_speed;
 
     MbimSubscriberReadyState last_ready_state;
 
@@ -469,7 +471,7 @@
          * capability and mode related operations are going to be done via QMI as well, so that we
          * don't mix both logics */
         if (self->priv->qmi_capability_and_mode_switching)
-            mm_obj_info (self, "QMI-based capability and mode switching support enabled");
+            mm_obj_dbg (self, "QMI-based capability and mode switching support enabled");
     }
 #else
     result = ctx->current_mbim;
@@ -480,12 +482,12 @@
 }
 
 static void
-device_caps_query_ready (MbimDevice *device,
+device_caps_query_ready (MbimDevice   *device,
                          GAsyncResult *res,
-                         GTask *task)
+                         GTask        *task)
 {
+    g_autoptr(MbimMessage)          response = NULL;
     MMBroadbandModemMbim           *self;
-    MbimMessage                    *response;
     GError                         *error = NULL;
     LoadCurrentCapabilitiesContext *ctx;
 
@@ -493,57 +495,114 @@
     ctx  = g_task_get_task_data (task);
 
     response = mbim_device_command_finish (device, res, &error);
-    if (!response ||
-        !mbim_message_response_get_result (response, MBIM_MESSAGE_TYPE_COMMAND_DONE, &error) ||
-        !mbim_message_device_caps_response_parse (
-            response,
-            NULL, /* device_type */
-            &self->priv->caps_cellular_class,
-            NULL, /* voice_class */
-            NULL, /* sim_class */
-            &self->priv->caps_data_class,
-            &self->priv->caps_sms,
-            NULL, /* ctrl_caps */
-            &self->priv->caps_max_sessions,
-            &self->priv->caps_custom_data_class,
-            &self->priv->caps_device_id,
-            &self->priv->caps_firmware_info,
-            &self->priv->caps_hardware_info,
-            &error)) {
+    if (!response || !mbim_message_response_get_result (response, MBIM_MESSAGE_TYPE_COMMAND_DONE, &error)) {
         g_task_return_error (task, error);
         g_object_unref (task);
-        goto out;
+        return;
+    }
+
+    if (mbim_device_check_ms_mbimex_version (device, 3, 0)) {
+        MbimDataClassV3  data_class_v3;
+        MbimDataSubclass data_subclass;
+
+        if (!mbim_message_ms_basic_connect_extensions_v3_device_caps_response_parse (
+                response,
+                NULL, /* device_type */
+                &self->priv->caps_cellular_class,
+                NULL, /* voice_class */
+                NULL, /* sim_class */
+                &data_class_v3,
+                &self->priv->caps_sms,
+                NULL, /* ctrl_caps */
+                &data_subclass,
+                &self->priv->caps_max_sessions,
+                NULL, /* executor_index */
+                NULL, /* wcdma_band_class */
+                NULL, /* lte_band_class_array_size */
+                NULL, /* lte_band_class_array */
+                NULL, /* nr_band_class_array_size */
+                NULL, /* nr_band_class_array */
+                &self->priv->caps_custom_data_class,
+                &self->priv->caps_device_id,
+                &self->priv->caps_firmware_info,
+                &self->priv->caps_hardware_info,
+                &error)) {
+            g_task_return_error (task, error);
+            g_object_unref (task);
+            return;
+        }
+        /* Translate data class v3 to standard data class to simplify further usage of the field */
+        self->priv->caps_data_class = mm_mbim_data_class_from_mbim_data_class_v3_and_subclass (data_class_v3, data_subclass);
+    } else if (mbim_device_check_ms_mbimex_version (device, 2, 0)) {
+        if (!mbim_message_ms_basic_connect_extensions_device_caps_response_parse (
+                response,
+                NULL, /* device_type */
+                &self->priv->caps_cellular_class,
+                NULL, /* voice_class */
+                NULL, /* sim_class */
+                &self->priv->caps_data_class,
+                &self->priv->caps_sms,
+                NULL, /* ctrl_caps */
+                &self->priv->caps_max_sessions,
+                &self->priv->caps_custom_data_class,
+                &self->priv->caps_device_id,
+                &self->priv->caps_firmware_info,
+                &self->priv->caps_hardware_info,
+                NULL, /* executor_index */
+                &error)) {
+            g_task_return_error (task, error);
+            g_object_unref (task);
+            return;
+        }
+    } else {
+        if (!mbim_message_device_caps_response_parse (
+                response,
+                NULL, /* device_type */
+                &self->priv->caps_cellular_class,
+                NULL, /* voice_class */
+                NULL, /* sim_class */
+                &self->priv->caps_data_class,
+                &self->priv->caps_sms,
+                NULL, /* ctrl_caps */
+                &self->priv->caps_max_sessions,
+                &self->priv->caps_custom_data_class,
+                &self->priv->caps_device_id,
+                &self->priv->caps_firmware_info,
+                &self->priv->caps_hardware_info,
+                &error)) {
+            g_task_return_error (task, error);
+            g_object_unref (task);
+            return;
+        }
     }
 
     ctx->current_mbim = mm_modem_capability_from_mbim_device_caps (self->priv->caps_cellular_class,
                                                                    self->priv->caps_data_class,
                                                                    self->priv->caps_custom_data_class);
     complete_current_capabilities (task);
-
-out:
-    if (response)
-        mbim_message_unref (response);
 }
 
 static void
 load_current_capabilities_mbim (GTask *task)
 {
+    g_autoptr(MbimMessage)          message = NULL;
     MMBroadbandModemMbim           *self;
-    MbimMessage                    *message;
     LoadCurrentCapabilitiesContext *ctx;
 
     self = g_task_get_source_object (task);
     ctx = g_task_get_task_data (task);
 
     mm_obj_dbg (self, "loading current capabilities...");
-    message = mbim_message_device_caps_query_new (NULL);
+    if (mbim_device_check_ms_mbimex_version (ctx->device, 2, 0))
+        message = mbim_message_ms_basic_connect_extensions_device_caps_query_new (NULL);
+    else
+        message = mbim_message_device_caps_query_new (NULL);
     mbim_device_command (ctx->device,
                          message,
                          10,
                          NULL,
                          (GAsyncReadyCallback)device_caps_query_ready,
                          task);
-    mbim_message_unref (message);
 }
 
 #if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED
@@ -963,7 +1022,7 @@
     }
 
     /* Build all */
-    mask_all = mm_modem_mode_from_mbim_data_class (self->priv->caps_data_class);
+    mask_all = mm_modem_mode_from_mbim_data_class (self->priv->caps_data_class, self->priv->caps_custom_data_class);
     mode.allowed = mask_all;
     mode.preferred = MM_MODEM_MODE_NONE;
     all = g_array_sized_new (FALSE, FALSE, sizeof (MMModemModeCombination), 1);
@@ -1111,7 +1170,7 @@
     }
 
     mode = g_new0 (MMModemModeCombination, 1);
-    mode->allowed = mm_modem_mode_from_mbim_data_class (preferred_data_classes);
+    mode->allowed = mm_modem_mode_from_mbim_data_class (preferred_data_classes, NULL);
     mode->preferred = MM_MODEM_MODE_NONE;
     g_task_return_pointer (task, mode, (GDestroyNotify)g_free);
     g_object_unref (task);
@@ -1198,8 +1257,8 @@
         return;
 
     requested_data_classes = (MbimDataClass) GPOINTER_TO_UINT (g_task_get_task_data (self->priv->pending_allowed_modes_action));
-    requested_modes = mm_modem_mode_from_mbim_data_class (requested_data_classes);
-    preferred_modes = mm_modem_mode_from_mbim_data_class (preferred_data_classes);
+    requested_modes = mm_modem_mode_from_mbim_data_class (requested_data_classes, NULL);
+    preferred_modes = mm_modem_mode_from_mbim_data_class (preferred_data_classes, NULL);
 
     /* only early complete on success, as we don't know if they're going to be
      * intermediate indications emitted before the preference change is valid */
@@ -1263,8 +1322,8 @@
         return;
     }
 
-    requested_modes = mm_modem_mode_from_mbim_data_class (requested_data_classes);
-    preferred_modes = mm_modem_mode_from_mbim_data_class (preferred_data_classes);
+    requested_modes = mm_modem_mode_from_mbim_data_class (requested_data_classes, NULL);
+    preferred_modes = mm_modem_mode_from_mbim_data_class (preferred_data_classes, NULL);
 
     if (requested_modes != preferred_modes) {
         g_autofree gchar *requested_modes_str = NULL;
@@ -1341,7 +1400,7 @@
 
         /* Limit ANY to the currently supported modes */
         if (allowed == MM_MODEM_MODE_ANY)
-            allowed = mm_modem_mode_from_mbim_data_class (self->priv->caps_data_class);
+            allowed = mm_modem_mode_from_mbim_data_class (self->priv->caps_data_class, self->priv->caps_custom_data_class);
 
         self->priv->requested_data_class = mm_mbim_data_class_from_modem_mode (allowed,
                                                                                mm_iface_modem_is_3gpp (_self),
@@ -3162,8 +3221,8 @@
 {
     /* We have to do a full re-probe here because simply reopening the device
      * and restarting mbim-proxy will leave us without MBIM notifications. */
-    mm_obj_info (self, "connection to mbim-proxy for %s lost, reprobing",
-                 mbim_device_get_path_display (device));
+    mm_obj_msg (self, "connection to mbim-proxy for %s lost, reprobing",
+                mbim_device_get_path_display (device));
 
     g_signal_handler_disconnect (device,
                                  self->priv->mbim_device_removed_id);
@@ -4690,6 +4749,11 @@
     g_autoptr(GError)        error = NULL;
     gboolean                 active_sim_event = FALSE;
 
+    if (self->priv->pending_sim_slot_switch_action) {
+        mm_obj_dbg (self, "ignoring slot status change");
+        return;
+    }
+
     if (mbim_device_check_ms_mbimex_version (device, 3, 0)) {
         if (!mbim_message_ms_basic_connect_v3_subscriber_ready_status_notification_parse (
                 notification,
@@ -4745,29 +4809,35 @@
     self->priv->last_ready_state = ready_state;
 
     if (active_sim_event) {
-        if (self->priv->pending_sim_slot_switch_action)
-            mm_obj_dbg (self, "ignoring slot status change");
-        else
-            mm_iface_modem_process_sim_event (MM_IFACE_MODEM (self));
+        mm_iface_modem_process_sim_event (MM_IFACE_MODEM (self));
     }
 }
 
-typedef struct {
-    MMBroadbandModemMbim *self;
-    guint64               uplink_speed;
-    guint64               downlink_speed;
-} ReportSpeedsContext;
+/*****************************************************************************/
+/* Packet service updates */
+
+void
+mm_broadband_modem_mbim_get_speeds (MMBroadbandModemMbim *self,
+                                    guint64              *uplink_speed,
+                                    guint64              *downlink_speed)
+{
+    if (uplink_speed)
+        *uplink_speed = self->priv->packet_service_uplink_speed;
+    if (downlink_speed)
+        *downlink_speed = self->priv->packet_service_downlink_speed;
+}
 
 static void
-bearer_list_report_speeds (MMBaseBearer *bearer,
-                           gpointer      user_data)
+bearer_list_report_speeds (MMBaseBearer         *bearer,
+                           MMBroadbandModemMbim *self)
 {
-    ReportSpeedsContext *ctx = user_data;
+    if (!MM_IS_BEARER_MBIM (bearer))
+        return;
 
-    if (MM_IS_BEARER_MBIM (bearer)) {
-        mm_obj_dbg (ctx->self, "bearer '%s' speeds updated", mm_base_bearer_get_path (bearer));
-        mm_base_bearer_report_speeds (bearer, ctx->uplink_speed, ctx->downlink_speed);
-    }
+    mm_obj_dbg (self, "bearer '%s' speeds updated", mm_base_bearer_get_path (bearer));
+    mm_base_bearer_report_speeds (bearer,
+                                  self->priv->packet_service_uplink_speed,
+                                  self->priv->packet_service_downlink_speed);
 }
 
 static void
@@ -4879,19 +4949,15 @@
                                   g_strdup (self->priv->current_operator_name));
     }
 
+    self->priv->packet_service_uplink_speed = uplink_speed;
+    self->priv->packet_service_downlink_speed = downlink_speed;
     g_object_get (self,
                   MM_IFACE_MODEM_BEARER_LIST, &bearer_list,
                   NULL);
-    if (bearer_list) {
-        ReportSpeedsContext ctx = {
-            .uplink_speed = uplink_speed,
-            .downlink_speed = downlink_speed,
-        };
-
+    if (bearer_list)
         mm_bearer_list_foreach (bearer_list,
                                 (MMBearerListForeachFunc)bearer_list_report_speeds,
-                                &ctx);
-    }
+                                self);
 }
 
 static void
@@ -8791,7 +8857,6 @@
     self = g_task_get_source_object (task);
 
     g_assert (self->priv->pending_sim_slot_switch_action);
-    self->priv->pending_sim_slot_switch_action = FALSE;
 
     /* the slot index in MM starts at 1 */
     slot_number = GPOINTER_TO_UINT (g_task_get_task_data (task)) - 1;
@@ -8803,6 +8868,7 @@
             &map_count,
             &slot_mappings,
             &error)) {
+        self->priv->pending_sim_slot_switch_action = FALSE;
         g_task_return_error (task, error);
         g_object_unref (task);
         return;
@@ -8811,9 +8877,13 @@
     for (i = 0; i < map_count; i++) {
         if (i == self->priv->executor_index) {
             if (slot_number != slot_mappings[i]->slot) {
+                self->priv->pending_sim_slot_switch_action = FALSE;
                 g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_NOT_FOUND,
                                          "SIM slot switch to '%u' failed", slot_number);
             } else {
+                /* Keep pending_sim_slot_switch_action flag TRUE to cleanly ignore SIM related indications
+                 * during slot swithing, We don't want SIM related indications received trigger the update
+                 * of SimSlots property, which may not be what we want as the modem object is being shutdown */
                 self->priv->active_slot_index = slot_number + 1;
                 g_task_return_boolean (task, TRUE);
             }
@@ -8823,6 +8893,7 @@
         }
     }
 
+    self->priv->pending_sim_slot_switch_action = FALSE;
     g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_NOT_FOUND,
                              "Can't find executor index '%u'", self->priv->executor_index);
     g_object_unref (task);
@@ -8972,53 +9043,72 @@
                           GAsyncResult *res,
                           GTask        *task)
 {
+    MMBroadbandModemMbim   *self;
     g_autoptr(MbimMessage)  response = NULL;
-    GError                 *error = NULL;
+    g_autoptr(GError)       error = NULL;
     MbimPacketServiceState  requested_packet_service_state;
     MbimPacketServiceState  packet_service_state;
+    guint32                 nw_error;
+
+    self = g_task_get_source_object (task);
 
     response = mbim_device_command_finish (device, res, &error);
-    if (!response || !mbim_message_response_get_result (response, MBIM_MESSAGE_TYPE_COMMAND_DONE, &error)) {
-        g_task_return_error (task, error);
-        g_object_unref (task);
-        return;
-    }
+    if (response &&
+        (mbim_message_response_get_result (response, MBIM_MESSAGE_TYPE_COMMAND_DONE, &error) ||
+         error->code == MBIM_STATUS_ERROR_FAILURE)) {
+        g_autoptr(GError) inner_error = NULL;
 
-    if (mbim_device_check_ms_mbimex_version (device, 3, 0)) {
-        mbim_message_ms_basic_connect_v3_packet_service_response_parse (
-            response,
-            NULL, /* &nw_error */
-            &packet_service_state,
-            NULL, /* data_class_v3 */
-            NULL, /* uplink_speed */
-            NULL, /* downlink_speed */
-            NULL, /* frequency_range */
-            NULL, /* data_subclass */
-            NULL, /* tai */
-            &error);
-    } else if (mbim_device_check_ms_mbimex_version (device, 2, 0)) {
-        mbim_message_ms_basic_connect_v2_packet_service_response_parse (
-            response,
-            NULL, /* nw_error */
-            &packet_service_state,
-            NULL, /* data_class */
-            NULL, /* uplink_speed */
-            NULL, /* downlink_speed */
-            NULL, /* frequency_range */
-            &error);
-    } else {
-        mbim_message_packet_service_response_parse (
-            response,
-            NULL, /* nw_error */
-            &packet_service_state,
-            NULL, /* data_class */
-            NULL, /* uplink_speed */
-            NULL, /* downlink_speed */
-            &error);
+        if (mbim_device_check_ms_mbimex_version (device, 3, 0)) {
+            mbim_message_ms_basic_connect_v3_packet_service_response_parse (
+                response,
+                &nw_error,
+                &packet_service_state,
+                NULL, /* data_class_v3 */
+                NULL, /* uplink_speed */
+                NULL, /* downlink_speed */
+                NULL, /* frequency_range */
+                NULL, /* data_subclass */
+                NULL, /* tai */
+                &inner_error);
+        } else if (mbim_device_check_ms_mbimex_version (device, 2, 0)) {
+            mbim_message_ms_basic_connect_v2_packet_service_response_parse (
+                response,
+                &nw_error,
+                &packet_service_state,
+                NULL, /* data_class */
+                NULL, /* uplink_speed */
+                NULL, /* downlink_speed */
+                NULL, /* frequency_range */
+                &inner_error);
+        } else {
+            mbim_message_packet_service_response_parse (
+                response,
+                &nw_error,
+                &packet_service_state,
+                NULL, /* data_class */
+                NULL, /* uplink_speed */
+                NULL, /* downlink_speed */
+                &inner_error);
+        }
+
+        if (!inner_error) {
+            /* Prefer the NW error if available */
+            if (nw_error) {
+                g_clear_error (&error);
+                error = mm_mobile_equipment_error_from_mbim_nw_error (nw_error, self);
+            }
+        } else {
+            /* Prefer the error from the result to the parsing error */
+            if (!error)
+                error = g_steal_pointer (&inner_error);
+        }
     }
 
     if (error) {
-        g_task_return_error (task, error);
+        if (g_error_matches (error, MBIM_STATUS_ERROR, MBIM_STATUS_ERROR_NO_DEVICE_SUPPORT))
+            g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED, "%s", error->message);
+        else
+            g_task_return_error (task, g_steal_pointer (&error));
         g_object_unref (task);
         return;
     }
@@ -9077,7 +9167,7 @@
     message = mbim_message_packet_service_set_new (packet_service_action, NULL);
     mbim_device_command (device,
                          message,
-                         10,
+                         30,
                          NULL,
                          (GAsyncReadyCallback)packet_service_set_ready,
                          task);
diff --git a/src/mm-broadband-modem-mbim.h b/src/mm-broadband-modem-mbim.h
index b8b5951..f85d23d 100644
--- a/src/mm-broadband-modem-mbim.h
+++ b/src/mm-broadband-modem-mbim.h
@@ -68,4 +68,9 @@
 void mm_broadband_modem_mbim_set_unlock_retries (MMBroadbandModemMbim *self,
                                                  MMModemLock           lock_type,
                                                  guint32               remaining_attempts);
+
+void mm_broadband_modem_mbim_get_speeds (MMBroadbandModemMbim *self,
+                                         guint64              *uplink_speed,
+                                         guint64              *downlink_speed);
+
 #endif /* MM_BROADBAND_MODEM_MBIM_H */
diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c
index 28b42c9..6dbb07a 100644
--- a/src/mm-broadband-modem-qmi.c
+++ b/src/mm-broadband-modem-qmi.c
@@ -187,7 +187,10 @@
      * (not applicable when using NAS Serving System) */
     gboolean dsd_supported;
     gboolean dsd_data_rat_available;
-    MMModem3gppRegistrationState system_info_ps_registration_state;
+    MMModem3gppRegistrationState system_info_registration_state_cs;
+    MMModem3gppRegistrationState system_info_registration_state_ps;
+    MMModem3gppRegistrationState system_info_registration_state_eps;
+    MMModem3gppRegistrationState system_info_registration_state_5gs;
     MMModemAccessTechnology access_tech;
     guint16 location_area_code;
     guint16 tracking_area_code;
@@ -3339,631 +3342,72 @@
     qmi_message_nas_get_serving_system_output_unref (output);
 }
 
-static gboolean
-process_common_info (QmiNasServiceStatus service_status,
-                     gboolean domain_valid,
-                     QmiNasNetworkServiceDomain domain,
-                     gboolean roaming_status_valid,
-                     QmiNasRoamingStatus roaming_status,
-                     gboolean forbidden_valid,
-                     gboolean forbidden,
-                     gboolean lac_valid,
-                     guint16 lac,
-                     gboolean tac_valid,
-                     guint16 tac,
-                     gboolean cid_valid,
-                     guint32 cid,
-                     gboolean network_id_valid,
-                     const gchar *mcc,
-                     const gchar *mnc,
-                     MMModem3gppRegistrationState *mm_cs_registration_state,
-                     MMModem3gppRegistrationState *mm_ps_registration_state,
-                     guint16 *mm_lac,
-                     guint16 *mm_tac,
-                     guint32 *mm_cid,
-                     gchar **mm_operator_id)
-{
-    MMModem3gppRegistrationState tmp_registration_state;
-    gboolean apply_cs = TRUE;
-    gboolean apply_ps = TRUE;
-
-    if (service_status != QMI_NAS_SERVICE_STATUS_LIMITED &&
-        service_status != QMI_NAS_SERVICE_STATUS_AVAILABLE &&
-        service_status != QMI_NAS_SERVICE_STATUS_LIMITED_REGIONAL)
-        return FALSE;
-
-    /* If we don't have domain, unknown */
-    if (!domain_valid)
-        tmp_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
-    else if (domain == QMI_NAS_NETWORK_SERVICE_DOMAIN_NONE)
-        tmp_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING;
-    else if (domain == QMI_NAS_NETWORK_SERVICE_DOMAIN_UNKNOWN)
-        tmp_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
-    else {
-        /* If we have CS or PS service domain, assume registered for now */
-        if (domain == QMI_NAS_NETWORK_SERVICE_DOMAIN_CS)
-            apply_ps = FALSE;
-        else if (domain == QMI_NAS_NETWORK_SERVICE_DOMAIN_PS)
-            apply_cs = FALSE;
-        else if (domain == QMI_NAS_NETWORK_SERVICE_DOMAIN_CS_PS) {
-            /* both apply */ ;
-        }
-
-        /* Check if we really are roaming or forbidden */
-        if (forbidden_valid && forbidden)
-            tmp_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_DENIED;
-        else {
-            if (roaming_status_valid && roaming_status == QMI_NAS_ROAMING_STATUS_ON)
-                tmp_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING;
-            else
-                tmp_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_HOME;
-
-            /* If we're registered either at home or roaming, try to get LAC/CID */
-            if (lac_valid)
-                *mm_lac = lac;
-            if (tac_valid)
-                *mm_tac = tac;
-            if (cid_valid)
-                *mm_cid = cid;
-        }
-    }
-
-    if (apply_cs)
-        *mm_cs_registration_state = tmp_registration_state;
-    if (apply_ps)
-        *mm_ps_registration_state = tmp_registration_state;
-
-    if (network_id_valid) {
-        *mm_operator_id = g_malloc (7);
-        memcpy (*mm_operator_id, mcc, 3);
-        if ((guint8)mnc[2] == 0xFF) {
-            memcpy (&((*mm_operator_id)[3]), mnc, 2);
-            (*mm_operator_id)[5] = '\0';
-        } else {
-            memcpy (&((*mm_operator_id)[3]), mnc, 3);
-            (*mm_operator_id)[6] = '\0';
-        }
-    }
-
-    return TRUE;
-}
-
-static gboolean
-process_gsm_info (MMBroadbandModemQmi *self,
-                  QmiMessageNasGetSystemInfoOutput *response_output,
-                  QmiIndicationNasSystemInfoOutput *indication_output,
-                  MMModem3gppRegistrationState *mm_cs_registration_state,
-                  MMModem3gppRegistrationState *mm_ps_registration_state,
-                  guint16 *mm_lac,
-                  guint32 *mm_cid,
-                  gchar **mm_operator_id,
-                  MMModemAccessTechnology *mm_act)
-{
-    QmiNasServiceStatus service_status;
-    gboolean domain_valid;
-    QmiNasNetworkServiceDomain domain;
-    gboolean roaming_status_valid;
-    QmiNasRoamingStatus roaming_status;
-    gboolean forbidden_valid;
-    gboolean forbidden;
-    gboolean lac_valid;
-    guint16 lac;
-    gboolean cid_valid;
-    guint32 cid;
-    gboolean network_id_valid;
-    const gchar *mcc;
-    const gchar *mnc;
-
-    g_assert ((response_output != NULL && indication_output == NULL) ||
-              (response_output == NULL && indication_output != NULL));
-
-    *mm_ps_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
-    *mm_cs_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
-    *mm_lac = 0;
-    *mm_cid = 0;
-    g_free (*mm_operator_id);
-    *mm_operator_id = NULL;
-
-    if (response_output) {
-        if (!qmi_message_nas_get_system_info_output_get_gsm_service_status (
-                response_output,
-                &service_status,
-                NULL, /* true_service_status */
-                NULL, /* preferred_data_path */
-                NULL) ||
-            !qmi_message_nas_get_system_info_output_get_gsm_system_info_v2 (
-                response_output,
-                &domain_valid,         &domain,
-                NULL, NULL, /* service_capability */
-                &roaming_status_valid, &roaming_status,
-                &forbidden_valid,      &forbidden,
-                &lac_valid,            &lac,
-                &cid_valid,            &cid,
-                NULL, NULL, NULL, /* registration_reject_info */
-                &network_id_valid,     &mcc, &mnc,
-                NULL, NULL, /* egprs support */
-                NULL, NULL, /* dtm_support */
-                NULL)) {
-            mm_obj_dbg (self, "no GSM service reported");
-            return FALSE;
-        }
-    } else {
-        if (!qmi_indication_nas_system_info_output_get_gsm_service_status (
-                indication_output,
-                &service_status,
-                NULL, /* true_service_status */
-                NULL, /* preferred_data_path */
-                NULL) ||
-            !qmi_indication_nas_system_info_output_get_gsm_system_info_v2 (
-                indication_output,
-                &domain_valid,         &domain,
-                NULL, NULL, /* service_capability */
-                &roaming_status_valid, &roaming_status,
-                &forbidden_valid,      &forbidden,
-                &lac_valid,            &lac,
-                &cid_valid,            &cid,
-                NULL, NULL, NULL, /* registration_reject_info */
-                &network_id_valid,     &mcc, &mnc,
-                NULL, NULL, /* egprs support */
-                NULL, NULL, /* dtm_support */
-                NULL)) {
-            mm_obj_dbg (self, "no GSM service reported");
-            return FALSE;
-        }
-    }
-
-    if (!process_common_info (service_status,
-                              domain_valid,         domain,
-                              roaming_status_valid, roaming_status,
-                              forbidden_valid,      forbidden,
-                              lac_valid,            lac,
-                              FALSE,                0,
-                              cid_valid,            cid,
-                              network_id_valid,     mcc, mnc,
-                              mm_cs_registration_state,
-                              mm_ps_registration_state,
-                              mm_lac,
-                              NULL,
-                              mm_cid,
-                              mm_operator_id)) {
-        mm_obj_dbg (self, "no GSM service registered");
-        return FALSE;
-    }
-
-    *mm_act |= MM_MODEM_ACCESS_TECHNOLOGY_GSM;
-
-    return TRUE;
-}
-
-static gboolean
-process_wcdma_info (MMBroadbandModemQmi *self,
-                    QmiMessageNasGetSystemInfoOutput *response_output,
-                    QmiIndicationNasSystemInfoOutput *indication_output,
-                    MMModem3gppRegistrationState *mm_cs_registration_state,
-                    MMModem3gppRegistrationState *mm_ps_registration_state,
-                    guint16 *mm_lac,
-                    guint32 *mm_cid,
-                    gchar **mm_operator_id,
-                    MMModemAccessTechnology *mm_act)
-{
-    QmiNasServiceStatus service_status;
-    gboolean domain_valid;
-    QmiNasNetworkServiceDomain domain;
-    gboolean roaming_status_valid;
-    QmiNasRoamingStatus roaming_status;
-    gboolean forbidden_valid;
-    gboolean forbidden;
-    gboolean lac_valid;
-    guint16 lac;
-    gboolean cid_valid;
-    guint32 cid;
-    gboolean network_id_valid;
-    const gchar *mcc;
-    const gchar *mnc;
-    gboolean hs_service_valid;
-    QmiNasWcdmaHsService hs_service;
-
-    g_assert ((response_output != NULL && indication_output == NULL) ||
-              (response_output == NULL && indication_output != NULL));
-
-    *mm_ps_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
-    *mm_cs_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
-    *mm_lac = 0;
-    *mm_cid = 0;
-    g_free (*mm_operator_id);
-    *mm_operator_id = NULL;
-
-    if (response_output) {
-        if (!qmi_message_nas_get_system_info_output_get_wcdma_service_status (
-                response_output,
-                &service_status,
-                NULL, /* true_service_status */
-                NULL, /* preferred_data_path */
-                NULL) ||
-            !qmi_message_nas_get_system_info_output_get_wcdma_system_info_v2 (
-                response_output,
-                &domain_valid,         &domain,
-                NULL, NULL, /* service_capability */
-                &roaming_status_valid, &roaming_status,
-                &forbidden_valid,      &forbidden,
-                &lac_valid,            &lac,
-                &cid_valid,            &cid,
-                NULL, NULL, NULL, /* registration_reject_info */
-                &network_id_valid,     &mcc, &mnc,
-                NULL, NULL, /* hs_call_status */
-                &hs_service_valid,     &hs_service,
-                NULL, NULL, /* primary_scrambling_code */
-                NULL)) {
-            mm_obj_dbg (self, "no WCDMA service reported");
-            return FALSE;
-        }
-    } else {
-        if (!qmi_indication_nas_system_info_output_get_wcdma_service_status (
-                indication_output,
-                &service_status,
-                NULL, /* true_service_status */
-                NULL, /* preferred_data_path */
-                NULL) ||
-            !qmi_indication_nas_system_info_output_get_wcdma_system_info_v2 (
-                indication_output,
-                &domain_valid,         &domain,
-                NULL, NULL, /* service_capability */
-                &roaming_status_valid, &roaming_status,
-                &forbidden_valid,      &forbidden,
-                &lac_valid,            &lac,
-                &cid_valid,            &cid,
-                NULL, NULL, NULL, /* registration_reject_info */
-                &network_id_valid,     &mcc, &mnc,
-                NULL, NULL, /* hs_call_status */
-                &hs_service_valid,     &hs_service,
-                NULL, NULL, /* primary_scrambling_code */
-                NULL)) {
-            mm_obj_dbg (self, "no WCDMA service reported");
-            return FALSE;
-        }
-    }
-
-    if (!process_common_info (service_status,
-                              domain_valid,         domain,
-                              roaming_status_valid, roaming_status,
-                              forbidden_valid,      forbidden,
-                              lac_valid,            lac,
-                              FALSE,                0,
-                              cid_valid,            cid,
-                              network_id_valid,     mcc, mnc,
-                              mm_cs_registration_state,
-                              mm_ps_registration_state,
-                              mm_lac,
-                              NULL,
-                              mm_cid,
-                              mm_operator_id)) {
-        mm_obj_dbg (self, "no WCDMA service registered");
-        return FALSE;
-    }
-
-    *mm_act |= MM_MODEM_ACCESS_TECHNOLOGY_UMTS;
-
-    return TRUE;
-}
-
-static gboolean
-process_lte_info (MMBroadbandModemQmi *self,
-                  QmiMessageNasGetSystemInfoOutput *response_output,
-                  QmiIndicationNasSystemInfoOutput *indication_output,
-                  MMModem3gppRegistrationState *mm_cs_registration_state,
-                  MMModem3gppRegistrationState *mm_ps_registration_state,
-                  guint16 *mm_lac,
-                  guint16 *mm_tac,
-                  guint32 *mm_cid,
-                  gchar **mm_operator_id,
-                  MMModemAccessTechnology *mm_act)
-{
-    QmiNasServiceStatus service_status;
-    gboolean domain_valid;
-    QmiNasNetworkServiceDomain domain;
-    gboolean roaming_status_valid;
-    QmiNasRoamingStatus roaming_status;
-    gboolean forbidden_valid;
-    gboolean forbidden;
-    gboolean lac_valid;
-    guint16 lac;
-    gboolean tac_valid;
-    guint16 tac;
-    gboolean cid_valid;
-    guint32 cid;
-    gboolean network_id_valid;
-    const gchar *mcc;
-    const gchar *mnc;
-    gboolean endc_available = FALSE;
-
-    g_assert ((response_output != NULL && indication_output == NULL) ||
-              (response_output == NULL && indication_output != NULL));
-
-    *mm_ps_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
-    *mm_cs_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
-    *mm_lac = 0;
-    *mm_tac = 0;
-    *mm_cid = 0;
-    g_free (*mm_operator_id);
-    *mm_operator_id = NULL;
-
-    if (response_output) {
-        if (!qmi_message_nas_get_system_info_output_get_lte_service_status (
-                response_output,
-                &service_status,
-                NULL, /* true_service_status */
-                NULL, /* preferred_data_path */
-                NULL) ||
-            !qmi_message_nas_get_system_info_output_get_lte_system_info_v2 (
-                response_output,
-                &domain_valid,         &domain,
-                NULL, NULL, /* service_capability */
-                &roaming_status_valid, &roaming_status,
-                &forbidden_valid,      &forbidden,
-                &lac_valid,            &lac,
-                &cid_valid,            &cid,
-                NULL, NULL, NULL, /* registration_reject_info */
-                &network_id_valid,     &mcc, &mnc,
-                &tac_valid,            &tac,
-                NULL)) {
-            mm_obj_dbg (self, "no LTE service reported");
-            return FALSE;
-        }
-
-        qmi_message_nas_get_system_info_output_get_eutra_with_nr5g_availability (
-            response_output,
-            &endc_available,
-            NULL);
-    } else {
-        if (!qmi_indication_nas_system_info_output_get_lte_service_status (
-                indication_output,
-                &service_status,
-                NULL, /* true_service_status */
-                NULL, /* preferred_data_path */
-                NULL) ||
-            !qmi_indication_nas_system_info_output_get_lte_system_info_v2 (
-                indication_output,
-                &domain_valid,         &domain,
-                NULL, NULL, /* service_capability */
-                &roaming_status_valid, &roaming_status,
-                &forbidden_valid,      &forbidden,
-                &lac_valid,            &lac,
-                &cid_valid,            &cid,
-                NULL, NULL, NULL, /* registration_reject_info */
-                &network_id_valid,     &mcc, &mnc,
-                &tac_valid,            &tac,
-                NULL)) {
-            mm_obj_dbg (self, "no LTE service reported");
-            return FALSE;
-        }
-
-        qmi_indication_nas_system_info_output_get_eutra_with_nr5g_availability (
-            indication_output,
-            &endc_available,
-            NULL);
-    }
-
-    if (!process_common_info (service_status,
-                              domain_valid,         domain,
-                              roaming_status_valid, roaming_status,
-                              forbidden_valid,      forbidden,
-                              lac_valid,            lac,
-                              tac_valid,            tac,
-                              cid_valid,            cid,
-                              network_id_valid,     mcc, mnc,
-                              mm_cs_registration_state,
-                              mm_ps_registration_state,
-                              mm_lac,
-                              mm_tac,
-                              mm_cid,
-                              mm_operator_id)) {
-        mm_obj_dbg (self, "no LTE service registered");
-        return FALSE;
-    }
-
-    *mm_act |= MM_MODEM_ACCESS_TECHNOLOGY_LTE;
-    if (endc_available)
-        *mm_act |= MM_MODEM_ACCESS_TECHNOLOGY_5GNR;
-
-    return TRUE;
-}
-
-static gboolean
-process_nr5g_info (MMBroadbandModemQmi *self,
-                   QmiMessageNasGetSystemInfoOutput *response_output,
-                   QmiIndicationNasSystemInfoOutput *indication_output,
-                   MMModem3gppRegistrationState *mm_cs_registration_state,
-                   MMModem3gppRegistrationState *mm_ps_registration_state,
-                   guint16 *mm_lac,
-                   guint16 *mm_tac,
-                   guint32 *mm_cid,
-                   gchar **mm_operator_id,
-                   MMModemAccessTechnology *mm_act)
-{
-    QmiNasServiceStatus service_status;
-    gboolean domain_valid;
-    QmiNasNetworkServiceDomain domain;
-    gboolean roaming_status_valid;
-    QmiNasRoamingStatus roaming_status;
-    gboolean forbidden_valid;
-    gboolean forbidden;
-    gboolean lac_valid;
-    guint16 lac;
-    gboolean tac_valid;
-    guint16 tac;
-    gboolean cid_valid;
-    guint32 cid;
-    gboolean network_id_valid;
-    const gchar *mcc;
-    const gchar *mnc;
-
-    g_assert ((response_output != NULL && indication_output == NULL) ||
-              (response_output == NULL && indication_output != NULL));
-
-    *mm_ps_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
-    *mm_cs_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
-    *mm_lac = 0;
-    *mm_tac = 0;
-    *mm_cid = 0;
-    g_free (*mm_operator_id);
-    *mm_operator_id = NULL;
-
-    if (response_output) {
-        if (!qmi_message_nas_get_system_info_output_get_nr5g_service_status_info (
-                response_output,
-                &service_status,
-                NULL, /* true_service_status */
-                NULL, /* preferred_data_path */
-                NULL) ||
-            !qmi_message_nas_get_system_info_output_get_nr5g_system_info (
-                response_output,
-                &domain_valid,         &domain,
-                NULL, NULL, /* service_capability */
-                &roaming_status_valid, &roaming_status,
-                &forbidden_valid,      &forbidden,
-                &lac_valid,            &lac,
-                &cid_valid,            &cid,
-                NULL, NULL, NULL, /* registration_reject_info */
-                &network_id_valid,     &mcc, &mnc,
-                &tac_valid,            &tac,
-                NULL)) {
-            mm_obj_dbg (self, "no NR5G service reported");
-            return FALSE;
-        }
-    } else {
-        if (!qmi_indication_nas_system_info_output_get_nr5g_service_status_info (
-                indication_output,
-                &service_status,
-                NULL, /* true_service_status */
-                NULL, /* preferred_data_path */
-                NULL) ||
-            !qmi_indication_nas_system_info_output_get_nr5g_system_info (
-                indication_output,
-                &domain_valid,         &domain,
-                NULL, NULL, /* service_capability */
-                &roaming_status_valid, &roaming_status,
-                &forbidden_valid,      &forbidden,
-                &lac_valid,            &lac,
-                &cid_valid,            &cid,
-                NULL, NULL, NULL, /* registration_reject_info */
-                &network_id_valid,     &mcc, &mnc,
-                &tac_valid,            &tac,
-                NULL)) {
-            mm_obj_dbg (self, "no NR5G service reported");
-            return FALSE;
-        }
-    }
-
-    if (!process_common_info (service_status,
-                              domain_valid,         domain,
-                              roaming_status_valid, roaming_status,
-                              forbidden_valid,      forbidden,
-                              lac_valid,            lac,
-                              tac_valid,            tac,
-                              cid_valid,            cid,
-                              network_id_valid,     mcc, mnc,
-                              mm_cs_registration_state,
-                              mm_ps_registration_state,
-                              mm_lac,
-                              mm_tac,
-                              mm_cid,
-                              mm_operator_id)) {
-        mm_obj_dbg (self, "no NR5G service registered");
-        return FALSE;
-    }
-
-    *mm_act |= MM_MODEM_ACCESS_TECHNOLOGY_5GNR;
-
-    return TRUE;
-}
-
 static void
-consolidated_update_ps_registration_state (MMBroadbandModemQmi *self,
-                                           gboolean             is_eps,
-                                           gboolean             is_5gs)
+consolidated_update_registration_state (MMBroadbandModemQmi *self)
 {
     MMModem3gppRegistrationState state_ps;
+    MMModem3gppRegistrationState state_eps;
+    MMModem3gppRegistrationState state_5gs;
 
-    state_ps = self->priv->system_info_ps_registration_state;
+    /* CS state unaffected by DSD state */
+    mm_iface_modem_3gpp_update_cs_registration_state  (MM_IFACE_MODEM_3GPP (self), self->priv->system_info_registration_state_cs, TRUE);
 
     /* If DSD supported but data RAT not set, no transition to HOME/ROAMING, force IDLE */
-    if ((state_ps == MM_MODEM_3GPP_REGISTRATION_STATE_HOME || state_ps == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING)) {
-        if (self->priv->dsd_supported && !self->priv->dsd_data_rat_available) {
+    state_ps = self->priv->system_info_registration_state_ps;
+    state_eps = self->priv->system_info_registration_state_eps;
+    state_5gs = self->priv->system_info_registration_state_5gs;
+    if (self->priv->dsd_supported && !self->priv->dsd_data_rat_available) {
+        if ((state_ps == MM_MODEM_3GPP_REGISTRATION_STATE_HOME || state_ps == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING)) {
             mm_obj_dbg (self, "fallback PS registration state to idle: DSD data RAT unavailable");
             state_ps  = MM_MODEM_3GPP_REGISTRATION_STATE_IDLE;
-        } else if (!self->priv->dsd_supported)
-            mm_obj_dbg (self, "updating PS registration state: DSD unsupported");
-        else if (self->priv->dsd_data_rat_available)
-            mm_obj_dbg (self, "updating PS registration state: DSD data RAT available");
-        else
-            g_assert_not_reached ();
-    }
-
+        }
+        if ((state_eps == MM_MODEM_3GPP_REGISTRATION_STATE_HOME || state_eps == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING)) {
+            mm_obj_dbg (self, "fallback EPS registration state to idle: DSD data RAT unavailable");
+            state_eps  = MM_MODEM_3GPP_REGISTRATION_STATE_IDLE;
+        }
+        if ((state_5gs == MM_MODEM_3GPP_REGISTRATION_STATE_HOME || state_5gs == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING)) {
+            mm_obj_dbg (self, "fallback 5GS registration state to idle: DSD data RAT unavailable");
+            state_5gs  = MM_MODEM_3GPP_REGISTRATION_STATE_IDLE;
+        }
+    } else if (!self->priv->dsd_supported)
+        mm_obj_dbg (self, "updating PS/EPS/5GS registration state: DSD unsupported");
+    else if (self->priv->dsd_data_rat_available)
+        mm_obj_dbg (self, "updating PS/EPS/5GS registration state: DSD data RAT available");
+    else
+        g_assert_not_reached ();
     mm_iface_modem_3gpp_update_ps_registration_state  (MM_IFACE_MODEM_3GPP (self), state_ps, TRUE);
-    mm_iface_modem_3gpp_update_eps_registration_state (MM_IFACE_MODEM_3GPP (self), is_eps ? state_ps : MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN, TRUE);
-    mm_iface_modem_3gpp_update_5gs_registration_state (MM_IFACE_MODEM_3GPP (self), is_5gs ? state_ps : MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN, TRUE);
+    mm_iface_modem_3gpp_update_eps_registration_state (MM_IFACE_MODEM_3GPP (self), state_eps, TRUE);
+    mm_iface_modem_3gpp_update_5gs_registration_state (MM_IFACE_MODEM_3GPP (self), state_5gs, TRUE);
     mm_iface_modem_3gpp_apply_deferred_registration_state (MM_IFACE_MODEM_3GPP (self));
 }
 
 static void
-common_process_system_info_3gpp (MMBroadbandModemQmi *self,
+common_process_system_info_3gpp (MMBroadbandModemQmi              *self,
                                  QmiMessageNasGetSystemInfoOutput *response_output,
                                  QmiIndicationNasSystemInfoOutput *indication_output)
 {
-    MMModem3gppRegistrationState cs_registration_state;
-    MMModem3gppRegistrationState ps_registration_state;
-    MMModemAccessTechnology act;
-    guint16 lac;
-    guint16 tac;
-    guint32 cid;
-    gchar *operator_id;
-    gboolean has_nr5g_info = FALSE;
-    gboolean has_lte_info = FALSE;
+    MMModem3gppRegistrationState  registration_state_cs = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
+    MMModem3gppRegistrationState  registration_state_ps = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
+    MMModem3gppRegistrationState  registration_state_eps = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
+    MMModem3gppRegistrationState  registration_state_5gs = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
+    MMModemAccessTechnology       act = MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN;
+    guint16                       lac = 0;
+    guint16                       tac = 0;
+    guint32                       cid = 0;
+    gchar                        *operator_id = NULL;
 
-    ps_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
-    cs_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
-    act = MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN;
-    lac = 0;
-    tac = 0;
-    cid = 0;
-    operator_id = NULL;
-
-    /* Process infos, with the following priority:
-     *   NR5G > LTE > WCDMA > GSM
-     * The first one giving results will be the one reported.
-     */
-    if (!(has_nr5g_info = process_nr5g_info (self, response_output, indication_output,
-                                             &cs_registration_state,
-                                             &ps_registration_state,
-                                             &lac,
-                                             &tac,
-                                             &cid,
-                                             &operator_id,
-                                             &act)) &&
-        !(has_lte_info = process_lte_info (self, response_output, indication_output,
-                                           &cs_registration_state,
-                                           &ps_registration_state,
-                                           &lac,
-                                           &tac,
-                                           &cid,
-                                           &operator_id,
-                                           &act)) &&
-        !process_wcdma_info (self, response_output, indication_output,
-                             &cs_registration_state,
-                             &ps_registration_state,
-                             &lac,
-                             &cid,
-                             &operator_id,
-                             &act) &&
-        !process_gsm_info (self, response_output, indication_output,
-                           &cs_registration_state,
-                           &ps_registration_state,
-                           &lac,
-                           &cid,
-                           &operator_id,
-                           &act)) {
-        mm_obj_dbg (self, "no service (GSM, WCDMA, LTE or NR5G) reported");
-    }
+    mm_modem_registration_state_from_qmi_system_info (response_output,
+                                                      indication_output,
+                                                      &registration_state_cs,
+                                                      &registration_state_ps,
+                                                      &registration_state_eps,
+                                                      &registration_state_5gs,
+                                                      &lac,
+                                                      &tac,
+                                                      &cid,
+                                                      &operator_id,
+                                                      &act,
+                                                      self);
 
     /* Cache current operator ID */
     if (operator_id) {
@@ -3971,13 +3415,14 @@
         self->priv->current_operator_id = operator_id;
     }
 
-    /* Report new registration states.
-     * Note: consolidated_update_ps_registration_state() calls apply_deferred_registration_state() always */
-    mm_iface_modem_3gpp_update_cs_registration_state (MM_IFACE_MODEM_3GPP (self), cs_registration_state, TRUE);
-    /* Store PS system reg state and update PS/EPS/5GS states accordingly */
-    self->priv->system_info_ps_registration_state = ps_registration_state;
-    consolidated_update_ps_registration_state (self, has_lte_info, has_nr5g_info);
+    /* Store latest registration states and update them */
+    self->priv->system_info_registration_state_cs = registration_state_cs;
+    self->priv->system_info_registration_state_ps = registration_state_ps;
+    self->priv->system_info_registration_state_eps = registration_state_eps;
+    self->priv->system_info_registration_state_5gs = registration_state_5gs;
+    consolidated_update_registration_state (self);
 
+    /* Store act and location info and update them */
     self->priv->access_tech = act;
     self->priv->location_area_code = lac;
     self->priv->tracking_area_code = tac;
@@ -3986,15 +3431,34 @@
     mm_iface_modem_3gpp_update_location (MM_IFACE_MODEM_3GPP (self), lac, tac, cid);
 }
 
+static gboolean
+get_3gpp_rat_data_available (QmiDsdRadioAccessTechnology rat)
+{
+    switch (rat) {
+        case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_WCDMA:
+        case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_TDSCDMA:
+        case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_GERAN:
+        case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_LTE:
+        case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_5G:
+            return TRUE;
+        case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_WLAN:
+        case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP2_1X:
+        case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP2_HRPD:
+        case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP2_EHRPD:
+        case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP2_WLAN:
+        case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_UNKNOWN:
+        default:
+            return FALSE;
+    }
+}
+
 static void
-common_process_system_status_3gpp (MMBroadbandModemQmi *self,
+common_process_system_status_3gpp (MMBroadbandModemQmi                *self,
                                    QmiMessageDsdGetSystemStatusOutput *response_output,
                                    QmiIndicationDsdSystemStatusOutput *indication_output)
 {
     GArray   *available_systems = NULL;
     gboolean  data_rat_available = FALSE;
-    gboolean  is_lte = FALSE;
-    gboolean  is_nr5g = FALSE;
 
     if (response_output) {
         qmi_message_dsd_get_system_status_output_get_available_systems (response_output, &available_systems, NULL);
@@ -4004,31 +3468,8 @@
 
             system = &g_array_index (available_systems, QmiMessageDsdGetSystemStatusOutputAvailableSystemsSystem, 0);
 
-            if (system->technology == QMI_DSD_DATA_SYSTEM_NETWORK_TYPE_3GPP) {
-                switch (system->rat) {
-                case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_WCDMA:
-                case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_TDSCDMA:
-                case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_GERAN:
-                    data_rat_available = TRUE;
-                    break;
-                case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_LTE:
-                    data_rat_available = TRUE;
-                    is_lte = TRUE;
-                    break;
-                case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_5G:
-                    data_rat_available = TRUE;
-                    is_nr5g = TRUE;
-                    break;
-                case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_WLAN:
-                case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP2_1X:
-                case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP2_HRPD:
-                case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP2_EHRPD:
-                case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP2_WLAN:
-                case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_UNKNOWN:
-                default:
-                    break;
-                }
-            }
+            if (system->technology == QMI_DSD_DATA_SYSTEM_NETWORK_TYPE_3GPP)
+                data_rat_available = get_3gpp_rat_data_available (system->rat);
         }
     }  else {
         qmi_indication_dsd_system_status_output_get_available_systems (indication_output, &available_systems, NULL);
@@ -4038,37 +3479,14 @@
 
             system = &g_array_index (available_systems, QmiIndicationDsdSystemStatusOutputAvailableSystemsSystem, 0);
 
-            if (system->technology == QMI_DSD_DATA_SYSTEM_NETWORK_TYPE_3GPP) {
-                switch (system->rat) {
-                case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_WCDMA:
-                case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_TDSCDMA:
-                case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_GERAN:
-                    data_rat_available = TRUE;
-                    break;
-                case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_LTE:
-                    data_rat_available = TRUE;
-                    is_lte = TRUE;
-                    break;
-                case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_5G:
-                    data_rat_available = TRUE;
-                    is_nr5g = TRUE;
-                    break;
-                case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_WLAN:
-                case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP2_1X:
-                case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP2_HRPD:
-                case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP2_EHRPD:
-                case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP2_WLAN:
-                case QMI_DSD_RADIO_ACCESS_TECHNOLOGY_UNKNOWN:
-                default:
-                    break;
-                }
-            }
+            if (system->technology == QMI_DSD_DATA_SYSTEM_NETWORK_TYPE_3GPP)
+                data_rat_available = get_3gpp_rat_data_available (system->rat);
         }
     }
 
     /* Store DSD data RAT availability and update PS/EPS/5GS states accordingly */
     self->priv->dsd_data_rat_available = data_rat_available;
-    consolidated_update_ps_registration_state (self, is_lte, is_nr5g);
+    consolidated_update_registration_state (self);
     mm_iface_modem_3gpp_update_access_technologies (MM_IFACE_MODEM_3GPP (self), self->priv->access_tech);
     mm_iface_modem_3gpp_update_location (MM_IFACE_MODEM_3GPP (self), self->priv->location_area_code, self->priv->tracking_area_code, self->priv->cell_id);
 }
@@ -4960,9 +4378,9 @@
     new = mm_modem_cdma_activation_state_from_qmi_activation_state (state);
 
     if (self->priv->activation_state != new)
-        mm_obj_info (self, "activation state changed: '%s'-->'%s'",
-                     mm_modem_cdma_activation_state_get_string (self->priv->activation_state),
-                     mm_modem_cdma_activation_state_get_string (new));
+        mm_obj_msg (self, "activation state changed: '%s'-->'%s'",
+                    mm_modem_cdma_activation_state_get_string (self->priv->activation_state),
+                    mm_modem_cdma_activation_state_get_string (new));
 
     /* Cache the new value */
     self->priv->activation_state = new;
@@ -5147,7 +4565,7 @@
         if (ctx->input_automatic) {
             QmiMessageDmsSetEventReportInput *input;
 
-            mm_obj_info (ctx->self, "activation step [1/5]: enabling indications");
+            mm_obj_msg (ctx->self, "activation step [1/5]: enabling indications");
             input = qmi_message_dms_set_event_report_input_new ();
             qmi_message_dms_set_event_report_input_set_activation_state_reporting (input, TRUE, NULL);
             qmi_client_dms_set_event_report (
@@ -5163,14 +4581,14 @@
 
         /* Manual activation, no indications needed */
         g_assert (ctx->input_manual != NULL);
-        mm_obj_info (ctx->self, "activation step [1/5]: indications not needed in manual activation");
+        mm_obj_msg (ctx->self, "activation step [1/5]: indications not needed in manual activation");
         ctx->step++;
         /* Fall through */
 
     case CDMA_ACTIVATION_STEP_REQUEST_ACTIVATION:
         /* Automatic activation */
         if (ctx->input_automatic) {
-            mm_obj_info (ctx->self, "activation step [2/5]: requesting automatic (OTA) activation");
+            mm_obj_msg (ctx->self, "activation step [2/5]: requesting automatic (OTA) activation");
             qmi_client_dms_activate_automatic (ctx->client,
                                                ctx->input_automatic,
                                                10,
@@ -5183,9 +4601,9 @@
         /* Manual activation */
         g_assert (ctx->input_manual != NULL);
         if (!ctx->segments)
-            mm_obj_info (ctx->self, "activation step [2/5]: requesting manual activation");
+            mm_obj_msg (ctx->self, "activation step [2/5]: requesting manual activation");
         else {
-            mm_obj_info (ctx->self, "activation step [2/5]: requesting manual activation (PRL segment %u/%u)",
+            mm_obj_msg (ctx->self, "activation step [2/5]: requesting manual activation (PRL segment %u/%u)",
                          (ctx->segment_i + 1), ctx->n_segments);
             qmi_message_dms_activate_manual_input_set_prl (
                 ctx->input_manual,
@@ -5207,14 +4625,14 @@
         /* Automatic activation */
         if (ctx->input_automatic) {
             /* State updates via unsolicited messages */
-            mm_obj_info (ctx->self, "activation step [3/5]: waiting for activation state updates");
+            mm_obj_msg (ctx->self, "activation step [3/5]: waiting for activation state updates");
             return;
         }
 
         /* Manual activation; needs MSISDN checks */
         g_assert (ctx->input_manual != NULL);
         ctx->n_mdn_check_retries++;
-        mm_obj_info (ctx->self, "activation step [3/5]: checking MDN update (retry %u)", ctx->n_mdn_check_retries);
+        mm_obj_msg (ctx->self, "activation step [3/5]: checking MDN update (retry %u)", ctx->n_mdn_check_retries);
         qmi_client_dms_get_msisdn (ctx->client,
                                    NULL,
                                    5,
@@ -5224,14 +4642,14 @@
         return;
 
     case CDMA_ACTIVATION_STEP_RESET:
-        mm_obj_info (ctx->self, "activation step [4/5]: power-cycling...");
+        mm_obj_msg (ctx->self, "activation step [4/5]: power-cycling...");
         mm_shared_qmi_reset (MM_IFACE_MODEM (ctx->self),
                              (GAsyncReadyCallback)activation_reset_ready,
                              task);
         return;
 
     case CDMA_ACTIVATION_STEP_LAST:
-        mm_obj_info (ctx->self, "activation step [5/5]: finished");
+        mm_obj_msg (ctx->self, "activation step [5/5]: finished");
         g_task_return_boolean (task, TRUE);
         g_object_unref (task);
         return;
@@ -13257,7 +12675,7 @@
     if (!output || !qmi_message_wds_set_autoconnect_settings_output_get_result (output, &error))
         mm_obj_warn (self, "failed disabling autoconnect: %s", error->message);
     else
-        mm_obj_info (self, "autoconnect explicitly disabled");
+        mm_obj_msg (self, "autoconnect explicitly disabled");
     g_task_return_boolean (task, TRUE);
     g_object_unref (task);
 }
@@ -13447,8 +12865,8 @@
                        MMBroadbandModemQmi *self)
 {
     /* Reprobe the modem here so we can get notifications back. */
-    mm_obj_info (self, "connection to qmi-proxy for %s lost, reprobing",
-                 qmi_device_get_path_display (device));
+    mm_obj_msg (self, "connection to qmi-proxy for %s lost, reprobing",
+                qmi_device_get_path_display (device));
 
     g_signal_handler_disconnect (device, self->priv->qmi_device_removed_id);
     self->priv->qmi_device_removed_id = 0;
@@ -13728,7 +13146,10 @@
                                               MM_TYPE_BROADBAND_MODEM_QMI,
                                               MMBroadbandModemQmiPrivate);
     self->priv->current_pdn_list = g_array_new (FALSE, FALSE, sizeof (guint16));
-    self->priv->system_info_ps_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
+    self->priv->system_info_registration_state_cs = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
+    self->priv->system_info_registration_state_ps = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
+    self->priv->system_info_registration_state_eps = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
+    self->priv->system_info_registration_state_5gs = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
     self->priv->access_tech = MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN;
 }
 
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c
index a9d4cd7..7f2fe83 100644
--- a/src/mm-broadband-modem.c
+++ b/src/mm-broadband-modem.c
@@ -2909,7 +2909,7 @@
     if (mm_base_bearer_get_status (bearer) == MM_BEARER_STATUS_DISCONNECTED)
         return;
 
-    mm_obj_info (bearer, "explicitly disconnected");
+    mm_obj_msg (bearer, "explicitly disconnected");
     mm_base_bearer_report_connection_status (bearer, MM_BEARER_CONNECTION_STATUS_DISCONNECTED);
 }
 
@@ -2933,13 +2933,13 @@
                      MM3gppCgev        type)
 {
     if (type == MM_3GPP_CGEV_NW_DETACH) {
-        mm_obj_info (self, "network forced PS detach: all contexts have been deactivated");
+        mm_obj_msg (self, "network forced PS detach: all contexts have been deactivated");
         bearer_list_report_disconnections (self, MM_3GPP_PROFILE_ID_UNKNOWN);
         return;
     }
 
     if (type == MM_3GPP_CGEV_ME_DETACH) {
-        mm_obj_info (self, "mobile equipment forced PS detach: all contexts have been deactivated");
+        mm_obj_msg (self, "mobile equipment forced PS detach: all contexts have been deactivated");
         bearer_list_report_disconnections (self, MM_3GPP_PROFILE_ID_UNKNOWN);
         return;
     }
@@ -2963,17 +2963,17 @@
 
     switch (type) {
     case MM_3GPP_CGEV_NW_ACT_PRIMARY:
-        mm_obj_info (self, "network request to activate context (cid %u)", cid);
+        mm_obj_msg (self, "network request to activate context (cid %u)", cid);
         break;
     case MM_3GPP_CGEV_ME_ACT_PRIMARY:
-        mm_obj_info (self, "mobile equipment request to activate context (cid %u)", cid);
+        mm_obj_msg (self, "mobile equipment request to activate context (cid %u)", cid);
         break;
     case MM_3GPP_CGEV_NW_DEACT_PRIMARY:
-        mm_obj_info (self, "network request to deactivate context (cid %u)", cid);
+        mm_obj_msg (self, "network request to deactivate context (cid %u)", cid);
         bearer_list_report_disconnections (self, (gint)cid);
         break;
     case MM_3GPP_CGEV_ME_DEACT_PRIMARY:
-        mm_obj_info (self, "mobile equipment request to deactivate context (cid %u)", cid);
+        mm_obj_msg (self, "mobile equipment request to deactivate context (cid %u)", cid);
         bearer_list_report_disconnections (self, (gint)cid);
         break;
     case MM_3GPP_CGEV_UNKNOWN:
@@ -3014,17 +3014,17 @@
 
     switch (type) {
     case MM_3GPP_CGEV_NW_ACT_SECONDARY:
-        mm_obj_info (self, "network request to activate secondary context (cid %u, primary cid %u)", cid, p_cid);
+        mm_obj_msg (self, "network request to activate secondary context (cid %u, primary cid %u)", cid, p_cid);
         break;
     case MM_3GPP_CGEV_ME_ACT_SECONDARY:
-        mm_obj_info (self, "mobile equipment request to activate secondary context (cid %u, primary cid %u)", cid, p_cid);
+        mm_obj_msg (self, "mobile equipment request to activate secondary context (cid %u, primary cid %u)", cid, p_cid);
         break;
     case MM_3GPP_CGEV_NW_DEACT_SECONDARY:
-        mm_obj_info (self, "network request to deactivate secondary context (cid %u, primary cid %u)", cid, p_cid);
+        mm_obj_msg (self, "network request to deactivate secondary context (cid %u, primary cid %u)", cid, p_cid);
         bearer_list_report_disconnections (self, (gint)cid);
         break;
     case MM_3GPP_CGEV_ME_DEACT_SECONDARY:
-        mm_obj_info (self, "mobile equipment request to deactivate secondary context (cid %u, primary cid %u)", cid, p_cid);
+        mm_obj_msg (self, "mobile equipment request to deactivate secondary context (cid %u, primary cid %u)", cid, p_cid);
         bearer_list_report_disconnections (self, (gint)cid);
         break;
     case MM_3GPP_CGEV_UNKNOWN:
@@ -3066,28 +3066,28 @@
 
     switch (type) {
     case MM_3GPP_CGEV_REJECT:
-        mm_obj_info (self, "network request to activate context (type %s, address %s) has been automatically rejected", pdp_type, pdp_addr);
+        mm_obj_msg (self, "network request to activate context (type %s, address %s) has been automatically rejected", pdp_type, pdp_addr);
         break;
     case MM_3GPP_CGEV_NW_REACT:
         /* NOTE: we don't currently notify about automatic reconnections like this one */
         if (cid)
-            mm_obj_info (self, "network request to reactivate context (type %s, address %s, cid %u)", pdp_type, pdp_addr, cid);
+            mm_obj_msg (self, "network request to reactivate context (type %s, address %s, cid %u)", pdp_type, pdp_addr, cid);
         else
-            mm_obj_info (self, "network request to reactivate context (type %s, address %s, cid unknown)", pdp_type, pdp_addr);
+            mm_obj_msg (self, "network request to reactivate context (type %s, address %s, cid unknown)", pdp_type, pdp_addr);
         break;
     case MM_3GPP_CGEV_NW_DEACT_PDP:
         if (cid) {
-            mm_obj_info (self, "network request to deactivate context (type %s, address %s, cid %u)", pdp_type, pdp_addr, cid);
+            mm_obj_msg (self, "network request to deactivate context (type %s, address %s, cid %u)", pdp_type, pdp_addr, cid);
             bearer_list_report_disconnections (self, (gint)cid);
         } else
-            mm_obj_info (self, "network request to deactivate context (type %s, address %s, cid unknown)", pdp_type, pdp_addr);
+            mm_obj_msg (self, "network request to deactivate context (type %s, address %s, cid unknown)", pdp_type, pdp_addr);
         break;
     case MM_3GPP_CGEV_ME_DEACT_PDP:
         if (cid) {
-            mm_obj_info (self, "mobile equipment request to deactivate context (type %s, address %s, cid %u)", pdp_type, pdp_addr, cid);
+            mm_obj_msg (self, "mobile equipment request to deactivate context (type %s, address %s, cid %u)", pdp_type, pdp_addr, cid);
             bearer_list_report_disconnections (self, (gint)cid);
         } else
-            mm_obj_info (self, "mobile equipment request to deactivate context (type %s, address %s, cid unknown)", pdp_type, pdp_addr);
+            mm_obj_msg (self, "mobile equipment request to deactivate context (type %s, address %s, cid unknown)", pdp_type, pdp_addr);
         break;
     case MM_3GPP_CGEV_UNKNOWN:
     case MM_3GPP_CGEV_NW_DETACH:
@@ -4200,12 +4200,15 @@
         g_assert_not_reached();
 
     if (g_strcmp0 (current, cached) != 0) {
-        mm_obj_info (self, "SIM %s has changed: %s -> %s",
-                     str, cached ? cached : "<none>", current ? current : "<none>");
+        mm_obj_msg (self, "SIM %s has changed: '%s' -> '%s'",
+                    str,
+                    mm_log_str_personal_info (cached ? cached : ""),
+                    mm_log_str_personal_info (current ? current : ""));
         mm_iface_modem_process_sim_event (MM_IFACE_MODEM (self));
         ctx->step = SIM_SWAP_CHECK_STEP_LAST;
     } else {
-        mm_obj_dbg (self, "SIM %s has not changed", str);
+        mm_obj_info (self, "SIM %s has not changed: %s",
+                     str, mm_log_str_personal_info (current));
         ctx->step++;
     }
 
@@ -4354,7 +4357,7 @@
     GTask          *task;
     SimSwapContext *ctx;
 
-    mm_obj_dbg (self, "checking if SIM was swapped...");
+    mm_obj_info (self, "checking if SIM was swapped...");
 
     task = g_task_new (self, NULL, callback, user_data);
     ctx = g_slice_new0 (SimSwapContext);
@@ -4375,7 +4378,7 @@
                       NULL);
 
         if (modem_state == MM_MODEM_STATE_FAILED) {
-            mm_obj_info (self, "new SIM detected, handle as SIM hot-swap");
+            mm_obj_msg (self, "new SIM detected, handle as SIM hot-swap");
             mm_iface_modem_process_sim_event (MM_IFACE_MODEM (self));
             g_task_return_boolean (task, TRUE);
         } else {
@@ -12246,8 +12249,8 @@
             g_object_unref (task);
             return;
         }
-        mm_obj_info (self, "resume synchronization state (%d/%d): modem interface sync",
-                     ctx->step, SYNCING_STEP_LAST);
+        mm_obj_msg (self, "resume synchronization state (%d/%d): modem interface sync",
+                    ctx->step, SYNCING_STEP_LAST);
         mm_iface_modem_sync (MM_IFACE_MODEM (self),
                              (GAsyncReadyCallback)iface_modem_sync_ready,
                              task);
@@ -12261,8 +12264,8 @@
          */
         if (self->priv->modem_3gpp_dbus_skeleton &&
             (self->priv->modem_state >= MM_MODEM_STATE_ENABLED)) {
-            mm_obj_info (self, "resume synchronization state (%d/%d): 3GPP interface sync",
-                         ctx->step, SYNCING_STEP_LAST);
+            mm_obj_msg (self, "resume synchronization state (%d/%d): 3GPP interface sync",
+                        ctx->step, SYNCING_STEP_LAST);
             mm_iface_modem_3gpp_sync (MM_IFACE_MODEM_3GPP (self), (GAsyncReadyCallback)iface_modem_3gpp_sync_ready, task);
             return;
         }
@@ -12273,8 +12276,8 @@
         /* Start Time interface synchronization, only if modem was enabled */
         if (self->priv->modem_time_dbus_skeleton &&
             (self->priv->modem_state >= MM_MODEM_STATE_ENABLED)) {
-            mm_obj_info (self, "resume synchronization state (%d/%d): time interface sync",
-                         ctx->step, SYNCING_STEP_LAST);
+            mm_obj_msg (self, "resume synchronization state (%d/%d): time interface sync",
+                        ctx->step, SYNCING_STEP_LAST);
             mm_iface_modem_time_sync (MM_IFACE_MODEM_TIME (self), (GAsyncReadyCallback)iface_modem_time_sync_ready, task);
             return;
         }
@@ -12282,8 +12285,8 @@
         /* fall through */
 
     case SYNCING_STEP_LAST:
-        mm_obj_info (self, "resume synchronization state (%d/%d): all done",
-                     ctx->step, SYNCING_STEP_LAST);
+        mm_obj_msg (self, "resume synchronization state (%d/%d): all done",
+                    ctx->step, SYNCING_STEP_LAST);
         /* We are done without errors! */
         g_task_return_boolean (task, TRUE);
         g_object_unref (task);
diff --git a/src/mm-context.c b/src/mm-context.c
index 5571d74..92f8ffd 100644
--- a/src/mm-context.c
+++ b/src/mm-context.c
@@ -226,7 +226,9 @@
 /* Test context */
 
 static gboolean  test_session;
+#if defined WITH_TESTS
 static gboolean  test_enable;
+#endif
 static gchar    *test_plugin_dir;
 #if defined WITH_UDEV
 static gboolean  test_no_udev;
@@ -249,11 +251,13 @@
         "Run in session DBus",
         NULL
     },
+#if defined WITH_TESTS
     {
         "test-enable", 0, 0, G_OPTION_ARG_NONE, &test_enable,
         "Enable the Test interface in the daemon",
         NULL
     },
+#endif
     {
         "test-plugin-dir", 0, 0, G_OPTION_ARG_FILENAME, &test_plugin_dir,
         "Path to look for plugins",
@@ -320,11 +324,13 @@
     return test_session;
 }
 
+#if defined WITH_TESTS
 gboolean
 mm_context_get_test_enable (void)
 {
     return test_enable;
 }
+#endif
 
 const gchar *
 mm_context_get_test_plugin_dir (void)
diff --git a/src/mm-context.h b/src/mm-context.h
index f33f27a..fcca1f6 100644
--- a/src/mm-context.h
+++ b/src/mm-context.h
@@ -45,7 +45,9 @@
 
 /* Testing support */
 gboolean     mm_context_get_test_session           (void);
+#if defined WITH_TESTS
 gboolean     mm_context_get_test_enable            (void);
+#endif
 const gchar *mm_context_get_test_plugin_dir        (void);
 #if defined WITH_UDEV
 gboolean     mm_context_get_test_no_udev           (void);
diff --git a/src/mm-device.c b/src/mm-device.c
index c2946bd..83b1ed1 100644
--- a/src/mm-device.c
+++ b/src/mm-device.c
@@ -490,9 +490,9 @@
             return FALSE;
         }
 
-        mm_obj_info (self, "creating modem with plugin '%s' and '%u' ports",
-                     mm_plugin_get_name (self->priv->plugin),
-                     g_list_length (self->priv->port_probes));
+        mm_obj_msg (self, "creating modem with plugin '%s' and '%u' ports",
+                    mm_plugin_get_name (self->priv->plugin),
+                    g_list_length (self->priv->port_probes));
     } else {
         if (!self->priv->virtual_ports) {
             g_set_error (error,
@@ -502,9 +502,9 @@
             return FALSE;
         }
 
-        mm_obj_info (self, "creating virtual modem with plugin '%s' and '%u' ports",
-                     mm_plugin_get_name (self->priv->plugin),
-                     g_strv_length (self->priv->virtual_ports));
+        mm_obj_msg (self, "creating virtual modem with plugin '%s' and '%u' ports",
+                    mm_plugin_get_name (self->priv->plugin),
+                    g_strv_length (self->priv->virtual_ports));
     }
 
     self->priv->modem = mm_plugin_create_modem (self->priv->plugin, self, error);
diff --git a/src/mm-iface-modem-3gpp-profile-manager.c b/src/mm-iface-modem-3gpp-profile-manager.c
index 36c850e..c464624 100644
--- a/src/mm-iface-modem-3gpp-profile-manager.c
+++ b/src/mm-iface-modem-3gpp-profile-manager.c
@@ -26,6 +26,7 @@
 #include "mm-iface-modem-3gpp-profile-manager.h"
 #include "mm-base-modem.h"
 #include "mm-log-object.h"
+#include "mm-log-helpers.h"
 
 #define SUPPORT_CHECKED_TAG "3gpp-profile-manager-support-checked-tag"
 #define SUPPORTED_TAG       "3gpp-profile-manager-supported-tag"
@@ -85,7 +86,7 @@
             g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_CONNECTED,
                          "Cannot use profile %d: found an already connected bearer", profile_id);
         } else if (g_strcmp0 (index_field, "apn-type") == 0) {
-            g_autofree gchar *apn_type_str;
+            g_autofree gchar *apn_type_str = NULL;
 
             apn_type_str = mm_bearer_apn_type_build_string_from_mask (apn_type);
             g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_CONNECTED,
@@ -907,36 +908,53 @@
     g_slice_free (HandleListContext, ctx);
 }
 
+static GVariant *
+build_list_profiles_result (MMIfaceModem3gppProfileManager *self,
+                            GList                          *profiles)
+{
+    GVariantBuilder  builder;
+    GList           *l;
+    guint            i;
+
+    /* Build array of dicts */
+    g_variant_builder_init (&builder, G_VARIANT_TYPE ("aa{sv}"));
+    for (l = profiles, i = 0; l; l = g_list_next (l), i++) {
+        g_autoptr(GVariant)  dict = NULL;
+        MM3gppProfile       *profile;
+
+        profile = MM_3GPP_PROFILE (l->data);
+
+        mm_obj_info (self, "profile %u:", i);
+        mm_log_3gpp_profile (self, MM_LOG_LEVEL_INFO, "  ", profile);
+
+        dict = mm_3gpp_profile_get_dictionary (profile);
+        g_variant_builder_add_value (&builder, dict);
+    }
+
+    return g_variant_ref_sink (g_variant_builder_end (&builder));
+}
+
 static void
 list_profiles_ready (MMIfaceModem3gppProfileManager *self,
                      GAsyncResult                   *res,
                      HandleListContext              *ctx)
 {
-    GVariantBuilder  builder;
-    GError          *error = NULL;
-    GList           *profiles = NULL;
-    GList           *l;
+    GError              *error = NULL;
+    GList               *profiles = NULL;
+    g_autoptr(GVariant)  dict_array = NULL;
 
     if (!mm_iface_modem_3gpp_profile_manager_list_profiles_finish (self, res, &profiles, &error)) {
+        mm_obj_warn (self, "failed listing 3GPP profiles: %s", error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
         handle_list_context_free (ctx);
         return;
     }
 
-    /* Build array of dicts */
-    g_variant_builder_init (&builder, G_VARIANT_TYPE ("aa{sv}"));
-    for (l = profiles; l; l = g_list_next (l)) {
-        g_autoptr(GVariant) dict = NULL;
-
-        dict = mm_3gpp_profile_get_dictionary (MM_3GPP_PROFILE (l->data));
-        g_variant_builder_add_value (&builder, dict);
-    }
-
-    mm_gdbus_modem3gpp_profile_manager_complete_list (ctx->skeleton,
-                                                      ctx->invocation,
-                                                      g_variant_builder_end (&builder));
-    handle_list_context_free (ctx);
+    mm_obj_info (self, "listed 3GPP profiles: %u found", g_list_length (profiles));
+    dict_array = build_list_profiles_result (self, profiles);
+    mm_gdbus_modem3gpp_profile_manager_complete_list (ctx->skeleton, ctx->invocation, dict_array);
     mm_3gpp_profile_list_free (profiles);
+    handle_list_context_free (ctx);
 }
 
 static void
@@ -959,6 +977,8 @@
         return;
     }
 
+    mm_obj_info (self, "processing user request to list 3GPP profiles...");
+
     /* Don't call the class callback directly, use the common helper method
      * that is also used by other internal operations. */
     mm_iface_modem_3gpp_profile_manager_list_profiles (
@@ -1013,16 +1033,21 @@
 {
     GError                   *error = NULL;
     g_autoptr(MM3gppProfile)  profile_stored = NULL;
+    g_autoptr(GVariant)       profile_dictionary = NULL;
 
     profile_stored = mm_iface_modem_3gpp_profile_manager_set_profile_finish (self, res, &error);
-    if (!profile_stored)
+    if (!profile_stored) {
+        mm_obj_warn (self, "failed setting 3GPP profile: %s", error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
-    else {
-        g_autoptr(GVariant) profile_dictionary = NULL;
-
-        profile_dictionary = mm_3gpp_profile_get_dictionary (profile_stored);
-        mm_gdbus_modem3gpp_profile_manager_complete_set (ctx->skeleton, ctx->invocation, profile_dictionary);
+        handle_set_context_free (ctx);
+        return;
     }
+
+    mm_obj_info (self, "3GPP profile set:");
+    mm_log_3gpp_profile (self, MM_LOG_LEVEL_INFO, "  ", profile_stored);
+
+    profile_dictionary = mm_3gpp_profile_get_dictionary (profile_stored);
+    mm_gdbus_modem3gpp_profile_manager_complete_set (ctx->skeleton, ctx->invocation, profile_dictionary);
     handle_set_context_free (ctx);
 }
 
@@ -1062,6 +1087,9 @@
         return;
     }
 
+    mm_obj_info (self, "processing user request to set 3GPP profile...");
+    mm_log_3gpp_profile (self, MM_LOG_LEVEL_INFO, "  ", profile_requested);
+
     index_field = mm_gdbus_modem3gpp_profile_manager_get_index_field (ctx->skeleton);
 
     /* Don't call the class callback directly, use the common helper method
@@ -1123,10 +1151,13 @@
 {
     GError *error = NULL;
 
-    if (!MM_IFACE_MODEM_3GPP_PROFILE_MANAGER_GET_INTERFACE (self)->delete_profile_finish (self, res, &error))
+    if (!MM_IFACE_MODEM_3GPP_PROFILE_MANAGER_GET_INTERFACE (self)->delete_profile_finish (self, res, &error)) {
+        mm_obj_warn (self, "failed deleting 3GPP profile: %s", error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
-    else
+    } else {
+        mm_obj_info (self, "3GPP profile deleted");
         mm_gdbus_modem3gpp_profile_manager_complete_delete (ctx->skeleton, ctx->invocation);
+    }
     handle_delete_context_free (ctx);
 }
 
@@ -1206,6 +1237,9 @@
         return;
     }
 
+    mm_obj_info (self, "processing user request to delete 3GPP profile...");
+    mm_log_3gpp_profile (self, MM_LOG_LEVEL_INFO, "  ", profile);
+
     MM_IFACE_MODEM_3GPP_PROFILE_MANAGER_GET_INTERFACE (self)->delete_profile (
         MM_IFACE_MODEM_3GPP_PROFILE_MANAGER (self),
         profile,
diff --git a/src/mm-iface-modem-3gpp.c b/src/mm-iface-modem-3gpp.c
index dad6bad..a747ffa 100644
--- a/src/mm-iface-modem-3gpp.c
+++ b/src/mm-iface-modem-3gpp.c
@@ -28,6 +28,7 @@
 #include "mm-modem-helpers.h"
 #include "mm-error-helpers.h"
 #include "mm-log.h"
+#include "mm-log-helpers.h"
 
 #define SUBSYSTEM_3GPP "3gpp"
 
@@ -289,19 +290,6 @@
 
 /*****************************************************************************/
 
-#define REG_STATE_IS_REGISTERED(state)                                    \
-    (state == MM_MODEM_3GPP_REGISTRATION_STATE_HOME ||                    \
-     state == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING ||                 \
-     state == MM_MODEM_3GPP_REGISTRATION_STATE_HOME_SMS_ONLY ||           \
-     state == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING_SMS_ONLY ||        \
-     state == MM_MODEM_3GPP_REGISTRATION_STATE_HOME_CSFB_NOT_PREFERRED || \
-     state == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING_CSFB_NOT_PREFERRED)
-
-#define REG_STATE_IS_UNKNOWN_IDLE_DENIED(state)                           \
-    (state == MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN ||                 \
-     state == MM_MODEM_3GPP_REGISTRATION_STATE_IDLE ||                    \
-     state == MM_MODEM_3GPP_REGISTRATION_STATE_DENIED)
-
 static MMModem3gppPacketServiceState
 get_consolidated_packet_service_state (MMIfaceModem3gpp *self)
 {
@@ -311,12 +299,12 @@
 
     /* If registered in any of PS, EPS or 5GS, then packet service domain is
      * implicitly attached. */
-    if (REG_STATE_IS_REGISTERED (priv->state_ps) ||
-        REG_STATE_IS_REGISTERED (priv->state_eps) ||
-        REG_STATE_IS_REGISTERED (priv->state_5gs))
+    if (mm_modem_3gpp_registration_state_is_registered (priv->state_ps) ||
+        mm_modem_3gpp_registration_state_is_registered (priv->state_eps) ||
+        mm_modem_3gpp_registration_state_is_registered (priv->state_5gs))
         return MM_MODEM_3GPP_PACKET_SERVICE_STATE_ATTACHED;
 
-    if (REG_STATE_IS_REGISTERED (priv->state_cs))
+    if (mm_modem_3gpp_registration_state_is_registered (priv->state_cs))
         return MM_MODEM_3GPP_PACKET_SERVICE_STATE_DETACHED;
 
     /* If not registered in any of CS, PS, EPS or 5GS, then packet service
@@ -352,6 +340,11 @@
         priv->state_5gs == MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING)
         return MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING;
 
+#define REG_STATE_IS_UNKNOWN_IDLE_DENIED(state)                           \
+    (state == MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN ||                 \
+     state == MM_MODEM_3GPP_REGISTRATION_STATE_IDLE ||                    \
+     state == MM_MODEM_3GPP_REGISTRATION_STATE_DENIED)
+
     /* If at least one state is DENIED and the others are UNKNOWN or IDLE, use DENIED */
     if ((priv->state_cs == MM_MODEM_3GPP_REGISTRATION_STATE_DENIED ||
          priv->state_ps == MM_MODEM_3GPP_REGISTRATION_STATE_DENIED ||
@@ -363,6 +356,8 @@
         REG_STATE_IS_UNKNOWN_IDLE_DENIED (priv->state_5gs))
         return MM_MODEM_3GPP_REGISTRATION_STATE_DENIED;
 
+#undef REG_STATE_IS_UNKNOWN_IDLE_DENIED
+
     /* Emergency services? */
     if (priv->state_cs  == MM_MODEM_3GPP_REGISTRATION_STATE_EMERGENCY_ONLY ||
         priv->state_ps  == MM_MODEM_3GPP_REGISTRATION_STATE_EMERGENCY_ONLY ||
@@ -479,7 +474,7 @@
 
     mm_iface_modem_3gpp_run_registration_checks_finish (MM_IFACE_MODEM_3GPP (self), res, &error);
     if (error) {
-        mm_obj_dbg (self, "3GPP registration check failed: %s", error->message);
+        mm_obj_info (self, "3GPP registration check failed: %s", error->message);
         register_in_network_context_complete_failed (task, error);
         return;
     }
@@ -489,7 +484,7 @@
     /* If we got a final state and it's denied, we can assume the registration is
      * finished */
     if (current_registration_state == MM_MODEM_3GPP_REGISTRATION_STATE_DENIED) {
-        mm_obj_dbg (self, "registration denied");
+        mm_obj_info (self, "registration denied");
         register_in_network_context_complete_failed (
             task,
             mm_mobile_equipment_error_for_code (MM_MOBILE_EQUIPMENT_ERROR_NETWORK_NOT_ALLOWED, self));
@@ -497,13 +492,13 @@
     }
 
     /* If we got registered, end registration checks */
-    if (REG_STATE_IS_REGISTERED (current_registration_state)) {
+    if (mm_modem_3gpp_registration_state_is_registered (current_registration_state)) {
         /* Request immediate access tech and signal update: we may have changed
          * from home to roaming or viceversa, both registered states, so there
          * wouldn't be an explicit refresh triggered from the modem interface as
          * the modem never got un-registered during the sequence. */
         mm_iface_modem_refresh_signal (MM_IFACE_MODEM (ctx->self));
-        mm_obj_dbg (self, "currently registered in a 3GPP network");
+        mm_obj_info (self, "currently registered in a 3GPP network");
         g_task_return_boolean (task, TRUE);
         g_object_unref (task);
         return;
@@ -511,7 +506,7 @@
 
     /* Don't spend too much time waiting to get registered */
     if (g_timer_elapsed (ctx->timer, NULL) > ctx->max_registration_time) {
-        mm_obj_dbg (self, "3GPP registration check timed out");
+        mm_obj_info (self, "3GPP registration check timed out");
         register_in_network_context_complete_failed (
             task,
             mm_mobile_equipment_error_for_code (MM_MOBILE_EQUIPMENT_ERROR_NETWORK_TIMEOUT, self));
@@ -620,9 +615,9 @@
         /* If already registered manually with the requested operator, we're done */
         if (!force_registration &&
             (g_strcmp0 (current_operator_code, ctx->operator_id) == 0) &&
-            REG_STATE_IS_REGISTERED (reg_state) &&
+            mm_modem_3gpp_registration_state_is_registered (reg_state) &&
             priv->manual_registration) {
-            mm_obj_dbg (self, "already registered manually in selected network '%s', manual registration not launched...",
+            mm_obj_info (self, "already registered manually in selected network '%s', manual registration not launched...",
                         current_operator_code);
             g_task_return_boolean (task, TRUE);
             g_object_unref (task);
@@ -630,7 +625,7 @@
         }
 
         /* Manual registration to a new operator required */
-        mm_obj_dbg (self, "launching manual network registration (%s)...", ctx->operator_id);
+        mm_obj_info (self, "launching manual network registration in '%s'...", ctx->operator_id);
         g_free (priv->manual_registration_operator_id);
         priv->manual_registration_operator_id = g_strdup (ctx->operator_id);
         priv->manual_registration = TRUE;
@@ -640,9 +635,9 @@
         /* If the modem is already registered and the last time it was asked
          * automatic registration, we're done */
         if (!force_registration &&
-            REG_STATE_IS_REGISTERED (reg_state) &&
+            mm_modem_3gpp_registration_state_is_registered (reg_state) &&
             !priv->manual_registration) {
-            mm_obj_dbg (self, "already registered automatically in network '%s',"
+            mm_obj_info (self, "already registered automatically in network '%s',"
                         " automatic registration not launched...",
                         current_operator_code ? current_operator_code : "unknown");
             g_task_return_boolean (task, TRUE);
@@ -651,7 +646,7 @@
         }
 
         /* Automatic registration to a new operator requested */
-        mm_obj_dbg (self, "launching automatic network registration...");
+        mm_obj_info (self, "launching automatic network registration...");
         g_clear_pointer (&priv->manual_registration_operator_id, g_free);
         priv->manual_registration = FALSE;
     }
@@ -705,10 +700,10 @@
 /*****************************************************************************/
 
 typedef struct {
-    MmGdbusModem3gpp *skeleton;
+    MmGdbusModem3gpp      *skeleton;
     GDBusMethodInvocation *invocation;
-    MMIfaceModem3gpp *self;
-    gchar *operator_id;
+    MMIfaceModem3gpp      *self;
+    gchar                 *operator_id;
 } HandleRegisterContext;
 
 static void
@@ -718,31 +713,40 @@
     g_object_unref (ctx->invocation);
     g_object_unref (ctx->self);
     g_free (ctx->operator_id);
-    g_free (ctx);
+    g_slice_free (HandleRegisterContext, ctx);
 }
 
 static void
-handle_register_ready (MMIfaceModem3gpp *self,
-                       GAsyncResult *res,
+handle_register_ready (MMIfaceModem3gpp      *self,
+                       GAsyncResult          *res,
                        HandleRegisterContext *ctx)
 {
     GError *error = NULL;
 
-    if (!mm_iface_modem_3gpp_register_in_network_finish (self, res, &error))
+    if (!mm_iface_modem_3gpp_register_in_network_finish (self, res, &error)) {
+        if (ctx->operator_id && ctx->operator_id[0])
+            mm_obj_warn (self, "failed registering modem in '%s': %s", ctx->operator_id, error->message);
+        else
+            mm_obj_warn (self, "failed registering modem: %s", error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
-    else
+    } else {
+        if (ctx->operator_id && ctx->operator_id[0])
+            mm_obj_info (self, "modem registered in '%s'", ctx->operator_id);
+        else
+            mm_obj_info (self, "modem registered");
         mm_gdbus_modem3gpp_complete_register (ctx->skeleton, ctx->invocation);
+    }
 
     handle_register_context_free (ctx);
 }
 
 static void
-handle_register_auth_ready (MMBaseModem *self,
-                            GAsyncResult *res,
+handle_register_auth_ready (MMBaseModem           *self,
+                            GAsyncResult          *res,
                             HandleRegisterContext *ctx)
 {
-    MMModemState modem_state;
-    GError *error = NULL;
+    MMModemState  modem_state = MM_MODEM_STATE_UNKNOWN;
+    GError       *error = NULL;
 
     if (!mm_base_modem_authorize_finish (self, res, &error)) {
         g_dbus_method_invocation_take_error (ctx->invocation, error);
@@ -753,7 +757,6 @@
     g_assert (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->register_in_network != NULL);
     g_assert (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->register_in_network_finish != NULL);
 
-    modem_state = MM_MODEM_STATE_UNKNOWN;
     g_object_get (self,
                   MM_IFACE_MODEM_STATE, &modem_state,
                   NULL);
@@ -766,17 +769,18 @@
     case MM_MODEM_STATE_DISABLED:
     case MM_MODEM_STATE_DISABLING:
     case MM_MODEM_STATE_ENABLING:
-        g_dbus_method_invocation_return_error (ctx->invocation,
-                                               MM_CORE_ERROR,
-                                               MM_CORE_ERROR_WRONG_STATE,
-                                               "Cannot register modem: "
-                                               "not yet enabled");
+        g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_WRONG_STATE,
+                                               "Device not yet enabled");
         handle_register_context_free (ctx);
         return;
 
     case MM_MODEM_STATE_ENABLED:
     case MM_MODEM_STATE_SEARCHING:
     case MM_MODEM_STATE_REGISTERED:
+        if (ctx->operator_id && ctx->operator_id[0])
+            mm_obj_info (self, "processing user request to register modem in '%s'...", ctx->operator_id);
+        else
+            mm_obj_info (self, "processing user request to register modem...");
         mm_iface_modem_3gpp_register_in_network (MM_IFACE_MODEM_3GPP (self),
                                                  ctx->operator_id,
                                                  FALSE, /* if already registered with same settings, do nothing */
@@ -788,11 +792,8 @@
     case MM_MODEM_STATE_DISCONNECTING:
     case MM_MODEM_STATE_CONNECTING:
     case MM_MODEM_STATE_CONNECTED:
-        g_dbus_method_invocation_return_error (ctx->invocation,
-                                               MM_CORE_ERROR,
-                                               MM_CORE_ERROR_WRONG_STATE,
-                                               "Cannot register modem: "
-                                               "modem is connected");
+        g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_WRONG_STATE,
+                                               "Operation not allowed while modem is connected");
         handle_register_context_free (ctx);
         return;
 
@@ -802,14 +803,14 @@
 }
 
 static gboolean
-handle_register (MmGdbusModem3gpp *skeleton,
+handle_register (MmGdbusModem3gpp      *skeleton,
                  GDBusMethodInvocation *invocation,
-                 const gchar *operator_id,
-                 MMIfaceModem3gpp *self)
+                 const gchar           *operator_id,
+                 MMIfaceModem3gpp      *self)
 {
     HandleRegisterContext *ctx;
 
-    ctx = g_new (HandleRegisterContext, 1);
+    ctx = g_slice_new0 (HandleRegisterContext);
     ctx->skeleton = g_object_ref (skeleton);
     ctx->invocation = g_object_ref (invocation);
     ctx->self = g_object_ref (self);
@@ -827,9 +828,9 @@
 /*****************************************************************************/
 
 typedef struct {
-    MmGdbusModem3gpp *skeleton;
+    MmGdbusModem3gpp      *skeleton;
     GDBusMethodInvocation *invocation;
-    MMIfaceModem3gpp *self;
+    MMIfaceModem3gpp      *self;
 } HandleScanContext;
 
 static void
@@ -838,11 +839,12 @@
     g_object_unref (ctx->skeleton);
     g_object_unref (ctx->invocation);
     g_object_unref (ctx->self);
-    g_free (ctx);
+    g_slice_free (HandleScanContext, ctx);
 }
 
 static GVariant *
-scan_networks_build_result (GList *info_list)
+build_scan_networks_result (MMIfaceModem3gpp *self,
+                            GList            *info_list)
 {
     GList *l;
     GVariantBuilder builder;
@@ -851,26 +853,30 @@
 
     for (l = info_list; l; l = g_list_next (l)) {
         MM3gppNetworkInfo *info = l->data;
+        g_autofree gchar  *access_tech_str = NULL;
 
         if (!info->operator_code) {
             g_warn_if_reached ();
             continue;
         }
 
-        g_variant_builder_open (&builder, G_VARIANT_TYPE ("a{sv}"));
+        /* log results as INFO */
+        access_tech_str = mm_modem_access_technology_build_string_from_mask (info->access_tech);
+        mm_obj_info (self, "  mccmnc: %s, status: %s, access tech: %s, long name: %s, short name: %s",
+                     info->operator_code,
+                     mm_modem_3gpp_network_availability_get_string (info->status),
+                     access_tech_str,
+                     info->operator_long ? info->operator_long : "n/a",
+                     info->operator_short ? info->operator_short : "n/a");
 
-        g_variant_builder_add (&builder, "{sv}",
-                               "operator-code", g_variant_new_string (info->operator_code));
-        g_variant_builder_add (&builder, "{sv}",
-                               "status", g_variant_new_uint32 (info->status));
-        g_variant_builder_add (&builder, "{sv}",
-                               "access-technology", g_variant_new_uint32 (info->access_tech));
+        g_variant_builder_open (&builder, G_VARIANT_TYPE ("a{sv}"));
+        g_variant_builder_add (&builder, "{sv}", "operator-code", g_variant_new_string (info->operator_code));
+        g_variant_builder_add (&builder, "{sv}", "status", g_variant_new_uint32 (info->status));
+        g_variant_builder_add (&builder, "{sv}", "access-technology", g_variant_new_uint32 (info->access_tech));
         if (info->operator_long)
-            g_variant_builder_add (&builder, "{sv}",
-                                   "operator-long", g_variant_new_string (info->operator_long));
+            g_variant_builder_add (&builder, "{sv}", "operator-long", g_variant_new_string (info->operator_long));
         if (info->operator_short)
-            g_variant_builder_add (&builder, "{sv}",
-                                   "operator-short", g_variant_new_string (info->operator_short));
+            g_variant_builder_add (&builder, "{sv}", "operator-short", g_variant_new_string (info->operator_short));
         g_variant_builder_close (&builder);
     }
 
@@ -878,33 +884,32 @@
 }
 
 static void
-handle_scan_ready (MMIfaceModem3gpp *self,
-                   GAsyncResult *res,
+handle_scan_ready (MMIfaceModem3gpp  *self,
+                   GAsyncResult      *res,
                    HandleScanContext *ctx)
 {
-    GError *error = NULL;
-    GList *info_list;
+    GError              *error = NULL;
+    GList               *info_list;
+    g_autoptr(GVariant)  dict_array = NULL;
 
     info_list = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->scan_networks_finish (self, res, &error);
-    if (error)
+    if (error) {
+        mm_obj_warn (self, "failed scanning networks: %s", error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
-    else {
-        GVariant *dict_array;
-
-        dict_array = scan_networks_build_result (info_list);
-        mm_gdbus_modem3gpp_complete_scan (ctx->skeleton,
-                                          ctx->invocation,
-                                          dict_array);
-        g_variant_unref (dict_array);
+        handle_scan_context_free (ctx);
+        return;
     }
 
+    mm_obj_info (self, "network scan performed: %u found", g_list_length (info_list));
+    dict_array = build_scan_networks_result (self, info_list);
+    mm_gdbus_modem3gpp_complete_scan (ctx->skeleton, ctx->invocation, dict_array);
     mm_3gpp_network_info_list_free (info_list);
     handle_scan_context_free (ctx);
 }
 
 static void
-handle_scan_auth_ready (MMBaseModem *self,
-                        GAsyncResult *res,
+handle_scan_auth_ready (MMBaseModem       *self,
+                        GAsyncResult      *res,
                         HandleScanContext *ctx)
 {
     GError *error = NULL;
@@ -940,13 +945,13 @@
 }
 
 static gboolean
-handle_scan (MmGdbusModem3gpp *skeleton,
+handle_scan (MmGdbusModem3gpp      *skeleton,
              GDBusMethodInvocation *invocation,
-             MMIfaceModem3gpp *self)
+             MMIfaceModem3gpp      *self)
 {
     HandleScanContext *ctx;
 
-    ctx = g_new (HandleScanContext, 1);
+    ctx = g_slice_new0 (HandleScanContext);
     ctx->skeleton = g_object_ref (skeleton);
     ctx->invocation = g_object_ref (invocation);
     ctx->self = g_object_ref (self);
@@ -987,16 +992,23 @@
 
     uemode = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_eps_ue_mode_operation_finish (self, res, &error);
     if (error) {
+        mm_obj_warn (self, "failed reloading EPS UE mode of operation after update to '%s': %s",
+                     mm_modem_3gpp_eps_ue_mode_operation_get_string (ctx->mode),
+                     error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
         handle_set_eps_ue_mode_operation_context_free (ctx);
         return;
     }
 
     if (uemode != ctx->mode) {
+        mm_obj_info (self, "requested (%s) and reloaded (%s) EPS UE mode of operation don't match",
+                     mm_modem_3gpp_eps_ue_mode_operation_get_string (ctx->mode),
+                     mm_modem_3gpp_eps_ue_mode_operation_get_string (uemode));
         g_dbus_method_invocation_return_error_literal (ctx->invocation,
                                                        MM_CORE_ERROR,
                                                        MM_CORE_ERROR_FAILED,
-                                                       "UE mode of operation for EPS wasn't updated");
+
+                                                       "EPS UE mode of operation wasn't updated");
         handle_set_eps_ue_mode_operation_context_free (ctx);
         return;
     }
@@ -1014,6 +1026,9 @@
     GError *error = NULL;
 
     if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_eps_ue_mode_operation_finish (self, res, &error)) {
+        mm_obj_warn (self, "failed setting EPS UE mode of operation to '%s': %s",
+                     mm_modem_3gpp_eps_ue_mode_operation_get_string (ctx->mode),
+                     error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
         handle_set_eps_ue_mode_operation_context_free (ctx);
         return;
@@ -1029,6 +1044,8 @@
     }
 
     /* Assume we're ok */
+    mm_obj_info (self, "EPS UE mode of operation set to '%s'",
+                 mm_modem_3gpp_eps_ue_mode_operation_get_string (ctx->mode));
     mm_gdbus_modem3gpp_complete_set_eps_ue_mode_operation (ctx->skeleton, ctx->invocation);
     handle_set_eps_ue_mode_operation_context_free (ctx);
 }
@@ -1065,6 +1082,9 @@
         return;
     }
 
+    mm_obj_info (self, "processing user request to set EPS UE mode of operation to '%s'...",
+                 mm_modem_3gpp_eps_ue_mode_operation_get_string (ctx->mode));
+
     MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_eps_ue_mode_operation (
         MM_IFACE_MODEM_3GPP (self),
         ctx->mode,
@@ -1080,7 +1100,7 @@
 {
     HandleSetEpsUeModeOperationContext *ctx;
 
-    ctx = g_slice_new (HandleSetEpsUeModeOperationContext);
+    ctx = g_slice_new0 (HandleSetEpsUeModeOperationContext);
     ctx->skeleton   = g_object_ref (skeleton);
     ctx->invocation = g_object_ref (invocation);
     ctx->self       = g_object_ref (self);
@@ -1116,83 +1136,40 @@
 }
 
 static void
-log_initial_eps_bearer_settings (MMIfaceModem3gpp   *self,
-                                 MMBearerProperties *properties)
-{
-    const gchar         *apn;
-    MMBearerAllowedAuth  allowed_auth;
-    const gchar         *user;
-    const gchar         *password;
-    MMBearerIpFamily     ip_family;
-
-    apn = mm_bearer_properties_get_apn (properties);
-    if (apn)
-        mm_obj_dbg (self, "  APN: '%s'", apn);
-
-    allowed_auth = mm_bearer_properties_get_allowed_auth (properties);
-    if (allowed_auth != MM_BEARER_ALLOWED_AUTH_UNKNOWN) {
-        g_autofree gchar *allowed_auth_str = NULL;
-
-        allowed_auth_str = mm_bearer_allowed_auth_build_string_from_mask (allowed_auth);
-        mm_obj_dbg (self, "  allowed auth: '%s'", allowed_auth_str);
-    }
-
-    user = mm_bearer_properties_get_user (properties);
-    if (user)
-        mm_obj_dbg (self, "  user: '%s'", user);
-
-    password = mm_bearer_properties_get_password (properties);
-    if (password)
-        mm_obj_dbg (self, "  password: '%s'", password);
-
-    ip_family = mm_bearer_properties_get_ip_type (properties);
-    if (ip_family != MM_BEARER_IP_FAMILY_NONE) {
-        g_autofree gchar *ip_family_str = NULL;
-
-        ip_family_str = mm_bearer_ip_family_build_string_from_mask (ip_family);
-        mm_obj_dbg (self, "  ip family: '%s'", ip_family_str);
-    }
-}
-
-static void
 after_set_load_initial_eps_bearer_settings_ready (MMIfaceModem3gpp                         *self,
                                                   GAsyncResult                             *res,
                                                   HandleSetInitialEpsBearerSettingsContext *ctx)
 {
-    GError             *error = NULL;
-    MMBearerProperties *new_config;
+    GError                        *error = NULL;
+    g_autoptr(MMBearerProperties)  new_config = NULL;
+    g_autoptr(GVariant)            dictionary = NULL;
 
     new_config = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_settings_finish (self, res, &error);
     if (error) {
+        mm_obj_warn (self, "failed reloading initial EPS bearer settings after update: %s", error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
         handle_set_initial_eps_bearer_settings_context_free (ctx);
         return;
     }
 
-    mm_obj_dbg (self, "Updated initial EPS bearer settings:");
-    log_initial_eps_bearer_settings (self, new_config);
-
     /* When we request to set an empty/NULL APN, we instead select the default initial attach APN used by the modem,
        which will probably not be an empty APN. If that's the case, we won't check for equality between the requested
        APN and the APN which is now set. */
     if (mm_bearer_properties_get_apn (ctx->config) && g_strcmp0 (mm_bearer_properties_get_apn (ctx->config), "") != 0 &&
         !mm_bearer_properties_cmp (new_config, ctx->config, MM_BEARER_PROPERTIES_CMP_FLAGS_EPS)) {
-        mm_obj_dbg (self, "Requested initial EPS bearer settings:");
-        log_initial_eps_bearer_settings (self, ctx->config);
+        mm_obj_warn (self, "requested and reloaded initial EPS bearer settings don't match");
+        mm_obj_info (self, "reloaded initial EPS bearer settings:");
+        mm_log_bearer_properties (self, MM_LOG_LEVEL_INFO, "  ", new_config);
         g_dbus_method_invocation_return_error_literal (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_FAILED,
                                                        "Initial EPS bearer settings were not updated");
-    } else {
-        GVariant *dictionary;
-
-        dictionary = mm_bearer_properties_get_dictionary (new_config);
-        mm_gdbus_modem3gpp_set_initial_eps_bearer_settings (ctx->skeleton, dictionary);
-        if (dictionary)
-            g_variant_unref (dictionary);
-        mm_gdbus_modem3gpp_complete_set_initial_eps_bearer_settings (ctx->skeleton, ctx->invocation);
+        handle_set_initial_eps_bearer_settings_context_free (ctx);
+        return;
     }
 
+    dictionary = mm_bearer_properties_get_dictionary (new_config);
+    mm_gdbus_modem3gpp_set_initial_eps_bearer_settings (ctx->skeleton, dictionary);
+    mm_gdbus_modem3gpp_complete_set_initial_eps_bearer_settings (ctx->skeleton, ctx->invocation);
     handle_set_initial_eps_bearer_settings_context_free (ctx);
-    g_object_unref (new_config);
 }
 
 static void
@@ -1203,11 +1180,14 @@
     GError *error = NULL;
 
     if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_initial_eps_bearer_settings_finish (self, res, &error)) {
+        mm_obj_warn (self, "failed setting initial EPS bearer settings: %s", error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
         handle_set_initial_eps_bearer_settings_context_free (ctx);
         return;
     }
 
+    mm_obj_info (self, "initial EPS bearer settings updated");
+
     if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_settings &&
         MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_settings_finish) {
         MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_settings (
@@ -1227,9 +1207,9 @@
                                             GAsyncResult                             *res,
                                             HandleSetInitialEpsBearerSettingsContext *ctx)
 {
-    GError             *error = NULL;
-    MMBearerProperties *old_config = NULL;
-    GVariant           *old_dictionary;
+    GError                        *error = NULL;
+    GVariant                      *old_dictionary;
+    g_autoptr(MMBearerProperties)  old_config = NULL;
 
     if (!mm_base_modem_authorize_finish (self, res, &error)) {
         g_dbus_method_invocation_take_error (ctx->invocation, error);
@@ -1240,10 +1220,8 @@
     /* If UE mode update is not implemented, report an error */
     if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_initial_eps_bearer_settings ||
         !MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_initial_eps_bearer_settings_finish) {
-        g_dbus_method_invocation_return_error (ctx->invocation,
-                                               MM_CORE_ERROR,
-                                               MM_CORE_ERROR_UNSUPPORTED,
-                                               "Cannot set initial EPS bearer settings: operation not supported");
+        g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
+                                               "Operation not supported");
         handle_set_initial_eps_bearer_settings_context_free (ctx);
         return;
     }
@@ -1255,23 +1233,25 @@
         return;
     }
 
+    mm_obj_info (self, "processing user request to set initial EPS bearer settings...");
+    mm_log_bearer_properties (self, MM_LOG_LEVEL_INFO, "  ", ctx->config);
+
     old_dictionary = mm_gdbus_modem3gpp_get_initial_eps_bearer_settings (ctx->skeleton);
     if (old_dictionary)
         old_config = mm_bearer_properties_new_from_dictionary (old_dictionary, NULL);
 
     if (old_config && mm_bearer_properties_cmp (ctx->config, old_config, MM_BEARER_PROPERTIES_CMP_FLAGS_EPS)) {
-        mm_obj_dbg (self, "Skipping initial eps bearer configuration. Same configuration provided");
+        mm_obj_info (self, "skipped setting initial EPS bearer settings: same configuration provided");
         mm_gdbus_modem3gpp_complete_set_initial_eps_bearer_settings (ctx->skeleton, ctx->invocation);
         handle_set_initial_eps_bearer_settings_context_free (ctx);
-    } else {
-        MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_initial_eps_bearer_settings (
-            MM_IFACE_MODEM_3GPP (self),
-            ctx->config,
-            (GAsyncReadyCallback)set_initial_eps_bearer_settings_ready,
-            ctx);
+        return;
     }
 
-    g_clear_object (&old_config);
+    MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_initial_eps_bearer_settings (
+        MM_IFACE_MODEM_3GPP (self),
+        ctx->config,
+        (GAsyncReadyCallback)set_initial_eps_bearer_settings_ready,
+        ctx);
 }
 
 static gboolean
@@ -1304,6 +1284,7 @@
     MMIfaceModem3gpp      *self;
     GVariant              *dictionary;
     MMModem3gppFacility    facility;
+    gchar                 *facility_str;
     guint8                 slot;
     gchar                 *control_key;
 } HandleDisableFacilityLockContext;
@@ -1316,7 +1297,8 @@
     g_object_unref (ctx->self);
     g_variant_unref (ctx->dictionary);
     g_free (ctx->control_key);
-    g_free (ctx);
+    g_free (ctx->facility_str);
+    g_slice_free (HandleDisableFacilityLockContext, ctx);
 }
 
 static void
@@ -1324,7 +1306,7 @@
                         GAsyncResult                     *res,
                         HandleDisableFacilityLockContext *ctx)
 {
-    GError      *error = NULL;
+    GError *error = NULL;
 
     mm_iface_modem_update_lock_info_finish (modem, res, &error);
     if (error) {
@@ -1346,11 +1328,15 @@
     GError              *error = NULL;
 
     if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->disable_facility_lock_finish (self, res, &error)) {
+        mm_obj_warn (self, "failed disabling facility lock '%s': %s",
+                     ctx->facility_str, error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
         handle_disable_facility_lock_context_free (ctx);
         return;
     }
 
+    mm_obj_info (self, "facility lock '%s' disabled", ctx->facility_str);
+
     /* Update the Enabled Facility Locks property in the DBus interface */
     facilities = mm_gdbus_modem3gpp_get_enabled_facility_locks (ctx->skeleton);
     facilities &= ~ctx->facility;
@@ -1379,20 +1365,16 @@
     /* If disable facility locks is not implemented, report an error */
     if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->disable_facility_lock ||
         !MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->disable_facility_lock_finish) {
-        g_dbus_method_invocation_return_error (ctx->invocation,
-                                               MM_CORE_ERROR,
-                                               MM_CORE_ERROR_UNSUPPORTED,
-                                               "Cannot disable facility locks: operation not supported");
+        g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
+                                               "Operation not supported");
         handle_disable_facility_lock_context_free (ctx);
         return;
     }
 
     /* Parse properties dictionary */
     if (!g_variant_is_of_type (ctx->dictionary, G_VARIANT_TYPE ("(us)"))) {
-        g_dbus_method_invocation_return_error (ctx->invocation,
-                                               MM_CORE_ERROR,
-                                               MM_CORE_ERROR_UNSUPPORTED,
-                                               "Cannot disable facility locks: invalid parameters");
+        g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS,
+                                               "Invalid parameters");
         handle_disable_facility_lock_context_free (ctx);
         return;
     }
@@ -1412,14 +1394,15 @@
                                            MM_MODEM_3GPP_FACILITY_NET_SUB_PERS |
                                            MM_MODEM_3GPP_FACILITY_PROVIDER_PERS |
                                            MM_MODEM_3GPP_FACILITY_CORP_PERS))) {
-        g_dbus_method_invocation_return_error (ctx->invocation,
-                                               MM_CORE_ERROR,
-                                               MM_CORE_ERROR_UNSUPPORTED,
+        g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS,
                                                "Invalid type of facility lock to disable or empty key");
         handle_disable_facility_lock_context_free (ctx);
         return;
     }
 
+    ctx->facility_str = mm_modem_3gpp_facility_build_string_from_mask (ctx->facility);
+    mm_obj_info (self, "processing user request to disable facility lock '%s'...", ctx->facility_str);
+    mm_obj_info (self, "  control key: %s", mm_log_str_personal_info (ctx->control_key));
     MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->disable_facility_lock (
         MM_IFACE_MODEM_3GPP (self),
         ctx->facility,
@@ -1437,7 +1420,7 @@
 {
     HandleDisableFacilityLockContext *ctx;
 
-    ctx = g_new0 (HandleDisableFacilityLockContext, 1);
+    ctx = g_slice_new0 (HandleDisableFacilityLockContext);
     ctx->skeleton   = g_object_ref (skeleton);
     ctx->invocation = g_object_ref (invocation);
     ctx->self       = g_object_ref (self);
@@ -1452,6 +1435,59 @@
 }
 
 /*****************************************************************************/
+/* Set Packet Service State (internal) */
+
+gboolean
+mm_iface_modem_3gpp_set_packet_service_state_finish (MMIfaceModem3gpp  *self,
+                                                     GAsyncResult      *res,
+                                                     GError           **error)
+{
+    return g_task_propagate_boolean (G_TASK (res), error);
+}
+
+static void
+set_packet_service_state_ready (MMIfaceModem3gpp *self,
+                                GAsyncResult     *res,
+                                GTask            *task)
+{
+    GError *error = NULL;
+
+    if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_packet_service_state_finish (self, res, &error))
+        g_task_return_error (task, error);
+    else
+        g_task_return_boolean (task, TRUE);
+    g_object_unref (task);
+}
+
+void
+mm_iface_modem_3gpp_set_packet_service_state (MMIfaceModem3gpp              *self,
+                                              MMModem3gppPacketServiceState  packet_service_state,
+                                              GAsyncReadyCallback            callback,
+                                              gpointer                       user_data)
+{
+    GTask *task;
+
+    g_assert (packet_service_state == MM_MODEM_3GPP_PACKET_SERVICE_STATE_ATTACHED ||
+              packet_service_state == MM_MODEM_3GPP_PACKET_SERVICE_STATE_DETACHED);
+
+    task = g_task_new (self, NULL, callback, user_data);
+
+    if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_packet_service_state ||
+        !MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_packet_service_state_finish) {
+        g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
+                                 "Explicit packet service attach/detach operation not supported");
+        g_object_unref (task);
+        return;
+    }
+
+    MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_packet_service_state (
+        self,
+        packet_service_state,
+        (GAsyncReadyCallback)set_packet_service_state_ready,
+        task);
+}
+
+/*****************************************************************************/
 /* Set Packet Service State */
 
 typedef struct {
@@ -1471,16 +1507,22 @@
 }
 
 static void
-set_packet_service_state_ready (MMIfaceModem3gpp                *self,
-                                GAsyncResult                    *res,
-                                HandlePacketServiceStateContext *ctx)
+internal_set_packet_service_state_ready (MMIfaceModem3gpp                *self,
+                                         GAsyncResult                    *res,
+                                         HandlePacketServiceStateContext *ctx)
 {
     GError *error = NULL;
 
-    if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_packet_service_state_finish (self, res, &error))
+    if (!mm_iface_modem_3gpp_set_packet_service_state_finish (self, res, &error)) {
+        mm_obj_warn (self, "failed setting packet service state to '%s': %s",
+                     mm_modem_3gpp_packet_service_state_get_string (ctx->packet_service_state),
+                     error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
-    else
+    } else {
+        mm_obj_info (self, "packet service state set to '%s'",
+                     mm_modem_3gpp_packet_service_state_get_string (ctx->packet_service_state));
         mm_gdbus_modem3gpp_complete_set_packet_service_state (ctx->skeleton, ctx->invocation);
+    }
     handle_set_packet_service_state_context_free (ctx);
 }
 
@@ -1504,28 +1546,20 @@
         return;
     }
 
-    if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->set_packet_service_state ||
-        !MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->set_packet_service_state_finish) {
-        g_dbus_method_invocation_return_error (ctx->invocation,
-                                               MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
-                                               "Explicit packet service attach/detach operation not supported");
-        handle_set_packet_service_state_context_free (ctx);
-        return;
-    }
-
     if ((ctx->packet_service_state != MM_MODEM_3GPP_PACKET_SERVICE_STATE_ATTACHED) &&
         (ctx->packet_service_state != MM_MODEM_3GPP_PACKET_SERVICE_STATE_DETACHED)) {
-        g_dbus_method_invocation_return_error (ctx->invocation,
-                                               MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS,
+        g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS,
                                                "Invalid packet service state requested");
         handle_set_packet_service_state_context_free (ctx);
         return;
     }
 
-    MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_packet_service_state (ctx->self,
-                                                                        ctx->packet_service_state,
-                                                                        (GAsyncReadyCallback)set_packet_service_state_ready,
-                                                                        ctx);
+    mm_obj_info (self, "processing user request to set packet service state to '%s'...",
+                 mm_modem_3gpp_packet_service_state_get_string (ctx->packet_service_state));
+    mm_iface_modem_3gpp_set_packet_service_state (ctx->self,
+                                                  ctx->packet_service_state,
+                                                  (GAsyncReadyCallback)internal_set_packet_service_state_ready,
+                                                  ctx);
 }
 
 static gboolean
@@ -1536,7 +1570,7 @@
 {
     HandlePacketServiceStateContext *ctx;
 
-    ctx = g_slice_new (HandlePacketServiceStateContext);
+    ctx = g_slice_new0 (HandlePacketServiceStateContext);
     ctx->skeleton = g_object_ref (skeleton);
     ctx->invocation = g_object_ref (invocation);
     ctx->self = g_object_ref (self);
@@ -1578,6 +1612,7 @@
 {
     GError                                *error = NULL;
     g_autoptr(MMNr5gRegistrationSettings)  new_settings = NULL;
+    g_autoptr(GVariant)                    dictionary = NULL;
 
     new_settings = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_nr5g_registration_settings_finish (self, res, &error);
     if (error) {
@@ -1586,19 +1621,19 @@
         return;
     }
 
-    mm_obj_dbg (self, "Updated 5GNR registration settings");
+    mm_obj_info (self, "5GNR registration settings updated");
 
     if (!mm_nr5g_registration_settings_cmp (new_settings, ctx->settings)) {
+        mm_obj_info (self, "requested and reloaded 5GNR registration settings don't match");
         g_dbus_method_invocation_return_error_literal (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_FAILED,
                                                        "5GNR registration settings were not updated");
-    } else {
-        g_autoptr(GVariant) dictionary = NULL;
-
-        dictionary = mm_nr5g_registration_settings_get_dictionary (new_settings);
-        mm_gdbus_modem3gpp_set_nr5g_registration_settings (ctx->skeleton, dictionary);
-        mm_gdbus_modem3gpp_complete_set_nr5g_registration_settings (ctx->skeleton, ctx->invocation);
+        handle_set_nr5g_registration_settings_context_free (ctx);
+        return;
     }
 
+    dictionary = mm_nr5g_registration_settings_get_dictionary (new_settings);
+    mm_gdbus_modem3gpp_set_nr5g_registration_settings (ctx->skeleton, dictionary);
+    mm_gdbus_modem3gpp_complete_set_nr5g_registration_settings (ctx->skeleton, ctx->invocation);
     handle_set_nr5g_registration_settings_context_free (ctx);
 }
 
@@ -1610,6 +1645,7 @@
     GError *error = NULL;
 
     if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_nr5g_registration_settings_finish (self, res, &error)) {
+        mm_obj_warn (self, "failed setting 5GNR registration settings: %s", error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
         handle_set_nr5g_registration_settings_context_free (ctx);
         return;
@@ -1625,6 +1661,7 @@
     }
 
     /* Assume we're ok */
+    mm_obj_info (self, "5GNR registration settings updated");
     mm_gdbus_modem3gpp_complete_set_nr5g_registration_settings (ctx->skeleton, ctx->invocation);
     handle_set_nr5g_registration_settings_context_free (ctx);
 }
@@ -1648,7 +1685,7 @@
     if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_nr5g_registration_settings ||
         !MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_nr5g_registration_settings_finish) {
         g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
-                                               "Cannot set 5GNR registration settings: operation not supported");
+                                               "Operation not supported");
         handle_set_nr5g_registration_settings_context_free (ctx);
         return;
     }
@@ -1660,21 +1697,24 @@
         return;
     }
 
+    mm_obj_info (self, "processing user request to set 5GNR registration settings...");
+
     old_dictionary = mm_gdbus_modem3gpp_get_nr5g_registration_settings (ctx->skeleton);
     if (old_dictionary)
         old_settings = mm_nr5g_registration_settings_new_from_dictionary (old_dictionary, NULL);
 
     if (old_settings && mm_nr5g_registration_settings_cmp (ctx->settings, old_settings)) {
-        mm_obj_dbg (self, "Skipping 5GNR registration settings. Same configuration provided");
+        mm_obj_info (self, "skipped setting 5GNR registration settings: same configuration provided");
         mm_gdbus_modem3gpp_complete_set_nr5g_registration_settings (ctx->skeleton, ctx->invocation);
         handle_set_nr5g_registration_settings_context_free (ctx);
-    } else {
-        MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_nr5g_registration_settings (
-            MM_IFACE_MODEM_3GPP (self),
-            ctx->settings,
-            (GAsyncReadyCallback)set_nr5g_registration_settings_ready,
-            ctx);
+        return;
     }
+
+    MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->set_nr5g_registration_settings (
+        MM_IFACE_MODEM_3GPP (self),
+        ctx->settings,
+        (GAsyncReadyCallback)set_nr5g_registration_settings_ready,
+        ctx);
 }
 
 static gboolean
@@ -1808,7 +1848,7 @@
     if (error) {
         mm_obj_warn (self, "couldn't load operator code: %s", error->message);
     } else if (!mm_3gpp_parse_operator_id (str, NULL, NULL, NULL, &error)) {
-        mm_obj_dbg (self, "unexpected operator code string '%s': %s", str, error->message);
+        mm_obj_warn (self, "unexpected operator code string '%s': %s", str, error->message);
         g_clear_pointer (&str, g_free);
     }
     g_clear_error (&error);
@@ -1933,7 +1973,7 @@
 
     /* Even if registration state didn't change, report access technology,
      * but only if something valid to report */
-    if (REG_STATE_IS_REGISTERED (state) || priv->reloading_registration_info) {
+    if (mm_modem_3gpp_registration_state_is_registered (state) || priv->reloading_registration_info) {
         if (access_tech != MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN)
             mm_iface_modem_update_access_technologies (MM_IFACE_MODEM (self),
                                                        access_tech,
@@ -1966,7 +2006,7 @@
      * location updates, but only if something valid to report. For the case
      * where we're registering (loading current registration info after a state
      * change to registered), we also allow LAC/CID updates. */
-    if (REG_STATE_IS_REGISTERED (state) || priv->reloading_registration_info) {
+    if (mm_modem_3gpp_registration_state_is_registered (state) || priv->reloading_registration_info) {
         if (location_area_code || tracking_area_code || cell_id)
             mm_iface_modem_location_3gpp_update_lac_tac_ci (MM_IFACE_MODEM_LOCATION (self),
                                                             location_area_code,
@@ -1990,9 +2030,9 @@
 
     new_state = GPOINTER_TO_UINT (user_data);
 
-    mm_obj_info (self, "3GPP registration state changed (registering -> %s)",
-                 mm_modem_3gpp_registration_state_get_string (new_state));
-    mm_obj_dbg (self, "consolidated registration state: cs '%s', ps '%s', eps '%s', 5gs '%s' --> '%s'",
+    mm_obj_msg (self, "3GPP registration state changed (registering -> %s)",
+                mm_modem_3gpp_registration_state_get_string (new_state));
+    mm_obj_info (self, "consolidated registration state: cs '%s', ps '%s', eps '%s', 5gs '%s' --> '%s'",
                 mm_modem_3gpp_registration_state_get_string (priv->state_cs),
                 mm_modem_3gpp_registration_state_get_string (priv->state_ps),
                 mm_modem_3gpp_registration_state_get_string (priv->state_eps),
@@ -2057,7 +2097,7 @@
     if (new_state == old_state && old_packet_service_state == get_consolidated_packet_service_state (self))
         return;
 
-    if (REG_STATE_IS_REGISTERED (new_state)) {
+    if (mm_modem_3gpp_registration_state_is_registered (new_state)) {
         MMModemState modem_state;
 
         /* If already reloading registration info, skip it */
@@ -2079,8 +2119,8 @@
             return;
         }
 
-        mm_obj_info (self, "3GPP registration state changed (%s -> registering)",
-                     mm_modem_3gpp_registration_state_get_string (old_state));
+        mm_obj_msg (self, "3GPP registration state changed (%s -> registering)",
+                    mm_modem_3gpp_registration_state_get_string (old_state));
 
         /* Reload current registration info. ONLY update the state to REGISTERED
          * after having loaded operator code/name/subscription state */
@@ -2092,10 +2132,10 @@
         return;
     }
 
-    mm_obj_info (self, "3GPP registration state changed (%s -> %s)",
-                 mm_modem_3gpp_registration_state_get_string (old_state),
-                 mm_modem_3gpp_registration_state_get_string (new_state));
-    mm_obj_dbg (self, "consolidated registration state: cs '%s', ps '%s', eps '%s', 5gs '%s' --> '%s'",
+    mm_obj_msg (self, "3GPP registration state changed (%s -> %s)",
+                mm_modem_3gpp_registration_state_get_string (old_state),
+                mm_modem_3gpp_registration_state_get_string (new_state));
+    mm_obj_info (self, "consolidated registration state: cs '%s', ps '%s', eps '%s', 5gs '%s' --> '%s'",
                 mm_modem_3gpp_registration_state_get_string (priv->state_cs),
                 mm_modem_3gpp_registration_state_get_string (priv->state_ps),
                 mm_modem_3gpp_registration_state_get_string (priv->state_eps),
@@ -2229,8 +2269,10 @@
 
     g_variant_builder_init (&builder, G_VARIANT_TYPE ("a(ubay)"));
     for (iter = pco_list; iter; iter = g_list_next (iter)) {
-        g_variant_builder_add_value (&builder,
-                                     mm_pco_to_variant (MM_PCO (iter->data)));
+        g_autoptr(GVariant) pco_variant = NULL;
+
+        pco_variant = mm_pco_to_variant (MM_PCO (iter->data));
+        g_variant_builder_add_value (&builder, pco_variant);
     }
     variant = g_variant_ref_sink (g_variant_builder_end (&builder));
     mm_gdbus_modem3gpp_set_pco (skeleton, variant);
@@ -3018,7 +3060,7 @@
 
     settings = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_nr5g_registration_settings_finish (self, res, &error);
     if (!settings) {
-        mm_obj_warn (self, "couldn't load 5GNR registration settings: %s", error->message);
+        mm_obj_dbg (self, "couldn't load 5GNR registration settings: %s", error->message);
     } else {
         g_autoptr(GVariant) dictionary = NULL;
 
@@ -3036,24 +3078,20 @@
                                         GAsyncResult     *res,
                                         GTask            *task)
 {
-    InitializationContext *ctx;
-    MMBearerProperties    *config;
-    GError                *error = NULL;
+    InitializationContext         *ctx;
+    g_autoptr(MMBearerProperties)  config = NULL;
+    g_autoptr(GError)              error = NULL;
 
     ctx = g_task_get_task_data (task);
 
     config = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_settings_finish (self, res, &error);
-    if (!config) {
-        mm_obj_warn (self, "couldn't load initial EPS bearer settings: %s", error->message);
-        g_error_free (error);
-    } else {
-        GVariant *dictionary;
+    if (!config)
+        mm_obj_dbg (self, "couldn't load initial EPS bearer settings: %s", error->message);
+    else {
+        g_autoptr(GVariant) dictionary = NULL;
 
         dictionary = mm_bearer_properties_get_dictionary (config);
         mm_gdbus_modem3gpp_set_initial_eps_bearer_settings (ctx->skeleton, dictionary);
-        g_object_unref (config);
-        if (dictionary)
-            g_variant_unref (dictionary);
     }
 
     /* Go on to next step */
@@ -3068,17 +3106,15 @@
 {
     InitializationContext         *ctx;
     MMModem3gppEpsUeModeOperation  uemode;
-    GError                        *error = NULL;
+    g_autoptr(GError)              error = NULL;
 
     ctx = g_task_get_task_data (task);
 
     uemode = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_eps_ue_mode_operation_finish (self, res, &error);
     mm_gdbus_modem3gpp_set_eps_ue_mode_operation (ctx->skeleton, uemode);
 
-    if (error) {
-        mm_obj_warn (self, "couldn't load UE mode of operation for EPS: %s", error->message);
-        g_error_free (error);
-    }
+    if (error)
+        mm_obj_dbg (self, "couldn't load UE mode of operation for EPS: %s", error->message);
 
     /* Go on to next step */
     ctx->step++;
@@ -3087,36 +3123,32 @@
 
 static void
 load_enabled_facility_locks_ready (MMIfaceModem3gpp *self,
-                                   GAsyncResult *res,
-                                   GTask *task)
+                                   GAsyncResult     *res,
+                                   GTask            *task)
 {
     InitializationContext *ctx;
-    GError *error = NULL;
-    MMModem3gppFacility facilities;
+    g_autoptr(GError)      error = NULL;
+    MMModem3gppFacility    facilities;
 
     ctx = g_task_get_task_data (task);
 
     facilities = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_enabled_facility_locks_finish (self, res, &error);
     mm_gdbus_modem3gpp_set_enabled_facility_locks (ctx->skeleton, facilities);
 
-    if (error) {
-        mm_obj_warn (self, "couldn't load facility locks: %s", error->message);
-        g_error_free (error);
-    } else {
-        MMBaseSim *sim = NULL;
+    if (error)
+        mm_obj_dbg (self, "couldn't load facility locks: %s", error->message);
+    else {
+        g_autoptr(MMBaseSim) sim = NULL;
 
         /* We loaded the initial list of facility locks; but we do need to update
          * the SIM PIN lock status when that changes. We'll connect to the signal
          * which notifies about such update. There is no need to ref self as the
          * SIM itself is an object which exists as long as self exists. */
-        g_object_get (self,
-                      MM_IFACE_MODEM_SIM, &sim,
-                      NULL);
+        g_object_get (self, MM_IFACE_MODEM_SIM, &sim, NULL);
         g_signal_connect (sim,
                           MM_BASE_SIM_PIN_LOCK_ENABLED,
                           G_CALLBACK (sim_pin_lock_enabled_cb),
                           ctx->skeleton);
-        g_object_unref (sim);
     }
 
     /* Go on to next step */
@@ -3126,23 +3158,20 @@
 
 static void
 load_imei_ready (MMIfaceModem3gpp *self,
-                 GAsyncResult *res,
-                 GTask *task)
+                 GAsyncResult     *res,
+                 GTask            *task)
 {
     InitializationContext *ctx;
-    GError *error = NULL;
-    gchar *imei;
+    g_autoptr(GError)      error = NULL;
+    g_autofree gchar      *imei = NULL;
 
     ctx = g_task_get_task_data (task);
 
     imei = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_imei_finish (self, res, &error);
     mm_gdbus_modem3gpp_set_imei (ctx->skeleton, imei);
-    g_free (imei);
 
-    if (error) {
-        mm_obj_warn (self, "couldn't load IMEI: %s", error->message);
-        g_error_free (error);
-    }
+    if (error)
+        mm_obj_dbg (self, "couldn't load IMEI: %s", error->message);
 
     /* Go on to next step */
     ctx->step++;
diff --git a/src/mm-iface-modem-3gpp.h b/src/mm-iface-modem-3gpp.h
index 08ef956..3925a58 100644
--- a/src/mm-iface-modem-3gpp.h
+++ b/src/mm-iface-modem-3gpp.h
@@ -392,6 +392,16 @@
                                                            GAsyncResult         *res,
                                                            GError              **error);
 
+/* Allow requesting packet service explicitly */
+void     mm_iface_modem_3gpp_set_packet_service_state        (MMIfaceModem3gpp              *self,
+                                                              MMModem3gppPacketServiceState  packet_service_state,
+                                                              GAsyncReadyCallback            callback,
+                                                              gpointer                       user_data);
+gboolean mm_iface_modem_3gpp_set_packet_service_state_finish (MMIfaceModem3gpp              *self,
+                                                              GAsyncResult                  *res,
+                                                              GError                       **error);
+
+/* Allow waiting for packet service */
 void                          mm_iface_modem_3gpp_wait_for_packet_service_state        (MMIfaceModem3gpp              *self,
                                                                                         MMModem3gppPacketServiceState  final_state,
                                                                                         GAsyncReadyCallback            callback,
diff --git a/src/mm-iface-modem-oma.c b/src/mm-iface-modem-oma.c
index cc796b8..e27ee22 100644
--- a/src/mm-iface-modem-oma.c
+++ b/src/mm-iface-modem-oma.c
@@ -124,9 +124,9 @@
 
     old_session_state = mm_gdbus_modem_oma_get_session_state (skeleton);
     if (old_session_state != new_session_state) {
-        mm_obj_info (self, "OMA session state changed (%s -> %s)",
-                     mm_oma_session_state_get_string (old_session_state),
-                     mm_oma_session_state_get_string (new_session_state));
+        mm_obj_msg (self, "OMA session state changed (%s -> %s)",
+                    mm_oma_session_state_get_string (old_session_state),
+                    mm_oma_session_state_get_string (new_session_state));
 
         /* Flush current change before signaling the state change,
          * so that clients get the proper state already in the
diff --git a/src/mm-iface-modem-sar.c b/src/mm-iface-modem-sar.c
index 63105d6..3d193e7 100644
--- a/src/mm-iface-modem-sar.c
+++ b/src/mm-iface-modem-sar.c
@@ -80,10 +80,11 @@
     GError *error = NULL;
     guint   power_level = 0;
 
-    if (!MM_IFACE_MODEM_SAR_GET_INTERFACE (ctx->self)->enable_finish (self, res, &power_level, &error))
+    if (!MM_IFACE_MODEM_SAR_GET_INTERFACE (ctx->self)->enable_finish (self, res, &power_level, &error)) {
+        mm_obj_warn (self, "failed %s SAR: %s", ctx->enable ? "enabling" : "disabling", error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
-    else {
-        /* Update current features in the interface */
+    } else {
+        mm_obj_info (self, "%s SAR", ctx->enable ? "enabled" : "disabled");
         mm_gdbus_modem_sar_set_state (ctx->skeleton, ctx->enable);
         if (ctx->enable)
             mm_gdbus_modem_sar_set_power_level (ctx->skeleton, power_level);
@@ -123,8 +124,7 @@
         return;
     }
 
-    mm_obj_dbg (self, "%s SAR...", ctx->enable ? "Enabling" : "Disabling");
-
+    mm_obj_info (self, "processing user request to %s SAR...", ctx->enable ? "enable" : "disable");
     MM_IFACE_MODEM_SAR_GET_INTERFACE (ctx->self)->enable (ctx->self,
                                                           ctx->enable,
                                                           (GAsyncReadyCallback)enable_ready,
@@ -180,8 +180,10 @@
     GError *error = NULL;
 
     if (!MM_IFACE_MODEM_SAR_GET_INTERFACE (ctx->self)->set_power_level_finish (self, res, &error)) {
+        mm_obj_warn (self, "failed setting SAR power level to %u: %s", ctx->power_level, error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
     } else {
+        mm_obj_info (self, "SAR power level set to %u", ctx->power_level);
         mm_gdbus_modem_sar_set_power_level (ctx->skeleton, ctx->power_level);
         mm_gdbus_modem_sar_complete_set_power_level (ctx->skeleton, ctx->invocation);
     }
@@ -228,7 +230,7 @@
         return;
     }
 
-    mm_obj_dbg (self, "Set SAR power level to: '%d'", ctx->power_level);
+    mm_obj_info (self, "processing user request to set SAR power level to %u...", ctx->power_level);
     MM_IFACE_MODEM_SAR_GET_INTERFACE (ctx->self)->set_power_level (
         ctx->self,
         ctx->power_level,
@@ -299,11 +301,11 @@
                         GTask           *task)
 {
     InitializationContext *ctx;
-    GError *error = NULL;
-    guint   level;
+    GError                *error = NULL;
+    guint                  level;
 
     if (!MM_IFACE_MODEM_SAR_GET_INTERFACE (self)->load_power_level_finish (self, res, &level, &error)) {
-        mm_obj_dbg (self, "SAR load power level failed: %s", error->message);
+        mm_obj_warn (self, "loading SAR power level failed: %s", error->message);
         g_task_return_error (task, error);
         g_object_unref (task);
         return;
@@ -323,11 +325,11 @@
                   GTask           *task)
 {
     InitializationContext *ctx;
-    gboolean state;
-    GError *error = NULL;
+    gboolean               state;
+    GError                *error = NULL;
 
     if (!MM_IFACE_MODEM_SAR_GET_INTERFACE (self)->load_state_finish (self, res, &state, &error)) {
-        mm_obj_dbg (self, "SAR load state failed: %s", error->message);
+        mm_obj_warn (self, "loading SAR state failed: %s", error->message);
         g_task_return_error (task, error);
         g_object_unref (task);
         return;
@@ -347,13 +349,12 @@
                      GTask           *task)
 {
     InitializationContext *ctx;
-    GError *error = NULL;
+    g_autoptr(GError) error = NULL;
 
     if (!MM_IFACE_MODEM_SAR_GET_INTERFACE (self)->check_support_finish (self, res, &error)) {
         if (error) {
             /* This error shouldn't be treated as critical */
             mm_obj_dbg (self, "SAR support check failed: %s", error->message);
-            g_error_free (error);
         }
     } else {
         /* SAR is supported! */
@@ -435,7 +436,7 @@
         ctx->step++;
         /* fall through */
 
-    case INITIALIZATION_STEP_LOAD_STATE:
+     case INITIALIZATION_STEP_LOAD_STATE:
         if (MM_IFACE_MODEM_SAR_GET_INTERFACE (self)->load_state &&
             MM_IFACE_MODEM_SAR_GET_INTERFACE (self)->load_state_finish) {
             MM_IFACE_MODEM_SAR_GET_INTERFACE (self)->load_state (
diff --git a/src/mm-iface-modem-signal.c b/src/mm-iface-modem-signal.c
index 1116057..225513f 100644
--- a/src/mm-iface-modem-signal.c
+++ b/src/mm-iface-modem-signal.c
@@ -43,11 +43,15 @@
     /* threshold-based reporting */
     guint    rssi_threshold;
     gboolean error_rate_threshold;
+    /* info logging control */
+    GTimer   *info_log_timer;
 } Private;
 
 static void
 private_free (Private *priv)
 {
+    if (priv->info_log_timer)
+        g_timer_destroy (priv->info_log_timer);
     if (priv->timeout_source)
         g_source_remove (priv->timeout_source);
     g_slice_free (Private, priv);
@@ -80,6 +84,35 @@
 
 /*****************************************************************************/
 
+/* Even if the signal refresh rate is higher than 300s, don't pollute the INFO
+ * level log with so many updates, force a reduction of the rate to once every
+ * 300s */
+#define SIGNAL_QUALITY_PRINT_RATE_SECS 300
+
+static void
+info_log_signal_quality (MMIfaceModemSignal *self,
+                         MMSignal           *info,
+                         const gchar        *rat)
+{
+    Private              *priv = NULL;
+    g_autofree gchar     *printable = NULL;
+    g_autoptr(GDateTime)  current_time = NULL;
+
+    priv = get_private (self);
+
+    if (G_UNLIKELY (!priv->info_log_timer))
+        priv->info_log_timer = g_timer_new ();
+
+    if (g_timer_elapsed (priv->info_log_timer, NULL) < SIGNAL_QUALITY_PRINT_RATE_SECS)
+        return;
+    g_timer_reset (priv->info_log_timer);
+
+    printable = mm_signal_get_string (info);
+    mm_obj_info (self, "%s: %s", rat, printable);
+};
+
+/*****************************************************************************/
+
 static void
 internal_signal_update (MMIfaceModemSignal *self,
                         MMSignal           *cdma,
@@ -119,24 +152,28 @@
 
     if (gsm) {
         mm_obj_dbg (self, "gsm extended signal information updated");
+        info_log_signal_quality (self, gsm, "gsm");
         dict_gsm = mm_signal_get_dictionary (gsm);
     }
     mm_gdbus_modem_signal_set_gsm (MM_GDBUS_MODEM_SIGNAL (skeleton), dict_gsm);
 
     if (umts) {
         mm_obj_dbg (self, "umts extended signal information updated");
+        info_log_signal_quality (self, umts, "umts");
         dict_umts = mm_signal_get_dictionary (umts);
     }
     mm_gdbus_modem_signal_set_umts (MM_GDBUS_MODEM_SIGNAL (skeleton), dict_umts);
 
     if (lte) {
         mm_obj_dbg (self, "lte extended signal information updated");
+        info_log_signal_quality (self, lte, "lte");
         dict_lte = mm_signal_get_dictionary (lte);
     }
     mm_gdbus_modem_signal_set_lte (MM_GDBUS_MODEM_SIGNAL (skeleton), dict_lte);
 
     if (nr5g) {
         mm_obj_dbg (self, "5gnr extended signal information updated");
+        info_log_signal_quality (self, nr5g, "5gnr");
         dict_nr5g = mm_signal_get_dictionary (nr5g);
     }
     mm_gdbus_modem_signal_set_nr5g (MM_GDBUS_MODEM_SIGNAL (skeleton), dict_nr5g);
@@ -232,10 +269,10 @@
     priv = get_private (self);
     polling_setup = (priv->enabled && priv->rate);
 
-    mm_obj_dbg (self, "%s extended signal information polling: interface %s, rate %u seconds",
-                polling_setup ? "setting up" : "cleaning up",
-                priv->enabled ? "enabled" : "disabled",
-                priv->rate);
+    if (polling_setup)
+        mm_obj_info (self, "setting up extended signal information polling: rate %u seconds", priv->rate);
+    else
+        mm_obj_dbg (self, "cleaning up extended signal information polling");
 
     /* Stop polling */
     if (!polling_setup) {
diff --git a/src/mm-iface-modem-simple.c b/src/mm-iface-modem-simple.c
index d4490f2..245ae66 100644
--- a/src/mm-iface-modem-simple.c
+++ b/src/mm-iface-modem-simple.c
@@ -28,6 +28,7 @@
 #include "mm-iface-modem-cdma.h"
 #include "mm-iface-modem-simple.h"
 #include "mm-log-object.h"
+#include "mm-log-helpers.h"
 
 /*****************************************************************************/
 /* Private data context */
@@ -209,6 +210,152 @@
 }
 
 /*****************************************************************************/
+/* Packet service attach in 3GPP network */
+
+typedef enum {
+    PACKET_SERVICE_ATTACH_IN_3GPP_NETWORK_STEP_FIRST,
+    PACKET_SERVICE_ATTACH_IN_3GPP_NETWORK_STEP_WAIT_BEFORE,
+    PACKET_SERVICE_ATTACH_IN_3GPP_NETWORK_STEP_SET,
+    PACKET_SERVICE_ATTACH_IN_3GPP_NETWORK_STEP_WAIT_AFTER,
+    PACKET_SERVICE_ATTACH_IN_3GPP_NETWORK_STEP_LAST,
+} PacketServiceAttachIn3gppNetworkStep;
+
+typedef struct {
+    PacketServiceAttachIn3gppNetworkStep  step;
+    GError                               *error;
+} PacketServiceAttachIn3gppNetworkContext;
+
+static void
+packet_service_attach_in_3gpp_network_context_free (PacketServiceAttachIn3gppNetworkContext *ctx)
+{
+    g_assert (!ctx->error);
+    g_slice_free (PacketServiceAttachIn3gppNetworkContext, ctx);
+}
+
+static gboolean
+packet_service_attach_in_3gpp_network_finish (MMIfaceModemSimple  *self,
+                                              GAsyncResult        *res,
+                                              GError             **error)
+{
+    return g_task_propagate_boolean (G_TASK (res), error);
+}
+
+static void packet_service_attach_in_3gpp_network_step (GTask *task);
+
+static void
+set_packet_service_state_ready (MMIfaceModem3gpp *self,
+                                GAsyncResult     *res,
+                                GTask            *task)
+{
+    PacketServiceAttachIn3gppNetworkContext *ctx;
+    g_autoptr(GError)                        error = NULL;
+
+    ctx = g_task_get_task_data (task);
+    g_assert (ctx->error);
+
+    if (!mm_iface_modem_3gpp_set_packet_service_state_finish (self, res, &error)) {
+        /* On an unsupported error, return the original wait failure; otherwise
+         * return the set error. */
+        if (!g_error_matches (error, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED)) {
+            g_error_free (ctx->error);
+            ctx->error = g_steal_pointer (&error);
+        }
+        /* Failures in the set are always fatal right away */
+        ctx->step = PACKET_SERVICE_ATTACH_IN_3GPP_NETWORK_STEP_LAST;
+    } else {
+        /* Retry if possible */
+        g_clear_error (&ctx->error);
+        ctx->step++;
+    }
+    packet_service_attach_in_3gpp_network_step (task);
+}
+
+static void
+wait_for_packet_service_state_ready (MMIfaceModem3gpp *self,
+                                     GAsyncResult     *res,
+                                     GTask            *task)
+{
+    PacketServiceAttachIn3gppNetworkContext *ctx;
+
+    ctx = g_task_get_task_data (task);
+    g_assert (!ctx->error);
+
+    if (!mm_iface_modem_3gpp_wait_for_packet_service_state_finish (self, res, &ctx->error))
+        ctx->step++;
+    else
+        ctx->step = PACKET_SERVICE_ATTACH_IN_3GPP_NETWORK_STEP_LAST;
+    packet_service_attach_in_3gpp_network_step (task);
+}
+
+static void
+packet_service_attach_in_3gpp_network_step (GTask *task)
+{
+    PacketServiceAttachIn3gppNetworkContext *ctx;
+    MMIfaceModemSimple                      *self;
+
+    self = g_task_get_source_object (task);
+    ctx = g_task_get_task_data (task);
+
+    switch (ctx->step) {
+        case PACKET_SERVICE_ATTACH_IN_3GPP_NETWORK_STEP_FIRST:
+            ctx->step++;
+            /* fall through */
+
+        case PACKET_SERVICE_ATTACH_IN_3GPP_NETWORK_STEP_WAIT_BEFORE:
+            g_assert (!ctx->error);
+            mm_iface_modem_3gpp_wait_for_packet_service_state (MM_IFACE_MODEM_3GPP (self),
+                                                               MM_MODEM_3GPP_PACKET_SERVICE_STATE_ATTACHED,
+                                                               (GAsyncReadyCallback)wait_for_packet_service_state_ready,
+                                                               task);
+            return;
+
+        case PACKET_SERVICE_ATTACH_IN_3GPP_NETWORK_STEP_SET:
+            /* An explicit set will only be attempted if the packet service state wait failed */
+            g_assert (ctx->error);
+            mm_iface_modem_3gpp_set_packet_service_state (MM_IFACE_MODEM_3GPP (self),
+                                                          MM_MODEM_3GPP_PACKET_SERVICE_STATE_ATTACHED,
+                                                          (GAsyncReadyCallback)set_packet_service_state_ready,
+                                                          task);
+            return;
+
+        case PACKET_SERVICE_ATTACH_IN_3GPP_NETWORK_STEP_WAIT_AFTER:
+            g_assert (!ctx->error);
+            mm_iface_modem_3gpp_wait_for_packet_service_state (MM_IFACE_MODEM_3GPP (self),
+                                                               MM_MODEM_3GPP_PACKET_SERVICE_STATE_ATTACHED,
+                                                               (GAsyncReadyCallback)wait_for_packet_service_state_ready,
+                                                               task);
+            return;
+
+        case PACKET_SERVICE_ATTACH_IN_3GPP_NETWORK_STEP_LAST:
+            if (ctx->error)
+                g_task_return_error (task, g_steal_pointer (&ctx->error));
+            else
+                g_task_return_boolean (task, TRUE);
+            g_object_unref (task);
+            return;
+
+        default:
+            g_assert_not_reached ();
+    }
+}
+
+static void
+packet_service_attach_in_3gpp_network (MMIfaceModemSimple  *self,
+                                       GAsyncReadyCallback  callback,
+                                       gpointer             user_data)
+{
+    PacketServiceAttachIn3gppNetworkContext *ctx;
+    GTask                                   *task;
+
+    task = g_task_new (self, NULL, callback, user_data);
+    ctx = g_slice_new0 (PacketServiceAttachIn3gppNetworkContext);
+    ctx->step = PACKET_SERVICE_ATTACH_IN_3GPP_NETWORK_STEP_FIRST;
+    g_task_set_task_data (task, ctx, (GDestroyNotify)packet_service_attach_in_3gpp_network_context_free);
+
+    packet_service_attach_in_3gpp_network_step (task);
+}
+
+/*****************************************************************************/
 
 typedef enum {
     CONNECTION_STEP_FIRST,
@@ -225,14 +372,14 @@
 } ConnectionStep;
 
 typedef struct {
-    MmGdbusModemSimple *skeleton;
+    MmGdbusModemSimple    *skeleton;
     GDBusMethodInvocation *invocation;
-    MMIfaceModemSimple *self;
-    ConnectionStep step;
-    MMBearerList *bearer_list;
+    MMIfaceModemSimple    *self;
+    ConnectionStep         step;
+    MMBearerList          *bearer_list;
 
     /* Expected input properties */
-    GVariant *dictionary;
+    GVariant                  *dictionary;
     MMSimpleConnectProperties *properties;
 
     /* Results to set */
@@ -272,33 +419,32 @@
     g_object_unref (ctx->skeleton);
     g_object_unref (ctx->invocation);
     g_object_unref (ctx->self);
-    g_free (ctx);
+    g_slice_free (ConnectionContext, ctx);
 }
 
 static void connection_step (ConnectionContext *ctx);
 
 static void
-connect_bearer_ready (MMBaseBearer *bearer,
-                      GAsyncResult *res,
+connect_bearer_ready (MMBaseBearer      *bearer,
+                      GAsyncResult      *res,
                       ConnectionContext *ctx)
 {
     GError *error = NULL;
 
     if (!mm_base_bearer_connect_finish (bearer, res, &error)) {
-        mm_obj_dbg (ctx->self, "couldn't connect bearer: %s", error->message);
+        mm_obj_warn (ctx->self, "couldn't connect bearer: %s", error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
         connection_context_free (ctx);
         return;
     }
 
-    /* Bearer connected.... all done!!!!! */
     ctx->step++;
     connection_step (ctx);
 }
 
 static void
-create_bearer_ready (MMIfaceModem *self,
-                     GAsyncResult *res,
+create_bearer_ready (MMIfaceModem      *self,
+                     GAsyncResult      *res,
                      ConnectionContext *ctx)
 {
     GError *error = NULL;
@@ -306,48 +452,48 @@
     /* ownership for the caller */
     ctx->bearer = mm_iface_modem_create_bearer_finish (self, res, &error);
     if (!ctx->bearer) {
+        mm_obj_warn (ctx->self, "couldn't create bearer: %s", error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
         connection_context_free (ctx);
         return;
     }
 
-    /* Bearer available! */
     ctx->step++;
     connection_step (ctx);
 }
 
 static void
-wait_for_packet_service_state_ready (MMIfaceModem3gpp  *self,
-                                     GAsyncResult      *res,
-                                     ConnectionContext *ctx)
+packet_service_attach_in_3gpp_network_ready (MMIfaceModemSimple *self,
+                                             GAsyncResult       *res,
+                                             ConnectionContext  *ctx)
 {
     GError *error = NULL;
 
-    if (!mm_iface_modem_3gpp_wait_for_packet_service_state_finish (self, res, &error)) {
+    if (!packet_service_attach_in_3gpp_network_finish (self, res, &error)) {
+        mm_obj_warn (ctx->self, "packet service attach in 3GPP network failed: %s", error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
         connection_context_free (ctx);
         return;
     }
 
-    /* Packet service attached now! */
     ctx->step++;
     connection_step (ctx);
 }
 
 static void
 register_in_3gpp_or_cdma_network_ready (MMIfaceModemSimple *self,
-                                        GAsyncResult *res,
-                                        ConnectionContext *ctx)
+                                        GAsyncResult       *res,
+                                        ConnectionContext  *ctx)
 {
     GError *error = NULL;
 
     if (!register_in_3gpp_or_cdma_network_finish (self, res, &error)) {
+        mm_obj_warn (ctx->self, "registration in network failed: %s", error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
         connection_context_free (ctx);
         return;
     }
 
-    /* Registered now! */
     ctx->step++;
     connection_step (ctx);
 }
@@ -362,21 +508,23 @@
 }
 
 static void
-wait_for_enabled_ready (MMIfaceModem *self,
-                        GAsyncResult *res,
+wait_for_enabled_ready (MMIfaceModem      *self,
+                        GAsyncResult      *res,
                         ConnectionContext *ctx)
 {
-    GError *error = NULL;
-    MMModemState state;
+    GError       *error = NULL;
+    MMModemState  state;
 
     state = mm_iface_modem_wait_for_final_state_finish (self, res, &error);
     if (error) {
+        mm_obj_warn (ctx->self, "failed waiting for final state: %s", error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
         connection_context_free (ctx);
         return;
     }
 
     if (state < MM_MODEM_STATE_ENABLED) {
+        mm_obj_warn (ctx->self, "failed waiting for enabled state: %s", mm_modem_state_get_string (state));
         g_dbus_method_invocation_return_error (
             ctx->invocation,
             MM_CORE_ERROR,
@@ -387,25 +535,24 @@
         return;
     }
 
-    /* Enabled now, cool. */
     ctx->step++;
     connection_step (ctx);
 }
 
 static void
-enable_ready (MMBaseModem *self,
-              GAsyncResult *res,
+enable_ready (MMBaseModem       *self,
+              GAsyncResult      *res,
               ConnectionContext *ctx)
 {
     GError *error = NULL;
 
     if (!mm_base_modem_enable_finish (MM_BASE_MODEM (self), res, &error)) {
+        mm_obj_warn (ctx->self, "failed enabling modem: %s", error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
         connection_context_free (ctx);
         return;
     }
 
-    /* Enabling done!, keep on!!! */
     ctx->step++;
     connection_step (ctx);
 }
@@ -419,45 +566,46 @@
 
     mm_iface_modem_wait_for_final_state_finish (self, res, &error);
     if (error) {
+        mm_obj_warn (ctx->self, "failed waiting for final state: %s", error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
         connection_context_free (ctx);
         return;
     }
 
-    /* Initialized now, cool. */
     ctx->step++;
     connection_step (ctx);
 }
 
 static void
-send_pin_ready (MMBaseSim *sim,
-                GAsyncResult *res,
+send_pin_ready (MMBaseSim         *sim,
+                GAsyncResult      *res,
                 ConnectionContext *ctx)
 {
     GError *error = NULL;
 
     if (!mm_base_sim_send_pin_finish (sim, res, &error)) {
+        mm_obj_warn (ctx->self, "failed sending SIM PIN: %s", error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
         connection_context_free (ctx);
         return;
     }
 
-    /* Sent pin, cool. */
     ctx->step++;
     connection_step (ctx);
 }
 
 static void
-update_lock_info_ready (MMIfaceModem *self,
-                        GAsyncResult *res,
+update_lock_info_ready (MMIfaceModem      *self,
+                        GAsyncResult      *res,
                         ConnectionContext *ctx)
 {
-    GError *error = NULL;
-    MMModemLock lock;
-    MMBaseSim *sim;
+    GError               *error = NULL;
+    MMModemLock           lock;
+    g_autoptr(MMBaseSim)  sim = NULL;
 
     lock = mm_iface_modem_update_lock_info_finish (self, res, &error);
     if (error) {
+        mm_obj_warn (ctx->self, "failed updating lock info: %s", error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
         connection_context_free (ctx);
         return;
@@ -477,6 +625,8 @@
     /* During simple connect we are only allowed to use SIM PIN */
     if (lock != MM_MODEM_LOCK_SIM_PIN ||
         !mm_simple_connect_properties_get_pin (ctx->properties)) {
+        mm_obj_warn (ctx->self, "modem is locked with '%s'",
+                     mm_modem_lock_get_string (lock));
         g_dbus_method_invocation_return_error (
             ctx->invocation,
             MM_CORE_ERROR,
@@ -488,11 +638,11 @@
     }
 
     /* Try to unlock the modem providing the PIN */
-    sim = NULL;
     g_object_get (ctx->self,
                   MM_IFACE_MODEM_SIM, &sim,
                   NULL);
     if (!sim) {
+        mm_obj_warn (ctx->self, "SIM is not accessible");
         g_dbus_method_invocation_return_error (
             ctx->invocation,
             MM_CORE_ERROR,
@@ -506,7 +656,6 @@
                           mm_simple_connect_properties_get_pin (ctx->properties),
                           (GAsyncReadyCallback)send_pin_ready,
                           ctx);
-    g_object_unref (sim);
 }
 
 static gboolean
@@ -517,6 +666,7 @@
         return FALSE;
 
     /* Otherwise cancellable is valid and it's cancelled */
+    mm_obj_warn (ctx->self, "connection attempt cancelled");
     g_dbus_method_invocation_return_error (
         ctx->invocation, G_IO_ERROR, G_IO_ERROR_CANCELLED,
         "Connection attempt cancelled");
@@ -557,8 +707,8 @@
         /* fall through */
 
     case CONNECTION_STEP_UNLOCK_CHECK:
-        mm_obj_info (ctx->self, "simple connect state (%d/%d): unlock check",
-                     ctx->step, CONNECTION_STEP_LAST);
+        mm_obj_msg (ctx->self, "simple connect state (%d/%d): unlock check",
+                    ctx->step, CONNECTION_STEP_LAST);
         mm_iface_modem_update_lock_info (MM_IFACE_MODEM (ctx->self),
                                          MM_MODEM_LOCK_UNKNOWN, /* ask */
                                          (GAsyncReadyCallback)update_lock_info_ready,
@@ -566,8 +716,8 @@
         return;
 
     case CONNECTION_STEP_WAIT_FOR_INITIALIZED:
-        mm_obj_info (ctx->self, "simple connect state (%d/%d): wait to get fully initialized",
-                     ctx->step, CONNECTION_STEP_LAST);
+        mm_obj_msg (ctx->self, "simple connect state (%d/%d): wait to get fully initialized",
+                    ctx->step, CONNECTION_STEP_LAST);
         mm_iface_modem_wait_for_final_state (MM_IFACE_MODEM (ctx->self),
                                              MM_MODEM_STATE_DISABLED, /* disabled == initialized */
                                              (GAsyncReadyCallback)wait_for_initialized_ready,
@@ -575,16 +725,16 @@
         return;
 
     case CONNECTION_STEP_ENABLE:
-        mm_obj_info (ctx->self, "simple connect state (%d/%d): enable",
-                     ctx->step, CONNECTION_STEP_LAST);
+        mm_obj_msg (ctx->self, "simple connect state (%d/%d): enable",
+                    ctx->step, CONNECTION_STEP_LAST);
         mm_base_modem_enable (MM_BASE_MODEM (ctx->self),
                               (GAsyncReadyCallback)enable_ready,
                               ctx);
         return;
 
     case CONNECTION_STEP_WAIT_FOR_ENABLED:
-        mm_obj_info (ctx->self, "simple connect state (%d/%d): wait to get fully enabled",
-                     ctx->step, CONNECTION_STEP_LAST);
+        mm_obj_msg (ctx->self, "simple connect state (%d/%d): wait to get fully enabled",
+                    ctx->step, CONNECTION_STEP_LAST);
         mm_iface_modem_wait_for_final_state (MM_IFACE_MODEM (ctx->self),
                                              MM_MODEM_STATE_UNKNOWN, /* just a final state */
                                              (GAsyncReadyCallback)wait_for_enabled_ready,
@@ -592,8 +742,8 @@
         return;
 
     case CONNECTION_STEP_WAIT_AFTER_ENABLED:
-        mm_obj_info (ctx->self, "simple connect state (%d/%d): wait after enabled",
-                     ctx->step, CONNECTION_STEP_LAST);
+        mm_obj_msg (ctx->self, "simple connect state (%d/%d): wait after enabled",
+                    ctx->step, CONNECTION_STEP_LAST);
         /* When we have just enabled, we want to give it some time before starting
          * the registration process, so that any pending registration update that may
          * have been scheduled during the enabling phase is applied. We don't want to
@@ -603,8 +753,8 @@
 
 
     case CONNECTION_STEP_REGISTER:
-        mm_obj_info (ctx->self, "simple connect state (%d/%d): register",
-                     ctx->step, CONNECTION_STEP_LAST);
+        mm_obj_msg (ctx->self, "simple connect state (%d/%d): register",
+                    ctx->step, CONNECTION_STEP_LAST);
         if (mm_iface_modem_is_3gpp (MM_IFACE_MODEM (ctx->self)) ||
             mm_iface_modem_is_cdma (MM_IFACE_MODEM (ctx->self))) {
             /* 3GPP or CDMA registration */
@@ -622,13 +772,13 @@
         /* fall through */
 
     case CONNECTION_STEP_PACKET_SERVICE_ATTACH:
-        mm_obj_info (ctx->self, "simple connect state (%d/%d): wait to get packet service state attached",
-                     ctx->step, CONNECTION_STEP_LAST);
+        mm_obj_msg (ctx->self, "simple connect state (%d/%d): wait to get packet service state attached",
+                    ctx->step, CONNECTION_STEP_LAST);
         if (mm_iface_modem_is_3gpp (MM_IFACE_MODEM (ctx->self))) {
-            mm_iface_modem_3gpp_wait_for_packet_service_state (MM_IFACE_MODEM_3GPP (ctx->self),
-                                                               MM_MODEM_3GPP_PACKET_SERVICE_STATE_ATTACHED,
-                                                               (GAsyncReadyCallback)wait_for_packet_service_state_ready,
-                                                               ctx);
+            packet_service_attach_in_3gpp_network (
+                ctx->self,
+                (GAsyncReadyCallback)packet_service_attach_in_3gpp_network_ready,
+                ctx);
             return;
         }
         /* If not 3GPP, just go on */
@@ -638,8 +788,8 @@
     case CONNECTION_STEP_BEARER: {
         g_autoptr(MMBearerProperties) bearer_properties = NULL;
 
-        mm_obj_info (ctx->self, "simple connect state (%d/%d): bearer",
-                     ctx->step, CONNECTION_STEP_LAST);
+        mm_obj_msg (ctx->self, "simple connect state (%d/%d): bearer",
+                    ctx->step, CONNECTION_STEP_LAST);
 
         bearer_properties = mm_simple_connect_properties_get_bearer_properties (ctx->properties);
 
@@ -660,8 +810,8 @@
     } /* fall through */
 
     case CONNECTION_STEP_CONNECT:
-        mm_obj_info (ctx->self, "simple connect state (%d/%d): connect",
-                     ctx->step, CONNECTION_STEP_LAST);
+        mm_obj_msg (ctx->self, "simple connect state (%d/%d): connect",
+                    ctx->step, CONNECTION_STEP_LAST);
 
         /* At this point, we can cleanup the cancellation point in the Simple interface,
          * because the bearer connection has its own cancellation setup. */
@@ -676,15 +826,14 @@
             return;
         }
 
-        mm_obj_dbg (ctx->self, "bearer at '%s' is already connected...",
-                    mm_base_bearer_get_path (ctx->bearer));
+        mm_obj_info (ctx->self, "bearer at '%s' is already connected...", mm_base_bearer_get_path (ctx->bearer));
 
         ctx->step++;
         /* fall through */
 
     case CONNECTION_STEP_LAST:
-        mm_obj_info (ctx->self, "simple connect state (%d/%d): all done",
-                     ctx->step, CONNECTION_STEP_LAST);
+        mm_obj_msg (ctx->self, "simple connect state (%d/%d): all done",
+                    ctx->step, CONNECTION_STEP_LAST);
         /* All done, yey! */
         mm_gdbus_modem_simple_complete_connect (
             ctx->skeleton,
@@ -721,6 +870,9 @@
         return;
     }
 
+    mm_obj_info (self, "processing user request to connect modem...");
+    mm_log_simple_connect_properties (self, MM_LOG_LEVEL_INFO, "  ", ctx->properties);
+
     if (!setup_cancellation (ctx, &error)) {
         g_dbus_method_invocation_take_error (ctx->invocation, error);
         connection_context_free (ctx);
@@ -740,64 +892,7 @@
         return;
     }
 
-    mm_obj_info (self, "simple connect started...");
-
-    /* Log about all the parameters being used for the simple connect */
-    {
-        MMBearerMultiplexSupport  multiplex;
-        MMBearerAllowedAuth       allowed_auth;
-        MMBearerApnType           apn_type;
-        gchar                    *str;
-        MMBearerIpFamily          ip_family;
-        gint                      profile_id;
-
-#define VALIDATE_UNSPECIFIED(str) (str ? str : "unspecified")
-
-        profile_id = mm_simple_connect_properties_get_profile_id (ctx->properties);
-        if (profile_id != MM_3GPP_PROFILE_ID_UNKNOWN)
-            mm_obj_dbg (self, "   profile ID: %d", profile_id);
-        else
-            mm_obj_dbg (self, "   profile ID: %s", VALIDATE_UNSPECIFIED (NULL));
-
-        mm_obj_dbg (self, "   PIN: %s", VALIDATE_UNSPECIFIED (mm_simple_connect_properties_get_pin (ctx->properties)));
-        mm_obj_dbg (self, "   operator ID: %s", VALIDATE_UNSPECIFIED (mm_simple_connect_properties_get_operator_id (ctx->properties)));
-        mm_obj_dbg (self, "   allowed roaming: %s", mm_simple_connect_properties_get_allow_roaming (ctx->properties) ? "yes" : "no");
-        mm_obj_dbg (self, "   APN: %s", VALIDATE_UNSPECIFIED (mm_simple_connect_properties_get_apn (ctx->properties)));
-
-        apn_type = mm_simple_connect_properties_get_apn_type (ctx->properties);
-        if (apn_type != MM_BEARER_APN_TYPE_NONE) {
-            str = mm_bearer_apn_type_build_string_from_mask (apn_type);
-            mm_obj_dbg (self, "   APN type: %s", str);
-            g_free (str);
-        } else
-            mm_obj_dbg (self, "   APN type: %s", VALIDATE_UNSPECIFIED (NULL));
-
-        ip_family = mm_simple_connect_properties_get_ip_type (ctx->properties);
-        if (ip_family != MM_BEARER_IP_FAMILY_NONE) {
-            str = mm_bearer_ip_family_build_string_from_mask (ip_family);
-            mm_obj_dbg (self, "   IP family: %s", str);
-            g_free (str);
-        } else
-            mm_obj_dbg (self, "   IP family: %s", VALIDATE_UNSPECIFIED (NULL));
-
-        allowed_auth = mm_simple_connect_properties_get_allowed_auth (ctx->properties);
-        if (allowed_auth != MM_BEARER_ALLOWED_AUTH_UNKNOWN) {
-            str = mm_bearer_allowed_auth_build_string_from_mask (allowed_auth);
-            mm_obj_dbg (self, "   allowed authentication: %s", str);
-            g_free (str);
-        } else
-            mm_obj_dbg (self, "   allowed authentication: %s", VALIDATE_UNSPECIFIED (NULL));
-
-        mm_obj_dbg (self, "   user: %s", VALIDATE_UNSPECIFIED (mm_simple_connect_properties_get_user (ctx->properties)));
-        mm_obj_dbg (self, "   password: %s", VALIDATE_UNSPECIFIED (mm_simple_connect_properties_get_password (ctx->properties)));
-
-        multiplex = mm_simple_connect_properties_get_multiplex (ctx->properties);
-        mm_obj_dbg (self, "   multiplex: %s", VALIDATE_UNSPECIFIED (multiplex != MM_BEARER_MULTIPLEX_SUPPORT_UNKNOWN ?
-                                                                    mm_bearer_multiplex_support_get_string (multiplex) :
-                                                                    NULL));
-
-#undef VALIDATE_UNSPECIFIED
-    }
+    mm_obj_msg (self, "simple connect started...");
 
     switch (current) {
     case MM_MODEM_STATE_FAILED:
@@ -842,21 +937,19 @@
 }
 
 static gboolean
-handle_connect (MmGdbusModemSimple *skeleton,
+handle_connect (MmGdbusModemSimple    *skeleton,
                 GDBusMethodInvocation *invocation,
-                GVariant *dictionary,
-                MMIfaceModemSimple *self)
+                GVariant              *dictionary,
+                MMIfaceModemSimple    *self)
 {
     ConnectionContext *ctx;
 
-    ctx = g_new0 (ConnectionContext, 1);
+    ctx = g_slice_new0 (ConnectionContext);
     ctx->skeleton = g_object_ref (skeleton);
     ctx->invocation = g_object_ref (invocation);
     ctx->self = g_object_ref (self);
     ctx->dictionary = g_variant_ref (dictionary);
 
-    mm_obj_dbg (self, "user request to connect modem");
-
     mm_base_modem_authorize (MM_BASE_MODEM (self),
                              invocation,
                              MM_AUTHORIZATION_DEVICE_CONTROL,
@@ -868,12 +961,12 @@
 /*****************************************************************************/
 
 typedef struct {
-    MMIfaceModemSimple *self;
-    MmGdbusModemSimple *skeleton;
+    MMIfaceModemSimple    *self;
+    MmGdbusModemSimple    *skeleton;
     GDBusMethodInvocation *invocation;
-    gchar *bearer_path;
-    GList *bearers;
-    MMBaseBearer *current;
+    gchar                 *bearer_path;
+    GList                 *bearers;
+    MMBaseBearer          *current;
 } DisconnectionContext;
 
 static void
@@ -883,22 +976,23 @@
     g_object_unref (ctx->invocation);
     g_object_unref (ctx->self);
     g_free (ctx->bearer_path);
-    if (ctx->current)
-        g_object_unref (ctx->current);
+    g_clear_object (&ctx->current);
     g_list_free_full (ctx->bearers, g_object_unref);
-    g_free (ctx);
+    g_slice_free (DisconnectionContext, ctx);
 }
 
 static void disconnect_next_bearer (DisconnectionContext *ctx);
 
 static void
-disconnect_ready (MMBaseBearer *bearer,
-                  GAsyncResult *res,
+disconnect_ready (MMBaseBearer         *bearer,
+                  GAsyncResult         *res,
                   DisconnectionContext *ctx)
 {
     GError *error = NULL;
 
     if (!mm_base_bearer_disconnect_finish (bearer, res, &error)) {
+        mm_obj_warn (ctx->self, "failed to disconnect bearer '%s': %s",
+                     mm_base_bearer_get_path (bearer), error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
         disconnection_context_free (ctx);
         return;
@@ -915,8 +1009,8 @@
 
     /* No more bearers? all done! */
     if (!ctx->bearers) {
-        mm_gdbus_modem_simple_complete_disconnect (ctx->skeleton,
-                                                   ctx->invocation);
+        mm_obj_info (ctx->self, "all requested bearers disconnected");
+        mm_gdbus_modem_simple_complete_disconnect (ctx->skeleton, ctx->invocation);
         disconnection_context_free (ctx);
         return;
     }
@@ -924,13 +1018,14 @@
     ctx->current = MM_BASE_BEARER (ctx->bearers->data);
     ctx->bearers = g_list_delete_link (ctx->bearers, ctx->bearers);
 
+    mm_obj_info (ctx->self, "disconnecting bearer '%s'...", mm_base_bearer_get_path (ctx->current));
     mm_base_bearer_disconnect (ctx->current,
                                (GAsyncReadyCallback)disconnect_ready,
                                ctx);
 }
 
 static void
-build_connected_bearer_list (MMBaseBearer *bearer,
+build_connected_bearer_list (MMBaseBearer         *bearer,
                              DisconnectionContext *ctx)
 {
     if (!ctx->bearer_path ||
@@ -939,13 +1034,13 @@
 }
 
 static void
-disconnect_auth_ready (MMBaseModem *self,
-                       GAsyncResult *res,
+disconnect_auth_ready (MMBaseModem          *self,
+                       GAsyncResult         *res,
                        DisconnectionContext *ctx)
 {
-    GError *error = NULL;
-    MMBearerList *list = NULL;
-    Private *priv;
+    g_autoptr(MMBearerList)  list = NULL;
+    GError                  *error = NULL;
+    Private                 *priv;
 
     if (!mm_base_modem_authorize_finish (self, res, &error)) {
         g_dbus_method_invocation_take_error (ctx->invocation, error);
@@ -974,13 +1069,17 @@
         return;
     }
 
+    if (ctx->bearer_path)
+        mm_obj_info (self, "processing user request to disconnect modem: bearer '%s'", ctx->bearer_path);
+    else
+        mm_obj_info (self, "processing user request to disconnect modem: all bearers");
+
     mm_bearer_list_foreach (list,
                             (MMBearerListForeachFunc)build_connected_bearer_list,
                             ctx);
-    g_object_unref (list);
 
-    if (ctx->bearer_path &&
-        !ctx->bearers) {
+    if (ctx->bearer_path && !ctx->bearers) {
+        mm_obj_warn (self, "failed to disconnect bearer '%s': not found", ctx->bearer_path);
         g_dbus_method_invocation_return_error (
             ctx->invocation,
             MM_CORE_ERROR,
@@ -996,14 +1095,14 @@
 }
 
 static gboolean
-handle_disconnect (MmGdbusModemSimple *skeleton,
+handle_disconnect (MmGdbusModemSimple    *skeleton,
                    GDBusMethodInvocation *invocation,
-                   const gchar *bearer_path,
-                   MMIfaceModemSimple *self)
+                   const gchar           *bearer_path,
+                   MMIfaceModemSimple    *self)
 {
     DisconnectionContext *ctx;
 
-    ctx = g_new0 (DisconnectionContext, 1);
+    ctx = g_slice_new0 (DisconnectionContext);
     ctx->skeleton = g_object_ref (skeleton);
     ctx->self = g_object_ref (self);
     ctx->invocation = g_object_ref (invocation);
@@ -1015,11 +1114,8 @@
      *
      * We will detect the '/' string and set the bearer path as NULL in the
      * context if so, and otherwise use the given input string as path */
-    if (g_strcmp0 (bearer_path, "/") != 0) {
-        mm_obj_dbg (self, "user request to disconnect modem (bearer '%s')", bearer_path);
+    if (g_strcmp0 (bearer_path, "/") != 0)
         ctx->bearer_path = g_strdup (bearer_path);
-    } else
-        mm_obj_dbg (self, "user request to disconnect modem (all bearers)");
 
     mm_base_modem_authorize (MM_BASE_MODEM (self),
                              invocation,
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c
index 911c139..01c5f69 100644
--- a/src/mm-iface-modem.c
+++ b/src/mm-iface-modem.c
@@ -28,6 +28,7 @@
 #include "mm-bearer-list.h"
 #include "mm-private-boxed-types.h"
 #include "mm-log-object.h"
+#include "mm-log-helpers.h"
 #include "mm-context.h"
 #include "mm-dispatcher-fcc-unlock.h"
 #if defined WITH_QMI
@@ -189,7 +190,7 @@
 
         /* Check that it's really the primary slot whose iccid or imsi has changed */
         if (primary_slot && primary_slot != slot_index) {
-            mm_obj_dbg (self, "checking for SIM swap ignored: status changed in slot %u, but primary is %u", slot_index, primary_slot);
+            mm_obj_info (self, "checking for SIM swap ignored: status changed in slot %u, but primary is %u", slot_index, primary_slot);
             g_task_return_boolean (task, TRUE);
             g_object_unref (task);
             return;
@@ -198,7 +199,7 @@
 
     if (MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap &&
         MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap_finish) {
-        mm_obj_dbg (self, "start checking for SIM swap in slot %u", slot_index);
+        mm_obj_info (self, "start checking for SIM swap in slot %u", slot_index);
         MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap (
             self,
             iccid,
@@ -239,14 +240,12 @@
                   NULL);
 
     if (!sim_slots_old) {
-        mm_obj_warn (self, "Failed to process SIM hot swap: couldn't load current list of SIM slots");
+        mm_obj_warn (self, "failed to process SIM hot swap: couldn't load current list of SIM slots");
         return;
     }
 
-    if (!skeleton) {
-        mm_obj_warn (self, "Failed to process SIM hot swap: interface skeleton not available");
+    if (!skeleton)
         return;
-    }
 
     sim_slot_paths_array = g_ptr_array_new ();
     sim_slots_new        = g_ptr_array_new_with_free_func ((GDestroyNotify) sim_slot_free);
@@ -299,6 +298,8 @@
 void
 mm_iface_modem_process_sim_event (MMIfaceModem *self)
 {
+    mm_obj_info (self, "Processing SIM event");
+
     if (MM_IFACE_MODEM_GET_INTERFACE (self)->cleanup_sim_hot_swap)
         MM_IFACE_MODEM_GET_INTERFACE (self)->cleanup_sim_hot_swap (self);
 
@@ -606,7 +607,11 @@
         /* For the remaining ones, retry if possible */
         if (ctx->retries < ctx->max_retries) {
             ctx->retries++;
-            mm_obj_dbg (self, "retrying (%u) unlock required check", ctx->retries);
+            /* Rate limit how often we log with INFO level */
+            if (ctx->retries % 5)
+                mm_obj_dbg (self, "retrying (%u/%u) unlock required check", ctx->retries, ctx->max_retries);
+            else
+                mm_obj_info (self, "retrying (%u/%u) unlock required check", ctx->retries, ctx->max_retries);
 
             g_assert (ctx->timeout_id == 0);
             ctx->timeout_id = g_timeout_add_seconds (UNLOAD_REQUIRED_RETRY_TIMEOUT_SECS,
@@ -878,11 +883,13 @@
         task);
 }
 
+/*****************************************************************************/
+
 typedef struct {
-    MmGdbusModem *skeleton;
+    MmGdbusModem          *skeleton;
     GDBusMethodInvocation *invocation;
-    MMIfaceModem *self;
-    GVariant *dictionary;
+    MMIfaceModem          *self;
+    GVariant              *dictionary;
 } HandleCreateBearerContext;
 
 static void
@@ -892,37 +899,36 @@
     g_object_unref (ctx->skeleton);
     g_object_unref (ctx->invocation);
     g_object_unref (ctx->self);
-    g_free (ctx);
+    g_slice_free (HandleCreateBearerContext, ctx);
 }
 
 static void
-handle_create_bearer_ready (MMIfaceModem *self,
-                            GAsyncResult *res,
+handle_create_bearer_ready (MMIfaceModem              *self,
+                            GAsyncResult              *res,
                             HandleCreateBearerContext *ctx)
 {
-    MMBaseBearer *bearer;
-    GError *error = NULL;
+    g_autoptr(MMBaseBearer)  bearer = NULL;
+    GError                  *error = NULL;
 
     bearer = mm_iface_modem_create_bearer_finish (self, res, &error);
-    if (!bearer)
+    if (!bearer) {
+        mm_obj_warn (self, "failed creating bearer: %s", error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
-    else {
-        mm_gdbus_modem_complete_create_bearer (ctx->skeleton,
-                                               ctx->invocation,
-                                               mm_base_bearer_get_path (bearer));
-        g_object_unref (bearer);
+    } else {
+        mm_obj_info (self, "created bearer: %s", mm_base_bearer_get_path (bearer));
+        mm_gdbus_modem_complete_create_bearer (ctx->skeleton, ctx->invocation, mm_base_bearer_get_path (bearer));
     }
 
     handle_create_bearer_context_free (ctx);
 }
 
 static void
-handle_create_bearer_auth_ready (MMBaseModem *self,
-                                 GAsyncResult *res,
+handle_create_bearer_auth_ready (MMBaseModem               *self,
+                                 GAsyncResult              *res,
                                  HandleCreateBearerContext *ctx)
 {
-    MMBearerProperties *properties;
-    GError *error = NULL;
+    g_autoptr(MMBearerProperties)  properties = NULL;
+    GError                        *error = NULL;
 
     if (!mm_base_modem_authorize_finish (self, res, &error)) {
         g_dbus_method_invocation_take_error (ctx->invocation, error);
@@ -942,23 +948,25 @@
         return;
     }
 
+    mm_obj_info (self, "processing user request to create bearer...");
+    mm_log_bearer_properties (self, MM_LOG_LEVEL_INFO, "  ", properties);
+
     mm_iface_modem_create_bearer (
         ctx->self,
         properties,
         (GAsyncReadyCallback)handle_create_bearer_ready,
         ctx);
-    g_object_unref (properties);
 }
 
 static gboolean
-handle_create_bearer (MmGdbusModem *skeleton,
+handle_create_bearer (MmGdbusModem          *skeleton,
                       GDBusMethodInvocation *invocation,
-                      GVariant *dictionary,
-                      MMIfaceModem *self)
+                      GVariant              *dictionary,
+                      MMIfaceModem          *self)
 {
     HandleCreateBearerContext *ctx;
 
-    ctx = g_new (HandleCreateBearerContext, 1);
+    ctx = g_slice_new0 (HandleCreateBearerContext);
     ctx->skeleton = g_object_ref (skeleton);
     ctx->invocation = g_object_ref (invocation);
     ctx->self = g_object_ref (self);
@@ -975,11 +983,11 @@
 /*****************************************************************************/
 
 typedef struct {
-    MmGdbusModem *skeleton;
+    MmGdbusModem          *skeleton;
     GDBusMethodInvocation *invocation;
-    MMIfaceModem *self;
-    gchar *cmd;
-    guint timeout;
+    MMIfaceModem          *self;
+    gchar                 *cmd;
+    guint                  timeout;
 } HandleCommandContext;
 
 static void
@@ -989,31 +997,32 @@
     g_object_unref (ctx->invocation);
     g_object_unref (ctx->self);
     g_free (ctx->cmd);
-    g_free (ctx);
+    g_slice_free (HandleCommandContext, ctx);
 }
 
 static void
-command_ready (MMIfaceModem *self,
-               GAsyncResult *res,
+command_ready (MMIfaceModem         *self,
+               GAsyncResult         *res,
                HandleCommandContext *ctx)
 {
-    GError *error = NULL;
+    GError      *error = NULL;
     const gchar *result;
 
-    result = MM_IFACE_MODEM_GET_INTERFACE (self)->command_finish (self,
-                                                                  res,
-                                                                  &error);
-    if (error)
+    result = MM_IFACE_MODEM_GET_INTERFACE (self)->command_finish (self, res, &error);
+    if (error) {
+        mm_obj_dbg (self, "failed running AT command '%s': %s", ctx->cmd, error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
-    else
+    } else {
+        mm_obj_dbg (self, "AT command '%s' run: %s", ctx->cmd, result);
         mm_gdbus_modem_complete_command (ctx->skeleton, ctx->invocation, result);
+    }
 
     handle_command_context_free (ctx);
 }
 
 static void
-handle_command_auth_ready (MMBaseModem *self,
-                           GAsyncResult *res,
+handle_command_auth_ready (MMBaseModem          *self,
+                           GAsyncResult         *res,
                            HandleCommandContext *ctx)
 {
     GError *error = NULL;
@@ -1027,28 +1036,22 @@
 #if ! defined WITH_AT_COMMAND_VIA_DBUS
     /* If we are not in Debug mode, report an error */
     if (!mm_context_get_debug ()) {
-        g_dbus_method_invocation_return_error (ctx->invocation,
-                                               MM_CORE_ERROR,
-                                               MM_CORE_ERROR_UNAUTHORIZED,
-                                               "Cannot send AT command to modem: "
-                                               "operation only allowed in debug mode");
+        g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_UNAUTHORIZED,
+                                               "Operation only allowed in debug mode");
         handle_command_context_free (ctx);
         return;
     }
 #endif
 
     /* If command is not implemented, report an error */
-    if (!MM_IFACE_MODEM_GET_INTERFACE (self)->command ||
-        !MM_IFACE_MODEM_GET_INTERFACE (self)->command_finish) {
-        g_dbus_method_invocation_return_error (ctx->invocation,
-                                               MM_CORE_ERROR,
-                                               MM_CORE_ERROR_UNSUPPORTED,
-                                               "Cannot send AT command to modem: "
-                                               "operation not supported");
+    if (!MM_IFACE_MODEM_GET_INTERFACE (self)->command || !MM_IFACE_MODEM_GET_INTERFACE (self)->command_finish) {
+        g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
+                                               "Operation not supported");
         handle_command_context_free (ctx);
         return;
     }
 
+    mm_obj_dbg (self, "processing user request to run AT command '%s'...", ctx->cmd);
     MM_IFACE_MODEM_GET_INTERFACE (self)->command (ctx->self,
                                                   ctx->cmd,
                                                   ctx->timeout,
@@ -1057,15 +1060,15 @@
 }
 
 static gboolean
-handle_command (MmGdbusModem *skeleton,
+handle_command (MmGdbusModem          *skeleton,
                 GDBusMethodInvocation *invocation,
-                const gchar *cmd,
-                guint timeout,
-                MMIfaceModem *self)
+                const gchar           *cmd,
+                guint                  timeout,
+                MMIfaceModem          *self)
 {
     HandleCommandContext *ctx;
 
-    ctx = g_new (HandleCommandContext, 1);
+    ctx = g_slice_new0 (HandleCommandContext);
     ctx->skeleton = g_object_ref (skeleton);
     ctx->invocation = g_object_ref (invocation);
     ctx->self = g_object_ref (self);
@@ -1083,51 +1086,53 @@
 /*****************************************************************************/
 
 typedef struct {
-    MmGdbusModem *skeleton;
+    MmGdbusModem          *skeleton;
     GDBusMethodInvocation *invocation;
-    MMIfaceModem *self;
-    MMBearerList *list;
-    gchar *bearer_path;
-    MMBaseBearer *bearer;
+    MMIfaceModem          *self;
+    MMBearerList          *list;
+    gchar                 *bearer_path;
+    MMBaseBearer          *bearer;
 } HandleDeleteBearerContext;
 
 static void
 handle_delete_bearer_context_free (HandleDeleteBearerContext *ctx)
 {
-    if (ctx->bearer)
-        g_object_unref (ctx->bearer);
     g_object_unref (ctx->skeleton);
     g_object_unref (ctx->invocation);
     g_object_unref (ctx->self);
-    if (ctx->list)
-        g_object_unref (ctx->list);
+    g_clear_object (&ctx->bearer);
+    g_clear_object (&ctx->list);
     g_free (ctx->bearer_path);
-    g_free (ctx);
+    g_slice_free (HandleDeleteBearerContext, ctx);
 }
 
 static void
-delete_bearer_disconnect_ready (MMBaseBearer *bearer,
-                                GAsyncResult *res,
+delete_bearer_disconnect_ready (MMBaseBearer              *bearer,
+                                GAsyncResult              *res,
                                 HandleDeleteBearerContext *ctx)
 {
     GError *error = NULL;
 
     if (!mm_base_bearer_disconnect_finish (bearer, res, &error)) {
+        mm_obj_warn (ctx->self, "failed disconnecting bearer '%s' before deleting: %s", ctx->bearer_path, error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
         handle_delete_bearer_context_free (ctx);
         return;
     }
 
-    if (!mm_bearer_list_delete_bearer (ctx->list, ctx->bearer_path, &error))
+    if (!mm_bearer_list_delete_bearer (ctx->list, ctx->bearer_path, &error)) {
+        mm_obj_warn (ctx->self, "failed deleting bearer '%s': %s", ctx->bearer_path, error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
-    else
+    } else {
+        mm_obj_info (ctx->self, "deleted bearer '%s'", ctx->bearer_path);
         mm_gdbus_modem_complete_delete_bearer (ctx->skeleton, ctx->invocation);
+    }
     handle_delete_bearer_context_free (ctx);
 }
 
 static void
-handle_delete_bearer_auth_ready (MMBaseModem *self,
-                                 GAsyncResult *res,
+handle_delete_bearer_auth_ready (MMBaseModem               *self,
+                                 GAsyncResult              *res,
                                  HandleDeleteBearerContext *ctx)
 {
     GError *error = NULL;
@@ -1144,40 +1149,35 @@
     }
 
     if (!g_str_has_prefix (ctx->bearer_path, MM_DBUS_BEARER_PREFIX)) {
-        g_dbus_method_invocation_return_error (ctx->invocation,
-                                               MM_CORE_ERROR,
-                                               MM_CORE_ERROR_INVALID_ARGS,
-                                               "Cannot delete bearer: invalid path '%s'",
-                                               ctx->bearer_path);
+        g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS,
+                                               "Invalid path '%s'", ctx->bearer_path);
         handle_delete_bearer_context_free (ctx);
         return;
     }
 
     ctx->bearer = mm_bearer_list_find_by_path (ctx->list, ctx->bearer_path);
     if (!ctx->bearer) {
-        g_dbus_method_invocation_return_error (ctx->invocation,
-                                               MM_CORE_ERROR,
-                                               MM_CORE_ERROR_INVALID_ARGS,
-                                               "Cannot delete bearer: no bearer found with path '%s'",
-                                               ctx->bearer_path);
+        g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS,
+                                               "No bearer found with path '%s'", ctx->bearer_path);
         handle_delete_bearer_context_free (ctx);
         return;
     }
 
+    mm_obj_info (self, "processing user request to delete bearer '%s'...", ctx->bearer_path);
     mm_base_bearer_disconnect (ctx->bearer,
                                (GAsyncReadyCallback)delete_bearer_disconnect_ready,
                                ctx);
 }
 
 static gboolean
-handle_delete_bearer (MmGdbusModem *skeleton,
+handle_delete_bearer (MmGdbusModem          *skeleton,
                       GDBusMethodInvocation *invocation,
-                      const gchar *bearer,
-                      MMIfaceModem *self)
+                      const gchar           *bearer,
+                      MMIfaceModem          *self)
 {
     HandleDeleteBearerContext *ctx;
 
-    ctx = g_new (HandleDeleteBearerContext, 1);
+    ctx = g_slice_new0 (HandleDeleteBearerContext);
     ctx->skeleton = g_object_ref (skeleton);
     ctx->invocation = g_object_ref (invocation);
     ctx->self = g_object_ref (self);
@@ -1197,12 +1197,12 @@
 /*****************************************************************************/
 
 static gboolean
-handle_list_bearers (MmGdbusModem *skeleton,
+handle_list_bearers (MmGdbusModem          *skeleton,
                      GDBusMethodInvocation *invocation,
-                     MMIfaceModem *self)
+                     MMIfaceModem          *self)
 {
-    GStrv paths;
-    MMBearerList *list = NULL;
+    g_auto(GStrv)           paths = NULL;
+    g_autoptr(MMBearerList) list = NULL;
 
     if (mm_iface_modem_abort_invocation_if_state_not_reached (self, invocation, MM_MODEM_STATE_LOCKED))
         return TRUE;
@@ -1211,20 +1211,13 @@
                   MM_IFACE_MODEM_BEARER_LIST, &list,
                   NULL);
     if (!list) {
-        g_dbus_method_invocation_return_error (invocation,
-                                               MM_CORE_ERROR,
-                                               MM_CORE_ERROR_FAILED,
+        g_dbus_method_invocation_return_error (invocation, MM_CORE_ERROR, MM_CORE_ERROR_FAILED,
                                                "Bearer list not found");
         return TRUE;
     }
 
     paths = mm_bearer_list_get_paths (list);
-    mm_gdbus_modem_complete_list_bearers (skeleton,
-                                          invocation,
-                                          (const gchar *const *)paths);
-
-    g_strfreev (paths);
-    g_object_unref (list);
+    mm_gdbus_modem_complete_list_bearers (skeleton, invocation, (const gchar *const *)paths);
     return TRUE;
 }
 
@@ -1243,7 +1236,7 @@
     g_clear_object (&ctx->skeleton);
     g_clear_object (&ctx->invocation);
     g_clear_object (&ctx->self);
-    g_free (ctx);
+    g_slice_free (HandleSetPrimarySimSlotContext, ctx);
 }
 
 static void
@@ -1257,16 +1250,17 @@
         /* If the implementation returns EXISTS, we're already in the requested SIM slot,
          * so we can safely return a success on the operation and skip the reprobing */
         if (!g_error_matches (error, MM_CORE_ERROR, MM_CORE_ERROR_EXISTS)) {
-            mm_obj_warn (self, "couldn't process primary SIM update request: %s", error->message);
+            mm_obj_warn (self, "failed setting primary SIM slot '%u': %s", ctx->requested_sim_slot, error->message);
             g_dbus_method_invocation_take_error (ctx->invocation, g_steal_pointer (&error));
             handle_set_primary_sim_slot_context_free (ctx);
             return;
         }
-        mm_obj_dbg (self, "ignoring SIM update request: %s", error->message);
+        mm_obj_dbg (self, "ignored request to set primary SIM slot '%u': already set", ctx->requested_sim_slot);
     } else {
         /* Notify about the SIM swap, which will disable and reprobe the device.
          * There is no need to update the PrimarySimSlot property, as this value will be
          * reloaded automatically during the reprobe. */
+        mm_obj_info (self, "primary SIM slot '%u' set", ctx->requested_sim_slot);
         mm_iface_modem_process_sim_event (self);
     }
 
@@ -1291,11 +1285,8 @@
     /* If SIM switching is not implemented, report an error */
     if (!MM_IFACE_MODEM_GET_INTERFACE (self)->set_primary_sim_slot ||
         !MM_IFACE_MODEM_GET_INTERFACE (self)->set_primary_sim_slot_finish) {
-        g_dbus_method_invocation_return_error (ctx->invocation,
-                                               MM_CORE_ERROR,
-                                               MM_CORE_ERROR_UNSUPPORTED,
-                                               "Cannot switch sim: "
-                                               "operation not supported");
+        g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
+                                               "Operation not supported");
         handle_set_primary_sim_slot_context_free (ctx);
         return;
     }
@@ -1303,14 +1294,13 @@
     /* Validate SIM slot number */
     sim_slot_paths = mm_gdbus_modem_get_sim_slots (ctx->skeleton);
     if (!sim_slot_paths || (ctx->requested_sim_slot > g_strv_length ((gchar **)sim_slot_paths))) {
-        g_dbus_method_invocation_return_error (ctx->invocation,
-                                               MM_CORE_ERROR,
-                                               MM_CORE_ERROR_INVALID_ARGS,
-                                               "Cannot switch sim: requested SIM slot number is out of bounds");
+        g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS,
+                                               "Requested SIM slot number is out of bounds");
         handle_set_primary_sim_slot_context_free (ctx);
         return;
     }
 
+    mm_obj_info (self, "processing user request to set primary SIM slot '%u'...", ctx->requested_sim_slot);
     MM_IFACE_MODEM_GET_INTERFACE (self)->set_primary_sim_slot (MM_IFACE_MODEM (self),
                                                                ctx->requested_sim_slot,
                                                                (GAsyncReadyCallback)set_primary_sim_slot_ready,
@@ -1325,7 +1315,7 @@
 {
     HandleSetPrimarySimSlotContext *ctx;
 
-    ctx = g_new0 (HandleSetPrimarySimSlotContext, 1);
+    ctx = g_slice_new0 (HandleSetPrimarySimSlotContext);
     ctx->skeleton = g_object_ref (skeleton);
     ctx->invocation = g_object_ref (invocation);
     ctx->self = g_object_ref (self);
@@ -1353,7 +1343,7 @@
     g_object_unref (ctx->skeleton);
     g_object_unref (ctx->invocation);
     g_object_unref (ctx->self);
-    g_free (ctx);
+    g_slice_free (HandleGetCellInfoContext, ctx);
 }
 
 static GVariant *
@@ -1383,11 +1373,13 @@
     GList  *info_list;
 
     info_list = MM_IFACE_MODEM_GET_INTERFACE (self)->get_cell_info_finish (self, res, &error);
-    if (error)
+    if (error) {
+        mm_obj_dbg (self, "failed retrieving cell info: %s", error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
-    else {
+    } else {
         g_autoptr(GVariant) dict_array = NULL;
 
+        mm_obj_dbg (self, "cell info retrieved");
         dict_array = get_cell_info_build_result (info_list);
         mm_gdbus_modem_complete_get_cell_info (ctx->skeleton, ctx->invocation, dict_array);
     }
@@ -1423,6 +1415,7 @@
         return;
     }
 
+    mm_obj_info (self, "processing user request to retrieve cell info...");
     MM_IFACE_MODEM_GET_INTERFACE (self)->get_cell_info (ctx->self,
                                                         (GAsyncReadyCallback)get_cell_info_ready,
                                                         ctx);
@@ -1435,7 +1428,7 @@
 {
     HandleGetCellInfoContext *ctx;
 
-    ctx = g_new (HandleGetCellInfoContext, 1);
+    ctx = g_slice_new0 (HandleGetCellInfoContext);
     ctx->skeleton = g_object_ref (skeleton);
     ctx->invocation = g_object_ref (invocation);
     ctx->self = g_object_ref (self);
@@ -1500,7 +1493,7 @@
         /* Log */
         old_access_tech_string = mm_modem_access_technology_build_string_from_mask (old_access_tech);
         new_access_tech_string = mm_modem_access_technology_build_string_from_mask (built_access_tech);
-        mm_obj_dbg (self, "access technology changed (%s -> %s)",
+        mm_obj_info (self, "access technology changed (%s -> %s)",
                     old_access_tech_string,
                     new_access_tech_string);
         g_free (old_access_tech_string);
@@ -1966,9 +1959,9 @@
 
     /* Update state only if different */
     if (new_state != old_state) {
-        mm_obj_info (self, "state changed (%s -> %s)",
-                     mm_modem_state_get_string (old_state),
-                     mm_modem_state_get_string (new_state));
+        mm_obj_msg (self, "state changed (%s -> %s)",
+                    mm_modem_state_get_string (old_state),
+                    mm_modem_state_get_string (new_state));
 
         /* The property in the interface is bound to the property
          * in the skeleton, so just updating here is enough */
@@ -2139,10 +2132,10 @@
 /*****************************************************************************/
 
 typedef struct {
-    MmGdbusModem *skeleton;
+    MmGdbusModem          *skeleton;
     GDBusMethodInvocation *invocation;
-    MMIfaceModem *self;
-    gboolean enable;
+    MMIfaceModem          *self;
+    gboolean               enable;
 } HandleEnableContext;
 
 static void
@@ -2151,26 +2144,32 @@
     g_object_unref (ctx->skeleton);
     g_object_unref (ctx->invocation);
     g_object_unref (ctx->self);
-    g_free (ctx);
+    g_slice_free (HandleEnableContext, ctx);
 }
 
 static void
-enable_ready (MMBaseModem *self,
-              GAsyncResult *res,
+enable_ready (MMBaseModem         *self,
+              GAsyncResult        *res,
               HandleEnableContext *ctx)
 {
     GError *error = NULL;
 
     if (ctx->enable) {
-        if (!mm_base_modem_enable_finish (self, res, &error))
+        if (!mm_base_modem_enable_finish (self, res, &error)) {
+            mm_obj_warn (self, "failed enabling modem: %s", error->message);
             g_dbus_method_invocation_take_error (ctx->invocation, error);
-        else
+        } else {
+            mm_obj_info (self, "enabled modem");
             mm_gdbus_modem_complete_enable (ctx->skeleton, ctx->invocation);
+        }
     } else {
-        if (!mm_base_modem_disable_finish (self, res, &error))
+        if (!mm_base_modem_disable_finish (self, res, &error)) {
+            mm_obj_warn (self, "failed disabling modem: %s", error->message);
             g_dbus_method_invocation_take_error (ctx->invocation, error);
-        else
+        } else {
+            mm_obj_info (self, "disabled modem");
             mm_gdbus_modem_complete_enable (ctx->skeleton, ctx->invocation);
+        }
     }
 
     handle_enable_context_free (ctx);
@@ -2194,25 +2193,28 @@
         return;
     }
 
-    if (ctx->enable)
+    if (ctx->enable) {
+        mm_obj_info (self, "processing user request to enable modem...");
         mm_base_modem_enable (self,
                               (GAsyncReadyCallback)enable_ready,
                               ctx);
-    else
+    } else {
+        mm_obj_info (self, "processing user request to disable modem...");
         mm_base_modem_disable (self,
                                (GAsyncReadyCallback)enable_ready,
                                ctx);
+    }
 }
 
 static gboolean
-handle_enable (MmGdbusModem *skeleton,
+handle_enable (MmGdbusModem          *skeleton,
                GDBusMethodInvocation *invocation,
-               gboolean enable,
-               MMIfaceModem *self)
+               gboolean               enable,
+               MMIfaceModem          *self)
 {
     HandleEnableContext *ctx;
 
-    ctx = g_new (HandleEnableContext, 1);
+    ctx = g_slice_new0 (HandleEnableContext);
     ctx->skeleton = g_object_ref (skeleton);
     ctx->invocation = g_object_ref (invocation);
     ctx->self = g_object_ref (self);
@@ -2229,10 +2231,10 @@
 /*****************************************************************************/
 
 typedef struct {
-    MmGdbusModem *skeleton;
+    MmGdbusModem          *skeleton;
     GDBusMethodInvocation *invocation;
-    MMIfaceModem *self;
-    MMModemPowerState power_state;
+    MMIfaceModem          *self;
+    MMModemPowerState      power_state;
 } HandleSetPowerStateContext;
 
 static void
@@ -2245,26 +2247,29 @@
 }
 
 static void
-set_power_state_ready (MMIfaceModem *self,
-                       GAsyncResult *res,
+set_power_state_ready (MMIfaceModem               *self,
+                       GAsyncResult               *res,
                        HandleSetPowerStateContext *ctx)
 {
     GError *error = NULL;
 
-    if (!mm_iface_modem_set_power_state_finish (self, res, &error))
+    if (!mm_iface_modem_set_power_state_finish (self, res, &error)) {
+        mm_obj_warn (self, "failed setting power state '%s': %s", mm_modem_power_state_get_string (ctx->power_state), error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
-    else
+    } else {
+        mm_obj_info (self, "set power state '%s'", mm_modem_power_state_get_string (ctx->power_state));
         mm_gdbus_modem_complete_set_power_state (ctx->skeleton, ctx->invocation);
+    }
     handle_set_power_state_context_free (ctx);
 }
 
 static void
-handle_set_power_state_auth_ready (MMBaseModem *self,
-                                   GAsyncResult *res,
+handle_set_power_state_auth_ready (MMBaseModem                *self,
+                                   GAsyncResult               *res,
                                    HandleSetPowerStateContext *ctx)
 {
-    MMModemState modem_state;
-    GError *error = NULL;
+    MMModemState  modem_state;
+    GError       *error = NULL;
 
     if (!mm_base_modem_authorize_finish (self, res, &error)) {
         g_dbus_method_invocation_take_error (ctx->invocation, error);
@@ -2276,10 +2281,8 @@
     if (ctx->power_state != MM_MODEM_POWER_STATE_LOW &&
         ctx->power_state != MM_MODEM_POWER_STATE_ON &&
         ctx->power_state != MM_MODEM_POWER_STATE_OFF) {
-        g_dbus_method_invocation_return_error (ctx->invocation,
-                                               MM_CORE_ERROR,
-                                               MM_CORE_ERROR_INVALID_ARGS,
-                                               "Cannot set '%s' power state",
+        g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS,
+                                               "Unknown power state: '%s'",
                                                mm_modem_power_state_get_string (ctx->power_state));
         handle_set_power_state_context_free (ctx);
         return;
@@ -2291,14 +2294,11 @@
                   NULL);
 
     /* Going into LOW or ON only allowed in disabled and failed states */
-    if ((ctx->power_state == MM_MODEM_POWER_STATE_LOW ||
-         ctx->power_state == MM_MODEM_POWER_STATE_ON) &&
+    if ((ctx->power_state == MM_MODEM_POWER_STATE_LOW || ctx->power_state == MM_MODEM_POWER_STATE_ON) &&
         modem_state != MM_MODEM_STATE_FAILED &&
         modem_state != MM_MODEM_STATE_DISABLED) {
-        g_dbus_method_invocation_return_error (ctx->invocation,
-                                               MM_CORE_ERROR,
-                                               MM_CORE_ERROR_WRONG_STATE,
-                                               "Cannot set power state: not in disabled or failed state");
+        g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_WRONG_STATE,
+                                               "Must be in disabled or failed state");
         handle_set_power_state_context_free (ctx);
         return;
     }
@@ -2311,11 +2311,12 @@
         g_dbus_method_invocation_return_error (ctx->invocation,
                                                MM_CORE_ERROR,
                                                MM_CORE_ERROR_WRONG_STATE,
-                                               "Cannot set power state: modem either enabled or initializing");
+                                               "Modem either enabled or initializing");
         handle_set_power_state_context_free (ctx);
         return;
     }
 
+    mm_obj_info (self, "processing user request to set power state '%s'...", mm_modem_power_state_get_string (ctx->power_state));
     mm_iface_modem_set_power_state (MM_IFACE_MODEM (self),
                                     ctx->power_state,
                                     (GAsyncReadyCallback)set_power_state_ready,
@@ -2323,14 +2324,14 @@
 }
 
 static gboolean
-handle_set_power_state (MmGdbusModem *skeleton,
+handle_set_power_state (MmGdbusModem          *skeleton,
                         GDBusMethodInvocation *invocation,
-                        guint32 power_state,
-                        MMIfaceModem *self)
+                        guint32                power_state,
+                        MMIfaceModem          *self)
 {
     HandleSetPowerStateContext *ctx;
 
-    ctx = g_slice_new (HandleSetPowerStateContext);
+    ctx = g_slice_new0 (HandleSetPowerStateContext);
     ctx->skeleton = g_object_ref (skeleton);
     ctx->invocation = g_object_ref (invocation);
     ctx->self = g_object_ref (self);
@@ -2347,9 +2348,9 @@
 /*****************************************************************************/
 
 typedef struct {
-    MmGdbusModem *skeleton;
+    MmGdbusModem          *skeleton;
     GDBusMethodInvocation *invocation;
-    MMIfaceModem *self;
+    MMIfaceModem          *self;
 } HandleResetContext;
 
 static void
@@ -2358,27 +2359,30 @@
     g_object_unref (ctx->skeleton);
     g_object_unref (ctx->invocation);
     g_object_unref (ctx->self);
-    g_free (ctx);
+    g_slice_free (HandleResetContext, ctx);
 }
 
 static void
-handle_reset_ready (MMIfaceModem *self,
-                    GAsyncResult *res,
+handle_reset_ready (MMIfaceModem       *self,
+                    GAsyncResult       *res,
                     HandleResetContext *ctx)
 {
     GError *error = NULL;
 
-    if (!MM_IFACE_MODEM_GET_INTERFACE (self)->reset_finish (self, res, &error))
+    if (!MM_IFACE_MODEM_GET_INTERFACE (self)->reset_finish (self, res, &error)) {
+        mm_obj_warn (self, "failed requesting modem reset: %s", error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
-    else
+    } else {
+        mm_obj_info (self, "modem reset requested");
         mm_gdbus_modem_complete_reset (ctx->skeleton, ctx->invocation);
+    }
 
     handle_reset_context_free (ctx);
 }
 
 static void
-handle_reset_auth_ready (MMBaseModem *self,
-                         GAsyncResult *res,
+handle_reset_auth_ready (MMBaseModem        *self,
+                         GAsyncResult       *res,
                          HandleResetContext *ctx)
 {
     GError *error = NULL;
@@ -2390,29 +2394,27 @@
     }
 
     /* If reseting is not implemented, report an error */
-    if (!MM_IFACE_MODEM_GET_INTERFACE (self)->reset ||
-        !MM_IFACE_MODEM_GET_INTERFACE (self)->reset_finish) {
-        g_dbus_method_invocation_return_error (ctx->invocation,
-                                               MM_CORE_ERROR,
-                                               MM_CORE_ERROR_UNSUPPORTED,
-                                               "Cannot reset the modem: operation not supported");
+    if (!MM_IFACE_MODEM_GET_INTERFACE (self)->reset || !MM_IFACE_MODEM_GET_INTERFACE (self)->reset_finish) {
+        g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
+                                               "Operation not supported");
         handle_reset_context_free (ctx);
         return;
     }
 
+    mm_obj_info (self, "processing user request to reset modem...");
     MM_IFACE_MODEM_GET_INTERFACE (self)->reset (MM_IFACE_MODEM (self),
                                                 (GAsyncReadyCallback)handle_reset_ready,
                                                 ctx);
 }
 
 static gboolean
-handle_reset (MmGdbusModem *skeleton,
+handle_reset (MmGdbusModem          *skeleton,
               GDBusMethodInvocation *invocation,
-              MMIfaceModem *self)
+              MMIfaceModem          *self)
 {
     HandleResetContext *ctx;
 
-    ctx = g_new (HandleResetContext, 1);
+    ctx = g_slice_new0 (HandleResetContext);
     ctx->skeleton = g_object_ref (skeleton);
     ctx->invocation = g_object_ref (invocation);
     ctx->self = g_object_ref (self);
@@ -2429,10 +2431,10 @@
 /*****************************************************************************/
 
 typedef struct {
-    MmGdbusModem *skeleton;
+    MmGdbusModem          *skeleton;
     GDBusMethodInvocation *invocation;
-    MMIfaceModem *self;
-    gchar *code;
+    MMIfaceModem          *self;
+    gchar                 *code;
 } HandleFactoryResetContext;
 
 static void
@@ -2442,27 +2444,30 @@
     g_object_unref (ctx->invocation);
     g_object_unref (ctx->self);
     g_free (ctx->code);
-    g_free (ctx);
+    g_slice_free (HandleFactoryResetContext, ctx);
 }
 
 static void
-handle_factory_reset_ready (MMIfaceModem *self,
-                            GAsyncResult *res,
+handle_factory_reset_ready (MMIfaceModem              *self,
+                            GAsyncResult              *res,
                             HandleFactoryResetContext *ctx)
 {
     GError *error = NULL;
 
-    if (!MM_IFACE_MODEM_GET_INTERFACE (self)->factory_reset_finish (self, res, &error))
+    if (!MM_IFACE_MODEM_GET_INTERFACE (self)->factory_reset_finish (self, res, &error)) {
+        mm_obj_warn (self, "failed requesting modem factory reset: %s", error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
-    else
+    } else {
+        mm_obj_info (self, "modem factory reset requested");
         mm_gdbus_modem_complete_factory_reset (ctx->skeleton, ctx->invocation);
+    }
 
     handle_factory_reset_context_free (ctx);
 }
 
 static void
-handle_factory_reset_auth_ready (MMBaseModem *self,
-                                 GAsyncResult *res,
+handle_factory_reset_auth_ready (MMBaseModem               *self,
+                                 GAsyncResult              *res,
                                  HandleFactoryResetContext *ctx)
 {
     GError *error = NULL;
@@ -2474,17 +2479,14 @@
     }
 
     /* If reseting is not implemented, report an error */
-    if (!MM_IFACE_MODEM_GET_INTERFACE (self)->factory_reset ||
-        !MM_IFACE_MODEM_GET_INTERFACE (self)->factory_reset_finish) {
-        g_dbus_method_invocation_return_error (ctx->invocation,
-                                               MM_CORE_ERROR,
-                                               MM_CORE_ERROR_UNSUPPORTED,
-                                               "Cannot reset the modem to factory defaults: "
-                                               "operation not supported");
+    if (!MM_IFACE_MODEM_GET_INTERFACE (self)->factory_reset || !MM_IFACE_MODEM_GET_INTERFACE (self)->factory_reset_finish) {
+        g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
+                                               "Operation not supported");
         handle_factory_reset_context_free (ctx);
         return;
     }
 
+    mm_obj_info (self, "processing user request to factory reset modem...");
     MM_IFACE_MODEM_GET_INTERFACE (self)->factory_reset (MM_IFACE_MODEM (self),
                                                         ctx->code,
                                                         (GAsyncReadyCallback)handle_factory_reset_ready,
@@ -2492,14 +2494,14 @@
 }
 
 static gboolean
-handle_factory_reset (MmGdbusModem *skeleton,
+handle_factory_reset (MmGdbusModem          *skeleton,
                       GDBusMethodInvocation *invocation,
-                      const gchar *code,
-                      MMIfaceModem *self)
+                      const gchar           *code,
+                      MMIfaceModem          *self)
 {
     HandleFactoryResetContext *ctx;
 
-    ctx = g_new (HandleFactoryResetContext, 1);
+    ctx = g_slice_new0 (HandleFactoryResetContext);
     ctx->skeleton = g_object_ref (skeleton);
     ctx->invocation = g_object_ref (invocation);
     ctx->self = g_object_ref (self);
@@ -2523,15 +2525,17 @@
  */
 
 typedef struct {
-    MmGdbusModem *skeleton;
+    MmGdbusModem          *skeleton;
     GDBusMethodInvocation *invocation;
-    MMIfaceModem *self;
-    MMModemCapability capabilities;
+    MMIfaceModem          *self;
+    MMModemCapability      capabilities;
+    gchar                 *capabilities_str;
 } HandleSetCurrentCapabilitiesContext;
 
 static void
 handle_set_current_capabilities_context_free (HandleSetCurrentCapabilitiesContext *ctx)
 {
+    g_free (ctx->capabilities_str);
     g_object_unref (ctx->skeleton);
     g_object_unref (ctx->invocation);
     g_object_unref (ctx->self);
@@ -2539,17 +2543,19 @@
 }
 
 static void
-set_current_capabilities_ready (MMIfaceModem *self,
-                                GAsyncResult *res,
+set_current_capabilities_ready (MMIfaceModem                        *self,
+                                GAsyncResult                        *res,
                                 HandleSetCurrentCapabilitiesContext *ctx)
 {
     GError *error = NULL;
 
-    if (!MM_IFACE_MODEM_GET_INTERFACE (self)->set_current_capabilities_finish (self, res, &error))
+    if (!MM_IFACE_MODEM_GET_INTERFACE (self)->set_current_capabilities_finish (self, res, &error)) {
+        mm_obj_warn (self, "failed setting current capabilities to '%s': %s", ctx->capabilities_str, error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
-    else {
+    } else {
         /* Capabilities updated: explicitly refresh signal and access technology */
         mm_iface_modem_refresh_signal (self);
+        mm_obj_info (self, "current capabilities set to '%s'", ctx->capabilities_str);
         mm_gdbus_modem_complete_set_current_capabilities (ctx->skeleton, ctx->invocation);
     }
 
@@ -2557,15 +2563,14 @@
 }
 
 static void
-handle_set_current_capabilities_auth_ready (MMBaseModem *self,
-                                            GAsyncResult *res,
+handle_set_current_capabilities_auth_ready (MMBaseModem                         *self,
+                                            GAsyncResult                        *res,
                                             HandleSetCurrentCapabilitiesContext *ctx)
 {
-    GError *error = NULL;
-    gchar *capabilities_string;
-    GArray *supported;
-    gboolean matched = FALSE;
-    guint i;
+    GError            *error = NULL;
+    g_autoptr(GArray)  supported = NULL;
+    gboolean           matched = FALSE;
+    guint              i;
 
     if (!mm_base_modem_authorize_finish (self, res, &error)) {
         g_dbus_method_invocation_take_error (ctx->invocation, error);
@@ -2573,18 +2578,30 @@
         return;
     }
 
+    /* Nothing to do if we already are in the requested setup */
+    if (mm_gdbus_modem_get_current_capabilities (ctx->skeleton) == ctx->capabilities) {
+        mm_gdbus_modem_complete_set_current_capabilities (ctx->skeleton, ctx->invocation);
+        handle_set_current_capabilities_context_free (ctx);
+        return;
+    }
+
+    /* If setting current capabilities is not implemented, report an error */
+    if (!MM_IFACE_MODEM_GET_INTERFACE (self)->set_current_capabilities ||
+        !MM_IFACE_MODEM_GET_INTERFACE (self)->set_current_capabilities_finish) {
+        g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
+                                               "Setting current capabilities not supported");
+        handle_set_current_capabilities_context_free (ctx);
+        return;
+    }
+
     /* Get list of supported capabilities */
-    supported = mm_common_capability_combinations_variant_to_garray (
-        mm_gdbus_modem_get_supported_capabilities (ctx->skeleton));
+    supported = mm_common_capability_combinations_variant_to_garray (mm_gdbus_modem_get_supported_capabilities (ctx->skeleton));
 
     /* Don't allow capability switching if only one item given in the supported list */
     if (supported->len == 1) {
-        g_dbus_method_invocation_return_error (ctx->invocation,
-                                               MM_CORE_ERROR,
-                                               MM_CORE_ERROR_UNSUPPORTED,
+        g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
                                                "Cannot change capabilities: only one combination supported");
         handle_set_current_capabilities_context_free (ctx);
-        g_array_unref (supported);
         return;
     }
 
@@ -2596,39 +2613,15 @@
         if (supported_capability == ctx->capabilities)
                 matched = TRUE;
     }
-    g_array_unref (supported);
-
     if (!matched) {
-        g_dbus_method_invocation_return_error (ctx->invocation,
-                                               MM_CORE_ERROR,
-                                               MM_CORE_ERROR_UNSUPPORTED,
+        g_dbus_method_invocation_return_error (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
                                                "The given combination of capabilities is not supported");
         handle_set_current_capabilities_context_free (ctx);
         return;
     }
 
-    /* Check if we already are in the requested setup */
-    if (mm_gdbus_modem_get_current_capabilities (ctx->skeleton) == ctx->capabilities) {
-        /* Nothing to do */
-        mm_gdbus_modem_complete_set_current_capabilities (ctx->skeleton, ctx->invocation);
-        handle_set_current_capabilities_context_free (ctx);
-        return;
-    }
-
-    /* If setting current capabilities is not implemented, report an error */
-    if (!MM_IFACE_MODEM_GET_INTERFACE (self)->set_current_capabilities ||
-        !MM_IFACE_MODEM_GET_INTERFACE (self)->set_current_capabilities_finish) {
-        g_dbus_method_invocation_return_error (ctx->invocation,
-                                               MM_CORE_ERROR,
-                                               MM_CORE_ERROR_UNSUPPORTED,
-                                               "Setting current capabilities not supported");
-        handle_set_current_capabilities_context_free (ctx);
-        return;
-    }
-
-    capabilities_string = mm_modem_capability_build_string_from_mask (ctx->capabilities);
-    mm_obj_dbg (self, "setting new list of capabilities: %s", capabilities_string);
-    g_free (capabilities_string);
+    ctx->capabilities_str = mm_modem_capability_build_string_from_mask (ctx->capabilities);
+    mm_obj_info (self, "processing user request to set current capabilities to '%s'...", ctx->capabilities_str);
 
     MM_IFACE_MODEM_GET_INTERFACE (self)->set_current_capabilities (
         MM_IFACE_MODEM (self),
@@ -2638,14 +2631,14 @@
 }
 
 static gboolean
-handle_set_current_capabilities (MmGdbusModem *skeleton,
+handle_set_current_capabilities (MmGdbusModem          *skeleton,
                                  GDBusMethodInvocation *invocation,
-                                 guint capabilities,
-                                 MMIfaceModem *self)
+                                 guint                  capabilities,
+                                 MMIfaceModem          *self)
 {
     HandleSetCurrentCapabilitiesContext *ctx;
 
-    ctx = g_slice_new (HandleSetCurrentCapabilitiesContext);
+    ctx = g_slice_new0 (HandleSetCurrentCapabilitiesContext);
     ctx->skeleton = g_object_ref (skeleton);
     ctx->invocation = g_object_ref (invocation);
     ctx->self = g_object_ref (self);
@@ -3011,16 +3004,20 @@
     g_free (bands_string);
 }
 
+/*****************************************************************************/
+
 typedef struct {
-    MmGdbusModem *skeleton;
+    MmGdbusModem          *skeleton;
     GDBusMethodInvocation *invocation;
-    MMIfaceModem *self;
-    GVariant *bands;
+    MMIfaceModem          *self;
+    GVariant              *bands;
+    gchar                 *bands_str;
 } HandleSetCurrentBandsContext;
 
 static void
 handle_set_current_bands_context_free (HandleSetCurrentBandsContext *ctx)
 {
+    g_free (ctx->bands_str);
     g_variant_unref (ctx->bands);
     g_object_unref (ctx->skeleton);
     g_object_unref (ctx->invocation);
@@ -3029,17 +3026,19 @@
 }
 
 static void
-handle_set_current_bands_ready (MMIfaceModem *self,
-                                GAsyncResult *res,
+handle_set_current_bands_ready (MMIfaceModem                 *self,
+                                GAsyncResult                 *res,
                                 HandleSetCurrentBandsContext *ctx)
 {
     GError *error = NULL;
 
-    if (!mm_iface_modem_set_current_bands_finish (self, res, &error))
+    if (!mm_iface_modem_set_current_bands_finish (self, res, &error)) {
+        mm_obj_warn (self, "failed setting current bands to '%s': %s", ctx->bands_str, error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
-    else {
+    } else {
         /* Bands updated: explicitly refresh signal and access technology */
         mm_iface_modem_refresh_signal (self);
+        mm_obj_info (self, "current bands set to '%s'", ctx->bands_str);
         mm_gdbus_modem_complete_set_current_bands (ctx->skeleton, ctx->invocation);
     }
 
@@ -3047,12 +3046,12 @@
 }
 
 static void
-handle_set_current_bands_auth_ready (MMBaseModem *self,
-                                     GAsyncResult *res,
+handle_set_current_bands_auth_ready (MMBaseModem                  *self,
+                                     GAsyncResult                 *res,
                                      HandleSetCurrentBandsContext *ctx)
 {
-    GArray *bands_array;
-    GError *error = NULL;
+    g_autoptr(GArray)  bands_array = NULL;
+    GError            *error = NULL;
 
     if (!mm_base_modem_authorize_finish (self, res, &error)) {
         g_dbus_method_invocation_take_error (ctx->invocation, error);
@@ -3066,22 +3065,24 @@
     }
 
     bands_array = mm_common_bands_variant_to_garray (ctx->bands);
+    ctx->bands_str = mm_common_build_bands_string ((const MMModemBand *)bands_array->data, bands_array->len);
+
+    mm_obj_info (self, "processing user request to set current bands to '%s'...", ctx->bands_str);
     mm_iface_modem_set_current_bands (MM_IFACE_MODEM (self),
                                       bands_array,
                                       (GAsyncReadyCallback)handle_set_current_bands_ready,
                                       ctx);
-    g_array_unref (bands_array);
 }
 
 static gboolean
-handle_set_current_bands (MmGdbusModem *skeleton,
+handle_set_current_bands (MmGdbusModem          *skeleton,
                           GDBusMethodInvocation *invocation,
-                          GVariant *bands_variant,
-                          MMIfaceModem *self)
+                          GVariant              *bands_variant,
+                          MMIfaceModem          *self)
 {
     HandleSetCurrentBandsContext *ctx;
 
-    ctx = g_slice_new (HandleSetCurrentBandsContext);
+    ctx = g_slice_new0 (HandleSetCurrentBandsContext);
     ctx->skeleton = g_object_ref (skeleton);
     ctx->invocation = g_object_ref (invocation);
     ctx->self = g_object_ref (self);
@@ -3398,35 +3399,45 @@
                                                             task);
 }
 
+/*****************************************************************************/
+
 typedef struct {
-    MmGdbusModem *skeleton;
+    MmGdbusModem          *skeleton;
     GDBusMethodInvocation *invocation;
-    MMIfaceModem *self;
-    MMModemMode allowed;
-    MMModemMode preferred;
+    MMIfaceModem          *self;
+    MMModemMode            allowed;
+    MMModemMode            preferred;
+    gchar                 *allowed_str;
+    gchar                 *preferred_str;
 } HandleSetCurrentModesContext;
 
 static void
 handle_set_current_modes_context_free (HandleSetCurrentModesContext *ctx)
 {
+    g_free (ctx->preferred_str);
+    g_free (ctx->allowed_str);
     g_object_unref (ctx->skeleton);
     g_object_unref (ctx->invocation);
     g_object_unref (ctx->self);
-    g_free (ctx);
+    g_slice_free (HandleSetCurrentModesContext, ctx);
 }
 
 static void
-handle_set_current_modes_ready (MMIfaceModem *self,
-                                GAsyncResult *res,
+handle_set_current_modes_ready (MMIfaceModem                 *self,
+                                GAsyncResult                 *res,
                                 HandleSetCurrentModesContext *ctx)
 {
     GError *error = NULL;
 
-    if (!mm_iface_modem_set_current_modes_finish (self, res, &error))
+    if (!mm_iface_modem_set_current_modes_finish (self, res, &error)) {
+        mm_obj_warn (self, "failed setting current modes to '%s' (preferred '%s'): %s",
+                     ctx->allowed_str, ctx->preferred_str, error->message);
         g_dbus_method_invocation_take_error (ctx->invocation, error);
-    else {
+    } else {
         /* Modes updated: explicitly refresh signal and access technology */
         mm_iface_modem_refresh_signal (self);
+        mm_obj_info (self, "current modes set to '%s' (preferred '%s')",
+                     ctx->allowed_str, ctx->preferred_str);
         mm_gdbus_modem_complete_set_current_modes (ctx->skeleton, ctx->invocation);
     }
 
@@ -3434,8 +3445,8 @@
 }
 
 static void
-handle_set_current_modes_auth_ready (MMBaseModem *self,
-                                     GAsyncResult *res,
+handle_set_current_modes_auth_ready (MMBaseModem                  *self,
+                                     GAsyncResult                 *res,
                                      HandleSetCurrentModesContext *ctx)
 {
     GError *error = NULL;
@@ -3451,6 +3462,10 @@
         return;
     }
 
+    ctx->allowed_str = mm_modem_mode_build_string_from_mask (ctx->allowed);
+    ctx->preferred_str = mm_modem_mode_build_string_from_mask (ctx->preferred);
+    mm_obj_info (self, "processing user request to set current modes to '%s' (preferred '%s')...",
+                 ctx->allowed_str, ctx->preferred_str);
     mm_iface_modem_set_current_modes (MM_IFACE_MODEM (self),
                                       ctx->allowed,
                                       ctx->preferred,
@@ -3459,14 +3474,14 @@
 }
 
 static gboolean
-handle_set_current_modes (MmGdbusModem *skeleton,
+handle_set_current_modes (MmGdbusModem          *skeleton,
                           GDBusMethodInvocation *invocation,
-                          GVariant *variant,
-                          MMIfaceModem *self)
+                          GVariant              *variant,
+                          MMIfaceModem          *self)
 {
     HandleSetCurrentModesContext *ctx;
 
-    ctx = g_new (HandleSetCurrentModesContext, 1);
+    ctx = g_slice_new0 (HandleSetCurrentModesContext);
     ctx->skeleton = g_object_ref (skeleton);
     ctx->invocation = g_object_ref (invocation);
     ctx->self = g_object_ref (self);
@@ -3691,7 +3706,7 @@
 
     unlock_retries = MM_IFACE_MODEM_GET_INTERFACE (self)->load_unlock_retries_finish (self, res, &error);
     if (!unlock_retries) {
-        mm_obj_warn (self, "couldn't load unlock retries: %s", error->message);
+        mm_obj_dbg (self, "couldn't load unlock retries: %s", error->message);
         g_error_free (error);
     } else {
         /* Update the dictionary in the DBus interface */
@@ -3714,7 +3729,7 @@
     GError *error = NULL;
 
     if (!MM_IFACE_MODEM_GET_INTERFACE (self)->modem_after_sim_unlock_finish (self, res, &error)) {
-        mm_obj_warn (self, "after SIM unlock failed: %s", error->message);
+        mm_obj_dbg (self, "after SIM unlock failed: %s", error->message);
         g_error_free (error);
     }
 
@@ -3767,7 +3782,7 @@
             }
 
             /* For non 3GPP-capable devices, skip SIM errors */
-            mm_obj_dbg (self, "skipping SIM error in non 3GPP-capable device, assuming no lock is needed");
+            mm_obj_info (self, "skipping SIM error in non 3GPP-capable device, assuming no lock is needed");
             g_error_free (error);
             ctx->lock = MM_MODEM_LOCK_NONE;
         } else {
@@ -3837,7 +3852,7 @@
             }
 
             /* If no way to run after SIM unlock step, we're done */
-            mm_obj_dbg (self, "SIM is ready, and no need for the after SIM unlock step...");
+            mm_obj_info (self, "SIM is ready, and no need for the after SIM unlock step...");
         }
         ctx->step++;
         /* fall-through */
@@ -3968,7 +3983,7 @@
     g_assert (!ctx->saved_error);
     MM_IFACE_MODEM_GET_INTERFACE (self)->modem_after_power_up_finish (self, res, &ctx->saved_error);
     if (ctx->saved_error)
-        mm_obj_dbg (self, "failure running after power up step: %s", ctx->saved_error->message);
+        mm_obj_info (self, "failure running after power up step: %s", ctx->saved_error->message);
 
     ctx->step++;
     set_power_state_step (task);
@@ -4052,7 +4067,7 @@
     ctx = g_task_get_task_data (task);
     g_assert (!ctx->saved_error);
     if (!ctx->requested_power_setup_finish (self, res, &ctx->saved_error))
-        mm_obj_dbg (self, "couldn't update power state: %s", ctx->saved_error->message);
+        mm_obj_info (self, "couldn't update power state: %s", ctx->saved_error->message);
 
     ctx->step++;
     set_power_state_step (task);
@@ -4142,7 +4157,7 @@
             ctx->saved_error &&
             g_error_matches (ctx->saved_error, MM_CORE_ERROR, MM_CORE_ERROR_RETRY) &&
             !ctx->fcc_unlock_attempted) {
-            mm_obj_dbg (self, "attempting fcc unlock...");
+            mm_obj_dbg (self, "attempting FCC unlock...");
             g_clear_error (&ctx->saved_error);
             ctx->fcc_unlock_attempted = TRUE;
             fcc_unlock (task);
@@ -4170,7 +4185,7 @@
                 mm_gdbus_modem_set_power_state (ctx->skeleton, ctx->previous_real_power_state);
             g_task_return_error (task, g_steal_pointer (&ctx->saved_error));
         } else {
-            mm_obj_info (self, "power state updated: %s", mm_modem_power_state_get_string (ctx->requested_power_state));
+            mm_obj_msg (self, "power state updated: %s", mm_modem_power_state_get_string (ctx->requested_power_state));
             mm_gdbus_modem_set_power_state (ctx->skeleton, ctx->requested_power_state);
             g_task_return_boolean (task, TRUE);
         }
@@ -4331,15 +4346,13 @@
 static void
 check_for_sim_swap_ready (MMIfaceModem *self,
                           GAsyncResult *res,
-                          GTask *task)
+                          GTask        *task)
 {
-    EnablingContext *ctx;
-    GError *error = NULL;
+    EnablingContext   *ctx;
+    g_autoptr(GError)  error = NULL;
 
-    if (!MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap_finish (self, res, &error)) {
-        mm_obj_warn (self, "failed to check if SIM was swapped: %s", error->message);
-        g_error_free (error);
-    }
+    if (!MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap_finish (self, res, &error))
+        mm_obj_dbg (self, "failed to check if SIM was swapped: %s", error->message);
 
     /* Go on to next step */
     ctx = g_task_get_task_data (task);
@@ -4729,22 +4742,19 @@
     static void                                                         \
     load_##NAME##_ready (MMIfaceModem *self,                            \
                          GAsyncResult *res,                             \
-                         GTask *task)                                   \
+                         GTask        *task)                            \
     {                                                                   \
         InitializationContext *ctx;                                     \
-        GError *error = NULL;                                           \
-        gchar *val;                                                     \
+        g_autoptr(GError)      error = NULL;                            \
+        g_autofree gchar      *val = NULL;                              \
                                                                         \
         ctx = g_task_get_task_data (task);                              \
                                                                         \
         val = MM_IFACE_MODEM_GET_INTERFACE (self)->load_##NAME##_finish (self, res, &error); \
         mm_gdbus_modem_set_##NAME (ctx->skeleton, val);                 \
-        g_free (val);                                                   \
                                                                         \
-        if (error) {                                                    \
-            mm_obj_warn (self, "couldn't load %s: %s", DISPLAY, error->message); \
-            g_error_free (error);                                       \
-        }                                                               \
+        if (error)                                                      \
+            mm_obj_dbg (self, "couldn't load %s: %s", DISPLAY, error->message); \
                                                                         \
         /* Go on to next step */                                        \
         ctx->step++;                                                    \
@@ -4756,10 +4766,10 @@
     static void                                                         \
     load_##NAME##_ready (MMIfaceModem *self,                            \
                          GAsyncResult *res,                             \
-                         GTask *task)                                   \
+                         GTask        *task)                            \
     {                                                                   \
         InitializationContext *ctx;                                     \
-        GError *error = NULL;                                           \
+        g_autoptr(GError)      error = NULL;                            \
                                                                         \
         ctx = g_task_get_task_data (task);                              \
                                                                         \
@@ -4767,10 +4777,8 @@
             ctx->skeleton,                                              \
             MM_IFACE_MODEM_GET_INTERFACE (self)->load_##NAME##_finish (self, res, &error)); \
                                                                         \
-        if (error) {                                                    \
-            mm_obj_warn (self, "couldn't load %s: %s", DISPLAY, error->message); \
-            g_error_free (error);                                       \
-        }                                                               \
+        if (error)                                                      \
+            mm_obj_dbg (self, "couldn't load %s: %s", DISPLAY, error->message); \
                                                                         \
         /* Go on to next step */                                        \
         ctx->step++;                                                    \
@@ -4876,19 +4884,16 @@
 static void
 load_supported_charsets_ready (MMIfaceModem *self,
                                GAsyncResult *res,
-                               GTask *task)
+                               GTask        *task)
 {
     InitializationContext *ctx;
-    GError *error = NULL;
+    g_autoptr(GError)      error = NULL;
 
     ctx = g_task_get_task_data (task);
 
-    ctx->supported_charsets =
-        MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_charsets_finish (self, res, &error);
-    if (error) {
-        mm_obj_warn (self, "couldn't load supported charsets: %s", error->message);
-        g_error_free (error);
-    }
+    ctx->supported_charsets = MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_charsets_finish (self, res, &error);
+    if (error)
+        mm_obj_dbg (self, "couldn't load supported charsets: %s", error->message);
 
     /* Go on to next step */
     ctx->step++;
@@ -4898,22 +4903,20 @@
 static void
 setup_charset_ready (MMIfaceModem *self,
                      GAsyncResult *res,
-                     GTask *task)
+                     GTask        *task)
 {
     InitializationContext *ctx;
-    GError *error = NULL;
+    g_autoptr(GError)      error = NULL;
 
     ctx = g_task_get_task_data (task);
 
-    if (!MM_IFACE_MODEM_GET_INTERFACE (self)->setup_charset_finish (self, res, &error)) {
+    if (!MM_IFACE_MODEM_GET_INTERFACE (self)->setup_charset_finish (self, res, &error))
         mm_obj_dbg (self, "couldn't set charset '%s': %s",
                     mm_modem_charset_to_string (*ctx->current_charset),
                     error->message);
-        g_error_free (error);
-
         /* Will retry step with some other charset type */
-    } else
-        /* Done, Go on to next step */
+    else
+        /* Done, go on to next step */
         ctx->step++;
 
     interface_initialization_step (task);
@@ -4922,11 +4925,11 @@
 static void
 load_supported_modes_ready (MMIfaceModem *self,
                             GAsyncResult *res,
-                            GTask *task)
+                            GTask        *task)
 {
     InitializationContext *ctx;
-    GError *error = NULL;
-    GArray *modes_array;
+    g_autoptr(GError)      error = NULL;
+    GArray                *modes_array;
 
     ctx = g_task_get_task_data (task);
 
@@ -4937,10 +4940,8 @@
         g_array_unref (modes_array);
     }
 
-    if (error) {
-        mm_obj_warn (self, "couldn't load supported modes: %s", error->message);
-        g_error_free (error);
-    }
+    if (error)
+        mm_obj_dbg (self, "couldn't load supported modes: %s", error->message);
 
     /* Go on to next step */
     ctx->step++;
@@ -4950,11 +4951,11 @@
 static void
 load_supported_bands_ready (MMIfaceModem *self,
                             GAsyncResult *res,
-                            GTask *task)
+                            GTask        *task)
 {
     InitializationContext *ctx;
-    GError *error = NULL;
-    GArray *bands_array;
+    g_autoptr(GError)      error = NULL;
+    GArray                *bands_array;
 
     ctx = g_task_get_task_data (task);
 
@@ -4966,10 +4967,8 @@
         g_array_unref (bands_array);
     }
 
-    if (error) {
-        mm_obj_warn (self, "couldn't load supported bands: %s", error->message);
-        g_error_free (error);
-    }
+    if (error)
+        mm_obj_dbg (self, "couldn't load supported bands: %s", error->message);
 
     /* Go on to next step */
     ctx->step++;
@@ -4979,11 +4978,11 @@
 static void
 load_supported_ip_families_ready (MMIfaceModem *self,
                                   GAsyncResult *res,
-                                  GTask *task)
+                                  GTask        *task)
 {
     InitializationContext *ctx;
-    GError *error = NULL;
-    MMBearerIpFamily ip_families;
+    g_autoptr(GError)      error = NULL;
+    MMBearerIpFamily       ip_families;
 
     ctx = g_task_get_task_data (task);
 
@@ -4992,10 +4991,8 @@
     if (ip_families != MM_BEARER_IP_FAMILY_NONE)
         mm_gdbus_modem_set_supported_ip_families (ctx->skeleton, ip_families);
 
-    if (error) {
-        mm_obj_warn (self, "couldn't load supported IP families: %s", error->message);
-        g_error_free (error);
-    }
+    if (error)
+        mm_obj_dbg (self, "couldn't load supported IP families: %s", error->message);
 
     /* Go on to next step */
     ctx->step++;
@@ -5007,12 +5004,12 @@
 static void
 load_current_modes_ready (MMIfaceModem *self,
                           GAsyncResult *res,
-                          GTask *task)
+                          GTask        *task)
 {
     InitializationContext *ctx;
-    MMModemMode allowed = MM_MODEM_MODE_NONE;
-    MMModemMode preferred = MM_MODEM_MODE_NONE;
-    GError *error = NULL;
+    MMModemMode            allowed = MM_MODEM_MODE_NONE;
+    MMModemMode            preferred = MM_MODEM_MODE_NONE;
+    g_autoptr(GError)      error = NULL;
 
     ctx = g_task_get_task_data (task);
 
@@ -5020,11 +5017,10 @@
                                                                          res,
                                                                          &allowed,
                                                                          &preferred,
-                                                                         &error)) {
+                                                                         &error))
         /* Errors when getting allowed/preferred won't be critical */
-        mm_obj_warn (self, "couldn't load current allowed/preferred modes: %s", error->message);
-        g_error_free (error);
-    } else
+        mm_obj_dbg (self, "couldn't load current allowed/preferred modes: %s", error->message);
+    else
         mm_gdbus_modem_set_current_modes (ctx->skeleton, g_variant_new ("(uu)", allowed, preferred));
 
     /* Done, Go on to next step */
@@ -5038,16 +5034,15 @@
                           GTask *task)
 {
     InitializationContext *ctx;
-    GArray *current_bands;
-    GError *error = NULL;
+    GArray                *current_bands;
+    g_autoptr(GError)      error = NULL;
 
     ctx = g_task_get_task_data (task);
 
     current_bands = MM_IFACE_MODEM_GET_INTERFACE (self)->load_current_bands_finish (self, res, &error);
     if (!current_bands) {
         /* Errors when getting current bands won't be critical */
-        mm_obj_warn (self, "couldn't load current bands: %s", error->message);
-        g_error_free (error);
+        mm_obj_dbg (self, "couldn't load current bands: %s", error->message);
     } else {
         GArray *filtered_bands;
         GArray *supported_bands;
@@ -5087,9 +5082,9 @@
 
     MM_IFACE_MODEM_GET_INTERFACE (self)->setup_sim_hot_swap_finish (self, res, &error);
     if (error)
-        mm_obj_warn (self, "SIM hot swap setup failed: %s", error->message);
+        mm_obj_info (self, "SIM hot swap setup failed: %s", error->message);
     else {
-        mm_obj_dbg (self, "SIM hot swap setup succeeded");
+        mm_obj_info (self, "SIM hot swap setup succeeded");
         priv->sim_hot_swap_configured = TRUE;
     }
 
@@ -5115,7 +5110,7 @@
                                                                      &sim_slots,
                                                                      &primary_sim_slot,
                                                                      &error))
-        mm_obj_warn (self, "couldn't query SIM slots: %s", error->message);
+        mm_obj_dbg (self, "couldn't query SIM slots: %s", error->message);
 
     if (sim_slots) {
         MMBaseSim     *primary_sim = NULL;
@@ -5177,8 +5172,7 @@
     /* NOTE: we already propagated the lock state, no need to do it again */
     mm_iface_modem_update_lock_info_finish (self, res, &ctx->fatal_error);
     if (ctx->fatal_error) {
-        g_prefix_error (&ctx->fatal_error,
-                        "Couldn't check unlock status: ");
+        g_prefix_error (&ctx->fatal_error, "Couldn't check unlock status: ");
         /* Jump to the last step */
         ctx->step = INITIALIZATION_STEP_LAST;
     } else
@@ -5228,22 +5222,20 @@
 }
 
 static void
-sim_reinit_ready (MMBaseSim *sim,
+sim_reinit_ready (MMBaseSim    *sim,
                   GAsyncResult *res,
-                  GTask *task)
+                  GTask        *task)
 {
     MMIfaceModem          *self;
     InitializationContext *ctx;
-    GError                *error = NULL;
+    g_autoptr(GError)      error = NULL;
 
     self = g_task_get_source_object (task);
     ctx  = g_task_get_task_data (task);
 
-    if (!mm_base_sim_initialize_finish (sim, res, &error)) {
+    if (!mm_base_sim_initialize_finish (sim, res, &error))
         mm_obj_warn (self, "SIM re-initialization failed: %s",
-                     error ? error->message : "Unknown error");
-        g_clear_error (&error);
-    }
+                     error ? error->message : "unknown error");
 
     /* Go on to next step */
     ctx->step++;
@@ -5256,14 +5248,12 @@
                             GTask        *task)
 {
     InitializationContext *ctx;
-    GError                *error = NULL;
+    g_autoptr(GError)      error = NULL;
 
     ctx = g_task_get_task_data (task);
 
-    if (!MM_IFACE_MODEM_GET_INTERFACE (self)->setup_carrier_config_finish (self, res, &error)) {
+    if (!MM_IFACE_MODEM_GET_INTERFACE (self)->setup_carrier_config_finish (self, res, &error))
         mm_obj_warn (self, "couldn't setup carrier config: %s", error->message);
-        g_error_free (error);
-    }
 
     /* Go on to next step */
     ctx->step++;
@@ -5276,20 +5266,17 @@
                            GTask        *task)
 {
     InitializationContext *ctx;
-    GError                *error = NULL;
-    gchar                 *name = NULL;
-    gchar                 *revision = NULL;
+    g_autoptr(GError)      error = NULL;
+    g_autofree gchar      *name = NULL;
+    g_autofree gchar      *revision = NULL;
 
     ctx = g_task_get_task_data (task);
 
-    if (!MM_IFACE_MODEM_GET_INTERFACE (self)->load_carrier_config_finish (self, res, &name, &revision, &error)) {
-        mm_obj_warn (self, "couldn't load carrier config: %s", error->message);
-        g_error_free (error);
-    } else {
+    if (!MM_IFACE_MODEM_GET_INTERFACE (self)->load_carrier_config_finish (self, res, &name, &revision, &error))
+        mm_obj_dbg (self, "couldn't load carrier config: %s", error->message);
+    else {
         mm_gdbus_modem_set_carrier_configuration          (ctx->skeleton, name);
         mm_gdbus_modem_set_carrier_configuration_revision (ctx->skeleton, revision);
-        g_free (name);
-        g_free (revision);
     }
 
     /* Go on to next step */
@@ -5303,21 +5290,17 @@
                         GTask *task)
 {
     InitializationContext *ctx;
-    GError *error = NULL;
-    GStrv str_list;
+    g_autoptr(GError)      error = NULL;
+    g_auto(GStrv)          str_list = NULL;
 
     ctx = g_task_get_task_data (task);
 
     str_list = MM_IFACE_MODEM_GET_INTERFACE (self)->load_own_numbers_finish (self, res, &error);
-    if (error) {
-        mm_obj_warn (self, "couldn't load list of own numbers: %s", error->message);
-        g_error_free (error);
-    }
+    if (error)
+        mm_obj_dbg (self, "couldn't load list of own numbers: %s", error->message);
 
-    if (str_list) {
+    if (str_list)
         mm_gdbus_modem_set_own_numbers (ctx->skeleton, (const gchar *const *) str_list);
-        g_strfreev (str_list);
-    }
 
     /* Go on to next step */
     ctx->step++;
diff --git a/src/mm-log-helpers.c b/src/mm-log-helpers.c
new file mode 100644
index 0000000..86e9a89
--- /dev/null
+++ b/src/mm-log-helpers.c
@@ -0,0 +1,76 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details:
+ *
+ * Copyright (C) 2022 Google, Inc.
+ */
+
+#include "mm-log-helpers.h"
+
+static void
+common_log_print_array (gpointer     log_object,
+                        MMLogLevel   level,
+                        const gchar *prefix,
+                        GPtrArray   *print_array)
+{
+    guint i;
+
+    mm_common_str_array_human_keys (print_array);
+    for (i = 0; i < print_array->len; i++) {
+        mm_obj_log (log_object, level, "%s%s", prefix,
+                    (const gchar *)g_ptr_array_index (print_array, i));
+    }
+}
+
+void
+mm_log_simple_connect_properties (gpointer                   log_object,
+                                  MMLogLevel                 level,
+                                  const gchar               *prefix,
+                                  MMSimpleConnectProperties *value)
+{
+    g_autoptr(GPtrArray) print_array = NULL;
+
+    if (!mm_log_check_level_enabled (level))
+      return;
+
+    print_array = mm_simple_connect_properties_print (value, mm_log_get_show_personal_info ());
+    common_log_print_array (log_object, level, prefix, print_array);
+}
+
+void
+mm_log_bearer_properties (gpointer            log_object,
+                          MMLogLevel          level,
+                          const gchar        *prefix,
+                          MMBearerProperties *value)
+{
+    g_autoptr(GPtrArray) print_array = NULL;
+
+    if (!mm_log_check_level_enabled (level))
+      return;
+
+    print_array = mm_bearer_properties_print (value, mm_log_get_show_personal_info ());
+    common_log_print_array (log_object, level, prefix, print_array);
+}
+
+void
+mm_log_3gpp_profile (gpointer       log_object,
+                     MMLogLevel     level,
+                     const gchar   *prefix,
+                     MM3gppProfile *value)
+{
+    g_autoptr(GPtrArray) print_array = NULL;
+
+    if (!mm_log_check_level_enabled (level))
+      return;
+
+    print_array = mm_3gpp_profile_print (value, mm_log_get_show_personal_info ());
+    common_log_print_array (log_object, level, prefix, print_array);
+}
diff --git a/src/mm-log-helpers.h b/src/mm-log-helpers.h
new file mode 100644
index 0000000..112b15e
--- /dev/null
+++ b/src/mm-log-helpers.h
@@ -0,0 +1,38 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details:
+ *
+ * Copyright (C) 2022 Google, Inc.
+ */
+
+#ifndef MM_LOG_HELPERS_H
+#define MM_LOG_HELPERS_H
+
+#include <ModemManager.h>
+#define _LIBMM_INSIDE_MM
+#include <libmm-glib.h>
+
+#include "mm-log.h"
+
+void mm_log_simple_connect_properties (gpointer                   log_object,
+                                       MMLogLevel                 level,
+                                       const gchar               *prefix,
+                                       MMSimpleConnectProperties *value);
+void mm_log_bearer_properties         (gpointer                   log_object,
+                                       MMLogLevel                 level,
+                                       const gchar               *prefix,
+                                       MMBearerProperties        *value);
+void mm_log_3gpp_profile              (gpointer                   log_object,
+                                       MMLogLevel                 level,
+                                       const gchar               *prefix,
+                                       MM3gppProfile             *value);
+
+#endif /* MM_LOG_HELPERS_H */
diff --git a/src/mm-log.c b/src/mm-log.c
index 26260b7..d5b80d9 100644
--- a/src/mm-log.c
+++ b/src/mm-log.c
@@ -28,6 +28,8 @@
 
 #include <ModemManager.h>
 #include <mm-errors-types.h>
+#define _LIBMM_INSIDE_MM
+#include <libmm-glib.h>
 
 #if defined WITH_QMI
 #include <libqmi-glib.h>
@@ -52,10 +54,11 @@
 };
 
 static gboolean ts_flags = TS_FLAG_NONE;
-static guint32  log_level = MM_LOG_LEVEL_INFO | MM_LOG_LEVEL_WARN | MM_LOG_LEVEL_ERR;
+static guint32  log_level = MM_LOG_LEVEL_MSG | MM_LOG_LEVEL_WARN | MM_LOG_LEVEL_ERR;
 static GTimeVal rel_start = { 0, 0 };
 static int      logfd = -1;
 static gboolean append_log_level_text = TRUE;
+static gboolean personal_info = FALSE;
 
 static void (*log_backend) (const char *loc,
                             const char *func,
@@ -71,8 +74,10 @@
 static const LogDesc level_descs[] = {
     { MM_LOG_LEVEL_ERR, "ERR" },
     { MM_LOG_LEVEL_WARN  | MM_LOG_LEVEL_ERR, "WARN" },
-    { MM_LOG_LEVEL_INFO  | MM_LOG_LEVEL_WARN | MM_LOG_LEVEL_ERR, "INFO" },
-    { MM_LOG_LEVEL_DEBUG | MM_LOG_LEVEL_INFO | MM_LOG_LEVEL_WARN | MM_LOG_LEVEL_ERR, "DEBUG" },
+    { MM_LOG_LEVEL_MSG   | MM_LOG_LEVEL_WARN | MM_LOG_LEVEL_ERR, "MSG" },
+    { MM_LOG_LEVEL_INFO  | MM_LOG_LEVEL_MSG  | MM_LOG_LEVEL_WARN | MM_LOG_LEVEL_ERR, "INFO" },
+    { MM_LOG_LEVEL_DEBUG | MM_LOG_LEVEL_INFO | MM_LOG_LEVEL_MSG  | MM_LOG_LEVEL_WARN | MM_LOG_LEVEL_ERR, "DEBUG" },
+    { 0, NULL }
 };
 
 static GString *msgbuf = NULL;
@@ -86,6 +91,8 @@
         return LOG_ERR;
     case MM_LOG_LEVEL_WARN:
         return LOG_WARNING;
+    case MM_LOG_LEVEL_MSG:
+        return LOG_NOTICE;
     case MM_LOG_LEVEL_INFO:
         return LOG_INFO;
     case MM_LOG_LEVEL_DEBUG:
@@ -112,6 +119,7 @@
     case G_LOG_LEVEL_WARNING:
         return MM_LOG_LEVEL_WARN;
     case G_LOG_LEVEL_MESSAGE:
+        return MM_LOG_LEVEL_MSG;
     case G_LOG_LEVEL_INFO:
         return MM_LOG_LEVEL_INFO;
     case G_LOG_LEVEL_DEBUG:
@@ -129,13 +137,15 @@
 {
     switch (level) {
     case MM_LOG_LEVEL_ERR:
-        return "<error>";
+        return "<err>";
     case MM_LOG_LEVEL_WARN:
-        return "<warn> ";
+        return "<wrn>";
+    case MM_LOG_LEVEL_MSG:
+        return "<msg>";
     case MM_LOG_LEVEL_INFO:
-        return "<info> ";
+        return "<inf>";
     case MM_LOG_LEVEL_DEBUG:
-        return "<debug>";
+        return "<dbg>";
     default:
         break;
     }
@@ -205,6 +215,18 @@
 }
 #endif
 
+gboolean
+mm_log_get_show_personal_info (void)
+{
+    return personal_info;
+}
+
+gboolean
+mm_log_check_level_enabled (MMLogLevel level)
+{
+    return (log_level & level);
+}
+
 void
 _mm_log (gpointer     obj,
          const gchar *module,
@@ -217,7 +239,7 @@
     va_list  args;
     GTimeVal tv;
 
-    if (!(log_level & level))
+    if (!mm_log_check_level_enabled (level))
         return;
 
     if (g_once_init_enter (&msgbuf_once)) {
@@ -324,6 +346,8 @@
     if (level && strlen (level) && !mm_log_set_level (level, error))
         return FALSE;
 
+    personal_info = show_personal_info;
+
     if (show_timestamps)
         ts_flags = TS_FLAG_WALL;
     else if (rel_timestamps)
@@ -393,3 +417,11 @@
     else
         close (logfd);
 }
+
+/******************************************************************************/
+
+const gchar *
+mm_log_str_personal_info (const gchar *str)
+{
+    return mm_common_str_personal_info (str, personal_info);
+}
diff --git a/src/mm-log.h b/src/mm-log.h
index 7eeee89..84e7596 100644
--- a/src/mm-log.h
+++ b/src/mm-log.h
@@ -24,28 +24,38 @@
 typedef enum {
     MM_LOG_LEVEL_ERR   = 0x00000001,
     MM_LOG_LEVEL_WARN  = 0x00000002,
-    MM_LOG_LEVEL_INFO  = 0x00000004,
-    MM_LOG_LEVEL_DEBUG = 0x00000008,
+    MM_LOG_LEVEL_MSG   = 0x00000004,
+    MM_LOG_LEVEL_INFO  = 0x00000008,
+    MM_LOG_LEVEL_DEBUG = 0x00000010,
 } MMLogLevel;
 
 #if !defined MM_MODULE_NAME
 # define MM_MODULE_NAME (const gchar *)NULL
 #endif
 
-#define mm_obj_err(obj, ...)  _mm_log (obj, MM_MODULE_NAME, G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_ERR,   ## __VA_ARGS__ )
-#define mm_obj_warn(obj, ...) _mm_log (obj, MM_MODULE_NAME, G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_WARN,  ## __VA_ARGS__ )
-#define mm_obj_info(obj, ...) _mm_log (obj, MM_MODULE_NAME, G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_INFO,  ## __VA_ARGS__ )
-#define mm_obj_dbg(obj, ...)  _mm_log (obj, MM_MODULE_NAME, G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_DEBUG, ## __VA_ARGS__ )
+#define mm_obj_log(obj, level, ...) _mm_log (obj, MM_MODULE_NAME, G_STRLOC, G_STRFUNC, level,              ## __VA_ARGS__ )
+#define mm_obj_err(obj, ...)        _mm_log (obj, MM_MODULE_NAME, G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_ERR,   ## __VA_ARGS__ )
+#define mm_obj_warn(obj, ...)       _mm_log (obj, MM_MODULE_NAME, G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_WARN,  ## __VA_ARGS__ )
+#define mm_obj_msg(obj, ...)        _mm_log (obj, MM_MODULE_NAME, G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_MSG,   ## __VA_ARGS__ )
+#define mm_obj_info(obj, ...)       _mm_log (obj, MM_MODULE_NAME, G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_INFO,  ## __VA_ARGS__ )
+#define mm_obj_dbg(obj, ...)        _mm_log (obj, MM_MODULE_NAME, G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_DEBUG, ## __VA_ARGS__ )
 
 /* only allow using non-object logging API if explicitly requested
  * (e.g. in the main daemon source) */
 #if defined MM_LOG_NO_OBJECT
 # define mm_err(...)  mm_obj_err  (NULL, ## __VA_ARGS__ )
 # define mm_warn(...) mm_obj_warn (NULL, ## __VA_ARGS__ )
+# define mm_msg(...)  mm_obj_msg  (NULL, ## __VA_ARGS__ )
 # define mm_info(...) mm_obj_info (NULL, ## __VA_ARGS__ )
 # define mm_dbg(...)  mm_obj_dbg  (NULL, ## __VA_ARGS__ )
 #endif
 
+#define mm_log_err_enabled()   mm_log_check_level_enabled (MM_LOG_LEVEL_ERR)
+#define mm_log_warn_enabled()  mm_log_check_level_enabled (MM_LOG_LEVEL_WARN)
+#define mm_log_msg_enabled()   mm_log_check_level_enabled (MM_LOG_LEVEL_MSG)
+#define mm_log_info_enabled()  mm_log_check_level_enabled (MM_LOG_LEVEL_INFO)
+#define mm_log_debug_enabled() mm_log_check_level_enabled (MM_LOG_LEVEL_DEBUG)
+
 void _mm_log (gpointer     obj,
               const gchar *module,
               const gchar *loc,
@@ -54,15 +64,22 @@
               const gchar *fmt,
               ...)  __attribute__((__format__ (__printf__, 6, 7)));
 
-gboolean mm_log_set_level (const gchar  *level,
-                           GError      **error);
-gboolean mm_log_setup     (const gchar  *level,
-                           const gchar  *log_file,
-                           gboolean      log_journal,
-                           gboolean      show_ts,
-                           gboolean      rel_ts,
-                           gboolean      show_personal_info,
-                           GError      **error);
-void     mm_log_shutdown  (void);
+gboolean mm_log_set_level              (const gchar  *level,
+                                        GError      **error);
+gboolean mm_log_setup                  (const gchar  *level,
+                                        const gchar  *log_file,
+                                        gboolean      log_journal,
+                                        gboolean      show_ts,
+                                        gboolean      rel_ts,
+                                        gboolean      show_personal_info,
+                                        GError      **error);
+gboolean mm_log_check_level_enabled    (MMLogLevel    level);
+gboolean mm_log_get_show_personal_info (void);
+void     mm_log_shutdown               (void);
+
+/* Helper used when printing a string that may be personal
+ * info. Depending on the settings, we may print it as-is,
+ * or otherwise provide a fallback string. */
+const gchar *mm_log_str_personal_info (const gchar *str);
 
 #endif  /* MM_LOG_H */
diff --git a/src/mm-modem-helpers-mbim.c b/src/mm-modem-helpers-mbim.c
index 3f5385b..da6a47d 100644
--- a/src/mm-modem-helpers-mbim.c
+++ b/src/mm-modem-helpers-mbim.c
@@ -135,7 +135,8 @@
 /*****************************************************************************/
 
 MMModemMode
-mm_modem_mode_from_mbim_data_class (MbimDataClass data_class)
+mm_modem_mode_from_mbim_data_class (MbimDataClass  data_class,
+                                    const gchar   *caps_custom_data_class)
 {
     MMModemMode mask = MM_MODEM_MODE_NONE;
 
@@ -152,6 +153,11 @@
     if (data_class & (MBIM_DATA_CLASS_5G_NSA |
                       MBIM_DATA_CLASS_5G_SA))
         mask |= MM_MODEM_MODE_5G;
+    /* Some modems (e.g. Telit FN990) reports MBIM custom data class "5G/TDS" */
+    if ((data_class & MBIM_DATA_CLASS_CUSTOM) && caps_custom_data_class) {
+        if (strstr (caps_custom_data_class, "5G"))
+            mask |= MM_MODEM_MODE_5G;
+    }
 
     /* 3GPP2... */
     if (data_class & MBIM_DATA_CLASS_1XRTT)
diff --git a/src/mm-modem-helpers-mbim.h b/src/mm-modem-helpers-mbim.h
index baf9a6b..d5ccfa3 100644
--- a/src/mm-modem-helpers-mbim.h
+++ b/src/mm-modem-helpers-mbim.h
@@ -38,7 +38,8 @@
 MbimDataClass mm_mbim_data_class_from_mbim_data_class_v3_and_subclass (MbimDataClassV3  data_class_v3,
                                                                        MbimDataSubclass data_subclass);
 
-MMModemMode mm_modem_mode_from_mbim_data_class (MbimDataClass data_class);
+MMModemMode mm_modem_mode_from_mbim_data_class (MbimDataClass  data_class,
+                                                const gchar   *caps_custom_data_class);
 
 MbimDataClass mm_mbim_data_class_from_modem_mode (MMModemMode modem_mode,
                                                   gboolean    is_3gpp,
diff --git a/src/mm-modem-helpers-qmi.c b/src/mm-modem-helpers-qmi.c
index 4e1705d..ff8f0bb 100644
--- a/src/mm-modem-helpers-qmi.c
+++ b/src/mm-modem-helpers-qmi.c
@@ -1517,6 +1517,628 @@
 
 /*****************************************************************************/
 
+static void
+process_common_info (const gchar                   *info_name,
+                     QmiNasServiceStatus            service_status,
+                     gboolean                       domain_valid,
+                     QmiNasNetworkServiceDomain     domain,
+                     gboolean                       roaming_status_valid,
+                     QmiNasRoamingStatus            roaming_status,
+                     gboolean                       forbidden_valid,
+                     gboolean                       forbidden,
+                     gboolean                       lac_valid,
+                     guint16                        lac,
+                     gboolean                       tac_valid,
+                     guint16                        tac,
+                     gboolean                       cid_valid,
+                     guint32                        cid,
+                     gboolean                       network_id_valid,
+                     const gchar                   *mcc,
+                     const gchar                   *mnc,
+                     MMModem3gppRegistrationState  *out_cs_registration_state,
+                     MMModem3gppRegistrationState  *out_ps_registration_state,
+                     guint16                       *out_lac,
+                     guint16                       *out_tac,
+                     guint32                       *out_cid,
+                     gchar                        **out_operator_id,
+                     gpointer                       log_object)
+{
+#define SET_OUTPUT(OUT, VAL) do { \
+        if (OUT)                  \
+            *(OUT) = (VAL);       \
+    } while (0)
+
+    /* If power save service status reported the modem is not actively searching
+     * for a network, therefore "idle". */
+    if (service_status == QMI_NAS_SERVICE_STATUS_POWER_SAVE) {
+        SET_OUTPUT (out_cs_registration_state, MM_MODEM_3GPP_REGISTRATION_STATE_IDLE);
+        SET_OUTPUT (out_ps_registration_state, MM_MODEM_3GPP_REGISTRATION_STATE_IDLE);
+        return;
+    }
+
+    /* If no service status reported, the modem is actively searching for a
+     * network, therefore "searching". */
+    if (service_status == QMI_NAS_SERVICE_STATUS_NONE) {
+        SET_OUTPUT (out_cs_registration_state, MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING);
+        SET_OUTPUT (out_ps_registration_state, MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING);
+        return;
+    }
+
+    /* When forbidden, the service status is usually reported as 'limited' or
+     * 'limited-regional', e.g. allowing only emergency calls. If the
+     * forbidden flag is explicitly reported, we report 'denied', otherwise
+     * 'emergency-services-only' */
+    if (forbidden_valid && forbidden) {
+        SET_OUTPUT (out_cs_registration_state, MM_MODEM_3GPP_REGISTRATION_STATE_DENIED);
+        SET_OUTPUT (out_ps_registration_state, MM_MODEM_3GPP_REGISTRATION_STATE_DENIED);
+    } else if (service_status == QMI_NAS_SERVICE_STATUS_LIMITED ||
+               service_status == QMI_NAS_SERVICE_STATUS_LIMITED_REGIONAL) {
+        SET_OUTPUT (out_cs_registration_state, MM_MODEM_3GPP_REGISTRATION_STATE_EMERGENCY_ONLY);
+        SET_OUTPUT (out_ps_registration_state, MM_MODEM_3GPP_REGISTRATION_STATE_EMERGENCY_ONLY);
+    }
+    /* On a successful registration (either home or roaming) we require a valid
+     * domain and "available" service status */
+    else if (domain_valid &&
+             domain != QMI_NAS_NETWORK_SERVICE_DOMAIN_UNKNOWN &&
+             domain != QMI_NAS_NETWORK_SERVICE_DOMAIN_NONE &&
+             service_status == QMI_NAS_SERVICE_STATUS_AVAILABLE) {
+        MMModem3gppRegistrationState tmp_registration_state;
+
+        if (roaming_status_valid && roaming_status == QMI_NAS_ROAMING_STATUS_ON)
+            tmp_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING;
+        else
+            tmp_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_HOME;
+
+        if (domain == QMI_NAS_NETWORK_SERVICE_DOMAIN_CS) {
+            SET_OUTPUT (out_cs_registration_state, tmp_registration_state);
+            SET_OUTPUT (out_ps_registration_state, MM_MODEM_3GPP_REGISTRATION_STATE_IDLE);
+        } else if (domain == QMI_NAS_NETWORK_SERVICE_DOMAIN_PS) {
+            SET_OUTPUT (out_cs_registration_state, MM_MODEM_3GPP_REGISTRATION_STATE_IDLE);
+            SET_OUTPUT (out_ps_registration_state, tmp_registration_state);
+        } else if (domain == QMI_NAS_NETWORK_SERVICE_DOMAIN_CS_PS) {
+            SET_OUTPUT (out_cs_registration_state, tmp_registration_state);
+            SET_OUTPUT (out_ps_registration_state, tmp_registration_state);
+        }
+
+        /* If we're registered either at home or roaming, try to get LAC/CID */
+        if (lac_valid)
+            SET_OUTPUT (out_lac, lac);
+        if (tac_valid)
+            SET_OUTPUT (out_tac, tac);
+        if (cid_valid)
+            SET_OUTPUT (out_cid, cid);
+    } else {
+        /* Issue a warning in case this ever happens and this logic needs to be updated */
+        mm_obj_warn (log_object, "unexpected %s system info: domain valid %s, domain %s, service status %s",
+                     info_name,
+                     domain_valid ? "yes" : "no",
+                     qmi_nas_network_service_domain_get_string (domain),
+                     qmi_nas_service_status_get_string (service_status));
+        return;
+    }
+
+    /* Network ID report also in the case of registration denial */
+    if (network_id_valid) {
+        *out_operator_id = g_malloc0 (7);
+        memcpy (*out_operator_id, mcc, 3);
+        if ((guint8)mnc[2] == 0xFF)
+            memcpy (&((*out_operator_id)[3]), mnc, 2);
+         else
+            memcpy (&((*out_operator_id)[3]), mnc, 3);
+    }
+}
+
+static void
+process_gsm_info (QmiMessageNasGetSystemInfoOutput *response_output,
+                  QmiIndicationNasSystemInfoOutput *indication_output,
+                  MMModem3gppRegistrationState     *out_cs_registration_state,
+                  MMModem3gppRegistrationState     *out_ps_registration_state,
+                  guint16                          *out_lac,
+                  guint32                          *out_cid,
+                  gchar                           **out_operator_id,
+                  gpointer                          log_object)
+{
+    QmiNasServiceStatus         service_status = QMI_NAS_SERVICE_STATUS_NONE;
+    gboolean                    domain_valid = FALSE;
+    QmiNasNetworkServiceDomain  domain = QMI_NAS_NETWORK_SERVICE_DOMAIN_UNKNOWN;
+    gboolean                    roaming_status_valid = FALSE;
+    QmiNasRoamingStatus         roaming_status = QMI_NAS_ROAMING_STATUS_OFF;
+    gboolean                    forbidden_valid = FALSE;
+    gboolean                    forbidden = FALSE;
+    gboolean                    lac_valid = FALSE;
+    guint16                     lac = 0;
+    gboolean                    cid_valid = FALSE;
+    guint32                     cid = 0;
+    gboolean                    network_id_valid = FALSE;
+    const gchar                *mcc = NULL;
+    const gchar                *mnc = NULL;
+
+    if (response_output) {
+        /* if service status info not given, ACT is unsupported */
+        if (!qmi_message_nas_get_system_info_output_get_gsm_service_status (
+                response_output,
+                &service_status,
+                NULL, /* true_service_status */
+                NULL, /* preferred_data_path */
+                NULL))
+            return;
+
+        qmi_message_nas_get_system_info_output_get_gsm_system_info_v2 (
+            response_output,
+            &domain_valid,         &domain,
+            NULL, NULL, /* service_capability */
+            &roaming_status_valid, &roaming_status,
+            &forbidden_valid,      &forbidden,
+            &lac_valid,            &lac,
+            &cid_valid,            &cid,
+            NULL, NULL, NULL, /* registration_reject_info */
+            &network_id_valid,     &mcc, &mnc,
+            NULL, NULL, /* egprs support */
+            NULL, NULL, /* dtm_support */
+            NULL);
+    } else if (indication_output) {
+        /* if service status info not given, ACT is unsupported */
+        if (!qmi_indication_nas_system_info_output_get_gsm_service_status (
+                indication_output,
+                &service_status,
+                NULL, /* true_service_status */
+                NULL, /* preferred_data_path */
+                NULL))
+            return;
+
+        qmi_indication_nas_system_info_output_get_gsm_system_info_v2 (
+            indication_output,
+            &domain_valid,         &domain,
+            NULL, NULL, /* service_capability */
+            &roaming_status_valid, &roaming_status,
+            &forbidden_valid,      &forbidden,
+            &lac_valid,            &lac,
+            &cid_valid,            &cid,
+            NULL, NULL, NULL, /* registration_reject_info */
+            &network_id_valid,     &mcc, &mnc,
+            NULL, NULL, /* egprs support */
+            NULL, NULL, /* dtm_support */
+            NULL);
+    } else
+        g_assert_not_reached ();
+
+    process_common_info ("GSM",
+                         service_status,
+                         domain_valid,         domain,
+                         roaming_status_valid, roaming_status,
+                         forbidden_valid,      forbidden,
+                         lac_valid,            lac,
+                         FALSE,                0,
+                         cid_valid,            cid,
+                         network_id_valid,     mcc, mnc,
+                         out_cs_registration_state,
+                         out_ps_registration_state,
+                         out_lac,
+                         NULL, /* out_tac */
+                         out_cid,
+                         out_operator_id,
+                         log_object);
+}
+
+static void
+process_wcdma_info (QmiMessageNasGetSystemInfoOutput *response_output,
+                    QmiIndicationNasSystemInfoOutput *indication_output,
+                    MMModem3gppRegistrationState     *out_cs_registration_state,
+                    MMModem3gppRegistrationState     *out_ps_registration_state,
+                    guint16                          *out_lac,
+                    guint32                          *out_cid,
+                    gchar                           **out_operator_id,
+                    gpointer                          log_object)
+{
+    QmiNasServiceStatus         service_status = QMI_NAS_SERVICE_STATUS_NONE;
+    gboolean                    domain_valid = FALSE;
+    QmiNasNetworkServiceDomain  domain = QMI_NAS_NETWORK_SERVICE_DOMAIN_UNKNOWN;
+    gboolean                    roaming_status_valid = FALSE;
+    QmiNasRoamingStatus         roaming_status = QMI_NAS_ROAMING_STATUS_OFF;
+    gboolean                    forbidden_valid = FALSE;
+    gboolean                    forbidden = FALSE;
+    gboolean                    lac_valid = FALSE;
+    guint16                     lac = 0;
+    gboolean                    cid_valid = FALSE;
+    guint32                     cid = 0;
+    gboolean                    network_id_valid = FALSE;
+    const gchar                *mcc = NULL;
+    const gchar                *mnc = NULL;
+
+    if (response_output) {
+        /* if service status info not given, ACT is unsupported */
+        if (!qmi_message_nas_get_system_info_output_get_wcdma_service_status (
+                response_output,
+                &service_status,
+                NULL, /* true_service_status */
+                NULL, /* preferred_data_path */
+                NULL))
+            return;
+
+        qmi_message_nas_get_system_info_output_get_wcdma_system_info_v2 (
+            response_output,
+            &domain_valid,         &domain,
+            NULL, NULL, /* service_capability */
+            &roaming_status_valid, &roaming_status,
+            &forbidden_valid,      &forbidden,
+            &lac_valid,            &lac,
+            &cid_valid,            &cid,
+            NULL, NULL, NULL, /* registration_reject_info */
+            &network_id_valid,     &mcc, &mnc,
+            NULL, NULL, /* hs_call_status */
+            NULL, NULL, /* hs_service */
+            NULL, NULL, /* primary_scrambling_code */
+            NULL);
+    } else if (indication_output) {
+        /* if service status info not given, ACT is unsupported */
+        if (!qmi_indication_nas_system_info_output_get_wcdma_service_status (
+                indication_output,
+                &service_status,
+                NULL, /* true_service_status */
+                NULL, /* preferred_data_path */
+                NULL))
+            return;
+
+        qmi_indication_nas_system_info_output_get_wcdma_system_info_v2 (
+            indication_output,
+            &domain_valid,         &domain,
+            NULL, NULL, /* service_capability */
+            &roaming_status_valid, &roaming_status,
+            &forbidden_valid,      &forbidden,
+            &lac_valid,            &lac,
+            &cid_valid,            &cid,
+            NULL, NULL, NULL, /* registration_reject_info */
+            &network_id_valid,     &mcc, &mnc,
+            NULL, NULL, /* hs_call_status */
+            NULL, NULL, /* hs_service */
+            NULL, NULL, /* primary_scrambling_code */
+            NULL);
+    } else
+        g_assert_not_reached ();
+
+    process_common_info ("WCDMA",
+                         service_status,
+                         domain_valid,         domain,
+                         roaming_status_valid, roaming_status,
+                         forbidden_valid,      forbidden,
+                         lac_valid,            lac,
+                         FALSE,                0,
+                         cid_valid,            cid,
+                         network_id_valid,     mcc, mnc,
+                         out_cs_registration_state,
+                         out_ps_registration_state,
+                         out_lac,
+                         NULL, /* out_tac */
+                         out_cid,
+                         out_operator_id,
+                         log_object);
+}
+
+static void
+process_lte_info (QmiMessageNasGetSystemInfoOutput *response_output,
+                  QmiIndicationNasSystemInfoOutput *indication_output,
+                  MMModem3gppRegistrationState     *out_eps_registration_state,
+                  guint16                          *out_tac,
+                  guint32                          *out_cid,
+                  gchar                           **out_operator_id,
+                  gboolean                         *out_endc_available,
+                  gpointer                          log_object)
+{
+    QmiNasServiceStatus         service_status = QMI_NAS_SERVICE_STATUS_NONE;
+    gboolean                    domain_valid = FALSE;
+    QmiNasNetworkServiceDomain  domain = QMI_NAS_NETWORK_SERVICE_DOMAIN_UNKNOWN;
+    gboolean                    roaming_status_valid = FALSE;
+    QmiNasRoamingStatus         roaming_status = QMI_NAS_ROAMING_STATUS_OFF;
+    gboolean                    forbidden_valid = FALSE;
+    gboolean                    forbidden = FALSE;
+    gboolean                    tac_valid = FALSE;
+    guint16                     tac = 0;
+    gboolean                    cid_valid = FALSE;
+    guint32                     cid = 0;
+    gboolean                    network_id_valid = FALSE;
+    const gchar                *mcc = NULL;
+    const gchar                *mnc = NULL;
+
+    if (response_output) {
+        /* if service status info not given, ACT is unsupported */
+        if (!qmi_message_nas_get_system_info_output_get_lte_service_status (
+                response_output,
+                &service_status,
+                NULL, /* true_service_status */
+                NULL, /* preferred_data_path */
+                NULL))
+            return;
+
+        qmi_message_nas_get_system_info_output_get_lte_system_info_v2 (
+            response_output,
+            &domain_valid,         &domain,
+            NULL, NULL, /* service_capability */
+            &roaming_status_valid, &roaming_status,
+            &forbidden_valid,      &forbidden,
+            NULL, NULL, /* lac */
+            &cid_valid,            &cid,
+            NULL, NULL, NULL, /* registration_reject_info */
+            &network_id_valid,     &mcc, &mnc,
+            &tac_valid,            &tac,
+            NULL);
+
+        qmi_message_nas_get_system_info_output_get_eutra_with_nr5g_availability (
+            response_output,
+            out_endc_available,
+            NULL);
+    } else if (indication_output) {
+        /* if service status info not given, ACT is unsupported */
+        if (!qmi_indication_nas_system_info_output_get_lte_service_status (
+                indication_output,
+                &service_status,
+                NULL, /* true_service_status */
+                NULL, /* preferred_data_path */
+                NULL))
+            return;
+
+        qmi_indication_nas_system_info_output_get_lte_system_info_v2 (
+            indication_output,
+            &domain_valid,         &domain,
+            NULL, NULL, /* service_capability */
+            &roaming_status_valid, &roaming_status,
+            &forbidden_valid,      &forbidden,
+            NULL, NULL, /* lac */
+            &cid_valid,            &cid,
+            NULL, NULL, NULL, /* registration_reject_info */
+            &network_id_valid,     &mcc, &mnc,
+            &tac_valid,            &tac,
+            NULL);
+
+        qmi_indication_nas_system_info_output_get_eutra_with_nr5g_availability (
+            indication_output,
+            out_endc_available,
+            NULL);
+    } else
+        g_assert_not_reached ();
+
+    process_common_info ("LTE",
+                         service_status,
+                         domain_valid,         domain,
+                         roaming_status_valid, roaming_status,
+                         forbidden_valid,      forbidden,
+                         FALSE,                0,
+                         tac_valid,            tac,
+                         cid_valid,            cid,
+                         network_id_valid,     mcc, mnc,
+                         NULL, /* out_cs_registration_state */
+                         out_eps_registration_state,
+                         NULL, /* out_lac */
+                         out_tac,
+                         out_cid,
+                         out_operator_id,
+                         log_object);
+}
+
+static void
+process_nr5g_info (QmiMessageNasGetSystemInfoOutput *response_output,
+                   QmiIndicationNasSystemInfoOutput *indication_output,
+                   MMModem3gppRegistrationState     *out_5gs_registration_state,
+                   guint16                          *out_tac,
+                   guint32                          *out_cid,
+                   gchar                           **out_operator_id,
+                   gpointer                          log_object)
+{
+    QmiNasServiceStatus         service_status = QMI_NAS_SERVICE_STATUS_NONE;
+    gboolean                    domain_valid = FALSE;
+    QmiNasNetworkServiceDomain  domain = QMI_NAS_NETWORK_SERVICE_DOMAIN_UNKNOWN;
+    gboolean                    roaming_status_valid = FALSE;
+    QmiNasRoamingStatus         roaming_status = QMI_NAS_ROAMING_STATUS_OFF;
+    gboolean                    forbidden_valid = FALSE;
+    gboolean                    forbidden = FALSE;
+    gboolean                    tac_valid = FALSE;
+    guint16                     tac = 0;
+    gboolean                    cid_valid = FALSE;
+    guint32                     cid = 0;
+    gboolean                    network_id_valid = FALSE;
+    const gchar                *mcc = NULL;
+    const gchar                *mnc = NULL;
+
+    if (response_output) {
+        /* if service status info not given, ACT is unsupported */
+        if (!qmi_message_nas_get_system_info_output_get_nr5g_service_status_info (
+                response_output,
+                &service_status,
+                NULL, /* true_service_status */
+                NULL, /* preferred_data_path */
+                NULL))
+            return;
+
+        qmi_message_nas_get_system_info_output_get_nr5g_system_info (
+            response_output,
+            &domain_valid,         &domain,
+            NULL, NULL, /* service_capability */
+            &roaming_status_valid, &roaming_status,
+            &forbidden_valid,      &forbidden,
+            NULL, NULL, /* lac */
+            &cid_valid,            &cid,
+            NULL, NULL, NULL, /* registration_reject_info */
+            &network_id_valid,     &mcc, &mnc,
+            &tac_valid,            &tac,
+            NULL);
+    } else if (indication_output) {
+        /* if service status info not given, ACT is unsupported */
+        if (!qmi_indication_nas_system_info_output_get_nr5g_service_status_info (
+                indication_output,
+                &service_status,
+                NULL, /* true_service_status */
+                NULL, /* preferred_data_path */
+                NULL))
+            return;
+
+        qmi_indication_nas_system_info_output_get_nr5g_system_info (
+            indication_output,
+            &domain_valid,         &domain,
+            NULL, NULL, /* service_capability */
+            &roaming_status_valid, &roaming_status,
+            &forbidden_valid,      &forbidden,
+            NULL, NULL, /* lac */
+            &cid_valid,            &cid,
+            NULL, NULL, NULL, /* registration_reject_info */
+            &network_id_valid,     &mcc, &mnc,
+            &tac_valid,            &tac,
+            NULL);
+    } else
+        g_assert_not_reached ();
+
+    process_common_info ("NR5G",
+                         service_status,
+                         domain_valid,         domain,
+                         roaming_status_valid, roaming_status,
+                         forbidden_valid,      forbidden,
+                         FALSE,                0,
+                         tac_valid,            tac,
+                         cid_valid,            cid,
+                         network_id_valid,     mcc, mnc,
+                         NULL, /* cs_registration_state */
+                         out_5gs_registration_state,
+                         NULL, /* out_lac */
+                         out_tac,
+                         out_cid,
+                         out_operator_id,
+                         log_object);
+}
+
+static MMModem3gppRegistrationState
+unregistered_state_fallback (MMModem3gppRegistrationState umts_state,
+                             MMModem3gppRegistrationState gsm_state)
+{
+    /* For 3G and 2G unregistered states, we will select SEARCHING if one of them
+     * reports it, otherwise DENIED if one of the reports it, and otherwise
+     * the 3G one if not unknown and finally the 2G one otherwise. */
+    if (umts_state == MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING || gsm_state == MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING)
+        return MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING;
+    if (umts_state == MM_MODEM_3GPP_REGISTRATION_STATE_DENIED || gsm_state == MM_MODEM_3GPP_REGISTRATION_STATE_DENIED)
+        return MM_MODEM_3GPP_REGISTRATION_STATE_DENIED;
+    if (umts_state != MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN)
+        return umts_state;
+    return gsm_state;
+}
+
+void
+mm_modem_registration_state_from_qmi_system_info (QmiMessageNasGetSystemInfoOutput *response_output,
+                                                  QmiIndicationNasSystemInfoOutput *indication_output,
+                                                  MMModem3gppRegistrationState     *out_cs_registration_state,
+                                                  MMModem3gppRegistrationState     *out_ps_registration_state,
+                                                  MMModem3gppRegistrationState     *out_eps_registration_state,
+                                                  MMModem3gppRegistrationState     *out_5gs_registration_state,
+                                                  guint16                          *out_lac,
+                                                  guint16                          *out_tac,
+                                                  guint32                          *out_cid,
+                                                  gchar                           **out_operator_id,
+                                                  MMModemAccessTechnology          *out_act,
+                                                  gpointer                          log_object)
+{
+    MMModem3gppRegistrationState  gsm_cs_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
+    MMModem3gppRegistrationState  gsm_ps_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
+    MMModem3gppRegistrationState  wcdma_cs_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
+    MMModem3gppRegistrationState  wcdma_ps_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
+    MMModem3gppRegistrationState  lte_eps_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
+    MMModem3gppRegistrationState  nr5g_5gs_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
+    g_autofree gchar             *gsm_operator_id = NULL;
+    g_autofree gchar             *wcdma_operator_id = NULL;
+    g_autofree gchar             *lte_operator_id = NULL;
+    g_autofree gchar             *nr5g_operator_id = NULL;
+    guint16                       gsm_lac = 0;
+    guint32                       gsm_cid = 0;
+    guint16                       wcdma_lac = 0;
+    guint32                       wcdma_cid = 0;
+    guint16                       lte_tac = 0;
+    guint32                       lte_cid = 0;
+    guint16                       nr5g_tac = 0;
+    guint32                       nr5g_cid = 0;
+    gboolean                      endc_available = FALSE;
+    gboolean                      reg_info_set = FALSE;
+
+    /* Reset outputs */
+    *out_cs_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
+    *out_ps_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
+    *out_eps_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
+    *out_5gs_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
+    *out_lac = 0;
+    *out_tac = 0;
+    *out_cid = 0;
+    *out_operator_id = NULL;
+    *out_act = MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN;
+
+    process_nr5g_info (response_output, indication_output,
+                       &nr5g_5gs_registration_state,
+                       &nr5g_tac, &nr5g_cid, &nr5g_operator_id,
+                       log_object);
+
+    process_lte_info (response_output, indication_output,
+                      &lte_eps_registration_state,
+                      &lte_tac, &lte_cid, &lte_operator_id,
+                      &endc_available, log_object);
+
+    process_wcdma_info (response_output, indication_output,
+                        &wcdma_cs_registration_state, &wcdma_ps_registration_state,
+                        &wcdma_lac, &wcdma_cid, &wcdma_operator_id,
+                        log_object);
+
+    process_gsm_info (response_output, indication_output,
+                      &gsm_cs_registration_state, &gsm_ps_registration_state,
+                      &gsm_lac, &gsm_cid, &gsm_operator_id,
+                      log_object);
+
+#define REG_INFO_SET(TAC,LAC,CID,OPERATOR_ID)                \
+    if (!reg_info_set) {                                     \
+        reg_info_set = TRUE;                                 \
+        *out_tac = (TAC);                                    \
+        *out_lac = (LAC);                                    \
+        *out_cid = (CID);                                    \
+        *out_operator_id = g_steal_pointer (&(OPERATOR_ID)); \
+    }
+
+    /* Process 5G data */
+    *out_5gs_registration_state = nr5g_5gs_registration_state;
+    if (mm_modem_3gpp_registration_state_is_registered (nr5g_5gs_registration_state)) {
+        REG_INFO_SET (nr5g_tac, 0, nr5g_cid, nr5g_operator_id)
+        *out_act |= MM_MODEM_ACCESS_TECHNOLOGY_5GNR;
+    }
+
+    /* Process 4G data */
+    *out_eps_registration_state = lte_eps_registration_state;
+    if (mm_modem_3gpp_registration_state_is_registered (lte_eps_registration_state)) {
+        REG_INFO_SET (lte_tac, 0, lte_cid, lte_operator_id)
+        *out_act |= MM_MODEM_ACCESS_TECHNOLOGY_LTE;
+        if (endc_available)
+            *out_act |= MM_MODEM_ACCESS_TECHNOLOGY_5GNR;
+    }
+
+    /* Process 2G/3G data */
+    if (mm_modem_3gpp_registration_state_is_registered (wcdma_ps_registration_state)) {
+        *out_ps_registration_state = wcdma_ps_registration_state;
+        *out_act |= MM_MODEM_ACCESS_TECHNOLOGY_UMTS;
+        REG_INFO_SET (0, wcdma_lac, wcdma_cid, wcdma_operator_id)
+    } else if (mm_modem_3gpp_registration_state_is_registered (gsm_ps_registration_state)) {
+        *out_ps_registration_state = gsm_ps_registration_state;
+        *out_act |= MM_MODEM_ACCESS_TECHNOLOGY_GPRS;
+        REG_INFO_SET (0, gsm_lac, gsm_cid, gsm_operator_id)
+    } else {
+        *out_ps_registration_state = unregistered_state_fallback (wcdma_ps_registration_state, gsm_ps_registration_state);
+    }
+    if (mm_modem_3gpp_registration_state_is_registered (wcdma_cs_registration_state)) {
+        *out_cs_registration_state = wcdma_cs_registration_state;
+        *out_act |= MM_MODEM_ACCESS_TECHNOLOGY_UMTS;
+        REG_INFO_SET (0, wcdma_lac, wcdma_cid, wcdma_operator_id)
+    } else if (mm_modem_3gpp_registration_state_is_registered (gsm_cs_registration_state)) {
+        *out_cs_registration_state = gsm_cs_registration_state;
+        *out_act |= MM_MODEM_ACCESS_TECHNOLOGY_GSM;
+        REG_INFO_SET (0, gsm_lac, gsm_cid, gsm_operator_id)
+    } else {
+        *out_cs_registration_state = unregistered_state_fallback (wcdma_cs_registration_state, gsm_cs_registration_state);
+    }
+
+#undef REG_INFO_SET
+}
+
+/*****************************************************************************/
+
 QmiWmsStorageType
 mm_sms_storage_to_qmi_storage_type (MMSmsStorage storage)
 {
diff --git a/src/mm-modem-helpers-qmi.h b/src/mm-modem-helpers-qmi.h
index 92e8f21..51110d7 100644
--- a/src/mm-modem-helpers-qmi.h
+++ b/src/mm-modem-helpers-qmi.h
@@ -112,6 +112,22 @@
 MMModemCdmaActivationState mm_modem_cdma_activation_state_from_qmi_activation_state (QmiDmsActivationState state);
 
 /*****************************************************************************/
+/* QMI NAS System Info processor */
+
+void mm_modem_registration_state_from_qmi_system_info (QmiMessageNasGetSystemInfoOutput *response_output,
+                                                       QmiIndicationNasSystemInfoOutput *indication_output,
+                                                       MMModem3gppRegistrationState     *out_cs_registration_state,
+                                                       MMModem3gppRegistrationState     *out_ps_registration_state,
+                                                       MMModem3gppRegistrationState     *out_eps_registration_state,
+                                                       MMModem3gppRegistrationState     *out_5gs_registration_state,
+                                                       guint16                          *out_lac,
+                                                       guint16                          *out_tac,
+                                                       guint32                          *out_cid,
+                                                       gchar                           **out_operator_id,
+                                                       MMModemAccessTechnology          *out_act,
+                                                       gpointer                          log_object);
+
+/*****************************************************************************/
 /* QMI/WMS to MM translations */
 
 QmiWmsStorageType mm_sms_storage_to_qmi_storage_type (MMSmsStorage storage);
diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c
index 93d9fda..7b24354 100644
--- a/src/mm-modem-helpers.c
+++ b/src/mm-modem-helpers.c
@@ -800,6 +800,30 @@
 
 /*************************************************************************/
 
+gboolean
+mm_modem_3gpp_registration_state_is_registered (MMModem3gppRegistrationState state)
+{
+    switch (state) {
+        case MM_MODEM_3GPP_REGISTRATION_STATE_HOME:
+        case MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING:
+        case MM_MODEM_3GPP_REGISTRATION_STATE_HOME_SMS_ONLY:
+        case MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING_SMS_ONLY:
+        case MM_MODEM_3GPP_REGISTRATION_STATE_EMERGENCY_ONLY:
+        case MM_MODEM_3GPP_REGISTRATION_STATE_HOME_CSFB_NOT_PREFERRED:
+        case MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING_CSFB_NOT_PREFERRED:
+        case MM_MODEM_3GPP_REGISTRATION_STATE_ATTACHED_RLOS:
+            return TRUE;
+        case MM_MODEM_3GPP_REGISTRATION_STATE_IDLE:
+        case MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING:
+        case MM_MODEM_3GPP_REGISTRATION_STATE_DENIED:
+        case MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN:
+        default:
+            return FALSE;
+    }
+}
+
+/*************************************************************************/
+
 static const gchar *creg_regex[] = {
     /* +CREG: <stat>                      (GSM 07.07 CREG=1 unsolicited) */
     [0] = "\\+(CREG|CGREG|CEREG|C5GREG):\\s*0*([0-9])",
diff --git a/src/mm-modem-helpers.h b/src/mm-modem-helpers.h
index c04d0e0..87199aa 100644
--- a/src/mm-modem-helpers.h
+++ b/src/mm-modem-helpers.h
@@ -126,6 +126,8 @@
 /* 3GPP specific helpers and utilities */
 /*****************************************************************************/
 
+gboolean mm_modem_3gpp_registration_state_is_registered (MMModem3gppRegistrationState state);
+
 /* Common Regex getters */
 GPtrArray *mm_3gpp_creg_regex_get     (gboolean solicited);
 void       mm_3gpp_creg_regex_destroy (GPtrArray *array);
diff --git a/src/mm-port-mbim.c b/src/mm-port-mbim.c
index 5748c15..7dcdda5 100644
--- a/src/mm-port-mbim.c
+++ b/src/mm-port-mbim.c
@@ -451,10 +451,10 @@
         g_error_free (error);
         g_clear_object (&self->priv->qmi_device);
         /* Ignore error and complete */
-        mm_obj_info (self, "MBIM device is not QMI capable");
+        mm_obj_msg (self, "MBIM device is not QMI capable");
         self->priv->qmi_supported = FALSE;
     } else {
-        mm_obj_info (self, "MBIM device is QMI capable");
+        mm_obj_msg (self, "MBIM device is QMI capable");
     }
 
     self->priv->in_progress = FALSE;
@@ -477,7 +477,7 @@
         mm_obj_dbg (self, "error: couldn't create QmiDevice: %s", error->message);
         g_error_free (error);
         /* Ignore error and complete */
-        mm_obj_info (self, "MBIM device is not QMI capable");
+        mm_obj_msg (self, "MBIM device is not QMI capable");
         self->priv->qmi_supported = FALSE;
         self->priv->in_progress = FALSE;
         g_task_return_boolean (task, TRUE);
@@ -546,7 +546,7 @@
     file = G_FILE (g_task_get_task_data (task));
 
     if (!file || !self->priv->qmi_supported) {
-        mm_obj_info (self, "MBIM device is not QMI capable");
+        mm_obj_msg (self, "MBIM device is not QMI capable");
         self->priv->in_progress = FALSE;
         g_task_return_boolean (task, TRUE);
         g_object_unref (task);
diff --git a/src/mm-port-qmi.c b/src/mm-port-qmi.c
index b4001c9..41f6033 100644
--- a/src/mm-port-qmi.c
+++ b/src/mm-port-qmi.c
@@ -2397,7 +2397,7 @@
 
 #if defined WITH_QRTR
         if (self->priv->node) {
-            mm_obj_info (self, "Creating QMI device from QRTR node...");
+            mm_obj_dbg (self, "Creating QMI device from QRTR node...");
             qmi_device_new_from_node (self->priv->node,
                                       g_task_get_cancellable (task),
                                       (GAsyncReadyCallback) qmi_device_new_ready,
diff --git a/src/mm-qrtr-bus-watcher.c b/src/mm-qrtr-bus-watcher.c
index ee0cb28..de7e6dd 100644
--- a/src/mm-qrtr-bus-watcher.c
+++ b/src/mm-qrtr-bus-watcher.c
@@ -83,7 +83,7 @@
         return;
     }
 
-    mm_obj_info (ctx->self, "qrtr services ready for node %u", node_id);
+    mm_obj_dbg (ctx->self, "qrtr services ready for node %u", node_id);
     g_signal_emit (ctx->self, signals[QRTR_DEVICE_ADDED], 0, node_id);
     device_context_free (ctx);
 }
@@ -152,7 +152,7 @@
     }
 
     g_hash_table_remove (self->priv->nodes, GUINT_TO_POINTER (node_id));
-    mm_obj_info (self, "qrtr node %u removed", node_id);
+    mm_obj_dbg (self, "qrtr node %u removed", node_id);
 
     g_signal_emit (self, signals[QRTR_DEVICE_REMOVED], 0, node_id);
 }
diff --git a/src/mm-shared-qmi.c b/src/mm-shared-qmi.c
index 3091312..a98352e 100644
--- a/src/mm-shared-qmi.c
+++ b/src/mm-shared-qmi.c
@@ -2141,7 +2141,7 @@
     if (!output || !qmi_message_dms_set_operating_mode_output_get_result (output, &error)) {
         g_task_return_error (task, error);
     } else {
-        mm_obj_info (self, "rebooting now");
+        mm_obj_msg (self, "rebooting now");
         g_task_return_boolean (task, TRUE);
     }
 
@@ -2632,8 +2632,8 @@
         g_assert (config_fallback_i >= 0);
 
         config = &g_array_index (priv->config_list, ConfigInfo, config_fallback_i);
-        mm_obj_info (self, "using fallback carrier configuration '%s' (version 0x%08x, size %u bytes)",
-                     config->description, config->version, config->total_size);
+        mm_obj_dbg (self, "using fallback carrier configuration '%s' (version 0x%08x, size %u bytes)",
+                    config->description, config->version, config->total_size);
 
         g_free (ctx->config_requested);
         ctx->config_requested = config_fallback;
@@ -2679,7 +2679,7 @@
         g_assert (ctx->config_requested_i >= 0);
         g_assert (priv->config_active_i >= 0 || priv->config_active_default);
         if (ctx->config_requested_i == priv->config_active_i) {
-            mm_obj_info (self, "carrier config switching not needed: already using '%s'", ctx->config_requested);
+            mm_obj_msg (self, "carrier config switching not needed: already using '%s'", ctx->config_requested);
             ctx->step = SETUP_CARRIER_CONFIG_STEP_LAST;
             setup_carrier_config_step (task);
             return;
@@ -3490,7 +3490,7 @@
         else
             g_task_return_error (task, g_steal_pointer (&error));
     } else {
-        mm_obj_info (self, "SIM slot switch operation request successful");
+        mm_obj_msg (self, "SIM slot switch operation request successful");
         g_task_return_boolean (task, TRUE);
     }
     g_object_unref (task);
@@ -6891,8 +6891,8 @@
 
     ctx->i += count;
 
-    mm_obj_info (self, "injecting xtra data: %" G_GSIZE_FORMAT " bytes (%u/%u)",
-                 count, (guint) ctx->n_part, (guint) ctx->total_parts);
+    mm_obj_dbg (self, "injecting xtra data: %" G_GSIZE_FORMAT " bytes (%u/%u)",
+                count, (guint) ctx->n_part, (guint) ctx->total_parts);
     qmi_client_loc_inject_xtra_data (ctx->client,
                                      input,
                                      10,
@@ -7044,8 +7044,8 @@
 
     ctx->i += count;
 
-    mm_obj_info (self, "injecting predicted orbits data: %" G_GSIZE_FORMAT " bytes (%u/%u)",
-                 count, (guint) ctx->n_part, (guint) ctx->total_parts);
+    mm_obj_dbg (self, "injecting predicted orbits data: %" G_GSIZE_FORMAT " bytes (%u/%u)",
+                count, (guint) ctx->n_part, (guint) ctx->total_parts);
     qmi_client_loc_inject_predicted_orbits_data (ctx->client,
                                                  input,
                                                  10,
diff --git a/src/mm-sleep-monitor-powerd.c b/src/mm-sleep-monitor-powerd.c
index 8f2d7ad..093b9de 100644
--- a/src/mm-sleep-monitor-powerd.c
+++ b/src/mm-sleep-monitor-powerd.c
@@ -81,10 +81,10 @@
 
     if (proxy == self->pd_proxy) {
         if (strcmp (signalname, "SuspendImminent") == 0) {
-            mm_obj_info (self, "system suspend signal from powerd");
+            mm_obj_msg (self, "system suspend signal from powerd");
             g_signal_emit (self, signals[SLEEPING], 0);
         } else if (strcmp (signalname, "SuspendDone") == 0) {
-            mm_obj_info (self, "system resume signal from powerd");
+            mm_obj_msg (self, "system resume signal from powerd");
             g_signal_emit (self, signals[RESUMING], 0);
         }
     }
diff --git a/src/mm-sleep-monitor-systemd.c b/src/mm-sleep-monitor-systemd.c
index a65aac4..9981438 100644
--- a/src/mm-sleep-monitor-systemd.c
+++ b/src/mm-sleep-monitor-systemd.c
@@ -148,11 +148,11 @@
     g_variant_get (args, "(b)", &is_about_to_suspend);
 
     if (is_about_to_suspend) {
-        mm_obj_info (self, "system is about to suspend");
+        mm_obj_msg (self, "system is about to suspend");
         g_signal_emit (self, signals[SLEEPING], 0);
         drop_inhibitor (self);
     } else {
-        mm_obj_info (self, "system is resuming");
+        mm_obj_msg (self, "system is resuming");
         take_inhibitor (self);
         g_signal_emit (self, signals[RESUMING], 0);
     }
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
deleted file mode 100644
index 617d612..0000000
--- a/src/tests/Makefile.am
+++ /dev/null
@@ -1,68 +0,0 @@
-
-include $(top_srcdir)/gtester.make
-
-################################################################################
-# common
-################################################################################
-
-AM_CFLAGS = \
-	$(WARN_CFLAGS) \
-	$(MM_CFLAGS) \
-	$(CODE_COVERAGE_CFLAGS) \
-	-I$(top_srcdir) \
-	-I$(top_srcdir)/include \
-	-I$(top_builddir)/include \
-	-I$(top_srcdir)/libqcdm/src \
-	-I$(top_srcdir)/libmm-glib \
-	-I${top_builddir}/libmm-glib/generated \
-	-I${top_srcdir}/src/ \
-	-I${top_builddir}/src/ \
-	-I${top_srcdir}/src/kerneldevice \
-	-DTESTUDEVRULESDIR=\"${top_srcdir}/src/\" \
-	$(NULL)
-
-LDADD = \
-	$(top_builddir)/src/libhelpers.la \
-	$(top_builddir)/src/libport.la \
-	$(top_builddir)/src/libkerneldevice.la \
-	$(NULL)
-
-AM_LDFLAGS = \
-	$(WARN_LDFLAGS) \
-	$(MM_LIBS) \
-	$(CODE_COVERAGE_LDFLAGS) \
-	-lutil \
-	$(NULL)
-
-if WITH_QMI
-AM_CFLAGS  += $(QMI_CFLAGS)
-AM_LDFLAGS += $(QMI_LIBS)
-endif
-
-if WITH_MBIM
-AM_CFLAGS  += $(MBIM_CFLAGS)
-AM_LDFLAGS += $(MBIM_LIBS)
-endif
-
-################################################################################
-# tests
-#  note: we abuse AM_LDFLAGS to include the libraries being tested
-################################################################################
-
-noinst_PROGRAMS = \
-	test-modem-helpers \
-	test-charsets \
-	test-qcdm-serial-port \
-	test-at-serial-port \
-	test-sms-part-3gpp \
-	test-sms-part-cdma \
-	test-udev-rules \
-	test-error-helpers \
-	test-kernel-device-helpers \
-	$(NULL)
-
-if WITH_QMI
-noinst_PROGRAMS += test-modem-helpers-qmi
-endif
-
-TEST_PROGS += $(noinst_PROGRAMS)
diff --git a/src/tests/test-modem-helpers-qmi.c b/src/tests/test-modem-helpers-qmi.c
index 544e6bf..07e2e1b 100644
--- a/src/tests/test-modem-helpers-qmi.c
+++ b/src/tests/test-modem-helpers-qmi.c
@@ -1332,6 +1332,581 @@
 }
 
 /*****************************************************************************/
+/* System Info processor helper */
+
+static void
+common_test_registration_state_from_qmi_system_info (const guint8                 *data,
+                                                     gsize                         data_size,
+                                                     MMModem3gppRegistrationState  expected_registration_state_cs,
+                                                     MMModem3gppRegistrationState  expected_registration_state_ps,
+                                                     MMModem3gppRegistrationState  expected_registration_state_eps,
+                                                     MMModem3gppRegistrationState  expected_registration_state_5gs,
+                                                     guint16                       expected_lac,
+                                                     guint16                       expected_tac,
+                                                     guint32                       expected_cid,
+                                                     const gchar                  *expected_operator_id,
+                                                     MMModemAccessTechnology       expected_act)
+{
+    g_autoptr(GByteArray)                       buffer = NULL;
+    g_autoptr(GError)                           error = NULL;
+    g_autoptr(QmiMessage)                       message = NULL;
+    g_autoptr(QmiMessageNasGetSystemInfoOutput) output = NULL;
+    MMModem3gppRegistrationState                registration_state_cs = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
+    MMModem3gppRegistrationState                registration_state_ps = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
+    MMModem3gppRegistrationState                registration_state_eps = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
+    MMModem3gppRegistrationState                registration_state_5gs = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
+    guint16                                     lac = 0;
+    guint16                                     tac = 0;
+    guint32                                     cid = 0;
+    g_autofree gchar                           *operator_id = NULL;
+    MMModemAccessTechnology                     act = MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN;
+
+    buffer = g_byte_array_append (g_byte_array_new (), data, data_size);
+    message = qmi_message_new_from_raw (buffer, &error);
+    g_assert_no_error (error);
+    g_assert (message);
+
+    output = qmi_message_nas_get_system_info_response_parse (message, &error);
+    g_assert_no_error (error);
+    g_assert (output);
+
+    mm_modem_registration_state_from_qmi_system_info (output, NULL,
+                                                      &registration_state_cs,
+                                                      &registration_state_ps,
+                                                      &registration_state_eps,
+                                                      &registration_state_5gs,
+                                                      &lac,
+                                                      &tac,
+                                                      &cid,
+                                                      &operator_id,
+                                                      &act,
+                                                      NULL); /* log_object */
+
+    g_assert_cmpuint (registration_state_cs, ==, expected_registration_state_cs);
+    g_assert_cmpuint (registration_state_ps, ==, expected_registration_state_ps);
+    g_assert_cmpuint (registration_state_eps, ==, expected_registration_state_eps);
+    g_assert_cmpuint (registration_state_5gs, ==, expected_registration_state_5gs);
+    g_assert_cmpuint (lac, ==, expected_lac);
+    g_assert_cmpuint (tac, ==, expected_tac);
+    g_assert_cmpuint (cid, ==, expected_cid);
+    g_assert_cmpstr (operator_id, ==, expected_operator_id);
+    g_assert_cmpuint (act, ==, expected_act);
+}
+
+static void
+test_registration_state_from_qmi_system_info_2g_searching (void)
+{
+    static const guint8 data[] = {
+        0x01, 0x19, 0x00, 0x80, /* marker (1 byte), qmux length (2 bytes), qmux flags (1 byte) */
+        0x03, /* service: NAS */
+        0x02, /* client id */
+        0x02, /* service flags */
+        0x01, 0x00, /* transaction */
+        0x4D, 0x00, /* message id */
+        0x0D, 0x00, /* all tlvs length */
+        /* TLV 0x02: Result */
+        0x02, /* tlv type */
+        0x04, 0x00, /* tlv size */
+        0x00, 0x00, 0x00, 0x00,
+        /* TLV 0x12: GSM Service Status*/
+        0x12, /* tlv type */
+        0x03, 0x00, /* tlv size */
+        0x00, 0x00, 0x00, /* [ service_status = 'none' true_service_status = 'none' preferred_data_path = 'no' ] */
+    };
+
+    common_test_registration_state_from_qmi_system_info (data, G_N_ELEMENTS (data),
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING, /* cs */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING, /* ps */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN,   /* eps */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN,   /* 5gs */
+                                                         0, /* lac */
+                                                         0, /* tac */
+                                                         0, /* cid */
+                                                         NULL, /* operator id */
+                                                         MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN);
+}
+
+static void
+test_registration_state_from_qmi_system_info_2g_idle (void)
+{
+    static const guint8 data[] = {
+        0x01, 0x19, 0x00, 0x80, /* marker (1 byte), qmux length (2 bytes), qmux flags (1 byte) */
+        0x03, /* service: NAS */
+        0x02, /* client id */
+        0x02, /* service flags */
+        0x01, 0x00, /* transaction */
+        0x4D, 0x00, /* message id */
+        0x0D, 0x00, /* all tlvs length */
+        /* TLV 0x02: Result */
+        0x02, /* tlv type */
+        0x04, 0x00, /* tlv size */
+        0x00, 0x00, 0x00, 0x00,
+        /* TLV 0x12: GSM Service Status*/
+        0x12, /* tlv type */
+        0x03, 0x00, /* tlv size */
+        0x04, 0x00, 0x00, /* [ service_status = 'power-save' true_service_status = 'none' preferred_data_path = 'no' ] */
+    };
+
+    common_test_registration_state_from_qmi_system_info (data, G_N_ELEMENTS (data),
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_IDLE,    /* cs */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_IDLE,    /* ps */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN, /* eps */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN, /* 5gs */
+                                                         0, /* lac */
+                                                         0, /* tac */
+                                                         0, /* cid */
+                                                         NULL, /* operator id */
+                                                         MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN);
+}
+
+static void
+test_registration_state_from_qmi_system_info_2g_cs_home (void)
+{
+    static const guint8 data[] = {
+        0x01, 0x3A, 0x00, 0x80, /* marker (1 byte), qmux length (2 bytes), qmux flags (1 byte) */
+        0x03, /* service: NAS */
+        0x02, /* client id */
+        0x02, /* service flags */
+        0x01, 0x00, /* transaction */
+        0x4D, 0x00, /* message id */
+        0x2E, 0x00, /* all tlvs length */
+        /* TLV 0x02: Result */
+        0x02, /* tlv type */
+        0x04, 0x00, /* tlv size */
+        0x00, 0x00, 0x00, 0x00,
+        /* TLV 0x12: GSM Service Status*/
+        0x12, /* tlv type */
+        0x03, 0x00, /* tlv size */
+        0x02, 0x00, 0x00, /* [ service_status = 'available' true_service_status = 'none' preferred_data_path = 'no' ] */
+        /* TLV 0x17: GSM System Info */
+        0x17, /* tlv type */
+        0x1E, 0x00, /* tlv size: 30 bytes */
+        /* [ domain_valid = 'yes' domain = 'cs' service_capability_valid = 'yes' service_capability = 'cs'
+         * roaming_status_valid = 'yes' roaming_status = 'off' forbidden_valid = 'yes' forbidden = 'no'
+         * lac_valid = 'yes' lac = '7' cid_valid = 'yes' cid = '105217' registration_reject_info_valid = 'no'
+         * registration_reject_domain = 'none' registration_reject_cause = 'none' network_id_valid = 'yes'
+         * mcc = '901' mnc = '701' egprs_support_valid = 'no' egprs_support = 'no' dtm_support_valid = 'no',
+         * dtm_support = 'no'] */
+        0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00,
+        0x01, 0x07, 0x00, 0x01, 0x01, 0x9B, 0x01, 0x00,
+        0x00, 0x00, 0x00, 0x01, 0x39, 0x30, 0x31, 0x37,
+        0x30, 0xFF, 0x00, 0x00, 0x00, 0x00
+    };
+
+    common_test_registration_state_from_qmi_system_info (data, G_N_ELEMENTS (data),
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_HOME,    /* cs */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_IDLE,    /* ps */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN, /* eps */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN, /* 5gs */
+                                                         7, /* lac */
+                                                         0, /* tac */
+                                                         0x019B01, /* cid */
+                                                         "90170", /* operator id */
+                                                         MM_MODEM_ACCESS_TECHNOLOGY_GSM);
+}
+
+static void
+test_registration_state_from_qmi_system_info_2g3g_searching (void)
+{
+    static const guint8 data[] = {
+        0x01, 0x1F, 0x00, 0x80, /* marker (1 byte), qmux length (2 bytes), qmux flags (1 byte) */
+        0x03, /* service: NAS */
+        0x02, /* client id */
+        0x02, /* service flags */
+        0x01, 0x00, /* transaction */
+        0x4D, 0x00, /* message id */
+        0x13, 0x00, /* all tlvs length */
+        /* TLV 0x02: Result */
+        0x02, /* tlv type */
+        0x04, 0x00, /* tlv size */
+        0x00, 0x00, 0x00, 0x00,
+        /* TLV 0x12: GSM Service Status*/
+        0x12, /* tlv type */
+        0x03, 0x00, /* tlv size */
+        0x00, 0x00, 0x00, /* [ service_status = 'none' true_service_status = 'none' preferred_data_path = 'no' ] */
+        /* TLV 0x13: WCDMA Service Status */
+        0x13, /* tlv type */
+        0x03, 0x00, /* tlv size */
+        0x00, 0x00, 0x00, /* [ service_status = 'none' true_service_status = 'none' preferred_data_path = 'no' ] */
+    };
+
+    common_test_registration_state_from_qmi_system_info (data, G_N_ELEMENTS (data),
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING, /* cs */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING, /* ps */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN,   /* eps */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN,   /* 5gs */
+                                                         0, /* lac */
+                                                         0, /* tac */
+                                                         0, /* cid */
+                                                         NULL, /* operator id */
+                                                         MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN);
+}
+
+static void
+test_registration_state_from_qmi_system_info_2g3g_idle (void)
+{
+    static const guint8 data[] = {
+        0x01, 0x1F, 0x00, 0x80, /* marker (1 byte), qmux length (2 bytes), qmux flags (1 byte) */
+        0x03, /* service: NAS */
+        0x02, /* client id */
+        0x02, /* service flags */
+        0x01, 0x00, /* transaction */
+        0x4D, 0x00, /* message id */
+        0x13, 0x00, /* all tlvs length */
+        /* TLV 0x02: Result */
+        0x02, /* tlv type */
+        0x04, 0x00, /* tlv size */
+        0x00, 0x00, 0x00, 0x00,
+        /* TLV 0x12: GSM Service Status*/
+        0x12, /* tlv type */
+        0x03, 0x00, /* tlv size */
+        0x04, 0x00, 0x00, /* [ service_status = 'power-save' true_service_status = 'none' preferred_data_path = 'no' ] */
+        /* TLV 0x13: WCDMA Service Status */
+        0x13, /* tlv type */
+        0x03, 0x00, /* tlv size */
+        0x04, 0x00, 0x00, /* [ service_status = 'power-save' true_service_status = 'none' preferred_data_path = 'no' ] */
+    };
+
+    common_test_registration_state_from_qmi_system_info (data, G_N_ELEMENTS (data),
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_IDLE,    /* cs */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_IDLE,    /* ps */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN, /* eps */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN, /* 5gs */
+                                                         0, /* lac */
+                                                         0, /* tac */
+                                                         0, /* cid */
+                                                         NULL, /* operator id */
+                                                         MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN);
+}
+
+static void
+test_registration_state_from_qmi_system_info_2g3g_ps_home (void)
+{
+    static const guint8 data[] = {
+        0x01, 0x43, 0x00, 0x80, /* marker (1 byte), qmux length (2 bytes), qmux flags (1 byte) */
+        0x03, /* service: NAS */
+        0x02, /* client id */
+        0x02, /* service flags */
+        0x01, 0x00, /* transaction */
+        0x4D, 0x00, /* message id */
+        0x37, 0x00, /* all tlvs length */
+        /* TLV 0x02: Result */
+        0x02, /* tlv type */
+        0x04, 0x00, /* tlv size */
+        0x00, 0x00, 0x00, 0x00,
+        /* TLV 0x12: GSM Service Status*/
+        0x12, /* tlv type */
+        0x03, 0x00, /* tlv size */
+        0x00, 0x00, 0x00, /* [ service_status = 'none' true_service_status = 'none' preferred_data_path = 'no' ] */
+        /* TLV 0x13: WCDMA Service Status */
+        0x13, /* tlv type */
+        0x03, 0x00, /* tlv size */
+        0x02, 0x00, 0x00, /* [ service_status = 'available' true_service_status = 'none' preferred_data_path = 'no' ] */
+        /* TLV 0x18: WCDMA System Info */
+        0x18, /* tlv type */
+        0x21, 0x00, /* tlv size: 33 bytes */
+        /* [ domain_valid = 'yes' domain = 'ps' service_capability_valid = 'yes' service_capability = 'ps'
+         * roaming_status_valid = 'yes' roaming_status = 'off' forbidden_valid = 'yes' forbidden = 'no'
+         * lac_valid = 'yes' lac = '7' cid_valid = 'yes' cid = '105217' registration_reject_info_valid = 'no'
+         * registration_reject_domain = 'none' registration_reject_cause = 'none' network_id_valid = 'yes'
+         * mcc = '901' mnc = '701' hs_call_status_valid = 'no' hs_call_stauts = '' hs_service_valid = 'yes',
+         * primary_scrambling_code_valid = 'yes' primary_scrambling_code = '255'] */
+        0x01, 0x02, 0x01, 0x02, 0x01, 0x00, 0x01, 0x00,
+        0x01, 0x07, 0x00, 0x01, 0x01, 0x9B, 0x01, 0x00,
+        0x00, 0x00, 0x00, 0x01, 0x39, 0x30, 0x31, 0x37,
+        0x30, 0xFF, 0x01, 0x00, 0x01, 0x00, 0x01, 0xFF,
+        0x00
+    };
+
+    common_test_registration_state_from_qmi_system_info (data, G_N_ELEMENTS (data),
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING, /* cs (from GSM) */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_HOME,      /* ps (from UMTS) */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN,   /* eps */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN,   /* 5gs */
+                                                         7, /* lac */
+                                                         0, /* tac */
+                                                         0x019B01, /* cid */
+                                                         "90170", /* operator id */
+                                                         MM_MODEM_ACCESS_TECHNOLOGY_UMTS);
+}
+
+static void
+test_registration_state_from_qmi_system_info_2g3g_csps_home (void)
+{
+    static const guint8 data[] = {
+        0x01, 0x43, 0x00, 0x80, /* marker (1 byte), qmux length (2 bytes), qmux flags (1 byte) */
+        0x03, /* service: NAS */
+        0x02, /* client id */
+        0x02, /* service flags */
+        0x01, 0x00, /* transaction */
+        0x4D, 0x00, /* message id */
+        0x37, 0x00, /* all tlvs length */
+        /* TLV 0x02: Result */
+        0x02, /* tlv type */
+        0x04, 0x00, /* tlv size */
+        0x00, 0x00, 0x00, 0x00,
+        /* TLV 0x12: GSM Service Status*/
+        0x12, /* tlv type */
+        0x03, 0x00, /* tlv size */
+        0x00, 0x00, 0x00, /* [ service_status = 'none' true_service_status = 'none' preferred_data_path = 'no' ] */
+        /* TLV 0x13: WCDMA Service Status */
+        0x13, /* tlv type */
+        0x03, 0x00, /* tlv size */
+        0x02, 0x00, 0x00, /* [ service_status = 'available' true_service_status = 'none' preferred_data_path = 'no' ] */
+        /* TLV 0x18: WCDMA System Info */
+        0x18, /* tlv type */
+        0x21, 0x00, /* tlv size: 33 bytes */
+        /* [ domain_valid = 'yes' domain = 'cs-ps' service_capability_valid = 'yes' service_capability = 'cs-ps'
+         * roaming_status_valid = 'yes' roaming_status = 'off' forbidden_valid = 'yes' forbidden = 'no'
+         * lac_valid = 'yes' lac = '7' cid_valid = 'yes' cid = '105217' registration_reject_info_valid = 'no'
+         * registration_reject_domain = 'none' registration_reject_cause = 'none' network_id_valid = 'yes'
+         * mcc = '901' mnc = '701' hs_call_status_valid = 'no' hs_call_stauts = '' hs_service_valid = 'yes',
+         * primary_scrambling_code_valid = 'yes' primary_scrambling_code = '255'] */
+        0x01, 0x03, 0x01, 0x03, 0x01, 0x00, 0x01, 0x00,
+        0x01, 0x07, 0x00, 0x01, 0x01, 0x9B, 0x01, 0x00,
+        0x00, 0x00, 0x00, 0x01, 0x39, 0x30, 0x31, 0x37,
+        0x30, 0xFF, 0x01, 0x00, 0x01, 0x00, 0x01, 0xFF,
+        0x00
+    };
+
+    common_test_registration_state_from_qmi_system_info (data, G_N_ELEMENTS (data),
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_HOME,    /* cs */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_HOME,    /* ps */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN, /* eps */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN, /* 5gs */
+                                                         7, /* lac */
+                                                         0, /* tac */
+                                                         0x019B01, /* cid */
+                                                         "90170", /* operator id */
+                                                         MM_MODEM_ACCESS_TECHNOLOGY_UMTS);
+}
+
+static void
+test_registration_state_from_qmi_system_info_2g3g4g_searching (void)
+{
+    static const guint8 data[] = {
+        0x01, 0x25, 0x00, 0x80, /* marker (1 byte), qmux length (2 bytes), qmux flags (1 byte) */
+        0x03, /* service: NAS */
+        0x02, /* client id */
+        0x02, /* service flags */
+        0x01, 0x00, /* transaction */
+        0x4D, 0x00, /* message id */
+        0x19, 0x00, /* all tlvs length */
+        /* TLV 0x02: Result */
+        0x02, /* tlv type */
+        0x04, 0x00, /* tlv size */
+        0x00, 0x00, 0x00, 0x00,
+        /* TLV 0x12: GSM Service Status*/
+        0x12, /* tlv type */
+        0x03, 0x00, /* tlv size */
+        0x00, 0x00, 0x00, /* [ service_status = 'none' true_service_status = 'none' preferred_data_path = 'no' ] */
+        /* TLV 0x13: WCDMA Service Status */
+        0x13, /* tlv type */
+        0x03, 0x00, /* tlv size */
+        0x00, 0x00, 0x00, /* [ service_status = 'none' true_service_status = 'none' preferred_data_path = 'no' ] */
+        /* TLV 0x14: LTE Service Status */
+        0x14, /* tlv type */
+        0x03, 0x00, /* tlv size */
+        0x00, 0x00, 0x00, /* [ service_status = 'none' true_service_status = 'none' preferred_data_path = 'no' ] */
+    };
+
+    common_test_registration_state_from_qmi_system_info (data, G_N_ELEMENTS (data),
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING, /* cs */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING, /* ps */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING, /* eps */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN,   /* 5gs */
+                                                         0, /* lac */
+                                                         0, /* tac */
+                                                         0, /* cid */
+                                                         NULL, /* operator id */
+                                                         MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN);
+}
+
+static void
+test_registration_state_from_qmi_system_info_2g3g4g_idle (void)
+{
+    static const guint8 data[] = {
+        0x01, 0x25, 0x00, 0x80, /* marker (1 byte), qmux length (2 bytes), qmux flags (1 byte) */
+        0x03, /* service: NAS */
+        0x02, /* client id */
+        0x02, /* service flags */
+        0x01, 0x00, /* transaction */
+        0x4D, 0x00, /* message id */
+        0x19, 0x00, /* all tlvs length */
+        /* TLV 0x02: Result */
+        0x02, /* tlv type */
+        0x04, 0x00, /* tlv size */
+        0x00, 0x00, 0x00, 0x00,
+        /* TLV 0x12: GSM Service Status*/
+        0x12, /* tlv type */
+        0x03, 0x00, /* tlv size */
+        0x04, 0x00, 0x00, /* [ service_status = 'power-save' true_service_status = 'none' preferred_data_path = 'no' ] */
+        /* TLV 0x13: WCDMA Service Status */
+        0x13, /* tlv type */
+        0x03, 0x00, /* tlv size */
+        0x04, 0x00, 0x00, /* [ service_status = 'power-save' true_service_status = 'none' preferred_data_path = 'no' ] */
+        /* TLV 0x14: LTE Service Status */
+        0x14, /* tlv type */
+        0x03, 0x00, /* tlv size */
+        0x04, 0x00, 0x00, /* [ service_status = 'power-save' true_service_status = 'none' preferred_data_path = 'no' ] */
+    };
+
+    common_test_registration_state_from_qmi_system_info (data, G_N_ELEMENTS (data),
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_IDLE,    /* cs */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_IDLE,    /* ps */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_IDLE,    /* eps */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN, /* 5gs */
+                                                         0, /* lac */
+                                                         0, /* tac */
+                                                         0, /* cid */
+                                                         NULL, /* operator id */
+                                                         MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN);
+}
+
+static void
+test_registration_state_from_qmi_system_info_2g3g4g_eps_home (void)
+{
+    static const guint8 data[] = {
+        0x01, 0x45, 0x00, 0x80, /* marker (1 byte), qmux length (2 bytes), qmux flags (1 byte) */
+        0x03, /* service: NAS */
+        0x02, /* client id */
+        0x02, /* service flags */
+        0x01, 0x00, /* transaction */
+        0x4D, 0x00, /* message id */
+        0x39, 0x00, /* all tlvs length */
+        /* TLV 0x02: Result */
+        0x02, /* tlv type */
+        0x04, 0x00, /* tlv size */
+        0x00, 0x00, 0x00, 0x00,
+        /* TLV 0x12: GSM Service Status*/
+        0x12, /* tlv type */
+        0x03, 0x00, /* tlv size */
+        0x00, 0x00, 0x00, /* [ service_status = 'none' true_service_status = 'none' preferred_data_path = 'no' ] */
+        /* TLV 0x13: WCDMA Service Status */
+        0x13, /* tlv type */
+        0x03, 0x00, /* tlv size */
+        0x00, 0x00, 0x00, /* [ service_status = 'none' true_service_status = 'none' preferred_data_path = 'no' ] */
+        /* TLV 0x14: LTE Service Status */
+        0x14, /* tlv type */
+        0x03, 0x00, /* tlv size */
+        0x02, 0x00, 0x00, /* [ service_status = 'available' true_service_status = 'none' preferred_data_path = 'no' ] */
+        /* TLV 0x19: LTE System Info */
+        0x19, /* tlv type */
+        0x1D, 0x00, /* tlv size: 29 bytes */
+        /* [ domain_valid = 'yes' domain = 'ps' service_capability_valid = 'yes' service_capability = 'ps'
+         * roaming_status_valid = 'yes' roaming_status = 'off' forbidden_valid = 'yes' forbidden = 'no'
+         * lac_valid = 'no' lac = '65535' cid_valid = 'yes' cid = '105217' registration_reject_info_valid = 'no'
+         * registration_reject_domain = 'none' registration_reject_cause = 'none' network_id_valid = 'yes'
+         * mcc = '901' mnc = '701' tac_valid = 'yes' tac = '7' ] */
+        0x01, 0x02, 0x01, 0x02, 0x01, 0x00, 0x01, 0x00,
+        0x00, 0xFF, 0xFF, 0x01, 0x01, 0x9B, 0x01, 0x00,
+        0x00, 0x00, 0x00, 0x01, 0x39, 0x30, 0x31, 0x37,
+        0x30, 0xFF, 0x01, 0x07, 0x00,
+    };
+
+    common_test_registration_state_from_qmi_system_info (data, G_N_ELEMENTS (data),
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING, /* cs */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING, /* ps */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_HOME, /* eps */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN, /* 5gs */
+                                                         0, /* lac */
+                                                         7, /* tac */
+                                                         0x019B01, /* cid */
+                                                         "90170", /* operator id */
+                                                         MM_MODEM_ACCESS_TECHNOLOGY_LTE);
+}
+
+static void
+test_registration_state_from_qmi_system_info_4g_eps_home (void)
+{
+    static const guint8 data[] = {
+        0x01, 0x39, 0x00, 0x80, /* marker (1 byte), qmux length (2 bytes), qmux flags (1 byte) */
+        0x03, /* service: NAS */
+        0x02, /* client id */
+        0x02, /* service flags */
+        0x01, 0x00, /* transaction */
+        0x4D, 0x00, /* message id */
+        0x2D, 0x00, /* all tlvs length */
+        /* TLV 0x02: Result */
+        0x02, /* tlv type */
+        0x04, 0x00, /* tlv size */
+        0x00, 0x00, 0x00, 0x00,
+        /* TLV 0x14: LTE Service Status */
+        0x14, /* tlv type */
+        0x03, 0x00, /* tlv size */
+        0x02, 0x00, 0x00, /* [ service_status = 'available' true_service_status = 'none' preferred_data_path = 'no' ] */
+        /* TLV 0x19: LTE System Info */
+        0x19, /* tlv type */
+        0x1D, 0x00, /* tlv size: 29 bytes */
+        /* [ domain_valid = 'yes' domain = 'ps' service_capability_valid = 'yes' service_capability = 'ps'
+         * roaming_status_valid = 'yes' roaming_status = 'off' forbidden_valid = 'yes' forbidden = 'no'
+         * lac_valid = 'no' lac = '65535' cid_valid = 'yes' cid = '105217' registration_reject_info_valid = 'no'
+         * registration_reject_domain = 'none' registration_reject_cause = 'none' network_id_valid = 'yes'
+         * mcc = '901' mnc = '701' tac_valid = 'yes' tac = '7' ] */
+        0x01, 0x02, 0x01, 0x02, 0x01, 0x00, 0x01, 0x00,
+        0x00, 0xFF, 0xFF, 0x01, 0x01, 0x9B, 0x01, 0x00,
+        0x00, 0x00, 0x00, 0x01, 0x39, 0x30, 0x31, 0x37,
+        0x30, 0xFF, 0x01, 0x07, 0x00,
+    };
+
+    common_test_registration_state_from_qmi_system_info (data, G_N_ELEMENTS (data),
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN, /* cs */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN, /* ps */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_HOME,    /* eps */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN, /* 5gs */
+                                                         0, /* lac */
+                                                         7, /* tac */
+                                                         0x019B01, /* cid */
+                                                         "90170", /* operator id */
+                                                         MM_MODEM_ACCESS_TECHNOLOGY_LTE);
+}
+
+static void
+test_registration_state_from_qmi_system_info_5g_5gs_home (void)
+{
+    static const guint8 data[] = {
+        0x01, 0x39, 0x00, 0x80, /* marker (1 byte), qmux length (2 bytes), qmux flags (1 byte) */
+        0x03, /* service: NAS */
+        0x02, /* client id */
+        0x02, /* service flags */
+        0x01, 0x00, /* transaction */
+        0x4D, 0x00, /* message id */
+        0x2D, 0x00, /* all tlvs length */
+        /* TLV 0x02: Result */
+        0x02, /* tlv type */
+        0x04, 0x00, /* tlv size */
+        0x00, 0x00, 0x00, 0x00,
+        /* TLV 0x4A: 5GNR System Info */
+        0x4A, /* tlv type */
+        0x03, 0x00, /* tlv size */
+        0x02, 0x00, 0x00,
+        /* TLV 0x4B: 5GNR System Info */
+        0x4B, /* tlv type */
+        0x1D, 0x00, /* tlv size: 29 bytes */
+        /* [ domain_valid = 'yes' domain = 'ps' service_capability_valid = 'yes' service_capability = 'ps'
+         * roaming_status_valid = 'yes' roaming_status = 'off' forbidden_valid = 'yes' forbidden = 'no'
+         * lac_valid = 'no' lac = '65535' cid_valid = 'yes' cid = '105217' registration_reject_info_valid = 'no'
+         * registration_reject_domain = 'none' registration_reject_cause = 'none' network_id_valid = 'yes'
+         * mcc = '901' mnc = '701' tac_valid = 'yes' tac = '7' ] */
+        0x01, 0x02, 0x01, 0x02, 0x01, 0x00, 0x01, 0x00,
+        0x00, 0xFF, 0xFF, 0x01, 0x01, 0x9B, 0x01, 0x00,
+        0x00, 0x00, 0x00, 0x01, 0x39, 0x30, 0x31, 0x37,
+        0x30, 0xFF, 0x01, 0x07, 0x00,
+    };
+
+    common_test_registration_state_from_qmi_system_info (data, G_N_ELEMENTS (data),
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN, /* cs */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN, /* ps */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN, /* eps */
+                                                         MM_MODEM_3GPP_REGISTRATION_STATE_HOME,    /* 5gs */
+                                                         0, /* lac */
+                                                         7, /* tac */
+                                                         0x019B01, /* cid */
+                                                         "90170", /* operator id */
+                                                         MM_MODEM_ACCESS_TECHNOLOGY_5GNR);
+}
+
+/*****************************************************************************/
 
 int main (int argc, char **argv)
 {
@@ -1394,5 +1969,18 @@
     g_test_add_func ("/MM/qmi/supported-capabilities/generic/nr5g-lte-evdo",  test_supported_capabilities_generic_nr5g_lte_evdo);
     g_test_add_func ("/MM/qmi/supported-modes/generic/nr5g-lte-evdo",         test_supported_modes_generic_nr5g_lte_evdo);
 
+    g_test_add_func ("/MM/qmi/registration-state-from-system-info/2g/searching",     test_registration_state_from_qmi_system_info_2g_searching);
+    g_test_add_func ("/MM/qmi/registration-state-from-system-info/2g/idle",          test_registration_state_from_qmi_system_info_2g_idle);
+    g_test_add_func ("/MM/qmi/registration-state-from-system-info/2g/cs-home",       test_registration_state_from_qmi_system_info_2g_cs_home);
+    g_test_add_func ("/MM/qmi/registration-state-from-system-info/2g3g/searching",   test_registration_state_from_qmi_system_info_2g3g_searching);
+    g_test_add_func ("/MM/qmi/registration-state-from-system-info/2g3g/idle",        test_registration_state_from_qmi_system_info_2g3g_idle);
+    g_test_add_func ("/MM/qmi/registration-state-from-system-info/2g3g/ps-home",     test_registration_state_from_qmi_system_info_2g3g_ps_home);
+    g_test_add_func ("/MM/qmi/registration-state-from-system-info/2g3g/csps-home",   test_registration_state_from_qmi_system_info_2g3g_csps_home);
+    g_test_add_func ("/MM/qmi/registration-state-from-system-info/2g3g4g/searching", test_registration_state_from_qmi_system_info_2g3g4g_searching);
+    g_test_add_func ("/MM/qmi/registration-state-from-system-info/2g3g4g/idle",      test_registration_state_from_qmi_system_info_2g3g4g_idle);
+    g_test_add_func ("/MM/qmi/registration-state-from-system-info/2g3g4g/eps-home",  test_registration_state_from_qmi_system_info_2g3g4g_eps_home);
+    g_test_add_func ("/MM/qmi/registration-state-from-system-info/4g/eps-home",      test_registration_state_from_qmi_system_info_4g_eps_home);
+    g_test_add_func ("/MM/qmi/registration-state-from-system-info/5g/5gs-home",      test_registration_state_from_qmi_system_info_5g_5gs_home);
+
     return g_test_run ();
 }
diff --git a/test/Makefile.am b/test/Makefile.am
deleted file mode 100644
index bf54f0a..0000000
--- a/test/Makefile.am
+++ /dev/null
@@ -1,131 +0,0 @@
-
-noinst_PROGRAMS =
-EXTRA_DIST =
-
-AM_CFLAGS = \
-	$(WARN_CFLAGS) \
-	$(NULL)
-
-AM_LDFLAGS = \
-	$(WARN_LDFLAGS) \
-	$(NULL)
-
-################################################################################
-# lsudev
-################################################################################
-
-if WITH_UDEV
-
-noinst_PROGRAMS += lsudev
-
-lsudev_SOURCES  = lsudev.c
-lsudev_CPPFLAGS = $(GUDEV_CFLAGS)
-lsudev_LDADD    = $(GUDEV_LIBS)
-
-endif
-
-################################################################################
-# mmtty
-################################################################################
-
-noinst_PROGRAMS += mmtty
-
-mmtty_SOURCES = mmtty.c
-
-mmtty_CPPFLAGS = \
-	$(MM_CFLAGS) \
-	-I$(top_srcdir) \
-	-I$(top_srcdir)/src \
-	-I$(top_srcdir)/src/kerneldevice \
-	-I$(top_srcdir)/include \
-	-I$(top_builddir)/include \
-	-I$(top_srcdir)/libmm-glib \
-	-I$(top_srcdir)/libmm-glib/generated \
-	-I$(top_builddir)/libmm-glib/generated
-	$(NULL)
-
-mmtty_LDADD = \
-	$(MM_LIBS) \
-	$(top_builddir)/src/libport.la \
-	$(NULL)
-
-################################################################################
-# mmrules
-################################################################################
-
-noinst_PROGRAMS += mmrules
-
-mmrules_SOURCES = mmrules.c
-
-mmrules_CPPFLAGS = \
-	$(MM_CFLAGS) \
-	-I$(top_srcdir) \
-	-I$(top_srcdir)/src \
-	-I$(top_srcdir)/src/kerneldevice \
-	-I$(top_srcdir)/include \
-	-I$(top_builddir)/include \
-	-I$(top_srcdir)/libmm-glib \
-	-I$(top_srcdir)/libmm-glib/generated \
-	-I$(top_builddir)/libmm-glib/generated
-	$(NULL)
-
-mmrules_LDADD = \
-	$(MM_LIBS) \
-	$(top_builddir)/src/libkerneldevice.la \
-	$(NULL)
-
-################################################################################
-# mmsmspdu
-################################################################################
-
-noinst_PROGRAMS += mmsmspdu
-
-mmsmspdu_SOURCES = mmsmspdu.c
-
-mmsmspdu_CPPFLAGS = \
-	$(MM_CFLAGS) \
-	-I$(top_srcdir) \
-	-I$(top_srcdir)/src \
-	-I$(top_srcdir)/include \
-	-I$(top_builddir)/include \
-	-I$(top_srcdir)/libmm-glib \
-	-I$(top_srcdir)/libmm-glib/generated \
-	-I$(top_builddir)/libmm-glib/generated
-	$(NULL)
-
-mmsmspdu_LDADD = \
-	$(MM_LIBS) \
-	$(top_builddir)/src/libhelpers.la \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(NULL)
-
-################################################################################
-# mmsmsmonitor
-################################################################################
-
-noinst_PROGRAMS += mmsmsmonitor
-
-mmsmsmonitor_SOURCES = mmsmsmonitor.c
-
-mmsmsmonitor_CPPFLAGS = \
-	$(MM_CFLAGS) \
-	-I$(top_srcdir) \
-	-I$(top_srcdir)/src \
-	-I$(top_srcdir)/include \
-	-I$(top_builddir)/include \
-	-I$(top_srcdir)/libmm-glib \
-	-I$(top_srcdir)/libmm-glib/generated \
-	-I$(top_builddir)/libmm-glib/generated
-	$(NULL)
-
-mmsmsmonitor_LDADD = \
-	$(MM_LIBS) \
-	$(top_builddir)/src/libhelpers.la \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(NULL)
-
-################################################################################
-# mmcli-test-sms
-################################################################################
-
-EXTRA_DIST += mmcli-test-sms
diff --git a/tools/Makefile.am b/tools/Makefile.am
deleted file mode 100644
index af87c73..0000000
--- a/tools/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-SUBDIRS = . tests
-
-EXTRA_DIST = test-modemmanager-service.py
diff --git a/tools/tests/Makefile.am b/tools/tests/Makefile.am
deleted file mode 100644
index f84a8fe..0000000
--- a/tools/tests/Makefile.am
+++ /dev/null
@@ -1,49 +0,0 @@
-include $(top_srcdir)/gtester.make
-
-################################################################################
-# common
-################################################################################
-
-AM_CFLAGS = \
-	$(WARN_CFLAGS) \
-	$(MM_CFLAGS) \
-	-I$(top_srcdir) \
-	-I$(top_srcdir)/src \
-	-I$(top_srcdir)/include \
-	-I$(top_builddir)/include \
-	-I$(top_srcdir)/libmm-glib \
-	-I${top_srcdir}/libmm-glib/generated \
-	-I${top_builddir}/libmm-glib/generated \
-	$(NULL)
-
-LDADD = \
-	$(top_builddir)/libmm-glib/libmm-glib.la \
-	$(NULL)
-
-AM_LDFLAGS = \
-	$(WARN_LDFLAGS) \
-	$(MM_LIBS) \
-	$(MM_LDFLAGS) \
-	$(NULL)
-
-noinst_PROGRAMS = test-stub
-test_stub_CPPFLAGS = \
-	-DTEST_SERVICES=\""$(abs_top_builddir)/tools/tests/services"\" \
-	$(NULL)
-
-# only run the test if introspection was enabled
-if HAVE_INTROSPECTION
-TEST_PROGS += $(noinst_PROGRAMS)
-endif
-
-test-wrapper.sh: test-wrapper.sh.in
-	@sed \
-	-e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
-	-e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
-	$< >$@
-	@chmod +x $@
-
-BUILT_SOURCES = test-wrapper.sh
-CLEANFILES = test-wrapper.sh
-
-EXTRA_DIST += test-wrapper.sh.in services/org.freedesktop.ModemManager1.service.in
diff --git a/tools/tests/test-stub.c b/tools/tests/test-stub.c
index b88b2a3..fa70229 100644
--- a/tools/tests/test-stub.c
+++ b/tools/tests/test-stub.c
@@ -105,7 +105,7 @@
 run_loop_for_ms (TestData *tdata,
                  guint32 timeout)
 {
-    mm_info ("Run loop for %u ms", timeout);
+    mm_msg ("Run loop for %u ms", timeout);
     tdata->timeout_id = g_timeout_add (timeout, loop_timeout_cb, tdata);
     g_main_loop_run (tdata->loop);
 }
@@ -117,7 +117,7 @@
         g_source_remove (tdata->timeout_id);
         tdata->timeout_id = 0;
     }
-    mm_info ("Stop the loop");
+    mm_msg ("Stop the loop");
     g_main_loop_quit (tdata->loop);
 }
 
@@ -133,7 +133,7 @@
 
     tdata = (TestData*)user_data;
 
-    mm_info ("AddModem DBus call completed");
+    mm_msg ("AddModem DBus call completed");
     dbus_return = g_dbus_proxy_call_finish (tdata->mm_proxy, res, &error);
     g_assert_no_error (error);
     g_assert_nonnull (dbus_return);
@@ -189,7 +189,7 @@
 
     tdata = (TestData*)user_data;
 
-    mm_info ("EmitStateChanged DBus call completed");
+    mm_msg ("EmitStateChanged DBus call completed");
     dbus_return = g_dbus_proxy_call_finish (tdata->mm_proxy, res, &error);
     g_assert_no_error (error);
     g_assert_nonnull (dbus_return);
@@ -277,7 +277,7 @@
 
     tdata = (TestData*)user_data;
 
-    mm_info ("org.freedesktop.DBus.Properties.Set DBus call completed");
+    mm_msg ("org.freedesktop.DBus.Properties.Set DBus call completed");
     dbus_return = g_dbus_proxy_call_finish (tdata->mm_modem_prop_proxy, res, &error);
     g_assert_no_error (error);
     g_assert_nonnull (dbus_return);
@@ -368,7 +368,7 @@
 
     tdata = (TestData*)user_data;
 
-    mm_info("SendPin DBus method call completed");
+    mm_msg ("SendPin DBus method call completed");
     ret = mm_sim_send_pin_finish (tdata->sim, res, &error);
     if (tdata->pin_error) {
         g_assert_nonnull (error);
diff --git a/vapi/Makefile.am b/vapi/Makefile.am
deleted file mode 100644
index 70c063b..0000000
--- a/vapi/Makefile.am
+++ /dev/null
@@ -1,22 +0,0 @@
-VAPIGEN_VAPIS = libmm-glib.vapi
-
-if ENABLE_VAPIGEN
-include $(VAPIGEN_MAKEFILE)
-
-libmm-glib.vapi: $(top_builddir)/libmm-glib/ModemManager-1.0.gir libmm-glib.deps ModemManager-1.0.metadata
-
-libmm_glib_vapi_METADATADIRS = $(srcdir)
-libmm_glib_vapi_FILES = $(top_builddir)/libmm-glib/ModemManager-1.0.gir
-libmm_glib_vapi_VAPIDIRS = $(builddir)
-libmm_glib_vapi_DEPS = gio-2.0
-
-vapidir = $(datadir)/vala/vapi
-vapi_DATA = $(VAPIGEN_VAPIS) $(VAPIGEN_VAPIS:.vapi=.deps)
-
-endif
-
-CLEANFILES = $(VAPIGEN_VAPIS)
-
-EXTRA_DIST = \
-	ModemManager-1.0.metadata \
-	libmm-glib.deps