Commit Graph

7616 Commits

Author SHA1 Message Date
Joel Selvaraj
a0ef2f403f modem-qmi: implement voice check support and create call functionality 2021-07-08 12:48:59 +00:00
Joel Selvaraj
630f96f4a4 call-qmi: implement call start, hangup and accept 2021-07-08 12:48:59 +00:00
Joel Selvaraj
788442c6d5 call-qmi: new `MMCallQmi' object 2021-07-08 12:48:59 +00:00
Alexander Dahl
266e98e020 ublox: Mark ubandsel as unsupported on SARA-R4 and -N4
See log from a SARA-R410M-02B-01 before the change:

    Feb 01 05:40:01 unit ModemManager[304]: <debug> [1612158001.012330] [modem0/ttymxc4/at] --> 'AT+UBANDSEL?<CR>'
    Feb 01 05:40:01 unit ModemManager[304]: <debug> [1612158001.026831] [modem0/ttymxc4/at] <-- '<CR><LF>ERROR<CR><LF>'
    Feb 01 05:40:01 unit ModemManager[304]: <debug> [1612158001.027113] [modem0/ttymxc4/at] operation failure: 100 (Unknown error)
    Feb 01 05:40:01 unit ModemManager[304]: <warn>  [1612158001.027298] [modem0] couldn't load current bands: Unknown error

Backed by SARA-R4 series AT commands manual, no reference to +UBANDSEL
in the manual at all.

Log after the change:

    Feb 01 06:58:25 unit ModemManager[329]: <debug> [1612162705.500845] [modem0] (u-blox) support configuration found for 'SARA-R410M-02B'
    Feb 01 06:58:25 unit ModemManager[329]: <debug> [1612162705.500961] [modem0] (u-blox)   band update requires explicit unregistration
    Feb 01 06:58:25 unit ModemManager[329]: <debug> [1612162705.501052] [modem0] (u-blox)   UACT based band configuration unsupported
    Feb 01 06:58:25 unit ModemManager[329]: <debug> [1612162705.501141] [modem0] (u-blox)   UBANDSEL based band configuration unsupported

Fixes: 437fb830c8 ("ublox,helpers: assume all SARA/LARA devices require COPS")
Signed-off-by: Alexander Dahl <ada@thorsis.com>
2021-07-07 17:20:23 +02:00
Alexander Dahl
7c9d1e45be ublox: Add more values to URAT combinations
The SARA-R410M-02B-01 only supports values 7 and 8, log excerpt:

    Feb 01 05:40:00 unit ModemManager[304]: <debug> [1612158000.826046] [modem0/ttymxc4/at] --> 'AT+URAT=?<CR>'
    Feb 01 05:40:00 unit ModemManager[304]: <debug> [1612158000.833596] [modem0/ttymxc4/at] <-- '<CR><LF>+URAT: (7-8),(7-8)(7-8)<CR><LF><CR><LF>OK<CR><LF>'
    Feb 01 05:40:00 unit ModemManager[304]: <warn>  [1612158000.833992] [modem0] (u-blox) unexpected AcT value: 7
    Feb 01 05:40:00 unit ModemManager[304]: <warn>  [1612158000.834096] [modem0] (u-blox) unexpected AcT value: 8
    Feb 01 05:40:00 unit ModemManager[304]: <warn>  [1612158000.834193] [modem0] couldn't load supported modes: No combinations built from +URAT=? response

The SARA-R4 series AT commands manual (and also the SARA-R5 AT commands
manual) lists them like this:

- 7: LTE Cat M1
- 8: LTE Cat NB1

After the change, log looks like this:

    Feb 01 06:58:25 unit ModemManager[329]: <debug> [1612162705.490627] [modem0/ttymxc4/at] --> 'AT+URAT?<CR>'
    Feb 01 06:58:25 unit ModemManager[329]: <debug> [1612162705.499994] [modem0/ttymxc4/at] <-- '<CR><LF>+URAT: 7,8<CR><LF><CR><LF>OK<CR><LF>'
    Feb 01 06:58:25 unit ModemManager[329]: <debug> [1612162705.500433] [modem0] (u-blox) current allowed modes retrieved: 4g
    Feb 01 06:58:25 unit ModemManager[329]: <debug> [1612162705.500561] [modem0] (u-blox) current preferred modes retrieved: 4g

Signed-off-by: Alexander Dahl <ada@thorsis.com>
2021-07-07 17:18:56 +02:00
Nicholas Smith
052eb267c8 docs: add --output-json documentation
Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
2021-07-06 15:27:59 +00:00
Michal Mazur
46c5cd8b72 mm-sim-mbim: Remove update of remaining attempts
Calling the mm_iface_modem_update_unlock_retries function directly from
pin_set_enter_ready caused a notification to be send too early with
invalid number of attempts to unlock on MBIM modems.
The mm_iface_modem_update_unlock_retries is already called for all
modems from send_pin_ready (mm-base-sim.c).
2021-07-06 08:49:10 +00:00
Aleksander Morgado
bf9005df07 api,location: update TAC documentation to allow 3-byte values in 5GNR 2021-07-03 22:49:01 +02:00
Aleksander Morgado
132fc268b8 libmm-glib,call: use helper macros to manage the monitored properties 2021-07-01 23:38:04 +02:00
Aleksander Morgado
19b3a55230 libmm-glib,bearer: use helper macros to manage the monitored properties 2021-07-01 23:38:04 +02:00
Aleksander Morgado
5012c1a3f3 libmm-glib,modem-signal: use helper macros to manage the monitored properties 2021-07-01 23:38:04 +02:00
Aleksander Morgado
b8e939ceac libmm-glib,modem-location: use helper macros to manage the monitored properties 2021-07-01 23:38:04 +02:00
Aleksander Morgado
6372d97e87 libmm-glib,modem-firmware: use helper macros to manage the monitored properties 2021-07-01 23:38:04 +02:00
Aleksander Morgado
1ecbc5e025 libmm-glib,modem-time: use helper macros to manage the monitored properties 2021-07-01 23:38:04 +02:00
Aleksander Morgado
f72a6377f3 libmm-glib,modem-oma: use helper macros to manage the monitored properties 2021-07-01 23:38:04 +02:00
Aleksander Morgado
434d7be3f2 libmm-glib,modem-messaging: use helper macros to manage the monitored properties 2021-07-01 23:38:04 +02:00
Aleksander Morgado
ccefbbc0c6 libmm-glib,modem-3gpp: use helper macros to manage the monitored properties 2021-07-01 23:38:04 +02:00
Aleksander Morgado
d7acc276e5 libmm-glib,modem: use helper macros to manage the monitored properties 2021-07-01 23:38:04 +02:00
Aleksander Morgado
22396a7d1d libmm-glib,helpers: new helper macros to define common property management 2021-07-01 23:38:04 +02:00
Aleksander Morgado
afc7e5f902 libmm-glib: use single mutex in each type to sync access
There is truly no need for a per-property mutex, using a global one
for the whole object is equally fine.
2021-07-01 15:18:44 +02:00
Aleksander Morgado
30c9fc65da libmm-glib,common-helpers: refactor helper methods
Remove unused methods, like all the variant_to_array() ones, and
reorder some others so that both header and source file have the same
order always.
2021-07-01 15:18:44 +02:00
Aleksander Morgado
c9ca1ab97b cli,location: new '--location-monitor' action
This action allows us to monitor location updates as signaled via the
'Location' property, only available if location signaling has been
explicitly enabled (e.g. with --location-set-enable-signal)
2021-07-01 01:10:39 +02:00
Aleksander Morgado
6364c9818c iface-modem-location: print 0-prefixed LAC/TAC/CID values in log
Each with its expected corresponding length.
2021-07-01 01:10:39 +02:00
Aleksander Morgado
b385fc20b0 cli,location: TAC is 3 bytes in 5GNR
TAC is 3 bytes for NG-RAN as specified in 3GPP TS 38.413 clause
9.3.3.10 and in 3GPP TS 24.501 clause 9.10.3.8.

We'll always print it as 3 bytes in the cli output, as that's also
backwards compatible with the original 2 byte TAC in LTE.
2021-07-01 01:10:39 +02:00
Aleksander Morgado
f226b63301 libmm-glib,location: new signaled location API support
We allow clients to receive asynchronous updates of location
information, e.g. if "location signaling" is explicitly enabled (with
the setup() method).

But if so, we should also allow clients to easily process those
asynchronous updates in the libmm-glib library, instead of requiring
them to run explicit DBus queries to refresh the location information.

These new signaled location APIs allow clients to do so; they can
enable location signaling, and then just wait for the updates to
arrive.
2021-07-01 01:10:39 +02:00
Aleksander Morgado
4e4cb6d66a libmm-glib,location: build_locations() doesn't own the dictionary
Rework the build_locations() method so that it doesn't take ownership
of the input dictionary. This allows us reusing this method with
dictionaries for which ownership cannot be transferred.
2021-06-30 23:02:33 +02:00
Aleksander Morgado
e1fbc1ccb7 cinterion: fix double free when loading initial EPS context
The properties object stored in the context is being returned as task
result; so we should make sure that object is no longer left in the
context so that it's not freed twice.

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/395
2021-06-30 22:31:17 +02:00
Aleksander Morgado
12613eac87 libmm-glib,modem: move deprecated methods to compat source 2021-06-25 19:01:06 +02:00
Aleksander Morgado
4bf7657086 libmm-glib,location-3gpp: move deprecated methods to compat source 2021-06-25 19:01:06 +02:00
Aleksander Morgado
219700ba6d libmm-glib,simple-status: move deprecated methods to compat source 2021-06-25 19:01:06 +02:00
Aleksander Morgado
a09b13de86 libmm-glib,pco: move deprecated methods to compat source 2021-06-25 19:01:06 +02:00
Aleksander Morgado
27a192c1ef libmm-glib,modem-3gpp: move deprecated methods to compat source 2021-06-25 19:01:06 +02:00
Aleksander Morgado
6363add86a libmm-glib,location-gps-nmea: move deprecated methods to compat source 2021-06-25 19:01:06 +02:00
Aleksander Morgado
b38586a12c libmm-glib,simple-connect-properties: move deprecated methods to compat source 2021-06-25 19:01:06 +02:00
Aleksander Morgado
febd5778e7 libmm-glib,bearer-properties: move deprecated methods to compat source 2021-06-25 19:01:06 +02:00
Aleksander Morgado
c1fae670b7 libmm-glib,call-properties: move deprecated methods to compat source 2021-06-25 19:01:06 +02:00
Aleksander Morgado
49f52d9182 libmm-glib,location-gps-nmea: add missing type check in get_traces() 2021-06-25 19:01:06 +02:00
Aleksander Morgado
c368a63e01 libmm-glib,oma: deprecate method names without the mm_modem_oma prefix 2021-06-25 10:56:38 +02:00
Aleksander Morgado
fefd59e3ce libmm-glib,3gpp: fix initial-eps-bearer-settings property updates 2021-06-25 10:36:25 +02:00
Aleksander Morgado
ce50d9c483 mmcli,messaging: fix leak when printing supported storages 2021-06-24 15:53:50 +02:00
Aleksander Morgado
dfeaec99ce libmm-glib,messaging: avoid array cleanup in get_supported_storages()
If we return a reference to the internal array in
ensure_internal_supported_storages() and then we free the array
unconditionally in the caller, the next time we call it, the array
would be valid, but it would be fully empty.
2021-06-24 15:51:04 +02:00
Aleksander Morgado
059f13ffd3 libmm-glib,modem: add missing input argument checks 2021-06-24 15:43:33 +02:00
Andrew Lassalle
b0f40cf966 port-qmi: Increase the reference counter of the QrtrNode
Currently, we are not increasing the reference counter of the QrtrNode
when creating a PortQmi for a QRTR port, and we are clearing the object
when disposing the port.
2021-06-22 14:56:42 -07:00
Aleksander Morgado
6175cf562f examples,modem-watcher-python: also monitor modem state updates
$ sudo ./modem-watcher-python
  [ModemWatcher] ModemManager 1.16.6 service is available in bus
  [ModemWatcher] /org/freedesktop/ModemManager1/Modem/0: modem managed by ModemManager [015805000283080]: foxconn (MBIM [105B:E0AB])
  [ModemWatcher] /org/freedesktop/ModemManager1/Modem/0: modem state updated: disabled -> enabling (user-requested)
  [ModemWatcher] /org/freedesktop/ModemManager1/Modem/0: modem state updated: enabling -> enabled (user-requested)
  [ModemWatcher] /org/freedesktop/ModemManager1/Modem/0: modem state updated: enabled -> registered (unknown)
2021-06-21 11:22:29 +02:00
Aleksander Morgado
a357777d39 port-qmi: apply master MTU handling to all multiplexing types in qmi_wwan
If using rmnet and IP passthrough setting in qmi_wwan, also configure
the master interface with an MTU equal to the maximum data aggregation
size.

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/367
2021-06-21 08:26:44 +00:00
Alyssa Ross
a8f086bfb3 tools: fix signal type in service test
The signal definition is:

    <signal name="StateChanged">
      <arg name="old" type="i" />
      <arg name="new" type="i" />
      <arg name="reason" type="u" />
    </signal>

So the first two arguments need to be adjusted.

Without this change, the test was failing for me:

    (/build/source/tools/tests/.libs/lt-test-stub:77030): GLib-GObject-CRITICAL **: 15:05:35.276: ../gobject/gsignal.c:3167: value for 'gint' parameter 0 for signal "state-changed" is of type 'guint'
2021-06-18 08:34:06 +00:00
Aleksander Morgado
b100189f49 broadband-modem: plug memleak when listing profiles
==4263== 747 (72 direct, 675 indirect) bytes in 3 blocks are definitely lost in loss record 5,739 of 5,787
  ==4263==    at 0x4842839: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
  ==4263==    by 0x50C6DE8: g_malloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6800.1)
  ==4263==    by 0x50DDFF1: g_slice_alloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6800.1)
  ==4263==    by 0x50B8EB9: g_list_prepend (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6800.1)
  ==4263==    by 0x27CE4C: mm_3gpp_parse_cgdcont_read_response (mm-modem-helpers.c:1845)
  ==4263==    by 0x1E5485: profile_manager_cgdcont_query_ready (mm-broadband-modem.c:10200)
  ==4263==    by 0x4ED54A1: g_simple_async_result_complete (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6800.1)
  ==4263==    by 0x18605E: at_command_ready (mm-base-modem-at.c:538)
  ==4263==    by 0x4ED54A1: g_simple_async_result_complete (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6800.1)
  ==4263==    by 0x25ADFA: serial_command_ready (mm-port-serial-at.c:393)
  ==4263==    by 0x4ED54A1: g_simple_async_result_complete (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6800.1)
  ==4263==    by 0x254752: command_context_complete_and_free (mm-port-serial.c:141)
2021-06-17 15:58:57 +02:00
Aleksander Morgado
4c5733e49b build: version bump to flag existence of new API (firehose fw update) 2021-06-16 21:23:27 +02:00
Aleksander Morgado
f9231bad34 base-manager: skip using g_warning() in process_initial_kernel_events()
Use mm_obj_warn() instead.
2021-06-16 11:59:51 +02:00
Aleksander Morgado
4cf12bb8bc helpers: skip g_warning() in mm_3gpp_parse_ws46_test_response()
Use mm_obj_warn() instead.
2021-06-16 11:59:51 +02:00