Age | Commit message (Collapse) | Author |
|
Main thing that's required to get modem hot-swapping to work is the
UDCONF=50,1 command(see u-blox AT-command manual). But there are a lot
of u-blox modules which do not support this command. So in this patch,
it's supposed that this thing is configured beforehand(Like the UUSBCONF
functioning mode) for modules, where SIM hot-swaping feature is
possible. For the modems where it's not, the patch will not have any effects.
----
For ublox modems, CIEV: 12(X) messages allow to know if
SIM is (un)plugged. The values are encoded as:
- 0: no SIM detected
- 1: SIM detected
It's required from a modem to generate these events about the SIM
detection state.
To set up these `CIEV: 12,(X)` URC events the `+CMER=1,0,0,1,0` command
is used. That command is supported by almost all u-blox modems except
SARA-G300/SARA-G310/LEON-G1(For these models the hot-swap feature will
not work).
As this 12 that is used in CIEV may be completely different in other
modules, the test command parsing is quite important to get that index
number. So, this logic is also added in cind_simind_format_check_ready
function.
----
It seems that it's necessary to issue this `+CMER` set up there despite
that the `+CMER` configuration will take place later in the 3GPP
interface enabling sequence. Because without it simind indications
will not be enabled at all.
CMER configuration may be later overwritten by 3GPP interface enabling
sequence, but in the worst-case scenario only hot-swap feature will not
work.
|
|
If we have a modem with an established connection, and then the
SIM is getting removed from that modem, this forces modem reprobing
sequence.
It looks like that:
```
mm-base-modem:mm_base_modem_process_sim_event
-> mm-base-modem:mm_base_modem_disable
-> mm-base-modem:disable
-> mm-broadband-modem:common_disable
-> mm-broadband-modem:disabling_step,
-> ctx->step=DISABLING_STEP_FIRST
-> ctx->step=DISABLING_STEP_WAIT_FOR_FINAL_STATE
-> ctx->step=DISABLING_STEP_DISCONNECT_BEARERS
```
At this stage, there is no actual connection existing already, but
bearer objects still exist and are still marked as connected.
So, if there were any active bearers - they will be disconnected.
In order to disconnect, ublox bearer sends +CGACT=0,%u, modem then
will return CME ERROR: 10(SIM not inserted):
```
[modem0/ttyACM0/at] --> 'AT+CGACT=0,1<CR>'
[modem0/ttyACM0/at] <-- '<CR><LF>+CME ERROR: 10<CR><LF>'
[modem0/ttyACM0/at] operation failure: 10 (SIM not inserted)
[modem0/bearer0] couldn't disconnect: SIM not inserted
```
this error will break disabling and reprobing. To fix that, it's
require to add 'SIM not inserted' state as a valid condition to
continue bearer disconnection.
|
|
The port type hints for the FM101 were updated to be in line with the final product layout,
where USB interface #2 is now used as an AT port (not ignored) and USB interface #4 is now
used as debug port. USB interface #6 is removed as it no longer exists.
|
|
The udev rules expect matches based on shell globbing pattern, not
based on regex. This means that "[0-9]*" doesn't mean "zero or more
digits", it actually means "one digit and zero or more other
characters".
So, avoid the regex like match, even if it worked for us, because it
didn't mean what we thought it meant, plus, it breaks our custom udev
rules processing logic, in which we convert the input patterns into
real regex expressions.
See https://bbs.archlinux.org/viewtopic.php?pid=1415916#p1415916
While at it, also make sure that the wildcard matching is done
exclusively for prefix and suffix matches, never in the middle of
a string, or our custom rules parser would not match correctly.
|
|
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.
|
|
This patch add fibocom FM101 to 77-mm-fibocom-port-types.rules file.
which contains two sets of vid and pid pairs, "2cb7:01a2" and "2cb7:01a4".
|
|
Different options are set as `feature`, also every possible plugin,
but this may cause confusion.
All options set as `feature` but plugins have been made `boolean` to
avoid further confusions.
`help2man` is also installed in the CI image because is required to
build different libraries.
|
|
|
|
|
|
We keep the 'WHITELIST-ONLY' filter type name still as an option in
--filter-policy=[POLICY], but deprecated and with the better
'ALLOWLIST-ONLY' replacement suggested from now on.
|
|
For T99W175, Qualcomm realized mcfg switching mechanism
in FW side. It can work indepently without MM's help.
Therefore, delete mcfg switching mechanism in MM.
|
|
When trying to lock the modem LE910S1 replies:
'AT+CSIM=1<CR>'
'<CR><LF>ERROR<CR><LF>'
but the modem actually supports CSIM unlock retries reporting.
|
|
|
|
|
|
Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
Includes updates by Aleksander Morgado to fix coding style issues.
|
|
|
|
|
|
|
|
|
|
|
|
Telit modems that require hexadecimal number when specifying 4G bands
also reply to #BND=? command with a 4th parameter <LTE_band_ext>
(e.g. LM940, LM960, LN920, FN980).
On the other hand, modems that require decimal number when specifying 4G
bands only return 3 parameters to the same command.
It is then possible replace the detection of ext_4g_bands via UDEV tags
with an inspection of BND=? reply.
|
|
|
|
|
|
Since the 'wwan' subsystem addition to the qcom-soc plugin, the rules
to say a modem is handled by this plugin are too broad, and the plugin
attempts to support any kind of device exposed by the WWAN subsystem,
not just those from Qualcomm SoCs.
Update the plugin to require a new ID_MM_QCOM_SOC udev tag that is set
in the plugin udev rules, given that these rules already check for the
expected SoC drivers (bam-dmux, ipa, qcom-q6v5-mss).
|
|
|
|
Improved the way the plugins are set to allow a smaller summary.
|
|
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/442
|
|
|
|
|
|
Fix the following segmentation fault:
ModemManager[128007]: mm_port_peek_kernel_device: assertion 'MM_IS_PORT (self)' failed
Thread 1 "ModemManager" received signal SIGSEGV, Segmentation fault.
0x00005555556c6e3e in mm_kernel_device_get_global_property
(self=0x0, property=0x7ffff5947480 "ID_MM_TELIT_BND_ALTERNATE")
at kerneldevice/mm-kernel-device.c:309
Reported by Carlo Lobrano <c.lobrano@gmail.com>
|
|
Fix the following g_object_unref failed assertion:
ModemManager[385967]: <debug> [1632924639.132023] [modem0/ttyUSB2/at] --> 'AT+CSIM=1<CR>'
ModemManager[385967]: <debug> [1632924639.144892] [modem0/ttyUSB2/at] <-- '<CR><LF>ERROR<CR><LF>'
ModemManager[385967]: <debug> [1632924639.145021] [modem0/ttyUSB2/at] operation failure: 100 (Unknown error)
(ModemManager:385967): GLib-GObject-CRITICAL **: 16:10:39.145: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
|
|
This reverts commit 09a5052a777c858b83baf9444306775ed5c50300.
This commit breaks the default disabling of the qcom-soc plugin.
|
|
We will end up exporting what we shouldn't:
$ abidiff /tmp/autotools/lib/ModemManager/libmm-shared-icera.so /tmp/meson/lib/ModemManager/libmm-shared-icera.so
Functions changes summary: 0 Removed, 0 Changed (3 filtered out), 8 Added functions
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
8 Added functions:
[A] 'function const gchar* mm_bearer_connection_status_get_string(MMBearerConnectionStatus)' {mm_bearer_connection_status_get_string}
[A] 'function GType mm_bearer_connection_status_get_type()' {mm_bearer_connection_status_get_type}
[A] 'function const gchar* mm_bearer_status_get_string(MMBearerStatus)' {mm_bearer_status_get_string}
[A] 'function GType mm_bearer_status_get_type()' {mm_bearer_status_get_type}
[A] 'function gchar* mm_filter_rule_build_string_from_mask(MMFilterRule)' {mm_filter_rule_build_string_from_mask}
[A] 'function GType mm_filter_rule_get_type()' {mm_filter_rule_get_type}
[A] 'function gchar* mm_port_probe_flag_build_string_from_mask(MMPortProbeFlag)' {mm_port_probe_flag_build_string_from_mask}
[A] 'function GType mm_port_probe_flag_get_type()' {mm_port_probe_flag_get_type}
|
|
When building shared utils modules or plugins, we should not link with
the static libraries built under src/, because that would mean we're
including their symbols as exported by the modules, and it'll break in
runtime.
Instead, just define the correct set of 'include_directories' to be
used in each plugin.
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/436
|
|
So that we don't confuse the plugin-specific libhelpers with the core
libhelpers built in src/.
|
|
Reported and fix suggested by:
Frederic Martinsons <frederic.martinsons@sigfox.com>
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/438
|
|
To avoid those cases where a plugin does not need a helper library
an empty array is created.
However, when a helper library has to be built, it is not necessary
to include the created static library in an array.
|
|
`libmm-test-common` is created using underscores. It also uses
`gio-unix-2.0` as a public dependency but actually it should be
private.
Both issues have been fixed.
|
|
Improved the way the plugins are set to allow a smaller summary.
|
|
|
|
meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.
|
|
|
|
|
|
|
|
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/414
|
|
E.g. for a FM150:
[1627656003.230873] [cdc-wdm0] port contents loaded:
[1627656003.231069] [cdc-wdm0] bus: usb
[1627656003.231179] [cdc-wdm0] interface: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.4/1-11.4.4/1-11.4.4:1.4
[1627656003.231272] [cdc-wdm0] device: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.4/1-11.4.4
[1627656003.231364] [cdc-wdm0] driver: qmi_wwan
[1627656003.231450] [cdc-wdm0] vendor: 2cb7
[1627656003.231536] [cdc-wdm0] product: 0104
[1627656003.231626] [cdc-wdm0] revision: 0414
[1627656003.231722] [base-manager] adding port cdc-wdm0 at sysfs path: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.4/1-11.4.4/1-11.4.4:1.4/usbmisc/cdc-wdm0
...
[1627656004.333874] [plugin/fibocom] port cdc-wdm0 filtered by implicit QMI driver
|
|
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/411
|
|
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/412
|
|
The template files in the `build-aux` directory used in enums sources
and headers generation use the `{$name}-template.[ch]` pattern.
However, the examples in the official guide[0] and usually GNOME and
Freedesktop packages use the `{$name}.[ch].template` pattern.
Due to this, the name of the template files and build commands have
been changed.
[0] https://developer.gnome.org/gobject/stable/glib-mkenums.html
|
|
The timeout in this command is extremely large, because there are some
modules like the EGS5 that build the response based on the current
network registration, and that implies the module needs to be
registered. If for any reason there is no serving network where to
register, the response comes after a very long time, up to 100s.
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/408
|