summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* broadband-modem: plug leak processing SIM loading stepsHEADmainAleksander Morgado2023-05-171-7/+5
| | | | | | | | | | | | | | | | ==6971== 52 (16 direct, 36 indirect) bytes in 1 blocks are definitely lost in loss record 3,764 of 6,140 ==6971== at 0x4842839: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==6971== by 0x4A1ADE8: g_malloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6800.1) ==6971== by 0x4A31FF1: g_slice_alloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6800.1) ==6971== by 0x4A3266D: g_slice_alloc0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6800.1) ==6971== by 0x49FD397: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6800.1) ==6971== by 0x49FD8B4: g_error_new_valist (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6800.1) ==6971== by 0x49FDACE: g_set_error (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6800.1) ==6971== by 0x187A4C: mm_base_modem_peek_best_at_port (mm-base-modem.c:1129) ==6971== by 0x184116: _at_command (mm-base-modem-at.c:634) ==6971== by 0x1841FE: mm_base_modem_at_command (mm-base-modem-at.c:660) ==6971== by 0x18F6F1: load_sim_identifier (mm-base-sim.c:2016) ==6971== by 0x18CA03: mm_base_sim_load_sim_identifier (mm-base-sim.c:820)
* mmcli: added --messaging-create-sms-with-text optionTom Wimmenhove2023-05-173-16/+77
| | | | | | | | | Added a `--messaging-create-sms-with-text' command line option that works similar to `--messaging-create-sms-with-data', except that it uses the content of the file as the message text instead of data. This allows creating mesasges containing both double and single quotes, which was not possible with the existing `--messaging-create-sms' command line option.
* modem-helpers-mbim: allow optional outputs in mm_signal_from_mbim_signal_state()Nagi Marupaka2023-05-171-6/+12
| | | | Fixes 470dff235c70683928ab0eb39c64151a8a4ceb7c
* broadband-modem-mbim: account for race condition in quick hot swap caseNagi Marupaka2023-05-123-2/+25
| | | | | | | | | On MBIM modems, when the SIM is ejected and re-inserted in a quick manner, the state machine logic encounters a race condition and eventually, the modem response for subscriber status is ignored. This change accounts for that state transition without erroring out. Fixes #672.
* mm-broadband-modem-mbim: fix log prints in certain notificationsNagi Marupaka2023-05-121-2/+2
|
* mm-iface-modem: increase the SIM retries to 7Nagi Marupaka2023-05-111-1/+1
| | | In some cases modem is taking 7 tries to detect an initialized SIM.
* broadband-modem-mbim: use MBIMEx v2 signal loading explicitly if supportedAleksander Morgado2023-05-111-0/+79
|
* iface-modem-signal: launch explicit signal query after setting up thresholdsAleksander Morgado2023-05-111-4/+7
|
* broadband-modem-mbim: non-zero interval when enabling thresholdsAleksander Morgado2023-05-111-1/+6
| | | | | | | Fix bug in Fibocom FM350 modem where a non-zero signal strength interval needs to be configured as part of threshold setup. Fixes #733
* sierra: port type hints for RC7611Aleksander Morgado2023-05-111-0/+8
|
* Revert "iface-modem-signal: send a query after threshold set up"Aleksander Morgado2023-05-102-19/+4
| | | | | | | This reverts commit 17ed63637fea7ab7238880ec5eb75df910355dd2. We were reusing the signal_state_query_ready() callback in the wrong way.
* iface-modem-signal: send a query after threshold set upNagi Marupaka2023-05-102-4/+19
| | | | | After the setup of threshold for signal state notifications, trigger a query of the current signal state values.
* broadband-modem-qmi: enable/disable messaging AT unsolicited events tooSebastian Krzyszkowiak2023-05-101-42/+88
| | | | | | | | | | | | | | | | | | | | | | When the host is resuming from system suspend, QMI indications sent by the modem at resume time can be lost. The exact reason why it happens is still unknown. Until this is fixed, ModemManager currently workarounds that in QMI mode by listening and reacting to AT URCs too, which are being received reliably. In order to achieve that, messaging_setup_unsolicited_events chains the parent's implementation with its own, effectively setting up handlers for both AT and QMI channels. This worked fine on modems such as EG25 which enable SMS indications by default. However, some modems, such as BM818, don't have these indications enabled on boot and don't report incoming messages via AT unless requested via AT+CNMI. To make SMS handling on resume reliable on such modems, make sure that MMBroadbandModemQmi also enables/disables unsolicited events in the same way it already sets up handlers for them. Signed-off-by: Sebastian Krzyszkowiak <dos@dosowisko.net>
* libmm-glib,location-3gpp: fix conversion to gulong in ↵Maxim Anisimov2023-05-091-3/+3
| | | | | | mm_location_3gpp_new_from_string_variant Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
* build: unstable release version bump to 1.21.61.21.6-devAleksander Morgado2023-05-031-1/+1
|
* shared-qmi: don't assume cancellation signal handler is setup in the ↵Aleksander Morgado2023-05-031-8/+10
| | | | | | | registration wait The cancellation_id will not be set if the cancellable is already cancelled by the time g_cancellable_connect() is called.
* shared-qmi: ensure cancellation is setup last in the registration waitAleksander Morgado2023-05-031-6/+9
| | | | | | | register_in_network_cancelled() may be called early if the given cancellable is already cancelled, and if so, we want it to remove the timeout and signal handler, which should have been configured before setting up the cancellation signal handler.
* broadband-modem-mbim: group together all runtime state while enabled in its ↵Aleksander Morgado2023-05-031-87/+96
| | | | own struct
* bearer-list: rename variables in the foreach contextsAleksander Morgado2023-05-031-26/+26
| | | | | So that the variable names in each context identify the action being performed, to easier reading.
* broadband-modem-mbim: ignore registration set error if NwError=0 reportedAleksander Morgado2023-05-031-11/+18
| | | | | | | | | | | | | | Returning an error in the registration set request completely breaks the async operation requesting the explicit registration, even if the modem may have already been registered via indications while waiting for the set request to be completed. We now ignore the registration set error if it returns a generic failure with NwError=0, as in certain Qualcomm based devices. We ignore unconditionally, without explicitly checking if we're registered or not, because the upper logic will anyway do that. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/723
* broadband-modem-mbim: ensure cached state info is reseted on disableAleksander Morgado2023-05-032-15/+43
| | | | | | So that it is reloaded fresh once re-enabled, otherwise we may be using stale state values that are not in sync with the state reported in the interface skeletons.
* iface-modem-3gpp: skip interface updates if it's disabledAleksander Morgado2023-05-031-4/+43
| | | | | | | | | | | | | | | | | | | | E.g. we don't want to update the 3GPP registration state to "idle" if the interface has already been disabled: <msg> [1681814812.903723] [modem0] 3GPP registration state changed (idle -> unknown) <inf> [1681814812.903842] [modem0] consolidated registration state: cs 'idle', ps 'idle', eps 'idle', 5gs 'unknown' --> 'unknown' <dbg> [1681814812.906194] [modem0] disabling the Modem interface... <inf> [1681814812.911148] [modem0] disabled modem <dbg> [1681814812.913453] [ttyACM0/at] device open count is 0 (close) <dbg> [1681814812.913629] [ttyACM0/at] closing serial port... <dbg> [1681814812.915559] [ttyACM0/at] serial port closed <msg> [1681814812.916569] [modem0] state changed (disabling -> disabled) <dbg> [1681814868.945069] [/dev/cdc-wdm4] number of consecutive timeouts: 1 <msg> [1681814868.950724] [modem0] 3GPP registration state changed (unknown -> idle) <inf> [1681814868.950885] [modem0] consolidated registration state: cs 'idle', ps 'idle', eps 'idle', 5gs 'unknown' --> 'idle' <msg> [1681814868.951797] [modem0] state changed (disabled -> enabled) <dbg> [1681814868.955740] [modem0] registration in network: cancelled <wrn> [1681814868.958562] [modem0] registration in network failed: Operation was cancelled
* iface-modem-3gpp: coding style updates in initialization sequenceAleksander Morgado2023-05-031-20/+20
|
* iface-modem-3gpp: coding style changes in initial EPS bearer update logicAleksander Morgado2023-05-031-19/+15
|
* iface-modem-simple: improve logging and cancellability in network ↵Aleksander Morgado2023-05-031-14/+27
| | | | registration sequence
* iface-modem-3gpp: coding style updates in enabling/disabling sequencesAleksander Morgado2023-05-031-82/+60
|
* broadband-modem: explicitly abort ongoing attempt when disablingAleksander Morgado2023-05-033-6/+29
|
* bearer-list: new common method to disconnect one or all bearersAleksander Morgado2023-05-034-112/+77
|
* iface-modem-3gpp: allow cancelling the wait for packet service stateAleksander Morgado2023-05-033-21/+88
| | | | | | | | | | | | | | When a request to disable the modem arrives while the packet service state wait is ongoing we were not correctly cancelling the operation. The main reason for this is that this operation does not change the modem state, and so the "wait for final state" logic in the disabling sequence was not being considered. We solve this by plugging in the Simple.Connect() operation cancellable in the wait for packet service state operation. The connection attempt will be cancelled during the disabling sequence as well, and when that happens we will explicitly halt the packet service state wait as well.
* iface-modem-3gpp: minor rename of variablesAleksander Morgado2023-05-031-16/+16
|
* broadband-modem-qmi: use DSD system status to report packet service stateAleksander Morgado2023-05-031-69/+11
| | | | | | | | | | | | | | We now support modem-reported packet service state, instead of guessing it in the 3GPP interface logic. The DSD system status reporting a valid access technology is an indication that the packet service is ready. Instead of holding back the registration status until the DSD system status reports a valid value, we will now report the modem as registered, and bind the DSD system status exclusively to the packet service status. In the simple connection attempt we're already waiting first for being registered, and then for being attached in PS.
* broadband-modem-mbim: minor refactor in speeds reportingAleksander Morgado2023-05-031-11/+30
|
* broadband-modem-mbim: report packet service state updatesAleksander Morgado2023-05-033-10/+47
| | | | | Use the Packet Service messages to report the state of PS domain, instead of guessing.
* iface-modem-3gpp: don't guess packet service state if modem can report itAleksander Morgado2023-05-032-11/+78
| | | | | | | | | | | In certain protocols like QMI or MBIM we may be able to report an exact packet service state, so there is no need to guess it, as the guess may not always be right. The logic will track automatically whether modem-reported packet service states are available, and use them if so. Otherwise, it'll try to guess as we were doing before (e.g. if registered in EPS, packet service is considered attached).
* libmm-glib: separate files for flags and enums typesAleksander Morgado2023-04-2720-130/+166
| | | | | | This allows us to skip needing to include the non-existent build_string_from_mask() or get_string() counterparts in the documentation index.
* build-aux,mkenums: use mixed enums+flags template without docs in daemonAleksander Morgado2023-04-2714-12/+137
|
* build-aux,mkenums: import custom mkenums tool from libqmi/libmbimAleksander Morgado2023-04-2722-79/+985
| | | | We're going to use certain new features included in the custom tool.
* iface-modem-3gpp: don't compare profile-name on attach APNsAndrew Lassalle2023-04-191-0/+2
| | | | | | | | | When a request to set a new eps bearer settings is received, ignore the profile-name when comparing the previous configuration with the new one, since the modem's profile might already have a name that won't match the settings provided by the user. Profile names are used in QMI modems. If the profile name does not match the existing one, the modem will detach and reattach to the network.
* helpers-mbim: fix MMSignal selection based on data classAleksander Morgado2023-04-191-20/+15
| | | | | | MbimDataClass is a flags bitmask, not an enumeration. This logic was broken if the reported data class was e.g. 4G+5GNSA.
* docs: update copyrightAleksander Morgado2023-04-142-0/+2
|
* daemon: update copyrightAleksander Morgado2023-04-141-1/+1
|
* cli: update copyrightAleksander Morgado2023-04-141-2/+2
|
* udev: new ID_MM_REQUIRED tagAleksander Morgado2023-04-133-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users with QMI or MBIM capable modems may want to ensure that these are never managed using plain AT commands, as that also involves using PPP. This fallback to AT could happen if the QMI or MBIM port probing fails for whatever reason. The new `ID_MM_REQUIRED` udev tag allows specifying that a given port MUST be successfully grabbed when creating a new modem object, or otherwise the modem object will not be created at all (even if there are other fallback control ports like AT that could have been used). Use this tag with caution. It is assumed that when this tag is used some other external process may be monitoring the existence of the modem object in DBus as exposed by ModemManager, and if it does not appear for any reason then the modem would be reseted with some other mechanism (e.g. GPIOs, if available). If no such mechanism to autorecover the modem is in place, using this tag may leave the modem exposed in the kernel but ignored by ModemManager. This tag must be applied on the specific port for which the existence and usability must be ensured. E.g. flagging the MBIM port of the Fibocom L850 module as required: $ vim /lib/udev/rules.d/78-mm-test.rules ACTION!="add|change|move|bind", GOTO="mm_test_rules_end" SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="?*", ENV{.MM_USBIFNUM}="$attr{bInterfaceNumber}" ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="0007", ENV{.MM_USBIFNUM}=="00", ENV{ID_MM_REQUIRED}="1" LABEL="mm_test_rules_end" $ sudo udevadm control --reload $ sudo udevadm trigger $ sudo udevadm info -p /sys/class/usbmisc/cdc-wdm0 ... E: ID_MM_REQUIRED=1 E: ID_MM_CANDIDATE=1
* plugin: refactor how list of probe flags is builtAleksander Morgado2023-04-131-35/+28
| | | | | | To make it clearer that the initial list of flags must be the one based on which ones are expected in the subsystem and which one the plugin is requesting.
* port-probe: perform auto detection of port type hints for wwanAleksander Morgado2023-04-132-14/+52
| | | | | | | | | | We can remove the port type hint udev tags for the wwan subsystem, as that logic is now incorporated in the port type hint processing logic in the daemon itself. This makes it clearer to know what exact hints are being used, as the logic is in a single place and it has proper logging of all possible cases.
* port-probe: perform auto detection of port type hints for cdc_wdmAleksander Morgado2023-04-132-7/+55
| | | | | | Do not do this in the plugin; instead, do it along with the logic that looks for port type hints in udev, so that we can properly warn if things don't match.
* port-probe: improve logging of detected port type hints in udev tagsAleksander Morgado2023-04-131-9/+39
| | | | | Explicitly log when a tag is found, and also warn if too many por type hints are provided in the same port.
* port-probe: simplify AT port type hints handlingAleksander Morgado2023-04-131-7/+5
| | | | | When processing the hints for port probing we don't care if the AT port is flagged as primary or secondary.
* sierra: add port hints for HL7812Marcus Folkesson2023-04-131-0/+8
| | | | Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
* port-serial: close_force() may dispose the last object referenceAleksander Morgado2023-04-121-1/+8
|