Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
We remove the built-in FCC unlock procedures from the ModemManager, we
will no longer run them automatically, and instead rely on external
scripts/programs to do that.
Packages providing the external FCC unlock tools can install them in
${pkglibdir}/fcc-unlock.d.
Users manually enabling external FCC unlock tools can install them in
${pkgsysconfdir}/fcc-unlock.d.
The user-enabled path takes precedence over the package-enabled one.
|
|
In some modems, the modem's radio can be ON when no SIM card is present.
In this case, the modem is in failed state, and the host cannot set the
power state to LOW. Since we we will allow the host to set the power to
LOW, we should allow it to set it back to ON.
|
|
The signal handler may have been already removed during dispose of the
modem object, which is run manually through g_object_run_dispose().
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/399
|
|
|
|
Prior to this change, a hotswap on the inactive slot would result
in reprobe of the modem. With this change, the sim object would be
updated, but no reprobe will be performed. The advantage is
1) we do not drop connections on the active slot
2) Slot status on the inactive slot is susceptible to firmware bugs.
We have seen scenarios where the inactive slot is reported as
absent/ iccid={0}, followed by a correction. We should not
reprobe the modem if our active slot hasn't changed.
|
|
There are modems (e.g. Nokia, Thuraya, Iridium) which don't require or
don't support power management, and therefore there is no way to
either load or update the power status.
In those modems we just assume ON is the current and only value (set
in the skeleton during initialization) and so when we attempt to
update the power state to ON during enabling, the logic should not
break.
Fix the logic by making sure the requested_power_setup() function
pointers are only checked for validity after ensuring we're not
already in the desired power state.
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/398
|
|
Do not launch N checks for N bearers and ignore their result. Instead,
go one by one, and report errors one by one.
|
|
Refresh connection status on resume to confirm
that the connection bearers are still valid.
|
|
There is no input cancellable in the method, so the GTask will never
get cancelled from the outside.
|
|
when mm_iface_modem_refresh_signal() is called, we'll restart the
signal quality refresh logic already, there is no need to request
an enforced start.
The enforced start was also modifying ctx->enabled unconditionally,
which is really not ok. This logic would be enabled only when we're
registered, and that logic is fine, no need to change that.
|
|
Refresh signal strength and access technologies,
check for SIM swaps, and check if the SIM is locked.
The modem may have switched to a different
access technologies or have a different signal strength
when resuming. Moreover, the user may swap or remove
the SIM when suspended.
|
|
|
|
There are devices that come locked before they can be put online.
Until now we had a specific implementation for this in the generic QMI
modem, but we should have it in a more generic way for any kind of
modem.
|
|
Reported and fix suggested by Maxim Anisimov
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/368
|
|
No change in the logic, just in how it's setup. E.g. we will load the
max number of retries just once when the logic starts, instead of
checking it on every iteration.
Also some other minor coding style changes included, e.g. adding the
timeout between retries as a defined symbol.
|
|
If a SIM is known to exist, for e.g. if it was created during load_sim_slots,
persist a few more times before giving up on the SIM to be ready. There
are modems on which the SIM takes more than 15s to be ready, luckily,
they happen to be QMI modems where the SIM's iccid in load_sim_slots
lets us know that there is a sim.
|
|
So that we can use it in other interfaces to abort invocations e.g. if
the modem is not yet enabled.
|
|
|
|
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/351
|
|
In addition to the amount of bearers a user may connect without
multiplexing enabled (the default until now), we now also expose the
maximum number of bearers a user may connect after enabling
multiplexing over one single network interface (if supported).
The method responsible for creating the MMBearerList is now also
subclassable, so that implementations supporting multiplexing can
provide their own version with their own thresholds.
|
|
This property was never initialized with a correct value, we would
always use the same value as used for MaxActiveBearers, which isn't
technically right. Just suggest to ignore this property, and flag
it as deprecated.
In addition to deprecating the API property, we will internally no
longer limit the amount of bearer objects that may be created with
different connection settings. The bearer object exposed in DBus is a
representation of the connection that may be setup, and so we can hold
as many representations as we want as long as the amount of connected
bearers doesn't exceed the maximum amount for each modem.
Leaving around the disconnected modems also serves another purpose.
Each bearer holds information about the amount of times a connection
with it has been attempted, and the amount of data transferred through
it. If we use the Simple.Connect() method to connect the modem using
different bearer settings, we won't lose the information of the past
connection attempts with different settings.
|
|
See See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/302
|
|
On some modem (for example SORACOM SC-QGLC4-C1) , the character set setup
step fails with "Unknown error" when the SIM card is missing or locked.
This leads to not expose Modem interface and not being able to unlocked
the SIM.
We should not consider this step as fatal but just issue a warning to let
other steps continue (which will let modem in failed state anyway).
Closes #289
Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
|
|
If the lock status cannot be read during a puk unblock attempt, reprobe
the modem. It is likely that the SIM was permanently blocked if the lock
status cannot be read.
|
|
Move the logic out of the base modem, and make it applicable only for
QMI modems.
|
|
Move the logic out of the base modem, and make it applicable only for
MBIM modems.
|
|
If we had already successfully run the sim hot swap context setup
during the initial initialization, make sure we don't re-run on SIM
PIN unlock, because we may be re-creating signal handlers and such.
|
|
The function shall be needed for profile switch checking.
|
|
If the new iccid is already available, reading the iccid from the
card can be skipped.
|
|
This new method allows changing the SIM slot considered as primary,
when the modem supports multiple SIM slots.
The generic handling of this method will make sure that the modem
object and all its SIM objects are re-probed from scratch as soon as a
successful SIM slot switch happens.
Implementations may report MM_CORE_ERROR_EXISTS when the switch
doesn't need to happen (e.g. if the requested SIM slot is already the
active one).
|
|
The 'SimSlots' property exposes an array of SIM object paths, with one
array item for each available SIM slot in the system. If a valid SIM
card is found in a given slot, the path of the SIM object will be
exposed in the array item; if no valid SIM card is found, the empty
object path ("/") will be exposed instead.
The 'PrimarySimSlot' property exposes which of the SIM slots available
in the system is the one configured as being primary. In a Multi-SIM
Single-Standby setup, the primary slot will be the one corresponding
to the single active SIM in the system. In a Multi-SIM Multi-Standby
setup, the primary slot will be the one configured to act as primary
(e.g. the one that will be used for the data connection) among all the
active SIM cards found.
|
|
If the modem is connected and we receive indications of a quick
unregistration cycle (i.e. unregistered, then registered again) we
should not end up flagging the modem as disconnected.
We already had some logic to avoid this with the "deferred 3GPP
unregistration" logic in the base bearer object, but this logic only
took into account the status of the bearer, not the status of the
modem.
Wed Jul 29 15:35:44 2020 daemon.info [1567]: <info> Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (home -> idle)
Wed Jul 29 15:35:44 2020 daemon.debug [1567]: <debug> Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP location updated (MCC: '0', MNC: '0', Location area code: '0', Tracking area code: '1CE8', Cell ID: '68F832')
Wed Jul 29 15:35:44 2020 daemon.debug [1567]: <debug> Connected bearer not registered in 3GPP network
Wed Jul 29 15:35:44 2020 daemon.info [1567]: <info> Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connected -> enabled)
Wed Jul 29 15:35:44 2020 daemon.debug [1567]: <debug> Modem /org/freedesktop/ModemManager1/Modem/0: signal quality updated (0)
Wed Jul 29 15:35:44 2020 daemon.debug [1567]: <debug> Modem /org/freedesktop/ModemManager1/Modem/0: access technology changed (lte -> unknown)
Wed Jul 29 15:35:44 2020 daemon.debug [1567]: <debug> Periodic signal checks disabled
Wed Jul 29 15:35:44 2020 daemon.info [1567]: <info> Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (idle -> registering)
Wed Jul 29 15:35:44 2020 daemon.debug [1567]: <debug> Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP location updated (MCC: '0', MNC: '0', Location area code: '0', Tracking area code: '1C84', Cell ID: 'A3E050')
Wed Jul 29 15:35:44 2020 daemon.debug [1567]: <debug> Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP location updated (MCC: '238', MNC: '1', Location area code: '0', Tracking area code: '1C84', Cell ID: 'A3E050')
Wed Jul 29 15:35:44 2020 daemon.info [1567]: <info> Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (registering -> home)
Wed Jul 29 15:35:44 2020 daemon.info [1567]: <info> Modem /org/freedesktop/ModemManager1/Modem/0: state changed (enabled -> registered)
We now try to improve this situation by also considering the case
where modem is supposed to get into "enabled" state (i.e. not
registered, not searching), but we still consider the amount of
connected bearers to decide the final state reported by the modem. In
other words, a modem with the 3GPP registration reported as 'idle'
will still be reported as 'connected' if there is at least one bearer
in connected state. This situation will end as soon as the 'deferred
3GPP unregistration' timeout expires, as that will force the bearer to
be disconnected.
|
|
|
|
|
|
We can safely cast the data in a GArray to gpointer first, and then
to the pointer type we require.
mm-iface-modem.c: In function 'after_set_load_current_bands_ready':
mm-iface-modem.c:2358:55: error: cast increases required alignment of target type [-Werror=cast-align]
requested_str = mm_common_build_bands_string ((MMModemBand *)requested_bands->data, requested_bands->len);
^
mm-iface-modem.c:2359:55: error: cast increases required alignment of target type [-Werror=cast-align]
current_str = mm_common_build_bands_string ((MMModemBand *)current_bands->data, current_bands->len);
^
mm-iface-modem.c: In function 'validate_bands':
mm-iface-modem.c:2474:48: error: cast increases required alignment of target type [-Werror=cast-align]
(const MMModemBand *)supported_bands_array->data,
^
mm-iface-modem.c: In function 'mm_iface_modem_set_current_bands':
mm-iface-modem.c:2535:50: error: cast increases required alignment of target type [-Werror=cast-align]
bands_string = mm_common_build_bands_string ((MMModemBand *)bands_array->data,
^
|
|
Charset definition moved from enable state machine to init state machine,
so that the right current charset is available also during further
initialization steps
|
|
This is already done by the modem interface as soon as current
capabilities are loaded.
|
|
|
|
|
|
|
|
It's not used anywhere.
|
|
The check needs to look for a matching single bit, so no need to make
it too complex.
|
|
|
|
|
|
mm-iface-modem.c: In function ‘peridic_signal_check_step’:
mm-iface-modem.c:1311:26: error: this statement may fall through [-Werror=implicit-fallthrough=]
1311 | ctx->running_step++;
| ~~~~~~~~~~~~~~~~~^~
...
|
|
mm-iface-modem.c: In function ‘bearer_status_changed’:
mm-iface-modem.c:483:9: error: switch missing default case [-Werror=switch-default]
483 | switch (mm_base_bearer_get_status (bearer)) {
| ^~~~~~
mm-iface-modem.c: In function ‘peridic_signal_check_step’:
mm-iface-modem.c:1293:5: error: switch missing default case [-Werror=switch-default]
1293 | switch (ctx->running_step) {
| ^~~~~~
mm-iface-modem.c: In function ‘interface_enabling_step’:
mm-iface-modem.c:3965:5: error: switch missing default case [-Werror=switch-default]
3965 | switch (ctx->step) {
| ^~~~~~
mm-iface-modem.c: In function ‘interface_initialization_step’:
mm-iface-modem.c:4708:5: error: switch missing default case [-Werror=switch-default]
4708 | switch (ctx->step) {
| ^~~~~~
|