aboutsummaryrefslogtreecommitdiff
path: root/plugins/wavecom
AgeCommit message (Collapse)Author
2023-01-03build: move plugins directory to src/pluginsAleksander Morgado
We are going to allow including the plugin sources built within the ModemManager daemon binary; moving the sources within the daemon sources directory makes it easier.
2022-09-05core: port GRegex/GMatchInfo to use autoptr()Aleksander Morgado
The behavior of GRegex changed in 2.73.2 once it was ported from pcre1 to pcre2. In some cases it was made more strict, which is fine, in other cases it exposed some change in how it behaves on certain matches that is not extremely clear whether it's ok or not. See https://gitlab.gnome.org/GNOME/glib/-/issues/2729 See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/601 See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/621 Either way, one thing that was assumed was that initializing all GRegex/GMatchInfo variables to NULL and making sure they're NULL before they're initialized by glib (especially the GMatchInfo) was a good and safer approach. So, whenever possible, g_autoptr() is used to cleanup the allocated GMatchInfo/GRegex variables, and otherwise, g_clear_pointer() is used to ensure that no free/unref is attempted unless the given variable is not NULL, and also so that the variable is reseted to NULL after being disposed.
2022-05-24base-modem: add subsystem vendor ID propertyDaniele Palmas
Subsystem vendor ID can be used for identifying PCI modems, so expose the property.
2021-03-04base-modem: explicitly say if NET or TTY data ports are supportedAleksander Morgado
A modem that creates exclusively bearer objects that work with NET ports (e.g. all QMI or MBIM modems) must not add any TTY port in the list of data ports. A modem that creates exclusively bearer objects that work with TTY ports (e.g. the generic modem) must not add any NET port in the list of data ports. A modem that may use both TTY and NET ports should add all in the list of data ports. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/324 Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/329
2020-06-02wavecom: break loop matching 2G bands if exact combination foundAleksander Morgado
2020-06-02wavecom: port to use g_autoptr() setupAleksander Morgado
2020-06-02wavecom: fix GTask return handling when loading current capsAleksander Morgado
2020-05-19wavecom: avoid cast-align errorsAleksander Morgado
We can safely cast the data in a GArray to gpointer first, and then to the pointer type we require. wavecom/mm-broadband-modem-wavecom.c: In function 'set_bands_3g': wavecom/mm-broadband-modem-wavecom.c:800:50: error: cast increases required alignment of target type [-Werror=cast-align] bands_string = mm_common_build_bands_string ((MMModemBand *)bands_array_final->data, ^ wavecom/mm-broadband-modem-wavecom.c: In function 'set_bands_2g': wavecom/mm-broadband-modem-wavecom.c:872:50: error: cast increases required alignment of target type [-Werror=cast-align] bands_string = mm_common_build_bands_string ((MMModemBand *)bands_array_final->data, ^
2020-04-08plugins: use logging module name as plugin nameAleksander Morgado
2020-04-08wavecom: port to use object loggingAleksander Morgado
2020-04-08modem-helpers: port supported modes filtering to use object loggingAleksander Morgado
2019-07-10misc: use g_regex_match() for simplicityBen Chan
This CL converts a few g_regex_match_full() expressions to their equivalent g_regex_match() in order to simplify the code, i.e. g_regex_match_full (regex, str, strlen (str), 0, 0, &match_info, NULL) is equivalent to: g_regex_match_full (regex, str, -1, 0, 0, &match_info, NULL) or simply: g_regex_match (regex, str, 0, &match_info)
2018-10-18core: remove unnecessary NULL checks for g_match_info_free()Ben Chan
g_match_info_free() already check if the given pointer is NULL and does nothing on a NULL pointer.
2017-10-07wavecom: fix memory leakBen Chan
2017-09-07wavecom: port modem_after_sim_unlock to use GTaskAleksander Morgado
2017-09-07wavecom: port register_in_network to use GTaskAleksander Morgado
2017-09-07wavecom: port set_current_bands to use GTaskAleksander Morgado
2017-09-07wavecom: port load_current_bands to use GTaskAleksander Morgado
2017-09-07wavecom: port load_supported_bands to use GTaskAleksander Morgado
2017-09-07wavecom: port set_current_modes to use GTaskAleksander Morgado
2017-09-07wavecom: port load_current_modes to use GTaskAleksander Morgado
2017-09-07wavecom: port load_supported_modes to GTaskAleksander Morgado
2017-09-07wavecom: update frequency bands supportAleksander Morgado
Updated to use the non-deprecated MMModemBand values.
2017-08-29wavecom: fix async operation completionAleksander Morgado
2017-04-18wavecom: ignore custom flow control handlingAleksander Morgado
The generic modem object already supports querying for the supported methods and setting the best one found.
2016-09-29core: allow identifying devices by a user-provided 'uid'Aleksander Morgado
All ports of the same modem reported by the kernel will all be associated with a common 'uid' (unique id), which uniquely identifies the physical device. This logic was already in place, what we do now is avoid calling it the 'sysfs path' of the physical device, because we may not want to use that to identify a device. This logic now also enables the possibility of "naming" the modems in a unique way by setting the "ID_MM_PHYSDEV_UID" property in the "usb_device" that owns all the ports. E.g. a custom device has 4 modems in 4 different USB ports. The device path of each USB device will always be the same, so the naming rules could go like this: $ vim /usr/lib/udev/rules.d/78-mm-naming.rules ACTION!="add|change|move", GOTO="mm_naming_rules_end" DEVPATH=="/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.5/4-1.5.1", ENV{ID_MM_PHYSDEV_UID}="USB-MODEM-1" DEVPATH=="/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.5/4-1.5.2", ENV{ID_MM_PHYSDEV_UID}="USB-MODEM-2" DEVPATH=="/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.5/4-1.5.3", ENV{ID_MM_PHYSDEV_UID}="USB-MODEM-3" DEVPATH=="/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.5/4-1.5.4", ENV{ID_MM_PHYSDEV_UID}="USB-MODEM-4" LABEL="mm_naming_rules_end" Each of the modems found will have a unique UID retrieved from the previous list of rules. Then, "mmcli" has also been updated to allow using the UID instead of the modem DBus path or index, e.g.: $ sudo mmcli -m USB-MODEM-1 /org/freedesktop/ModemManager1/Modem/0 (device id '988d83252c0598f670c2d69d5f41e077204a92fd') ------------------------- Hardware | manufacturer: 'ZTE CORPORATION' | model: 'MF637' | revision: 'BD_W7P673A3F3V1.0.0B04' | supported: 'gsm-umts' | current: 'gsm-umts' | equipment id: '356516027657837' ------------------------- System | device: 'USB-MODEM-1' | drivers: 'option' | plugin: 'ZTE' | primary port: 'ttyUSB5' | ports: 'ttyUSB5 (at)' ... $ sudo mmcli -m USB-MODEM-1 --enable ...
2016-05-28plugin-manager: protect mm_plugin_{major,minor}_versionTing-Yuan Huang
This patch makes declarations bind to definitions within the same module to prevent the potential ambiguity if referenced directly. AddressSanitizer think they violated one definition rule, although those symbols are accessed by address through their modules and do not depend on the order of the libararies loaded.
2015-12-02core: use G_SOURCE_REMOVE and G_SOURCE_CONTINUE in GSourceFuncsAleksander Morgado
2014-03-07wavecom: avoid +COPS=0 if already in automatic registration modeAleksander Morgado
AT+COPS=0 in a FXT009 may end up making the device stuck in a weird state in which it only replies "+CME ERROR: 515" to every AT command. So try to avoid this command whenever possible.
2014-02-20wavecom: implement power offAleksander Morgado
Powering off Wavecom devices is done via the AT^CPOF=1 command. These devices seem to not only power-off, but also power-cycle when this command is received, which means that the user needs to make sure to fully cut the power to the device when the SetPowerState() method replies.
2014-02-13ports: rename 'MMAtSerialPort' to 'MMPortSerialAt'Aleksander Morgado
2014-02-12wavecom: implement after-sim-unlock stepAleksander Morgado
Just give some time to the SIM to get properly initialized, so that we avoid errors when reloading e.g. facility lock status.
2013-06-05api,introspection: merge 'AllowedModes' and 'SupportedMode' into 'CurrentModes'Aleksander Morgado
We now have a single 'CurrentModes' property which contains both values in a tuple with signature "(uu)". Also, rename 'SetAllowedModes()' to 'SetCurrentModes()', and update the list of arguments expected to have a single "(uu)" tuple.
2013-06-05api,introspection: 'SupportedModes' is now a list of possible combinationsAleksander Morgado
Instead of just a mask of MMModemMode values, we now provide a list of the allowed and preferred mode combinations supported by the modem. E.g.: $> sudo mmcli -m 0 ------------------------- Modes | supported: 'allowed: 2g; preferred: none | allowed: 3g; preferred: none | allowed: 2g, 3g; preferred: none | allowed: 2g, 3g; preferred: 2g | allowed: 2g, 3g; preferred: 3g | allowed: 4g; preferred: none | allowed: 2g, 3g, 4g; preferred: none'
2013-06-05api,instrospection: rename 'Bands' to 'CurrentBands'Aleksander Morgado
... and 'SetBands()' to 'SetCurrentBands()'. We'll keep the 'Current' keyword in those properties which also have 'Supported' values.
2013-05-27wavecom: don't grab ports handled by the qcserial driverAleksander Morgado
Sierra Wireless will assign the Wavecom USB vendor ID to some Gobi-based modems, like the MC7750. Just ignore those by filtering out all devices with the Wavecom USB vendor ID if they are handled by the qcserial driver.
2013-01-11core,plugins: remove initial power down sequenceAleksander Morgado
We no longer power down the modem during initialization, so remove that implementation.
2013-01-11wavecom: no need to check if already powered up before powering upAleksander Morgado
This logic is now implemented by the parent broadband modem object.
2012-10-04libmm-glib: remove the `libmm-common.h' headerAleksander Morgado
Both the ModemManager daemon and the mmcli will now include `libmm-glib.h' only. We also handle two new special `_LIBMM_INSIDE_MM' and `LIBMM_INSIDE_MMCLI' symbols, which if included before the `libmm-glib.h' library allow us to: * Don't include the libmm-glib high level API in the ModemManager daemon, as the object names would clash with those in the core. * Define some of the methods of helper objects to be included only if compiling ModemManager daemon or the mmcli.
2012-10-01wavecom: run power-down during initAleksander Morgado
2012-08-28wavecom: fix segfault when setting allowed modesAleksander Morgado
2012-08-28wavecom: fix loading supported bandsAleksander Morgado
2012-08-24api,introspection: report list of drivers, not just oneAleksander Morgado
Different ports of the same modem may get handled by different drivers. We therefore need to provide a list of drivers (new `Modem.Drivers' property with signature 'as') instead of just one (removed `Modem.Driver' property with signature 's'). $ sudo mmcli -m 0 | grep drivers | drivers: 'qcserial, qmi_wwan'
2012-08-06plugins: use default port grabbing on those plugins without special requirementsAleksander Morgado
2012-08-06core: merge `MMPluginBase' and `MMPlugin'Aleksander Morgado
There's no real point in maintaining a separate `MMPlugin' interface, as all the plugins will inherit from `MMPluginBase', so just merge them and simplify everything.
2012-08-06core: compile all ports before creating the modem objectAleksander Morgado
Before this, we only exported the modem to DBus when all ports were organized, in order to make sure that we select as primary port the one we really want and not the first AT port grabbed. Given that to get all the ports organized we also needed to wait to get all the ports grabbed, we can now also defer the creation of the modem object until all the ports get grabbed. This allows us to create different types of objects based on the ports available (e.g. we can now create QMI-supported modem objects if we see a QMI port around).
2012-05-06wavecom: implement custom band settingAleksander Morgado
2012-05-06wavecom: setup custom serial parserAleksander Morgado
AT+CPIN? replies come without trailing 'OK'; which we need to handle.
2012-05-06wavecom: implement custom current bands loadingAleksander Morgado
2012-05-06wavecom: implement custom supported bands loadingAleksander Morgado