Commit Graph

8619 Commits

Author SHA1 Message Date
Aleksander Morgado
4a62ea3e84 broadband-modem-mbim: SIM slots ptr array should have GDestroyNotify
The SIM slots ptr array should have a proper GDestroyNotify, so that
whenever the array is unref-ed as part of the modem disposal logic,
the SIM objects (and the modem object references they keep) are also
unref-ed.

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/571
2022-08-04 17:58:55 +02:00
Aleksander Morgado
a783d9f68a shared-qmi: minor rework SetPacketServiceState()
Port to using g_autoptr() so that we avoid the gotos.
2022-08-04 14:26:33 +00:00
Aleksander Morgado
f58dcc832b iface-modem-3gpp: update packet service state in the interface
The skeleton property will be update automatically as they're bound.
2022-08-04 14:26:33 +00:00
Aleksander Morgado
d82f0d5371 iface-modem-simple: wait for packet service state is 3GPP specific 2022-08-04 14:26:33 +00:00
Aleksander Morgado
9746600a12 broadband-modem-qmi: force IDLE state if PS registered but DSD RAT unavailable
We provide a consolidated method to update the PS/EPS/5GS registration
states, based on the actual state reported via NAS and the availabiity
or not of the DSD data RAT.

On this consolidated method, we now force the IDLE state for every
case where it would have been HOME/ROAMING if the data RAT reported
via the DSD service is unknown. This includes not only transitions
into the HOME/ROAMING state, but also transitions to unknown data RAT.
2022-08-04 14:26:33 +00:00
Akash Aggarwal
213cd81b3a iface-modem-simple: wait for packet service 'attach' state in ConnectionStep 2022-08-04 14:26:33 +00:00
Akash Aggarwal
d008e437c3 broadband-modem-qmi,mm-shared-qmi: implement support for 'SetPacketServiceState()' 2022-08-04 14:26:33 +00:00
Akash Aggarwal
6761fc0099 broadband-modem-qmi: Move to "registered" state based on DSD System Status for PS domain
"registered" state should not wholly depend on the PS/EPS/5GS domain
state reported by NAS.

It should listen to DSD system status for availabilty of data network
at modem before moving to 'registered' state".
2022-08-04 14:26:33 +00:00
Aleksander Morgado
3893396e20 broadband-modem: SIM swap check should consider errors loading as no SIM
A failure loading IMSI or ICCID (unless for the UNSUPPORTED case)
could be an indication that there is no SIM.

Ideally, the logic checking if a SIM swap happened should have checked
first if there is a SIM card in the slot, and only if there is one go
on to try to load IMSI or ICCID.
2022-08-04 13:08:55 +00:00
Aleksander Morgado
86f6d33513 sim-mbim: clear cached subscriber info on modem sync request 2022-08-01 20:17:43 +00:00
Aleksander Morgado
f5b3dc7689 broadband-modem: notify when a sync is needed after a suspend/resume
Modem/SIM implementations that keep cached info that is not supposed
to change during runtime of a modem may need to be notified about when
a suspend/resume has happened, so that they can clear and reload the
internally cached data.
2022-08-01 19:51:26 +00:00
Aleksander Morgado
bda3ade5a8 iface-modem: reordering of ready methods in sync() 2022-07-29 15:07:45 +02:00
Aleksander Morgado
dd51defd2b broadband-modem: quick sync the Modem interface also if disabled
If the modem was in disabled state, we still want to sync the Modem
interface, among other things to make sure no SIM event happened
during the system suspension.

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/605
2022-07-29 15:06:49 +02:00
NorwayFun
31dec02c6f po: add Georgian translation 2022-07-27 12:26:35 +00:00
Alexey Orishko
04d1e5a380 mm-enums: Added E-UTRAN Band 85 to MMModemBand.
LTE Band 85 is supported by modems based on Qualcomm 9205 chipset.
2022-07-27 11:59:27 +00:00
Aleksander Morgado
a32538fa32 helpers-mbim: report correct network availability from mbim bitmask
MbimProviderState is a bitset, so don't try to match exact values in a
switch statement when converting to MMModem3gppNetworkAvailability.

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/524
2022-07-25 20:43:07 +00:00
Dylan Van Assche
57637132c9 ci: build without testcases
Verify if ModemManager builds with everything disabled
2022-07-25 11:01:57 +02:00
Dylan Van Assche
ba96ccc615 build: make tests optional
Add a meson option -Dtests and --without-tests automake option
to disable the compilation of all available testcases.
This is useful for compiling projects with Flatpak such as
GNOME Control Center which disables all possible integrations since they
only need the DBus part of ModemManager.

Contributes to https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1392
2022-07-25 11:01:51 +02:00
Aleksander Morgado
041f53af8b base-sms: don't clear parts on send/store error
The part generation logic is independent to whether the SMS send or
store operation failed, so just avoid doing the parts cleanup. E.g.
if we created the parts for store() but storing failed, the same parts
could still be used for send() successfully.
2022-07-24 13:14:26 +00:00
Aleksander Morgado
4aaea37022 base-sms: fix segfault when storing already sent messages
The internal list of parts in the base SMS object is created either
when the message is sent or when the message is stored.

The daemon should not expect the list of SMS parts to be empty upon a
store() operation requested via DBus, as the list of parts may have
already been created during send().

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/598
2022-07-24 13:14:26 +00:00
Dan Carpenter
a8b9058a0c sierra: disable CPOL in the GL7600
Similar to the EM7345 (also from Sierra Wireless), the GL7600 becomes
unresponsive after using "AT+CPOL?".

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/595
2022-07-20 13:09:46 +02:00
Aleksander Morgado
1615c8627c broadband-modem: don't make fatal SIM swap check of IMSI or ICCID
If the SIM swap check using ICCID or IMSI fail, don't completely fail
the operation, as the other one may still succeed.

Fail the operation only if both checks failed.
2022-07-16 22:24:33 +02:00
Aleksander Morgado
76f837697a broadband-modem: plug leaks in sim_swap_context_free() 2022-07-16 22:24:28 +02:00
Aleksander Morgado
41ff262006 shared-qmi: improve logging of steps in SIM hot swap setup 2022-07-16 22:24:25 +02:00
Aleksander Morgado
e96a111a63 shared-qmi: only transfer state to priv info if SIM hotswap setup succeeds
Don't transfer state to the private info until we know the operation
has fully succeeded.
2022-07-16 22:24:23 +02:00
Aleksander Morgado
c994ae1b3a shared-qmi: move indication callbacks out of the SIM hot swap setup 2022-07-16 22:24:20 +02:00
Aleksander Morgado
ba3b15fe29 shared-qmi: return error if none of the methods succeeded in SIM hot swap setup 2022-07-16 22:24:17 +02:00
Aleksander Morgado
b7da236567 shared-qmi: avoid jumps in the SIM hot swap setup state machine
Always transition to the next step, and decide what to do based on the
state tracked by the previously run steps.
2022-07-16 22:24:14 +02:00
Aleksander Morgado
21d24657eb shared-qmi: make refresh all non-fatal during SIM hot swap setup
If for any reason "Refresh all" fails, don't return an error, as we
may have already configured SIM slot status correctly.
2022-07-16 22:24:02 +02:00
Aleksander Morgado
d2bc73f394 shared-qmi: add slot status indication in its own step during SIM hot swap setup 2022-07-16 22:23:57 +02:00
Aleksander Morgado
405f5867c7 shared-qmi: add slot status check in its own step during SIM hot swap setup
Also, don't make the "Get Slot Status" operation fatal; just go on
assuming that the slot status indications are unsupported.
2022-07-16 22:23:53 +02:00
Aleksander Morgado
76c0896535 shared-qmi: new step in SIM hot swap setup to connect to refresh signal
Instead of connecting to the signal in multiple places, do it in one
single place in the logic.
2022-07-16 22:23:45 +02:00
Prakash Pabba
5c0db37432 mm-iface-modem,mm-broadband-modem,mm-shared-qmi: support SIM IMSI switch
It is possible that SIM IMSI might change in roaming conditions for a sim.

Register for UIM refresh indication always and reprobe if ICCID or IMSI changes for QMI modem.
2022-07-16 22:22:59 +02:00
Aleksander Morgado
115692dd91 api,tags: fix typo in ID_MM_PORT_TYPE_AT_GPS_CONTROL doc 2022-07-16 22:22:11 +02:00
Aleksander Morgado
36d3a2c4f5 docs: add missing reference to ID_MM_PORT_TYPE_AT_GPS_CONTROL 2022-07-16 22:21:22 +02:00
Aleksander Morgado
f5151fb02e po: update after source file rename 2022-07-16 22:13:04 +02:00
Dylan Van Assche
efb497e2e6 mm-call-qmi: implement DTMF support
Overwrite the base class with a QMI implementation
to send DTMF characters during a call. Uses the continuous DTMF
QMI messages to support both CDMA and 3GPP networks.
2022-07-16 13:33:29 +00:00
Dylan Van Assche
ea3f5ccad8 mm-call-qmi: drop unnecessary white space 2022-07-16 13:33:29 +00:00
Dylan Van Assche
3e61d07419 mm-call-qmi: fix comment consistency
Do not use caps for 'call'
2022-07-16 13:33:29 +00:00
Daniele Palmas
fbf497c701 iface-modem-3gpp-profile-manager: add default index_field
If check_support functions are not defined when implementing
iface-modem-3gpp-profile-manager, set "profile-id" as default
index_field.
2022-07-15 16:47:34 +02:00
Carlo Lobrano
7464940971 mm-iface-modem-3gpp-profile-manager: do not override Bearer 3gpp profile properties during connection
When connecting via AT commands requiring a 3gpp profile with undefined
profile-id, the corresponding bearer 3gpp profile is later modified
adding the selected PDP context.

For this reason when a next connection is requested with the same
properties (that is no profile-id) the already existing bearers is not
selected because of the different profile-id value and a new one is
created.

This change lets the connection logic use a copy of the user-requested
bearer's 3gpp profile which can be modified for the logic needs, but it
is not stored and then does not compromise a bearer comparison in a next
connection request.
2022-07-15 11:18:36 +00:00
Carlo Lobrano
85d4ad1158 mm-iface-modem-3gpp-profile-manager: do not try to deactivate unused profile
'mm_3gpp_profile_list_find_best' can return an unused profile ID, which
is later tested for being already activated in
'profile_manager_check_activated_profile_ready' with +GCACT?. Since the
profile does not exist, this check always fails, but the profile manager
still tries to deactivate it, which is unnecessary.

This change checks the return error from 'check_activated_profile' and skips
SET_PROFILE_STEP_DEACTIVATE_PROFILE step if error is
MM_CORE_ERROR_NOT_FOUND.
2022-07-15 11:18:36 +00:00
Ulrich Mohr
249e46a70a mbim: Make use of uim qmi service if available 2022-07-14 13:16:09 +02:00
Ulrich Mohr
9f44dfa45e mm-sim-qmi: use shared qmi interface instead of using qmi modem class directly 2022-07-14 13:16:09 +02:00
Fanice Luo
c8a4a76630 foxconn: updating the T77W968 carrier mapping table
add new MCCMNC of EE UK(23430,23431,23432,23433,23434,23476,23501,23502,23577)
add new MCCMNC of ATT(310650,310980,90118)
add new MCCMNC of Verizon(312770)
add new MCCMNC of Vodafone(46601,46603)
add new MCCMNC of Orange(21409,23105,26005)
2022-07-14 14:18:16 +08:00
Fanice Luo
f2a3d836db dell: Add DW5829e(T77W968) modules
add new device(0x413c:0x81e4 0x413c:0x81e6)
2022-07-12 09:00:11 +00:00
Sven Schwermer
bbf1b272e6 fibocom: Ignore +SIM READY URC
This URC is emitted when the SIM phonebook is initialized. We don't care
about that but don't want this URC to mess with the initialization
sequence either.

Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
2022-07-11 11:50:00 +00:00
Sven Schwermer
eebdbc45b5 fibocom: Add alternative MA510 USB config
Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
2022-07-08 08:26:33 +02:00
Sven Schwermer
38646bb68f fibocom: Add alternative L610 USB config
This is the factory-default setting. Make sure to support it as well as
the ECM/RNDIS settings. The L610 in GTUSBMODE=31 only enumerates with
serial USB interfaces using the option driver, so we need to allow that
driver too.

Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
2022-07-08 08:25:40 +02:00
Jack Song
71a3942b3f mm-bearer-mbim: ignore mbim status error 'SIM not inserted' while disconnecting
Ignore the error SIM_NOT_INSERTED when ModemManager disable modem after SIM card removed

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/578
2022-07-06 11:07:06 +08:00