aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-12-05filter: new automatic whitelisting rules and strict/paranoid policiesAleksander Morgado
The 'default' filter policy was based on blacklisting as much as possible and otherwise allow. The new 'strict' filter policy will be based on whitelisting as much as much as possible, using custom defined rules, and otherwise forbid the ports. The new 'paranoid' filter policy is equivalent to the 'strict' filter after having applied the blacklist rules from the 'default' filter.
2017-12-05kerneldevice: allow getting interface class/subclass/protocolAleksander Morgado
2017-12-05filter: explicitly allow port when ID_MM_PLATFORM_DRIVER_PROBE is setAleksander Morgado
Don't assume that the port will be implicitly allowed afterwards.
2017-12-05filter: allow selection of filter policy on startupAleksander Morgado
Added a new '--filter-policy=[POLICY]' option in the daemon, which allows selecting between the supported filter policies. For now, only two policies are defined: * default: the default policy used by ModemManager, where it tries to probe and detect as many modem ports as possible. * whitelist-only: only devices explicitly tagged via udev (with the ID_MM_DEVICE_PROCESS tag) will be probed and used.
2017-12-05filter: let the user tag modems explicitlyAleksander Morgado
The user can tag modems (either full devices or ports independently) to be explicitly probed by ModemManager, using the new "ID_MM_DEVICE_PROCESS" udev tag, e.g.: $ sudo vim /lib/udev/rules.d/78-mm-whitelist-internal-modem.rules ACTION!="add|change|move", GOTO="mm_whitelist_internal_modem_end" ATTRS{idVendor}=="1199", ATTRS{idProduct}=="a001", ENV{ID_MM_DEVICE_PROCESS}="1" LABEL="mm_whitelist_internal_modem_end" $ sudo udevadm control --reload $ sudo udevadm trigger This rule runs before any other filter rule. This tag may be used e.g. by manufacturers building systems with built-in modems that will always be available. Distributions targeting support for multiple modem devices shouldn't use this udev tag.
2017-12-05filter: allow enabling/disabling rules via envvarsAleksander Morgado
E.g. forcing a MBIM modem to run in AT-only mode: # MM_FILTER_RULE_NET=0 \ MM_FILTER_RULE_CDC_WDM=0 \ /usr/sbin/ModemManager --debug This is just for quick testing for now.
2017-12-05filter: remove bogus TTY virtual console filterAleksander Morgado
The more generic filter for virtual devices already covers all cases covered by the TTY virtual console filter.
2017-12-05filter: new object to run the port/device filter logicAleksander Morgado
This new object allows configuring the filter rules applied to the device ports. By default, for now, it implements the same rules as the MMKernelDevice is_candidate() method, which is obsoleted.
2017-12-05kerneldevice: consolidate candidate rules in the base deviceAleksander Morgado
This patch implicitly enables in the generic device backend the manual-only greylist (ID_MM_DEVICE_MANUAL_SCAN_ONLY tag) and the platform TTY whitelist (ID_MM_PLATFORM_DRIVER_PROBE), which were not being applied.
2017-12-05kerneldevice: allow loading physdev sysfs pathAleksander Morgado
2017-12-05kerneldevice: allow loading physdev subsystemAleksander Morgado
Used to filter out TTYs when not explicitly whitelisted.
2017-12-05mbm: port dial_3gpp() and disconnect_3gpp() to GTaskAleksander Morgado
The two connection and disconnection methods are ported to GTask, and are also updated so that the reception of the unsolicited message reporting either connect/disconnection is able to right away complete the pending connection/disconnection attempts, as done in other plugins like the Icera or HSO ones.
2017-12-05icera: port dial_3gpp() to GTaskAleksander Morgado
2017-12-05hso: make report_connection_status() a separate logical blockAleksander Morgado
This block is a subclassed method from MMBaseBearer, which we just happen to also use as part of the 3GPP dial logic in the connection attempt. So make it a separate logical block, and call the processing of the connection attempt if one is found. This change makes it similar to the same logic in the Icera plugin.
2017-12-05hso: use a 60s timeout to wait for connection unsolicited messagesAleksander Morgado
Same amount of time as in the Icera plugin.
2017-12-05hso: port dial_3gpp() to GTaskAleksander Morgado
2017-12-05quectel: new pluginAleksander Morgado
For now just creating generic QMI/AT capable modems.
2017-12-05po: add Swedish translationAleksander Morgado
From: Josef Andersson <l10nl18nsweja@gmail.com> https://bugs.freedesktop.org/show_bug.cgi?id=104086
2017-11-23sierra: enable QMI connection status polling in Netgear AC341UAleksander Morgado
The Netgear AC341U seems to delay reporting packet service status indications or actually not even send them. This leaves us with modems in connected state in ModemManager but actually disconnected. We can detect this situation by actively polling ourselves the connection status. See e.g. this case where the indication is received 2.5 mins after the first OutOfCall error detected when loading statistics. Aug 30 22:52:50 ModemManager[574]: <info> Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> connected) Aug 30 22:52:50 ModemManager[574]: <info> Simple connect state (8/8): All done Aug 30 22:52:50 ModemManager[574]: <warn> Reloading stats failed: Couldn't get packet statistics: QMI protocol error (15): 'OutOfCall' Aug 30 22:53:20 ModemManager[574]: <warn> Reloading stats failed: Couldn't get packet statistics: QMI protocol error (15): 'OutOfCall' Aug 30 22:53:50 ModemManager[574]: <warn> Reloading stats failed: Couldn't get packet statistics: QMI protocol error (15): 'OutOfCall' Aug 30 22:54:20 ModemManager[574]: <warn> Reloading stats failed: Couldn't get packet statistics: QMI protocol error (15): 'OutOfCall' Aug 30 22:56:21 ModemManager[574]: <info> bearer call end reason (2): 'generic-client-end' Aug 30 22:56:21 ModemManager[574]: <info> bearer verbose call end reason (3,2000): [cm] client-end Aug 30 22:56:21 ModemManager[574]: <info> Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connected -> registered)
2017-11-23bearer-qmi: new optional connection status monitoringAleksander Morgado
This update makes it possible to request connection status polling for QMI modems via the ID_MM_QMI_CONNECTION_STATUS_POLLING_ENABLE tag. If not given, the connection status polling will be disabled by default, and the QMI modem will rely on WDS indications only.
2017-11-23iface-modem: remove invalid modem reference count in update_lock_info()Aleksander Morgado
The modem object is being explicitly referenced and stored in the Context, but then never unref-ed, completely leaking a modem reference forever. Fixes: 4df545884733bbc5a851ab86e0983dec057d5482
2017-11-23broadband-modem-qmi: plug memleak when listing stored imagesAleksander Morgado
==24602== 288 bytes in 4 blocks are definitely lost in loss record 4,693 of 4,860 ==24602== at 0x4C2CE5F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==24602== by 0x67292F9: g_malloc (in /usr/lib/libglib-2.0.so.0.5400.0) ==24602== by 0x670A706: g_slice_alloc (in /usr/lib/libglib-2.0.so.0.5400.0) ==24602== by 0x670B849: g_slice_alloc0 (in /usr/lib/libglib-2.0.so.0.5400.0) ==24602== by 0x53D3A24: __qmi_message_dms_get_stored_image_info_response_parse (qmi-dms.c:22779) ==24602== by 0x53E5C61: get_stored_image_info_ready (qmi-dms.c:32287) ==24602== by 0x6134908: g_simple_async_result_complete (in /usr/lib/libgio-2.0.so.0.5400.0) ==24602== by 0x613499E: ??? (in /usr/lib/libgio-2.0.so.0.5400.0) ==24602== by 0x67180BD: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.5400.0) ==24602== by 0x6719F68: ??? (in /usr/lib/libglib-2.0.so.0.5400.0) ==24602== by 0x671AF41: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.5400.0) ==24602== by 0x14477B: main (main.c:180)
2017-11-12po: update Ukrainian translationAleksander Morgado
From: Yuri Chornoivan <yurchor@ukr.net> https://bugs.freedesktop.org/show_bug.cgi?id=103685
2017-11-11build: minor build rules reordering for the udev rules testerAleksander Morgado
Move it after all plugin build rules.
2017-11-03cli: port mmcli_get_call to GTaskAleksander Morgado
2017-11-03cli: port mmcli_get_sim to GTaskAleksander Morgado
2017-11-03cli: port mmcli_get_sms to GTaskAleksander Morgado
2017-11-03cli: port mmcli_get_bearer to GTaskAleksander Morgado
2017-11-03cli: port mmcli_get_modem to GTaskAleksander Morgado
2017-11-03cli: port mmcli_get_manager to GTaskAleksander Morgado
2017-10-26sms-cdma-part: fix tautological-constant-compare compiler warningLuis A. Lozano
This patch fixes the following compiler warning issued by clang: mm-sms-part-cdma.c:301:46: mcomparison 'guint8' (aka 'unsigned char') <= 255 is always true [-Werror,-Wtautological-constant-compare]
2017-10-22mm-broadband-modem-qmi: reprobe on qmi-proxy deathEric Caruso
This allows us to reprobe the modem and respawn the qmi-proxy in case it dies on us. This gets us access to the modem and unsolicited notifications again. Do this by connecting to the device-removed signal on QmiDevice. --- Rebased on top of git master by Aleksander Morgado <aleksander@aleksander.es>
2017-10-22po: add Czech translationAleksander Morgado
From: Marek Černocký <marek@manet.cz> https://bugs.freedesktop.org/show_bug.cgi?id=103390
2017-10-22novatel: port load_supported_modes to use GTaskBen Chan
2017-10-20broadband-modem-qmi: avoid NULL success return in firmware_load_currentAleksander Morgado
Instead of assuming that NULL is a valid return, make sure we return an error instead. This also makes it sure that if the GTask gets cancelled, the result we set is always a valid GObject, so that the g_object_unref passed as GDestroyNotify can be safely called always. Not a big deal anyway, as the GTask cannot be currently cancelled.
2017-10-20broadband-modem-qmi: avoid NULL success return in firmware_load_listAleksander Morgado
Instead of assuming that NULL is a valid return, make sure we return an error instead.
2017-10-20broadband-modem-qmi: make it explicit that the GTask is successfulAleksander Morgado
When load_supported_storages() doesn't run the parent implementation, the GTask is always successful. Make it explicit, in case the logic changes in the future.
2017-10-20broadband-modem-qmi: port modem_cdma_load_meid to use GTaskBen Chan
2017-10-20broadband-modem-qmi: port modem_cdma_load_esn to use GTaskBen Chan
2017-10-20broadband-modem-qmi: port modem_3gpp_load_operator_code to use GTaskBen Chan
2017-10-20broadband-modem-qmi: port modem_3gpp_load_operator_name to use GTaskBen Chan
2017-10-20broadband-modem-qmi: port modem_3gpp_load_imei to use GTaskBen Chan
2017-10-20broadband-modem-qmi: port modem_messaging_setup_sms_format to use GTaskBen Chan
2017-10-20broadband-modem-qmi: port modem_load_supported_ip_families to use GTaskBen Chan
2017-10-20broadband-modem-qmi: port modem_load_supported_ip_modes to use GTaskBen Chan
2017-10-20broadband-modem-qmi: port modem_load_device_identifier to use GTaskBen Chan
2017-10-20broadband-modem-qmi: port modem_load_unlock_required to use GTaskBen Chan
2017-10-20broadband-modem-qmi: port modem_create_bearer to use GTaskBen Chan
2017-10-20broadband-modem-qmi: port messaging_load_supported_storages to use GTaskBen Chan
2017-10-20broadband-modem-qmi: port messaging_check_support to use GTaskBen Chan