Commit Graph
380 Commits
Author SHA1 Message Date
Guido Günther b491bc474e cli: Add support for listing and deleting Cell Broadcast messages
This adds

```
   $ mmcli -m 0 --cell-broadcast-list-cbm
       /org/freedesktop/ModemManager1/CBM/0 (received)
       /org/freedesktop/ModemManager1/CBM/0 (received)

   $ mmcli -m 0 --cell-broadcast-delete-cbm=0
   successfully deleted CBM from modem

   $ mmcli -m 0 --cbm 0
   --------------------------
   General    |         path: /org/freedesktop/ModemManager1/CBM/1
   --------------------------
   Content    |         text: This is a test of the Ontario Alert Ready System. There is no danger to your health or safety
   --------------------------
   Properties |       update: 0
              | message code: 0
```

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2024-12-01 21:41:10 +00:00
Guido Günther ce8989182c cli: Fix indent
We indent with one space after }

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2024-12-01 21:41:10 +00:00
Guido Günther e627062674 cli: Fix copy/paste error in comment
We check call caps not messaging caps

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2024-12-01 21:41:10 +00:00
Akula Susmitha f22d099f38 api,core,mmcli: Add new 'API' support to set-default-storage for SMS
API support has been added to set default storage for SMS.
Changes were made to get, set the deafult storage value.
2024-10-07 16:35:09 +05:30
Lubomir Rintel 509acb6474 mmcli: fix a memory leak
Poor modem_uid got left behind.
2024-07-09 14:55:30 +00:00
Ujjwal Pande 2904510e76 api: new NetworkRejection property
When a modem is not able to register to the network, MBIM and QMI indications
related to registration reports network rejection cause codes if request is
rejected by the network. This information is currently logged in the ModemManager
but not exposed outside of ModemManager.
These are the changes to define interface to expose network reject cause codes
over d-bus to the above layers which could be used by above layers to present
this information in a user friendly way.
2024-06-12 09:39:12 +00:00
Lubomir Rintel 6ca02a3edf mmcli/sms: do not leak message_reference 2024-05-31 10:46:59 +00:00
Aleksander Morgado 50755b07d3 cli,3ppp: allow updating EPS settings before enabling 2024-05-29 08:14:13 +00:00
Raphaël Jakse 63dd4ad263 iface-location: allow enabling without SIM
When the modem is in a failed state because of a SIM-related error,
like a missing SIM, or if the modem is SIM-locked, allow the
Location interface to initialize and be enabled anyway.

This allows someone without a SIM to use the GPS, which does not
particularly require a phone subscription. It also allows
someone with a SIM to use the GPS even if the SIM is still
locked.

This patch was reworked, while keeping the original idea, by:
Aleksander Morgado <aleksander@aleksander.es>

Fixes #183
2023-12-11 12:37:42 +00:00
Lukas Voegl 8cd1c1bdb9 api,modem: new 'Physdev' property
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2023-09-18 10:53:12 +02:00
Ujjwal Pande e3a1206c57 api: new carrier lock support
Adding support for carrier lock for MBIM modems using google simlock
mechanism.
2023-06-08 20:16:12 +00:00
Tom Wimmenhove bd5a82845a mmcli: added --messaging-create-sms-with-text option
Added a `--messaging-create-sms-with-text' command line option that works similar to
`--messaging-create-sms-with-data', except that it uses the content of the file as the
message text instead of data.

This allows creating mesasges containing both double and single quotes, which was not
possible with the existing `--messaging-create-sms' command line option.
2023-05-17 10:08:03 +00:00
Aleksander Morgado 19b910b60f cli: update copyright 2023-04-14 08:48:35 +00:00
Aleksander Morgado 4903a1ed74 cli: remove unneeded EOLs when printing PCOs
E.g. in the key-value output:
  modem.3gpp.pco.length   : 2
  modem.3gpp.pco.value[1] : session-id: 1, complete: yes, data: 270180\n
  modem.3gpp.pco.value[2] : session-id: 2, complete: yes, data: 271480802110030100108106503A3DFA8306503A3DFE\n

Or in the human output:
  ----------------------------------
  3GPP     |
           |                    pco: 1: (complete) '270180'

           |                         2: (complete) '271480802110030100108106503A3DFA8306503A3DFE'

  ----------------------------------
  3GPP EPS |   ue mode of operation: csps-2
2023-03-07 11:33:18 +00:00
Aleksander Morgado fe7008e414 cli,output: coding style fixes 2023-02-17 10:33:11 +00:00
Florian Eckert c3365a36f0 cli,output: print valid json for network scan result
A network scan with json output currently returns the following:

root@G3-10940 ~ # mmcli -m 0 -J --3gpp-scan --timeout=300 | jq
{
  "modem": {
    "3gpp": {
      "scan-networks": [
        "operator-code: 26201, operator-name: TDG, access-technologies: lte, availability: forbidden",
        "operator-code: 26203, operator-name: o2 - de, access-technologies: lte, availability: forbidden",
        "operator-code: 26202, operator-name: vodafone.de, access-technologies: lte, availability: current"
      ]
    }
  }
}

This is a valid JSON, but in order to be able to access the individual
data elements more easily, the line can also be dumped as a json object.

The following commit converts the lines into a JSON obejct, so that it
looks like this:

root@G3-10940 ~ # mmcli -m 0 -J --3gpp-scan --timeout=300 | jq
{
  "modem": {
    "3gpp": {
      "scan-networks": [
        {
          "operator-code": "26201",
          "operator-name": "TDG",
          "access-technologies": "lte",
          "availability": "forbidden"
        },
        {
          "operator-code": "26203",
          "operator-name": "o2 - de",
          "access-technologies": "lte",
          "availability": "forbidden"
        },
        {
          "operator-code": "26202",
          "operator-name": "vodafone.de",
          "access-technologies": "lte",
          "availability": "current"
        }
      ]
    }
  }
}

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2023-02-17 10:15:36 +00:00
Frederic Martinsons 766962167c cli: add formating option (json and key/value) for created SMS
Fixes #657

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
2023-01-18 11:00:17 +00:00
Aleksander Morgado f419f56628 build: drop autotools 2022-11-07 14:26:02 +00:00
Aleksander Morgado a114e131ab libmm-glib,3gpp-profile: new print() method
Can be used right away in the mmcli output generation logic.
2022-11-04 13:12:56 +00:00
Aleksander Morgado b3f315ad2d core,log: new 'MSG' log level between 'INFO' and 'WARN'
We're bumping the current "INFO" level messages to the new "MSG"
level, also making the new level the default.

The old "INFO" level will be used to setup an intermediate level of
logging which is not as verbose as "DEBUG" but still provides some
capabilities to analyze the behavior of a modem.
2022-11-04 13:12:56 +00:00
Aleksander Morgado 68123ac875 mmcli: update copyright years 2022-10-19 11:18:38 +00:00
Aleksander Morgado bfba265009 libmm-glib,common-helpers: don't assume new_from_unix_utc() always succeeds
The g_date_time_new_from_unix_utc() method in glib2 may fail if the
given timestamp is too far into the future. The value is supposed to
be seconds since unix time origin, but internally it will be converted
into usecs, so any value longer than G_MAXINT64 / USEC_PER_SECOND
isn't allowed.

This is currently used in the CLI, and we're anyway ignoring the error
returned in that case, but at least it won't crash if it ever happens.
2022-10-05 09:06:22 +00:00
Aleksander Morgado 129807c417 cli,output: plug leak of OutputItemListItem items 2022-08-19 22:43:33 +00:00
Aleksander Morgado 210020c7d2 cli,sim: print GID1 and GID2 fields if available 2022-08-19 15:53:43 +00:00
Aleksander Morgado 59e36c6838 cli,sms: minor alignment fix 2022-08-19 15:53:43 +00:00
Aleksander Morgado 9fa1b32e34 cli: don't print signal quality unless modem is enabled
We don't have a clear way to report "unknown" signal quality, so for
now just skip printing it altogether in the mmcli human output if the
modem is not yet enabled.
2022-05-25 11:15:29 +02:00
Amol Lad 4d0400b77f mmcli: correctly set key_length
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/559
2022-04-28 12:02:02 +02:00
Aleksander Morgado dc9e28f3a6 cli: new --test-session option to use the session bus 2022-02-16 00:10:49 +01:00
Aleksander Morgado c4f59aebe0 mmcli,modem: new '--get-cell-info' action 2022-01-18 09:00:10 +00:00
Aleksander Morgado 791fb38417 cli: fix 3GPP location mcc/mnc field names 2021-12-26 11:04:05 +01:00
Aleksander Morgado 2bfa6863c4 mmcli: new '--3gpp-profile-manager-status' operation
In order to show the properties of the profile management interface, e.g.:

  $ sudo mmcli -m a --3gpp-profile-manager-status
    -----------------------------------
    3GPP profile manager | index field: apn-type
2021-12-26 10:12:32 +01:00
Aleksander Morgado 80c4f49940 cli,modem-3gpp-profile-manager: delete should allow other index fields
Instead of expecting a specific profile id, allow the command to
support different index field types.
2021-12-26 10:12:31 +01:00
Aleksander Morgado e7c55f5f70 cli: indent all profile property names to the same column 2021-12-24 14:05:35 +01:00
Aleksander Morgado a896f88bf9 cli: don't use dashes in 3GPP profile human output 2021-12-24 14:05:35 +01:00
Aleksander Morgado 3c0d94ac03 cli: new 'profile-source' setting in 3GPP profile 2021-12-24 14:05:35 +01:00
Aleksander Morgado fb0b00db16 cli: new 'roaming-allowance' in 3GPP profile and bearer properties 2021-12-24 14:05:35 +01:00
Aleksander Morgado 99ca2f5a1c cli: new 'profile enabled' setting in 3GPP profile 2021-12-24 14:05:35 +01:00
Aleksander Morgado 41887b3fb7 cli: new 'access-type-preference' in 3GPP profile and bearer properties 2021-12-24 14:05:32 +01:00
Aleksander Morgado a6dd7ac60f cli,modem: add 5GNR registration settings in modem info output 2021-12-24 12:41:27 +00:00
Aleksander Morgado dcf9bb4ee8 cli,modem-3gpp: new '--3gpp-set-nr5g-registration-settings' action 2021-12-24 12:41:27 +00:00
Aleksander Morgado f8719e6308 cli,sim: new 'SimType', 'Removability' and 'EsimStatus' properties 2021-12-11 12:53:37 +01:00
Iñigo Martínez ec2e5403f1 build,meson: Make feature options boolean
Different options are set as `feature`, also every possible plugin,
but this may cause confusion.

All options set as `feature` but plugins have been made `boolean` to
avoid further confusions.

`help2man` is also installed in the CI image because is required to
build different libraries.
2021-11-08 09:28:55 +00:00
Som_SP 511859ef0a api,bearer: add 'uplink-speed' and 'downlink-speed' stats
These values show the rates that have been negotiated with the network
during the PS domain attach.

These are not the current ongoing data rates associated to the network
usage at some given moment.

Includes updates by Aleksander Morgado to fix coding style issues and
add missing documentation items.
2021-11-03 12:41:51 +01:00
Aleksander Morgado 3ab765f11c api,3gpp: new 'SetPacketServiceState()' method 2021-11-02 09:50:17 +00:00
Aleksander Morgado f55ea211a9 api,3gpp: new 'PacketServiceState' property
This property allows the user to know whether the device is attached
or detached from the packet domain service.
2021-11-02 09:50:17 +00:00
Frederic Martinsons 9d82d30978 cli, plugins: factorize usage of iso8601 datetime format
Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>

Includes updates by Aleksander Morgado to fix coding style issues.
2021-10-22 13:48:20 +02:00
Frederic Martinsons 0510e9aef8 api,bearer: new 'start-date' field in bearer statistics
It stores the epoch timestamp of the current bearer session start.
If there is no connected bearer, it is set to 0 and not displayed
in mmcli output.

Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>

Includes updates by Aleksander Morgado to fix coding style issues.
2021-10-22 13:48:13 +02:00
Aleksander Morgado e8c4b88493 libmm-glib: new 'MMSignalThresholdProperties' helper object
To avoid needing to work with GVariants directly.
2021-10-20 22:14:57 +02:00
Som_SP 925f0bae11 libmm-glib,mmcli: add support for the new signal 'SetupThresholds()' API
Includes updates by Aleksander Morgado to fix mostly coding style issues.
2021-10-20 22:09:18 +02:00
Som_SP 9537261651 libmm-glib,mmcli: add support for 'error-rate' measurements in signal info
Includes updates by Aleksander Morgado to fix mostly coding style issues.
2021-10-20 22:07:24 +02:00