Commit Graph

7297 Commits

Author SHA1 Message Date
Aleksander Morgado
88e4c0492d cli,modem: output should include all 3GPP EPS fields always
Even if some fields wouldn't apply to some modem, we're always
including all in the output so that clients can assume the fields are
always given.

Fix adding the 3GPP EPS related fields unconditionally.
2018-12-07 16:20:53 +00:00
Aleksander Morgado
c12b5fa027 broadband-modem-mbim: implement initial EPS bearer settings updating
We use the "LTE attach config" extension defined by Microsoft to update
the initial EPS bearer settings.

https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-lte-attach-operations
2018-12-07 16:20:53 +00:00
Aleksander Morgado
2b25673f34 broadband-modem-mbim: implement initial EPS bearer settings loading
We use the "LTE attach config" extension defined by Microsoft to query
the initial EPS bearer settings.

https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-lte-attach-operations
2018-12-07 16:20:53 +00:00
Aleksander Morgado
1e09b586a7 broadband-modem-mbim: implement initial EPS bearer status support
We use the "LTE attach status" extension defined by Microsoft to query
and monitor the initial EPS bearer settings.

https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-lte-attach-operations
2018-12-07 16:20:53 +00:00
Aleksander Morgado
48ba504f4e helpers-mbim: new method to convert IP type settings to/from MM 2018-12-07 16:20:53 +00:00
Aleksander Morgado
d6e2c69129 helpers-mbim: new method to convert auth settings to/from MM 2018-12-07 16:20:53 +00:00
Aleksander Morgado
4cb6751daf api,modem-3gpp: new 'SetInitialEpsBearerSettings' method
This method allows users to modify the settings used during the
initial LTE attach procedure.
2018-12-07 16:20:53 +00:00
Aleksander Morgado
8281b5048b api,modem-3gpp: new 'InitialEpsBearerSettings' property
This property shows the settings stored in the device to be used
during the initial LTE attach procedure.
2018-12-07 16:20:53 +00:00
Aleksander Morgado
9c3ac2fb60 api,modem-3gpp: new 'InitialEpsBearer' property
This property contains the DBus path of a Bearer object of type
MM_BEARER_TYPE_DEFAULT_ATTACH, which is automatically exposed by the
modem when registered in the LTE network.

Unlike standard bearer objects created by the user, this bearer won't
allow any connection/disconnection request, as its status is bound to
the LTE registration exclusively.

The bearer settings exposed by the object include the APN details that
have been used during the initial packet network attach, which may be
defined by modem settings (e.g. if previously configured in the
firmware which APN to use for the given SIM card operator) or by the
network itself (e.g. if none configured, or if a network override is
required as when roaming).

The bearer object will be created as soon as the LTE attach status
details are known, and only while the modem is enabled. The
implementation allows modems to update the LTE attach status details
during runtime, so the bearer object with the settings may be
recreated during runtime as well.
2018-12-07 16:20:53 +00:00
Aleksander Morgado
dc154cf005 api,bearer: new 'BearerType' property
Until now we have only allowed to use and setup 'default bearers' (in
4G) or 'primary contexts' (in 2G/3G).

We can define a couple of additional bearer types, though:

* The 'dedicated bearers' (in 4G) or 'secondary contexts' (in 2G/3G),
  which are associated to a specific default/primary one, but which
  provide specific QoS settings configured via traffic flow templates.

* The 'initial default EPS bearer', which is a special case of default
  bearer in LTE, which is automatically created and connected when the
  modem is registered in the LTE network.

This commit introduces a new 'MMBearerType' enumeration that will be
associated to each bearer through a 'BearerType' property in the
org.freedesktop.ModemManager1.Bearer interface, showing what kind of
bearer/context this is.

By default, right now, all bearer objects created are 'default'
bearers.
2018-12-07 16:20:53 +00:00
Aleksander Morgado
46d627ff83 libmm-glib: fix mm_manager_scan() operation
The reporting of the operation result was reversed in the async method.
2018-12-07 17:00:36 +01:00
Aleksander Morgado
1ef58be792 libmm-glib: fix mm_manager_set_logging() operation
The reporting of the operation result was reversed in the async method.
2018-12-07 16:59:44 +01:00
Dan Williams
397faef3c5 mm-common-helpers: add mm_autoptr helpers for GRegex and GMatchInfo
Alias them to g_autoptr() on glib >= 2.44, otherwise re-implement.
2018-12-04 17:39:15 +00:00
Aleksander Morgado
9c15579347 build: version bump to flag existence of new API (runtime version reporting) 2018-12-04 17:26:59 +00:00
Aleksander Morgado
c7af14cc80 api,manager: new 'Version' property
This string shows the runtime version of the ModemManager daemon.

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/94
2018-12-04 17:26:59 +00:00
Aleksander Morgado
d0bb8d1d50 libmm-glib,manager: fix manager interface proxy creation
We were re-using the GDBusObjectManagerClientFlags set in the
MMManager object as GDBusProxyFlags for the Manager1 interface proxy
object, and that was completely broken.

Instead of setting "DO_NOT_AUTO_START" in the proxy, we were actually
setting "DO_NOT_LOAD_PROPERTIES"...
2018-12-04 17:26:59 +00:00
Aleksander Morgado
3b743dcc36 helpers-qmi: fix UTRAN band 6 vs band 19 mapping
Looks like the original band 6 mapping was ok, and the mismatch was
introduced when adding support for band 19.

https://forum.sierrawireless.com/t/utran-19-band-configuration-in-sdk/14625

Fixes 518d62e731.
2018-12-03 17:43:21 +00:00
Ben Chan
03fdb33e1c cli,output: include string.h for strlen()
This patch fixes the following compiler warning:

mmcli-output.c:783:19: error: implicitly declaring library function 'strlen' with type 'unsigned long (const char *)' [-Werror,-Wimplicit-function-declaration]
            aux = strlen (section_infos[field_infos[item_l->field].section].name);
                  ^
2018-11-30 11:36:07 +01:00
Ben Chan
9389265bab cli,call: fix incorrect string conversion of MMCallStateReason enum
This patch fixes the following issue with string conversion of a MMCallStateReason enum:

mmcli-call.c:160:88: error: implicit conversion from enumeration type 'MMCallStateReason' to different enumeration type 'MMCallState' [-Werror,-Wenum-conversion]
    mmcli_output_string (MMC_F_CALL_PROPERTIES_STATE_REASON, mm_call_state_get_string (mm_call_get_state_reason (call)));
                                                             ~~~~~~~~~~~~~~~~~~~~~~~~  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2018-11-30 11:35:10 +01:00
Aleksander Morgado
7510b3355d base-modem: fix segfault when disposing modem
If we have a modem reference around during an ongoing operation but
the modem has already been disposed after getting removed from the
system, we were trying to iterate a NULL hash table, which led to a
crash.

https://lists.freedesktop.org/archives/modemmanager-devel/2018-November/006915.html

Reported by Sebastien Fabre <sebastien.fabre@sigfox.com>
2018-11-28 11:58:34 +01:00
Aleksander Morgado
b0fba14b1e cli: allow multiple output format types
In addition to the standard human-friendly output, we now allow a
machine-friendly key-value pair output, much easier to parse and use
by programs that look at the mmcli output.

This new key-value pair output should be treated as API from now on, so
third-party programs can assume the output is compatible from one
release to another.
2018-11-26 16:51:35 +00:00
Aleksander Morgado
cafc40245d cli,location: remove redundant --location-get-XXX actions
The --location-get action provides full location information from all
sources, which is better than per-source actions, as those were anyway
using the same API method to load location information as the global
one.
2018-11-26 16:51:35 +00:00
Aleksander Morgado
613aceabda cli,simple: remove redundant --simple-status action
The Simple.GetStatus() method is useful for simple DBus clients that
don't need all the information associated to the modem, just the most
important bits. But, in our case, the information provided by this
method is already given by the standard modem info output, so it is
totally redundant.
2018-11-26 16:51:35 +00:00
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