Commit Graph

11 Commits

Author SHA1 Message Date
coolsnowwolf
7ac8242a9d modemmanager: bump to 1.22.0 2024-04-09 23:25:24 +08:00
Kuan-Yi Li
cbf67beb4b modemmanager: bump to 1.20.2
Drop deprecated AUTORELEASE.

Disable unused tests as its compilation is optional in 1.20.

Signed-off-by: Kuan-Yi Li <kyli@abysm.org>
2022-12-09 10:29:02 +08:00
Aleksander Morgado
c7027a45ce modemmanager: fix unquoted strings when launching pppd
Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
2022-11-18 13:10:33 +08:00
Maxim Anisimov
a80f060d93 modemmanager: bump to 1.18.12
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
2022-11-10 17:32:52 +08:00
Arkadiusz Drabczyk
5bb6cabaf8 modemmanager: fix mm_log() invocations in 25-modemmanager* files
Definition of mm_log() was changed in
45a56a889943b437f78fa2bfca3d5d8ac555c77e but 25-modemmanager* weren't
changed.

Signed-off-by: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
2022-11-10 17:32:52 +08:00
Aleksander Morgado
418b83c362 modemmanager: explicitly disconnect even if no bearers found
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>
2022-11-10 17:32:52 +08:00
Rosen Penev
28a58b5b6a treewide: remove PKG_INSTALL for meson projects
It doesn't seem to be used by meson.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-06-16 12:49:10 +00:00
Beginner
32b2413454
modemmanager: sync upstream (#474)
* modemmanager: bump to 1.16.10

Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>

* modemmanager: switch to autorelease

Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>

* modemmanager: bump to 1.18.2

Signed-off-by: Kuan-Yi Li <kyli@abysm.org>

* modemmanager: add support for wwan subsystem in hotplug

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: fix physdev sysfs path detection in PCIe modems

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: refactoring procd init script

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: add service options

Signed-off-by: Florian Eckert <fe@dev.tdt.de>

* modemmanager: refactoring hotplug debug logging

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: remove 2s timeout before reporting cached events

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: bump to 1.18.4 with patch

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] e9f254ba3f
[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: bump to 1.18.6

Remove upstreamed patch.

Signed-off-by: Kuan-Yi Li <kyli@abysm.org>

* modemmanager: switch to meson build tools

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.8

Also removed two patches that are already included in the upstream
release.

Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>

* modemmanager: install available FCC unlock scripts

The FCC unlock scripts are installed but not enabled by default.

Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>

* modemmanager: report network initiated disconnections to netifd

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>

Co-authored-by: Nicholas Smith <nicholas@nbembedded.com>
Co-authored-by: Kuan-Yi Li <kyli@abysm.org>
Co-authored-by: Aleksander Morgado <aleksander@aleksander.es>
Co-authored-by: Florian Eckert <fe@dev.tdt.de>
Co-authored-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
2022-06-16 20:47:41 +08:00
lean
49b7495639 packages: merge upstream 2021-06-15 17:47:11 +08:00
coolsnowwolf
c36ad692b4 packages: sync to new packages 2020-07-08 14:18:52 +08:00
LEAN-ESX
eeea03f457 packages: sync with 19.07-rc2 2019-12-04 02:45:43 -08:00