Commit Graph

5874 Commits

Author SHA1 Message Date
Aleksander Morgado
72674225ca api,modem: deprecate ListBearers() method
This method is completely unnecessary as we have the readable Bearers
property already in place, so let's deprecate it.

Worth noting that the mm_modem_list_bearers() async/sync methods in
libmm-glib were not really using the ListBearers() method anyway, they
are using the property directly. These methods are NOT deprecated,
because they allow us to get a list of MMBearer objects, instead of
just the list of DBus paths that we get when reading the Bearers
property directly.

We also remove --list-bearers from the mmcli operation list as we have
already the same information in the standard modem output.
2018-11-26 16:51:35 +00:00
Aleksander Morgado
a15193b7ca broadband-modem: enable and handle +CGEV indications
The +CGEV indications allow us to get notified of packet domain
events like network-initiated or ME-initiated disconnections on
specific connected contexts, as well as full PS detach events (all
contexts disconnected). If the modem supports these indications, we
will enable them with +CGEREP and will then process them when they are
emitted by the modem.

If a full PS detach event happens, we will explicitly disconnect all
connected bearers.

If a deactivation inidication is received for a single context, we
will look for the associated bearer by CID and explicitly disconnect
it.
2018-11-26 16:28:39 +00:00
Aleksander Morgado
73df7087fd cli,signal: fix missing separator in GSM block
Each group of items should have a separator.
2018-11-20 09:17:32 +01:00
Aleksander Morgado
b98accf660 cli,signal: fix unknown value reporting
At this point we want the values enclosed between single quotes,
e.g. so that the fields are parsed easier by scripts.

This issue will not have any practical relevance as soon as the
key-value pair output support is merged.
2018-11-20 09:15:41 +01:00
Aleksander Morgado
cc6a286cc4 dell: don't ignore ttyUSB1 in the DW5821e
This port was ignored because it was non-functional in early
development firmware images, and made device probing very slow.

This has been solved in the first production images of the DW5821e
module.
2018-11-12 12:28:41 +01:00
Aleksander Morgado
ce945dc15f doc,libmm-glib: mm_pco_new() is not part of public API 2018-11-12 12:22:35 +01:00
Aleksander Morgado
270d3318ea docs,libmm-glib: flag as private the mm_location_3gpp_reset() method 2018-11-12 12:22:28 +01:00
Aleksander Morgado
8b8bc0773f libmm-glib,bearer-properties: don't document non-public API
To avoid gtk-doc complaining about that.
2018-11-12 12:22:24 +01:00
Aleksander Morgado
e9fd90a70c libmm-glib,3gpp: add missing set_eps_ue_mode_operation() API docs 2018-11-12 12:22:19 +01:00
Aleksander Morgado
ae84e3faf4 docs: remove duplicated mm-call-audio-format section 2018-11-12 12:22:14 +01:00
Ben Chan
bf1b396596 tests: use memcmp() instead of g_assert_cmpmem() for now
g_assert_cmpmem() isn't available until glib 2.46, while the minimum
glib version required by ModemManager is 2.36. This patch replaces the
uses of g_assert_cmpmem() with memcmp() instead.
2018-11-08 17:00:59 +01:00
Ben Chan
2522efb359 broadband-modem-mbim: update ms-basic-connect-extensions naming
libmbim 1.17.4 (commit 3eeaa4248b98 "ms-basic-connect-extensions: rename
service") added a MS prefix to the Basic Connectivity Extensions
service. This patch updates the MMBroadbandModemMbim code accordingly.
2018-11-07 09:52:30 +01:00
Sven Schwermer
98fbc7a8b3 ublox: Add CDC-ECM support for SARA/LISA-U2xx
The SARA-U2xx and LISA-U20x require the PDP context to be activated via
+UCEDATA instead of +CGACT=1 when using the CDC-ECM USB profile.
Furthermore, they expect the DHCP discover packet from the TE while the
command is running, i.e. while the modem has not replied yet. In order
to achieve that, the bearer is marked as connected as soon as the
command is issued. This makes the NetworkManager start the DHCP process.
If the modem replies with an error, the bearer will be marked
disconnected later on.

Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
2018-10-31 11:07:39 +01:00
Aleksander Morgado
668d6af408 docs: add missing MMCallAudioFormat reference in docs 2018-10-27 11:18:47 +02:00
Aleksander Morgado
a32883d358 doc: fix multiple missing references 2018-10-27 10:53:31 +02:00
Ben Chan
864679543b build: ignore generated ChangeLog 2018-10-27 10:09:51 +02:00
Ben Chan
aa85aeae3d libqcdm: remove useless checks on always true condition
result.c: In function ‘qcdm_result_add_u8_array’:
result.c:338:36: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
     qcdm_return_if_fail (array_len >= 0);

result.c: In function ‘qcdm_result_add_u16_array’:
result.c:418:36: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
     qcdm_return_if_fail (array_len >= 0);
                                    ^
2018-10-27 10:09:51 +02:00
Ben Chan
737eff557d modem-helpers: remove useless checks on always true condition
mm-modem-helpers.c:3075:31: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
     g_return_val_if_fail (idx >= 0, NULL);
                               ^
2018-10-27 10:09:51 +02:00
Ben Chan
b76db60313 ublox: fix username and password passed to +UAUTHREQ 2018-10-26 10:56:57 -07:00
Ben Chan
be81f7e5a2 sim-qmi: use QMI UIM service to read IMSI if needed
If a QMI modem doesn't support the deprecated DMS_UIM_GET_IMSI command,
use the UIM_READ_TRANSPARENT command to read EFimsi on the SIM to
determine the IMSI.
2018-10-26 09:50:51 -07:00
Ben Chan
055177fdf0 sim-qmi: use QMI UIM service to read ICCID if needed
If a QMI modem doesn't support the deprecated DMS_UIM_GET_ICCID command,
use the UIM_READ_TRANSPARENT command to read EFiccid on the SIM to
determine the ICCID.
2018-10-26 09:50:01 -07:00
Ben Chan
942bdeaec2 modem-helpers: new helper to convert binary-coded decimals
This patch adds a mm_bcd_to_string() helper function to convert a byte
array representing a binary-coded decimal (BCD) number to a string
representing the equivalent decimal number.
2018-10-26 09:50:01 -07:00
Aleksander Morgado
025fcb7e92 api: deprecate SubscriptionState property 2018-10-26 09:41:44 -07:00
Ben Chan
408a2a9c6c altair-lte: migrate from SubscriptionState to Pco property
In preparation of deprecating the SubscriptionState property in the
Modem3gpp interface, this CL updates the altair-lte plugin to update the
Pco property in the Modem3gpp interface upon receiving %PCOINFO
notification.
2018-10-26 09:41:44 -07:00
Ben Chan
beb1aab178 sierra: remove unused 'self' variable in scact_periodic_query_ready() 2018-10-22 11:23:29 +02:00
Ben Chan
55e011b5da broadband-bearer: remove unused 'self' variables 2018-10-22 11:23:24 +02:00
Ben Chan
14ca3efb7f xmm: remove unused 'priv' variable in xact_query_bands_ready() 2018-10-20 13:57:18 +02:00
Ben Chan
9c03ce033c base-call: remove unused 'self' variables 2018-10-20 13:56:13 +02:00
Ben Chan
436f9ef7e6 core: use g_clear_pointer() to avoid explicitly checking and resetting pointers 2018-10-18 13:17:36 +02:00
Ben Chan
7de6b6f2e1 core: remove unnecessary NULL checks for g_match_info_free()
g_match_info_free() already check if the given pointer is NULL and does
nothing on a NULL pointer.
2018-10-18 13:17:36 +02:00
Ben Chan
749b806c30 core: remove unnecessary NULL checks for g_free()
g_free() already check if the given pointer is NULL and does nothing on
a NULL pointer.
2018-10-18 13:17:36 +02:00
Aleksander Morgado
4156fd2718 xmm: implement A-GPS support 2018-10-17 11:18:36 +02:00
Aleksander Morgado
fe05383fe5 libmm-glib,gps-raw: prefer $GNGGA over $GPGGA
The $GNGGA traces provide "combined" values when multiple satellite
constellations are used (e.g. GPS+GLONASS). Prefer these values over
the GPS-only $GPGGA traces if both are received.
2018-10-17 11:17:17 +02:00
Aleksander Morgado
2ffd0adf05 xmm: implement XLCSLSR based GPS management and report 2018-10-17 11:17:11 +02:00
Ben Chan
04ca18c01f modem-helpers-qmi: include string.h for memset()
This patch fixes the following compiler warning:

mm-modem-helpers-qmi.c:568:5: error: implicitly declaring library function 'memset' with type 'void *(void *, int, unsigned int)' [-Werror,-Wimplicit-function-declaration]
    memset (extended_qmi_lte_bands, 0, extended_qmi_lte_bands_size * sizeof (guint64));
    ^
2018-10-17 11:05:46 +02:00
Ben Chan
b134272532 sim-qmi: avoid unnecessary MM_SIM_QMI() call on MMSimQmi object 2018-10-16 12:07:43 -07:00
Aleksander Morgado
c9a56605ca huawei,call: check for ^CVOICE support and enable audio streaming
USB sticks only support voice if ^CVOICE returns 0.  And to enable audio
streaming on the "Application" port (whatever is returned by AT^DDSETEX=?)
we need to send AT^DDSETEX=<port> after starting the call.  After that
the serial port will send and accept signed 16-bit 8000hz PCM audio, or
whatever format is returned by ^CVOICE?.

This patch is a rework of the original implementation by:
Dan Williams <dcbw@redhat.com>
2018-10-16 17:09:21 +00:00
Dan Williams
e5f65d1b27 port-serial: don't allow opens when a port is connected 2018-10-16 17:09:21 +00:00
Aleksander Morgado
329caff84f base-call: implement generic audio channel setup/cleanup handlers
Modems that require specific commands to setup or cleanup the audio
channel as soon as a call is ongoing can subclass these two new
methods.

The setup() method is considered part of the call start/accept
process, and so if it fails, the whole operation will fail.

The failures in the cleanup() method will be reported in the log, but
otherwise ignored, as this operation may be executed without any
user intervention (e.g. if the remote party hangs up).
2018-10-16 17:09:21 +00:00
Aleksander Morgado
17c511ec69 api,call: new state reason to report audio setup failures 2018-10-16 17:09:21 +00:00
Dan Williams
627303a748 api/libmm-glib/cli: add AudioPort and AudioFormat properties to the Call object 2018-10-16 17:09:21 +00:00
Aleksander Morgado
16162a5033 ublox: implement detailed call state transitions with +UCALLSTAT
Among other things, we now support:
  * Dialing to Ringing Out transition.
  * Ringing Out to Active transition.
2018-10-16 17:09:21 +00:00
Aleksander Morgado
89218a0874 iface-modem-voice: remove unused declaration 2018-10-16 17:09:21 +00:00
Aleksander Morgado
2b85d27fc0 iface-modem-voice: simplify reporting new incoming calls
Allow creating a new incoming call object also when we receive +CLIP,
so that we can have the remote caller number as soon as the object is
created.
2018-10-16 17:09:21 +00:00
Aleksander Morgado
b2d859e370 base-call: treat 'ringing-in' as an in-call state
So that we setup in-call events as soon as we get the incoming call
ringing in. This allows us to have plugin-specific implementations
e.g. reporting call termination when the remote caller hangs up.
2018-10-16 17:09:21 +00:00
Aleksander Morgado
887376fe44 mm-iface-mode: provide direction and number when creating calls
Calls created from property bundles are always outgoing, while calls
created as input events from URCs during runtime are always incoming.

This change makes it mandatory to provide at least direction of the
call when the object is created, leaving the number as an optional
property that may or may not be known in advance (e.g. it would be
optional only for incoming calls).
2018-10-16 17:09:21 +00:00
Aleksander Morgado
44413308b2 iface-modem-voice: always create plugin-specified call objects
The Voice interface logic must always use the create_call() object
from its own interface to create call objects, as that is the method
that plugins can subclass to provide plugin-specific call objects.

This applies to both incoming and outgoing calls.
2018-10-16 17:09:21 +00:00
Aleksander Morgado
fc0feee654 huawei,call: handle in-call URCs in the call object itself
Instead of handling the URCs in the modem object and using the
MMIfaceModem as a bridge to report the status read from the URC to a
call obtained from the MMCallList... just handle the URCs in the call
object itself.
2018-10-16 17:09:21 +00:00
Aleksander Morgado
f71e120fb7 huawei: ignore voice origination info URCs
These are not used for anything, so just simplify code.
2018-10-16 17:09:21 +00:00
Aleksander Morgado
ae917d03fd huawei: if URCs fully ignored always, don't treat them as voice-specific 2018-10-16 17:09:21 +00:00