Commit Graph

18 Commits

Author SHA1 Message Date
Rukun Mao
3da84c2079 suspend: add suspend/resume support with powerd on ChromeOS
ModemManager handles suspend and resume signals sent from powerd

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/547
2022-06-09 08:32:13 +00:00
som
1e08f9ca2c mm-log: hiding personal info while logging
During mm logging, some of the information like simIccId, Telephone
numbers need to be hidden from displaying in the logs to protect
some of the user information.

Implemented for MBIM requiring libmbim 1.27.6, which is the
development version that includes the needed API.
2022-04-20 15:20:34 +02:00
Aleksander Morgado
f9487cf3d1 core: new '--test-mbimex-profile-management' option
The profile management APIs implemented by Microsoft in the MBIM
extensions provide certain features that are not available via other
means (e.g. ip type, access type preference, roaming allowance...).

Unfortunately, these APIs require the current list of profiles
installed in the modem to be a bit special; e.g. with one profile max
for each context/APN type. If this does not happen, the operations
will fail, or they will update contexts that should not be updated.

So, we disable for now the MBIM extension profile management support;
the logic is there, but not used by default.
2021-12-26 10:12:33 +01:00
Aleksander Morgado
185e492c0a core: new '--test-multiplex-requested' option
The new option will change the default setting in MBIM and QMI bearers
to "request" when no explicit "multiplex" configuration is given by
the user.

This option will help test the multiplexing support in the modems
before it's made a default in a future release.
2021-08-09 12:22:26 +00:00
Dylan Van Assche
38740e9d11 base-manager: add quick suspend/resume base
Quick suspend/resume infrastructure for
synchronizing the interfaces when resuming.
2021-05-26 13:14:52 +00:00
Aleksander Morgado
768d76e0aa context: allow disabling QRTR on runtime even if support is built 2021-04-14 11:27:27 +02:00
Dylan Van Assche
7159b8e27a context: add test-no-suspend-resume cli parameter
Disables suspend/resume support at runtime.
This is useful for modems which are never turned off
or suspended when the host suspends.
2021-02-14 12:27:42 +00:00
Aleksander Morgado
e112896994 base-manager: allow forcing the testing without udev
Even if udev support is really built and available.

This is extremely useful to test the udev-less setup without fully
recompiling the whole daemon.

  E.g.: the daemon can be run like this:
    $ sudo /usr/sbin/ModemManager --debug --test-no-udev

  And then, the kernel events may be reported using mmcli like this:
    $ sudo mmcli --report-kernel-event-auto-scan
2020-11-14 22:55:52 +01:00
Aleksander Morgado
c4bf785d67 filter: allow selection of filter policy on startup
Added a new '--filter-policy=[POLICY]' option in the daemon, which
allows selecting between the supported filter policies. For now, only
two policies are defined:

  * default: the default policy used by ModemManager, where it tries
    to probe and detect as many modem ports as possible.

  * whitelist-only: only devices explicitly tagged via udev (with the
    ID_MM_DEVICE_PROCESS tag) will be probed and used.
2017-12-05 10:58:29 +01:00
Torsten Hilbrich
fd0bed1df9 log: Add support for journal logging
This logging is available if the software was build with the configure
option --with-systemd-journal.

It will be enabled by default if libsystemd is found.

The runtime parameter --log-journal enables to output of log messages
to the systemd journal.

Please note that the journal priority field has the same value as the
syslog level so no conversion is required here.
2017-06-21 13:08:17 +02:00
Aleksander Morgado
3bb0f7e66d context: rework application options and help output
Group together all options that allow configuring the logging output,
and make them have the same --log-[XXX] prefix.

Also rework the --help output so that all option groups are printed by
default (i.e. there is no longer a --help-all option).
2017-05-29 12:37:36 +02:00
Aleksander Morgado
c4a584416a core: allow disabling auto-scan and notifying ports one by one via API
This commit enables a new core ModemManager daemon option, so that automatic
detection of available modems is totally disabled: '--no-auto-scan'. Note that
this option also replaces the previously used '--test-no-auto-scan' option,
which was only used during tests.

Along with the new ModemManager option, a new ReportKernelEvent() method in
the API is defined, which allows notifying the daemon of which interfaces it
should be accessing, as well as the main details of each interface. The only
mandatory parameters in the new method are 'action' (add/remove), 'name' (the
name of the interface) and 'subsystem' (the subsystem of the interface).

The mmcli tool has support for using the new api method via several new options:

 * The '--report-kernel-event' option allows specifying device ports one by
   one, and is a direct mapping of the ReportKernelEvent() method:
     $ sudo mmcli --report-kernel-event="action=add,name=wwan0,subsystem=net"
     $ sudo mmcli --report-kernel-event="action=add,name=cdc-wdm0,subsystem=usbmisc"

 * The '--report-kernel-event-auto-scan' option uses udev monitoring to notify
   events automatically to the daemon. This allows to operate in a way
   equivalent to the default daemon operation (with implicit auto-scan).

Worth noting that the ReportKernelEvent() method is only usable when
'--no-auto-scan' is explicitly used in the daemon. An error will be reported if
the method is tried while standard udev monitoring is enabled (implicit if
auto scan isn't explicitly disabled in the daemon).

If mmcli is going to be used only to report 'real time' events, an optional
'--initial-kernel-events=[PATH]' may be given in the ModemManager call to
automatically process a set of port kernel events one by one on boot. The file
may e.g. contain:
  action=add,name=wwan0,subsystem=net
  action=add,name=cdc-wdm0,subsystem=usbmisc
2016-09-29 15:43:05 +02:00
Aleksander Morgado
c4e7fdf025 core: add --version option to the ModemManager daemon
It was actually included in the man page of the daemon, but we didn't have it.
2014-09-05 11:18:06 +02:00
Aleksander Morgado
247a945950 context: new '--test-plugin-dir' to allow specifying where the plugins are 2014-02-13 13:41:50 +01:00
Aleksander Morgado
65f87561c5 context: new '--test-enable' to enable the Test interface 2014-02-13 13:41:25 +01:00
Aleksander Morgado
243720414e context: new '--test-no-auto-scan' to avoid automatic scanning for devices 2014-02-13 13:41:23 +01:00
Aleksander Morgado
bf57da537d context: new '--test-session' allows launching the MM daemon in the session bus 2014-02-13 13:41:20 +01:00
Aleksander Morgado
952b9164b9 context: new source files to keep the daemon context 2012-03-16 14:53:18 +01:00