Commit Graph

8129 Commits

Author SHA1 Message Date
Aleksander Morgado
6ec97a29ae foxconn: firmware info loading only if MBIM-QMUX enabled in libqmi
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/477
2022-01-20 13:46:23 +01:00
Aleksander Morgado
bb256b0cec quectel: new ID_MM_QUECTEL_FIREHOSE udev tag
To identify which devices support the firehose update protocol.
2022-01-18 11:15:14 +01:00
Ivan Mikhanchuk
22e38199a9 quectel: combine firmware functions in mm-shared-quectel 2022-01-18 10:36:15 +01:00
Aleksander Morgado
c9ffa2c9e5 quectel: fix reference cycle
The 'update_settings' object must be referenced before the task is completed.
2022-01-18 10:29:45 +01:00
Aleksander Morgado
af0665c573 broadband-modem-mbim: implement support for GetCellInfo() 2022-01-18 09:00:10 +00:00
Aleksander Morgado
3c49e04377 iface-modem: implement support for 'GetCellInfo()' 2022-01-18 09:00:10 +00:00
Aleksander Morgado
c4f59aebe0 mmcli,modem: new '--get-cell-info' action 2022-01-18 09:00:10 +00:00
Aleksander Morgado
dbeeb98745 libmm-glib,modem: new methods to get list of cell infos 2022-01-18 09:00:10 +00:00
Aleksander Morgado
ec7bcc88d3 libmm-glib,cell-info-nr5g: new 'MMCellInfoNr5g' object
Implementing support for 5GNR cell info.
2022-01-18 09:00:10 +00:00
Aleksander Morgado
c1fc027f66 libmm-glib,cell-info-lte: new 'MMCellInfoLte' object
Implementing support for LTE cell info.
2022-01-18 09:00:10 +00:00
Aleksander Morgado
e682b8a499 libmm-glib,cell-info-tdscdma: new 'MMCellInfoTdscdma' object
Implementing support for TDSCDMA cell info.
2022-01-18 09:00:10 +00:00
Aleksander Morgado
b5a5d58650 libmm-glib,cell-info-umts: new 'MMCellInfoUmts' object
Implementing support for UMTS cell info.
2022-01-18 09:00:10 +00:00
Aleksander Morgado
7c7f97807b libmm-glib,cell-info-gsm: new 'MMCellInfoGsm' object
Implementing support for GSM cell info.
2022-01-18 09:00:10 +00:00
Aleksander Morgado
58de2a9904 libmm-glib,cell-info-cdma: new 'MMCellInfoCdma' object
Implementing support for CDMA cell info.
2022-01-18 09:00:10 +00:00
Aleksander Morgado
bfb66970f2 libmm-glib,cell-info: new helpers to implement subclasses 2022-01-18 09:00:10 +00:00
Aleksander Morgado
3ca7201444 libmm-glib,cell-info: new 'MMCellInfo' object
Generic base object to implement support for the different types of
cell infos.

Provides support for the 'serving' boolean, which is common to all.
2022-01-18 09:00:10 +00:00
Aleksander Morgado
554faa855c api,modem: new 'GetCellInfo()' method
This new method allows querying the modem for information about the
current serving cell(s) as well as any other neighboring cell that may
be found.

The information for the cells is given in an array of dictionaries,
where each element of the dictionary is a new dictionary itself.

Each cell type has a different set of properties that may be given in
the dictionary, and some of those properties in each type are also
applicable under certain conditions (e.g. only applicable to the cell
if it's a 'serving' cell instead of 'neighboring').

The API documentation explains in detail what is expected in each
case.
2022-01-18 09:00:10 +00:00
Aleksander Morgado
322a601b29 broadband-modem-qmi: if UNSUPPORTED, ignore power update operation
We were returning success on this operation upon an UNSUPPORTED error,
and we should keep on doing the same after all the indication support
changes.
2022-01-14 10:36:39 +01:00
Aleksander Morgado
60f61e9740 broadband-modem-qmi: setup operation context for power up/down/off
We must keep a valid QmiClient reference for as long as the operation
runs, so that we can use it in all the request send operations we do,
and also so that we can remove the indication id upon completing the
operation.

The timeout id and indication id, which are also part of a single
power operation are also included in the operation context, because
they don't have any other meaning out of it.

The operation context is stored as task data.
2022-01-14 10:36:39 +01:00
Aleksander Morgado
1291754e60 broadband-modem-qmi: rework log and error messages 2022-01-14 10:36:39 +01:00
Aleksander Morgado
3216e7a21a broadband-modem-qmi: don't pass full reference to signal handlers
As in the case of the timeouts, we should not pass a full reference as
data to the signal handler as we don't know how many times we'll
receive the signal or if we'll ever receive it.

We already make sure that the signal handler is disconnected when the
operation ends, so we can be sure the self pointer is valid while the
signal handler is connected.
2022-01-14 10:36:39 +01:00
Aleksander Morgado
504d6f51a3 broadband-modem-qmi: reorder code and minor coding style fixes 2022-01-14 10:36:39 +01:00
Aleksander Morgado
c3fcb66acf broadband-modem-qmi: don't pass full reference in timeouts
The timeout may not be called if we remove it earlier (e.g. if the
indication is received) and therefore we must not pass a full new
reference, otherwise it may get leaked.

There is no problem with the validity of the self pointer in timeout
callbacks because we're removing the timeout as part of the operation
teardown logic.
2022-01-11 11:33:38 +01:00
Aleksander Morgado
fa1e581f13 broadband-modem-qmi: remove paranoid assert
We just created the GTask and we just updated the stored pointer,
checking for it being non-NULL at this point is a bit paranoid
2022-01-11 11:32:36 +01:00
Aleksander Morgado
447243f667 broadband-modem-qmi: avoid capitalizing all words in error message 2022-01-11 11:32:02 +01:00
Prakash Pabba
2d96df774a broadband-modem-qmi: Handle DMS operating mode indications
If Mode online is triggered just after Mode LPM and Mode LPM
processing is not complete in modem, modem will not process the next
request and the device will be stuck in an unwanted modem power
state. Thus, wait for a mode change indication from the modem before
declaring that a power on/off has been successful.
2022-01-11 11:30:19 +01:00
Sven Schwermer
300e1023ef fibocom: Double-check connection after dialing
Fibocom's documentation states that we must double-check the connection
is established when setting up an ECM connection. The possible replies -
according to the documentation - are:

  +GTRNDIS: <state>,<cid>,<ip>,<prim. dns>,<sec. dns>
  OK

or

  +GTRNDIS: 0

We just care about the state value which is 1 if everything worked.
2022-01-11 09:31:32 +00:00
Sven Schwermer
382a7c2425 fibocom: Use ECM bearer if +GTRNDIS is available
Some modems might have a net port but don't support +GTRNDIS which is
used by the ECM bearer. That case will be caught by this additional
check.
2022-01-11 09:31:32 +00:00
Sven Schwermer
c174fd29dc fibocom: Add L610 support 2022-01-11 09:31:32 +00:00
Sven Schwermer
2830cb3273 fibocom: Add udev port rules for MA510-GL 2022-01-11 09:31:32 +00:00
Sven Schwermer
c21bcb5526 fibocom: Add bearer for ECM-based connections 2022-01-11 09:31:32 +00:00
Sven Schwermer
6ad17fb22e fibocom: Subclass broadband modem
This is required in order to be able to use a custom bearer which in
turn is necessary for establishing ECM connections.
2022-01-11 09:31:32 +00:00
Dylan Van Assche
07d7f596d3 plugins/quectel/mm-shared-quectel: use QGMR to set version
Quectel modems report only their major firmware version through
AT+GMR, use AT+QGMR instead to report the full firmware version.
2022-01-11 08:42:53 +00:00
Dylan Van Assche
3f76b3b7d1 plugins/quectel/mm-broadband-modem-qmi-quectel: ignore carrier revision
Quectel EG25-G QMI modem firmware revisions are not matched with carrier configs.
Different VoLTE profiles might be selected by the user causing
the carrier config revision to change.

Since fwupd uses this string for firmware updates, it gets confused and
thinks the user has an update available.
2022-01-11 08:41:37 +00:00
Aleksander Morgado
fb0dfb8751 iface-modem-3gpp: fix variant ref handling in scan output 2022-01-07 21:35:43 +01:00
Aleksander Morgado
4515b00020 libmm-glib,modem-3gpp: fix leak when processing scan results 2022-01-07 21:35:43 +01:00
Aleksander Morgado
d30ad946d0 build: ignore test-kernel-device-helpers 2022-01-07 12:38:52 +01:00
Aleksander Morgado
1c1ba66d5e docs,libmm-glib: add missing references to reload stats supported related methods 2022-01-06 20:51:59 +01:00
Aleksander Morgado
cf210e3916 docs,libmm-glib: add missing reference to index field related methods 2022-01-06 20:51:59 +01:00
Aleksander Morgado
6449828535 docs,libmm-glib: fix references to new SIM property methods and types 2022-01-06 20:51:59 +01:00
Aleksander Morgado
0eaf42572b docs,libmm-glib: add missing reference for MMNr5gRegistrationSettings 2022-01-06 20:51:59 +01:00
Aleksander Morgado
bae2f3b204 api,modem: fix alignment in SetPrimarySimSlot() 2022-01-06 20:31:29 +01:00
Bruce A. Johnson
91ed72aa29 core: switch bash shell scripts to use /bin/sh for use w/Busybox.
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/483
2022-01-05 10:26:16 +01:00
Aleksander Morgado
791fb38417 cli: fix 3GPP location mcc/mnc field names 2021-12-26 11:04:05 +01:00
Aleksander Morgado
3fac73a113 iface-modem-simple: explicit short wait after enabling
When we have just enabled, we want to give it some time before
starting the registration process, so that any pending registration
update that may have been scheduled during the enabling phase is
applied. We don't want to trigger a new automatic registration if
e.g. we're already registered.
2021-12-26 11:02:45 +01:00
Aleksander Morgado
1ffd693f54 iface-modem-simple: fix connection attempt start place
The 'ENABLE + 1' step is 'WAIT_FOR_ENABLED' really, and that should be
only used when the current state is not a final one. If we're already
enabled, or registered, or connected, then jump to 'REGISTER' right
away.
2021-12-26 11:02:45 +01:00
Aleksander Morgado
1199fa934d broadband-modem-mbim: schedule reg info updates as soon as enabled
During the enabling phase, the modem may receive a lot of asynchronous
updates reporting registration info changes, but we were fully
ignoring them because the modem was not yet enabled. The problem with
this is that as soon as we reach the enabled state, we may not receive
additional info, so we would be left in 'enabled' state until new
asynchronous updates are received or until we start a connection
attempt.

We can solve this by triggering an explicit update with the
registration information that we have cached as soon as we're enabled.
2021-12-26 11:02:45 +01:00
Aleksander Morgado
73eda8cdc8 broadband-modem-mbim: don't miss operator id/name on packet service updates 2021-12-26 11:01:50 +01:00
Aleksander Morgado
59c79b07ae iface-modem: minor coding style changes 2021-12-26 11:01:50 +01:00
Aleksander Morgado
f2f2dfec13 broadband-modem-mbim: reload ATDS location on reg state changes
Only if transitioning into a "registered" state ("home", "roaming",
"partner") or if "denied"; otherwise, assume LAC/TAC/CID are all
unknown.

This change makes the logic also reload the location info on
registration updates reported asynchronously via notifications.
2021-12-26 11:01:50 +01:00