Re: openwrt netifd integration improvements with new dispatcher scripts

2022-03-30 Thread Bjørn Mork
Aleksander Morgado  writes:

> Yes yes, since yesterday morning we have all libqrtr-glib, libmbim and
> libqmi already built using meson in openwrt-packages, so updating them
> manually to point to git main is just about changing the
> PKG_SOURCE_VERSION to point to the git main commit that you want, and
> PKG_VERSION to the current version (as per meson.build) in the git
> main branch.

Great! Will test.  Changing PKG_SOURCE_VERSION is within acceptable work
load :-)


Bjørn


Re: openwrt netifd integration improvements with new dispatcher scripts

2022-03-30 Thread Aleksander Morgado
Hey!

>
> The test failed at first attempt, though.  But I assume that was only
> because I didn't install the connection dispatcher script executable?
> It has worked every time after I did
>

Nice! Thanks for testing.

>  chmod 755 /usr/lib/ModemManager/connection.d/10-report-down
>

Yes, that's it. The scripts must be owned and executable only by root.

> > Comments and tests welcome!
>
> Us lazy people would love to see proper packaging of those modern meson
> based libqmi/libmbim packages. The threshold for testing MM is a lot
> higher when I have to update packaging of both those libraries first.
>
> (oops, and there I admitted that I did yesterdays testing by backporting
> instead of updating to latest and greates.  Yes, I'm lazy)

Yes yes, since yesterday morning we have all libqrtr-glib, libmbim and
libqmi already built using meson in openwrt-packages, so updating them
manually to point to git main is just about changing the
PKG_SOURCE_VERSION to point to the git main commit that you want, and
PKG_VERSION to the current version (as per meson.build) in the git
main branch.

ModemManager is also on its way: https://github.com/openwrt/packages/pull/18167

My plan is to get this change into 1.18.8 and get it released in
openwrt along with the dispatch script.
--
Aleksander
https://aleksander.es


Re: openwrt netifd integration improvements with new dispatcher scripts

2022-03-29 Thread Bjørn Mork
Aleksander Morgado  writes:

> Hey,
>
> The current openwrt integration suffered from a serious problem:
> network initiated disconnections were properly detected by MM but
> never reported to netifd. Due to this, the modem may end up in
> registered state while netifd thinks it is still connected.
>
> I reported about this issue here: 
> https://github.com/openwrt/openwrt/issues/8368
>
> After discussing the problem with one of the openwrt maintainers, they
> suggested a way to report the disconnection of the interface to
> netifd. In order to run the operations they suggested, I've added
> support for connection status dispatch scripts in ModemManager. These
> are scripts that distributions or users could install, equivalent to
> what we do with the FCC unlock scripts, and which are run whenever a
> bearer gets connected or disconnected.
>
> The work is ready for review/testing here:
>
> https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/775
>
> In that same bugreport I've pushed also the dispatcher script that I
> would attempt to integrate in the openwrt packaging once the
> dispatcher script support is shipped in a ModemManager release.

Works for me, simply repeating the test you did.  Nice stuff.  I was
missing something like this when I tried to have a MM managed backup
link running on OpenWrt.

The test failed at first attempt, though.  But I assume that was only
because I didn't install the connection dispatcher script executable?
It has worked every time after I did

 chmod 755 /usr/lib/ModemManager/connection.d/10-report-down

> Comments and tests welcome!

Us lazy people would love to see proper packaging of those modern meson
based libqmi/libmbim packages. The threshold for testing MM is a lot
higher when I have to update packaging of both those libraries first.

(oops, and there I admitted that I did yesterdays testing by backporting
instead of updating to latest and greates.  Yes, I'm lazy)



Bjørn


Re: openwrt netifd integration improvements with new dispatcher scripts

2022-03-29 Thread Peter Naulls

On 3/29/22 09:29, Aleksander Morgado wrote:

Hey,

The current openwrt integration suffered from a serious problem:
network initiated disconnections were properly detected by MM but
never reported to netifd. Due to this, the modem may end up in
registered state while netifd thinks it is still connected.

I reported about this issue here: https://github.com/openwrt/openwrt/issues/8368

After discussing the problem with one of the openwrt maintainers, they
suggested a way to report the disconnection of the interface to
netifd. In order to run the operations they suggested, I've added
support for connection status dispatch scripts in ModemManager. These
are scripts that distributions or users could install, equivalent to
what we do with the FCC unlock scripts, and which are run whenever a
bearer gets connected or disconnected.


Oh, good. We have ended up with extensive logic to handle reconnections/reset
logic and whatnot with a monitoring script; it's clearly not perfect, but it
does much of what's needed, but it is now overly complex.

Improving this logic at the lower layer will likely be a significant reliability
improvement. I will try and test this soon.




openwrt netifd integration improvements with new dispatcher scripts

2022-03-29 Thread Aleksander Morgado
Hey,

The current openwrt integration suffered from a serious problem:
network initiated disconnections were properly detected by MM but
never reported to netifd. Due to this, the modem may end up in
registered state while netifd thinks it is still connected.

I reported about this issue here: https://github.com/openwrt/openwrt/issues/8368

After discussing the problem with one of the openwrt maintainers, they
suggested a way to report the disconnection of the interface to
netifd. In order to run the operations they suggested, I've added
support for connection status dispatch scripts in ModemManager. These
are scripts that distributions or users could install, equivalent to
what we do with the FCC unlock scripts, and which are run whenever a
bearer gets connected or disconnected.

The work is ready for review/testing here:

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/775

In that same bugreport I've pushed also the dispatcher script that I
would attempt to integrate in the openwrt packaging once the
dispatcher script support is shipped in a ModemManager release.

Comments and tests welcome!
Cheers

-- 
Aleksander
https://aleksander.es