Age | Commit message (Collapse) | Author |
|
|
|
|
|
We implement both loading the current configuration in use, as well as
automatically switching to a different one if a mapping file is
available.
|
|
During initialization phase we will allow querying the modem for the
details of which carrier-specific configuration is being used, and
will expose a description string in the API.
In addition to showing the current configuration, we will also allow
automatically switching the configuration based on the SIM card
detected in the device. In order to allow this, plugins/modems will
need to provide the expected mapping between carrier config
description and MCCMNC. This mapping cannot be generic, because
different manufacturers may use different description strings.
|
|
|
|
|
|
The raw/nmea GPS source setup is using QMI LOC operations, so there is
no point in disallowing the control of the unmanaged GPS source, as
the GPS data TTY is exclusively used for unmanaged GPS.
|
|
But only if the plugin implementation allows to do so.
|
|
|
|
This patch fixes several invalid checks like this:
array[i] && i < G_N_ELEMENTS (array)
which should instead be:
i < G_N_ELEMENTS (array) && array[i]
to avoid an out-of-bounds access of the array.
Fixes: c1aa658802940327369a6a4cc50d35a4a6a9b04e
|
|
[1551646332.583651] (ttyACM2): --> 'AT+UGCNTRD<CR>'
[1551646332.626567] (ttyACM2): <-- '<CR><LF>+UGCNTRD: 1,0,0,0,0<CR><LF><CR><LF>+UGCNTRD: 2,1397316870,113728263578,1397316870,113728263578<CR><LF><CR><LF>OK<CR><LF>'
[1551646332.627120] Reloading stats failed: Couldn't load primary PDP context 2 statistics: Error parsing session RX bytes
|
|
We use strtoull() to read a "unsigned long long" that is always at
least 64bits, even in 32bit systems.
|
|
|
|
|
|
|
|
|
|
Modes and band support are added through AT commands.
|
|
|
|
version
And require libqmi 1.23.1.
|
|
Telit modems LM940/960 need more time for becoming responsive
to qmi requests after device appearance.
|
|
If ModemManager fails to open a QMI port with data format update, it
retries without update. It would be useful to log the reason why the
first try failed; for example on RHEL 7.6 ModemManager fails to write
to sysfs due to SELinux. With this commit, the following message would
be logged:
<debug> QMI port open operation finished
<debug> Couldn't open QMI port with data format update: Expected data
format not updated properly: Failed to open file
'/sys/class/net/wwp0s29u1u2i8/qmi/raw_ip' for R/W: Permission denied
<debug> Opening QMI device...
instead of just:
<debug> QMI port open operation finished
<debug> Opening QMI device...
While at it, also fix the GError leak.
|
|
This allows us to run unit tests on every commit to the gitlab
instance.
|
|
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/merge_requests/68
|
|
If the modem ends up not being managed by ModemManager, detect it
during the '--monitor-state' mmcli operation and report it.
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/106
|
|
We were filtering the 4G bands supported by the module when parsing
+UBANDSEL responses, e.g. so that we would not reply unsupported bands
for a given ubandsel value.
But we need the same filtering in 2G and 3G bands, because for example
some modules may support a specific 4G band with a given ubandsel
value, but NOT the associated 3G band. E.g. the TOBY-R200 supports
EUTRAN-4 but not UTRAN-4.
|
|
|
|
|
|
We cannot have the ubandsel value comparision inside the for(;;) stop
conditions, because that would mean the loop would stop whenever the
comparison fails. We want to look for a value, so we need to loop the
whole array and stop once we find it only.
|
|
So, assert() if for any reason we're asking to use a band that we
don't find in the list.
|
|
|
|
|
|
We're hardcoding the supported bands for each u-blox model, so there
really is no point in having unit tests for them.
|
|
|
|
|
|
When we're changing modes or bands, we only need to keep track of the
initial power state when CFUN=4/CFUN=1 based logic is used. When using
COPS, we do not need to track initial power state or recover it after
the operation.
|
|
|
|
We're not going to use CFUN/COPS just for bands, but also for modes,
so use more generic names.
|
|
If both UBANDSEL and UACT are unsupported, we were not initializing
the command variable.
|
|
If both UACT and UBANDSEL are unsupported, the async operation was
never completed.
|
|
Make mm_ublox_get_support_config() return FALSE only when GError is
set. And also, prepare a preload_support_config() method to be run
before using any information from the support configuration (i.e.
don't do it in load_supported_bands(), do it in load_current_bands()
or in set_current_bands().
|
|
The implemented register_in_network() was totally unused.
|
|
acquire_power_operation (MMBroadbandModemUblox *self,
^~~~~~~~~~~~~~~~~~~~~~~
ublox/mm-broadband-modem-ublox.c:74:1: error: no previous prototype for ‘acquire_power_operation’ [-Werror=missing-prototypes]
|
|
ublox/mm-modem-helpers-ublox.c:1291:14: error: unused variable ‘found’ [-Werror=unused-variable]
gboolean found;
^~~~~
|
|
ublox/mm-modem-helpers-ublox.c:1298:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
guint i, j, k;
^~~~~
|
|
If mm_ublox_get_supported_bands() and mm_ublox_get_support_config()
both failed, we would be completing the GTask twice. Fix it by
chaining both steps so that the second one is not run if the first one
is already failed.
|
|
|
|
The u-blox plugin was originally written to support the TOBY-L4 only.
This caused issues with mmcli reporting the correct supported and
current bands because the logic was based only for the TOBY-L4 and
the AT commands used in the implementaion are only supported by
a couple of modems.
There is now a hard-coded modem list that contains the supported bands
and the supported modes. A hard-coded list was chosen over a logic
based list because ublox modems only report the frequency of the bands
they support in the current mode they are in. For further justification,
the reported frequency could relate to multiple bands that are not all
supported by the modem, and not all the supported bands are always caught
depending on the mode the modem is in (e.g. 2G, 3G, 4G). The only
realiable way to retrieve the correct supported bands is to have the list
hard-coded. Based off of the modem, the code chooses whether it is
appropriate to issue +UACT or +UBANDSEL to retrieve the current bands list.
Additionally, the appropriate AT command of +CFUN=4 or +COPS=2 is chosen
to detach from the network when the mmcli --set-current-bands command is
issued. The new setup also adds a header file that contains the modem list.
This should make adding support for future additional modems easier as long
as future modems stick to the same AT command interface that is currently
supported by the plugin.
|
|
|
|
|
|
No need to process the detailed dictionary if no explicit method is
reported as supported. Avoids unnecessary warnings:
$ mmcli -m 1 --firmware-status
** (mmcli:6887): WARNING **: 15:52:54.664: Invalid initial update settings: Missing required 'device-ids' setting
error: firmware status unsupported
|