aboutsummaryrefslogtreecommitdiff
path: root/net/modemmanager
Commit message (Collapse)AuthorAge
* modemmanager: improve 'simple connection' option handlingFlorian Eckert2023-07-24
| | | | | | | | The line to generate the argument list for 'simple connect' is quite long and is not maintainable. To improve the handling a function 'append_param' was added for appending the 'simple connect' options. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* modemmanager: Adding support for 'allow_roaming' optionFrancisco Jose Alvarez2023-07-24
| | | | | | | Signed-off-by: Francisco Jose Alvarez <francisco.alvarez@galgus.net> * Update commit head * Rebase patch to the latest changes Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* modemmanger: add missing proto_init_update in teardownFlorian Eckert2023-07-24
| | | | | | | Inform netifd with missing 'proto_update', that the interface is not up anymore. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* modemmanager: do not set proto_notify_error on teardownFlorian Eckert2023-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If on teardown the 'proto_notify_error' is set to 'MM_TEARDOWN_IN_PROGRESS', then an error which is set on 'setup' is not visible in the ubus network.interface.<iface> status output. { "up": false, "pending": false, "available": true, "autostart": false, "dynamic": false, "proto": "modemmanager", "data": { }, "errors": [ { "subsystem": "dualsim", "code": "MM_TEARDOWN_IN_PROGRESS" } ] } It alway shows the code 'MM_TEARDWON_IN_PROGRESS'! By removing the line 'proto_notify_error "${interface}" MM_TEARDOWN_IN_PROGRESS' in teardown, the last error is show in the proto stack from setup. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* modemmanager: support setting plmnMladen Milinkovic2023-07-21
| | | | Signed-off-by: Mladen Milinkovic <maxrd2@smoothware.net>
* modemmanager: if an alias name is used do not check sysfs pathFlorian Eckert2023-06-15
| | | | | | | | | If an alias name is used for the modem, then a check if the device exists in sysfs does not work. To fix this remove the check if the sysfs device exists. The protocoll handler already checks if the modem is responsible for this device on the next line. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* modemmanager: do not cache virtual device eventsFlorian Eckert2023-06-15
| | | | | | | | | | | On small systems with many virtual devices, the modem manager sometimes could not start because it took too long until all devices for the modem were recognised. This is because all system events that are stored in the file events.cache have to be processed. To speed up the processing, all devices under /sys/devices/virtual are now filtered out so that they do not have to be processed. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* treewide: refactor to use PKG_BUILD_FLAGS:=gc-sectionsAndre Heider2023-04-08
| | | | | | | | | | | | See commit da370098 "treewide: add support for "gc-sections" in PKG_BUILD_FLAGS" on the main repository. Note: This only touches packages which use all three parts (-ffunction-sections, -fdata-sections and -Wl,--gc-sections) enabled by this build flag. Some packages only use a subset, and these are left unchanged for now. Signed-off-by: Andre Heider <a.heider@gmail.com>
* modemmanager: bump to 1.20.6Kuan-Yi Li2023-03-09
| | | | Signed-off-by: Kuan-Yi Li <kyli@abysm.org>
* modemmanager: bump to 1.20.2Kuan-Yi Li2022-12-09
| | | | | | | | Drop deprecated AUTORELEASE. Disable unused tests as its compilation is optional in 1.20. Signed-off-by: Kuan-Yi Li <kyli@abysm.org>
* modemmanager: fix unquoted strings when launching pppdAleksander Morgado2022-11-11
| | | | Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* modemmanager: bump to 1.18.12Maxim Anisimov2022-09-14
| | | | Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
* modemmanager: fix mm_log() invocations in 25-modemmanager* filesArkadiusz Drabczyk2022-07-24
| | | | | | | | Definition of mm_log() was changed in 45a56a889943b437f78fa2bfca3d5d8ac555c77e but 25-modemmanager* weren't changed. Signed-off-by: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
* modemmanager: explicitly disconnect even if no bearers foundAleksander Morgado2022-07-05
| | | | | | | | | | | | | | | | | A network restart where netifd is cleanly restarted involves bringing the network interfaces down. The 'modemmanager' protocol handler will run a mmcli --simple-disconnect in this case, but only if there are bearer objects found. If the network restart happened *during* the connection attempt procedure, while the modem is e.g. being registered in the network, no bearer objects exist yet, and so, we would skip doing anything during the interface teardown operation. This would lead to the original connection attempt succeeding, so leaving the modem in ModemManager in connected state, while the associated interface in netifd is reported down. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* treewide: remove PKG_INSTALL for meson projectsRosen Penev2022-06-15
| | | | | | It doesn't seem to be used by meson. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* modemmanager: report network initiated disconnections to netifdAleksander Morgado2022-05-14
| | | | | | | | | | | | | | The new connection dispatcher scripts support integrated in ModemManager 1.18.8 allows us to provide a openwrt-specific dispatcher script used to report netifd that the underlying network connection is down. See also https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/775 Fixes https://github.com/openwrt/openwrt/issues/8368 Fixes https://github.com/openwrt/packages/issues/14096 Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* modemmanager: install available FCC unlock scriptsAleksander Morgado2022-05-14
| | | | | | The FCC unlock scripts are installed but not enabled by default. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* modemmanager: bump to 1.18.8Aleksander Morgado2022-05-14
| | | | | | | Also removed two patches that are already included in the upstream release. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* modemmanager: switch to meson build toolsMaxim Anisimov2022-03-30
| | | | | | | | | | Using https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git to download the source code. Added compile option to compile qrtr support. Enabled lto and additional gcc flags for perfomance and less size. Modified to use meson as upstream has abandoned autotools. Removed BUILD_PARALLEL options. These are default with ninja/meson. Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
* modemmanager: bump to 1.18.6Kuan-Yi Li2022-03-09
| | | | | | Remove upstreamed patch. Signed-off-by: Kuan-Yi Li <kyli@abysm.org>
* modemmanager: bump to 1.18.4 with patchNicholas Smith2022-02-11
| | | | | | | | | | | | | | The included patch corrects an issue preventing udev rules from being parsed correctly. [1][2] This patch should not be needed after the next release. [3] More information: [1] https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/commit/e9f254ba3f923248efffe4fd458dc5e5469e0f73 [2] https://lists.freedesktop.org/archives/modemmanager-devel/2021-December/009024.html [3] https://lists.freedesktop.org/archives/modemmanager-devel/2021-December/009022.html Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
* modemmanager: remove 2s timeout before reporting cached eventsAleksander Morgado2022-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When ModemManager is started on boot we may end up with hotplug events reported directly to the daemon, plus some others already cached in the cache file before the daemon was started. If the cached events correspond to the same device that is still notifying ports directly, we may end up with a modem object created before the cached events have been emitted, so the modem may not handle all control/data ports it should. E.g.: - modem detected - hotplug event for wwan0 port, cached as MM not running - hotplug event for cdc-wdm0 port, cached as MM not running - hotplug event for ttyUSB0, cached as MM not running - MM starts - hotplug event for ttyUSB1, directly processed as MM is running - hotplug event for ttyUSB2, directly processed as MM is running - modem object created with ttyUSB1 and ttyUSB2 - 2s after MM starts, cached events for wwan0, cdc-wdm0 and ttyUSB0 happen, but are ignored because the modem object has already been created MM expects that ports of the same device are reported with less than 1500ms in between ports. In other words, if ports are reported more than 1500ms after the last reported port, they may get ignored. If we remove the 2s timeout, the report of the cached events will happen as soon as MM starts, which makes it much more likely to happen in the timeslot that MM expects for ports of the same device reported. The logic is still not perfect, and we may also need to increase that 1500ms timeout inside MM, but removing the 2s timeout right away here makes sense. This 2s timeout was introduced along with the new wrapper launcher for the daemon, it didn't exist before. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* modemmanager: refactoring hotplug debug loggingFlorian Eckert2021-12-14
| | | | | | | | | | | | | The output of the hotplug is very chatty and floods the log with messages that are not necessary in functioning operation. So that the log can be filtered. A log level was added to each message as the first opiton on mm_log function call. In addition, the facility of the hotplug script has been set to daemon, which in my view fits better than user. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* ModemManager: add service optionsFlorian Eckert2021-12-14
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* ModemManager: refactoring procd init scriptFlorian Eckert2021-12-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way the init script is written now, we get a bad output when calling the ubus service backend. ubus call service list "{'verbose':true,'name':'modemmanager'}" >{ > "modemmanager": { > "instances": { > "instance1": { > "running": true, > "pid": 20511, > "command": [ > "sh", > "-c", > ". >/usr/share/ModemManager/modemmanager.common; \t >mkdir -m 0755 -p /var/run/modemmanager; \t >mm_cleanup_interfaces; \t >( mm_report_events_from_cache ) >/dev/null 2>&1 & \t >/usr/sbin/ModemManager" > ], > "term_timeout": 5, > "respawn": { > "threshold": 3600, > "timeout": 5, > "retry": 5 > }, > "pidfile":"/var/run/modemmanager/modemmanager.pid" > } > } > } >}" I also get the output in the log that the PID file cannot be created. > daemon.err procd: Failed to remove pidfile: :No such file or directory The changes in this commit fixes this issues, by moving startup into a wrapper script. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* modemmanager: fix physdev sysfs path detection in PCIe modemsAleksander Morgado2021-11-12
| | | | | | | | The PCIe physdev path lookup relies on the 'vendor' and 'device' attribute files, instead of the 'idVendor' and 'idProduct' ones, which are USB specific. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* modemmanager: add support for wwan subsystem in hotplugAleksander Morgado2021-10-19
| | | | | | | | | WWAN devices may now be exposed in the new 'wwan' subsystem in the kernel (since 5.13), initially applicable to devices exposed in PCIe (no USB), but at some point may also apply to USB devices that until now were exposed via other subsystems (e.g. usbmisc, tty). Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* modemmanager: bump to 1.18.2Kuan-Yi Li2021-09-20
| | | | Signed-off-by: Kuan-Yi Li <kyli@abysm.org>
* modemmanager: switch to autoreleaseNicholas Smith2021-08-22
| | | | Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
* modemmanager: bump to 1.16.10Nicholas Smith2021-08-22
| | | | Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
* modemmanager: bump to 1.16.6Nicholas Smith2021-06-07
| | | | Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
* modemmanager: bump to 1.16.2Nicholas Smith2021-03-07
| | | | Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
* modemmanager: bump to version 1.16.0Nicholas Smith2021-02-24
| | | | Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
* modemmanager: bump versionNicholas Smith2021-01-19
| | | | Signed-off-by: Nicholas Smith <nicholas.smith@telcoantennas.com.au>
* modemmanager: bump releaseRosen Penev2020-12-09
| | | | Signed-off-by: Rosen Penev <rosenp@gmail.com>
* Merge pull request #13009 from valexi7/masterRosen Penev2020-12-09
|\ | | | | modemmanager: Added options
| * modemmanager: added new proto optionsValtteri Holopainen2020-08-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added signal refresh rate option modemmanager: update readme.md Added description for added proto options. Added compile option to compile --with-at-command-via-dbus for allowing AT commands to modem without --debug flag Changes to be committed: modified: net/modemmanager/Config.in modified: net/modemmanager/Makefile modified: net/modemmanager/files/modemmanager.init modified: net/modemmanager/files/modemmanager.proto modified: README.md Signed-off-by: Valtteri Holopainen <valtsu@gmail.com>
* | modemmanager: bump to 1.14.8Nicholas Smith2020-11-30
| | | | | | | | Signed-off-by: Nicholas Smith <nicholas.smith@telcoantennas.com.au>
* | modemmanager: include all init commands in the procd instanceAleksander Morgado2020-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | If procd relaunches the ModemManager daemon after e.g. a crash, we also want it to notify all cached hotplug events, or otherwise we would end up leaving the daemon running without the full initial processing done. This change modifies the init script to include all the required init commands as part of the procd instance command, so that procd launches all of them on every respawn. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* | modemmanager: increase initial timeout for event reportingAleksander Morgado2020-10-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the ModemManager daemon is started by the init script, we're explicitly calling mm_report_events_from_cache() so that all the hotplug events that happened before that moment are properly notified to the newly launched daemon. This initial reporting of events does a wait for the ModemManager process to be available in DBus, and if the daemon isn't registered in the bus in a given time, the process is considered failed: Sun Sep 6 16:20:02 2020 ModemManager: hotplug: checking if ModemManager is available... Sun Sep 6 16:20:02 2020 ModemManager: hotplug: ModemManager not yet available Sun Sep 6 16:20:03 2020 [2180]: <info> ModemManager (version 1.14.6) starting in system bus... Sun Sep 6 16:20:03 2020 ModemManager: hotplug: checking if ModemManager is available... Sun Sep 6 16:20:04 2020 ModemManager: hotplug: ModemManager not yet available Sun Sep 6 16:20:05 2020 ModemManager: hotplug: checking if ModemManager is available... Sun Sep 6 16:20:05 2020 ModemManager: hotplug: ModemManager not yet available Sun Sep 6 16:20:06 2020 ModemManager: hotplug: checking if ModemManager is available... Sun Sep 6 16:20:06 2020 ModemManager: hotplug: ModemManager not yet available Sun Sep 6 16:20:07 2020 ModemManager: hotplug: checking if ModemManager is available... Sun Sep 6 16:20:07 2020 ModemManager: hotplug: ModemManager not yet available Sun Sep 6 16:20:08 2020 ModemManager: hotplug: checking if ModemManager is available... Sun Sep 6 16:20:08 2020 ModemManager: hotplug: ModemManager not yet available Sun Sep 6 16:20:09 2020 ModemManager: hotplug: checking if ModemManager is available... Sun Sep 6 16:20:09 2020 ModemManager: hotplug: ModemManager not yet available Sun Sep 6 16:20:10 2020 ModemManager: hotplug: checking if ModemManager is available... Sun Sep 6 16:20:10 2020 ModemManager: hotplug: ModemManager not yet available Sun Sep 6 16:20:11 2020 ModemManager: hotplug: checking if ModemManager is available... Sun Sep 6 16:20:11 2020 ModemManager: hotplug: ModemManager not yet available Sun Sep 6 16:20:12 2020 ModemManager: hotplug: checking if ModemManager is available... Sun Sep 6 16:20:12 2020 ModemManager: hotplug: ModemManager not yet available Sun Sep 6 16:20:12 2020 ModemManager: hotplug: error: couldn't report initial kernel events: ModemManager not running Update the default wait time for this initial event notification from 10s to 60s, because there are cases where the daemon is slower to boot, e.g. during the first boot after a sysupgrade. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* | modemmanager: bump to 1.14.6Nicholas Smith2020-10-15
| | | | | | | | Signed-off-by: Nicholas Smith <nicholas.smith@telcoantennas.com.au>
* | modemmanager: bump to 1.14.2Aleksander Morgado2020-08-20
| | | | | | | | | | | | https://lists.freedesktop.org/archives/modemmanager-devel/2020-August/008099.html Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* | modemmanager: avoid requiring autoreconf to build packageAleksander Morgado2020-07-30
|/ | | | | | | | | | | | | | | | | | | | | | | | | Do not manually overwrite the paths of gdbus-codegen or glib-mkenums in the ModemManager package build, as modifying the configure.ac ends up requiring a full autoreconf. Since MM 1.14, git builds or autoreconf-ed source package builds require autoconf-archive installed in the build system, and so the build would fail if this happens. The update to overwrite the paths was to force using the gdbus-codegen and glib-mkenums provided by the "host" glib2 package instead of the "target" glib2 package (see fa8ad6e69c41d694b1220e04ec4f45bb8e8c1edf), but these tools are really the same in both as they're python programs, arch independent. Tested in a local build where the setup detects and uses the correct glib tool paths from the target: /home/user/openwrt/staging_dir/target-mips_24kc_musl/usr/bin/gdbus-codegen /home/user/openwrt/staging_dir/target-mips_24kc_musl/usr/bin/glib-mkenums Fixes https://github.com/openwrt/packages/issues/12958 Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* modemmanager: add error message notifications to proto handlerNicholas Smith2020-07-10
| | | | Signed-off-by: Nicholas Smith <nicholas.smith@telcoantennas.com.au>
* modemmanager: bump to 1.14.0Nicholas Smith2020-07-06
| | | | Signed-off-by: Nicholas Smith <nicholas.smith@telcoantennas.com.au>
* Merge pull request #12086 from aleksander0m/aleksander/mm-authRosen Penev2020-06-28
|\ | | | | Authentication protocol setup in ModemManager
| * modemmanager: improve package READMEAleksander Morgado2020-05-14
| | | | | | | | | | | | | | | | Explain which are the options supported by the protocol, and also which are the supported values in each (if the field has value validation). Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
| * modemmanager: allow specifying list of authentication protocolsAleksander Morgado2020-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ModemManager allows specifying which are the authentication protocols to be used during the user/password context authentication with the peer. This protocol update allows users to provide a new 'allowedauth' option in the interface configuration, which is then used in two different places: * It is sent to ModemManager in the --simple-connect call so that modems with a network interface can perform the authentication using their own vendor-specific protocol. * If the connection is done using PPP, this list of protocols is used to configure the pppd call. If the new 'allowedauth' option is not given, all auth protocols are implicitly allowed. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* | modemmanager: set interface MTU based on bearer settingsAleksander Morgado2020-05-25
|/ | | | | | | | Using the same method used by other protocol handlers like uqmi. Fixes https://github.com/openwrt/packages/issues/11383 Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
* modemmanager: release 1.12.10Aleksander Morgado2020-05-09
| | | | | | https://lists.freedesktop.org/archives/modemmanager-devel/2020-May/007828.html Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>