Bug 101386 - back some patches to support modem module dw5816[413c:81cc]
Summary: back some patches to support modem module dw5816[413c:81cc]
Status: RESOLVED WONTFIX
Alias: None
Product: ModemManager
Classification: Unclassified
Component: general (show other bugs)
Version: 1.4
Hardware: Other Linux (All)
: medium normal
Assignee: ModemManager bug user
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-12 09:54 UTC by alex.tu
Modified: 2017-06-12 11:42 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
the needed patches for libmbim (30.00 KB, patch)
2017-06-12 10:44 UTC, alex.tu
Details | Splinter Review
the needed patches of libqmi branch: qmi-1-12 (70.00 KB, patch)
2017-06-12 11:08 UTC, alex.tu
Details | Splinter Review
the needed patches of modemmanager branch mm-1-4 (110.00 KB, patch)
2017-06-12 11:35 UTC, alex.tu
Details | Splinter Review

Description alex.tu 2017-06-12 09:54:46 UTC
modem module dw5816 not works on modemmanager 1.4 + libmbim 1.12 + libqmi 1.12, it need some patches from newer code tree.

I'm working on it and going to attach the verified worked patches here later.

There's also a opened ticket on launchpad for Ubuntu Xenial:
https://bugs.launchpad.net/ubuntu/+source/modemmanager/+bug/1693756
Comment 1 alex.tu 2017-06-12 10:44:37 UTC
Created attachment 131887 [details] [review]
the needed patches for libmbim

it cherry-picked from followed existed patches of mbim-1-14, and it still need other patches on libqmi and modemmanager to make things work.
* 0ad5f9c libmbim-glib,message: allow building messages of custom services
* 7bf40d2 QMI via MBIM
* 7733044 Added json file lost in original qmi-over-mbim patch
Comment 2 alex.tu 2017-06-12 11:00:28 UTC
(In reply to alex.tu from comment #1)
> Created attachment 131887 [details] [review] [review]
> the needed patches for libmbim
> 
> it cherry-picked from followed existed patches of mbim-1-14, and it still
> need other patches on libqmi and modemmanager to make things work.
> * 0ad5f9c libmbim-glib,message: allow building messages of custom services
> * 7bf40d2 QMI via MBIM
> * 7733044 Added json file lost in original qmi-over-mbim patch

the way I used to to build libmbim for Ubuntu xenial is:
./autogen.sh

./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu --libexecdir=\${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-gtk-doc --enable-gtk-doc-html --libexecdir=/usr/lib/libmbim

make; sudo make install
Comment 3 alex.tu 2017-06-12 11:08:39 UTC
Created attachment 131889 [details] [review]
the needed patches of libqmi branch: qmi-1-12

libqmi need 17 patches[1] from qmi-1-16, 

One thing confuse me here is the version defined in configure.ac.
Because this backport include lots of patches and new interface (qmi-over-mbim), I'm not sure if it's better to sync the version as what qmi-1-16 is using.

[1] http://paste.ubuntu.com/24840598/

The way I used to build qmi:
./autogen.sh --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu --libexecdir=\${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-gtk-doc --enable-gtk-doc-html --libexecdir=/usr/lib/libqmi

make; sudo make install
Comment 4 Aleksander Morgado 2017-06-12 11:33:00 UTC
No, the QMI over MBIM thing is not something we want to backport to older versions; as you have noticed you need a ton of patches backported and it really isn't worth it. I'm sorry you took the effort to do this but it just is cleaner to upgrade to a new version of the packages if needed.

If you want support for modems requiring FCC auth via QMI over MBIM in Xenial, you can always setup this PPA:
https://launchpad.net/~aleksander-m/+archive/ubuntu/modemmanager-xenial

Even for Trusty:
https://launchpad.net/~aleksander-m/+archive/ubuntu/modemmanager-trusty
Comment 5 alex.tu 2017-06-12 11:35:40 UTC
Created attachment 131891 [details] [review]
the needed patches of modemmanager branch mm-1-4

There are 9 patches needed be backport from several branches, and some conflict need to be revised.
http://paste.ubuntu.com/24840670/

They are include 
* 7c929b5 novatel: move custom init method to separate source files
* 60a17df novatel: build a common non-inst library with the core Novatel modem support
* 2992801 sierra: build a common non-inst library with the core Sierra modem support
* 5a26843 mbm: build a common non-inst library with the core Ericsson modem support
* b115945 sierra: move custom init and port grabbing methods to separate source files
* 6bbc4c1 sierra: move all the legacy Sierra support to a new 'sierra-legacy' plugin
* 93d6e4f dell: new Dell plugin
* 47a99dc broadband-modem-qmi: use 'DMS Set FCC Authentication' if online mode fails
 - Conflicts:
    	configure.ac
    	src/mm-broadband-modem-qmi.c
* 8621086 broadband-modem-mbim: try to use FCC Auth through QMI-over-MBIM if power up fails
 - Conflicts:
    	configure.ac
    	src/mm-broadband-modem-mbim.c

the way to build modemmanager for Ubuntu Xenial:
 ./autogen.sh --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu --libexecdir=\${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --enable-gtk-doc --with-polkit=strict --with-systemdsystemunitdir=/lib/systemd/system 2>&1 | tee ~/collect-logs/configure.log

make; sudo make install
Comment 6 alex.tu 2017-06-12 11:39:29 UTC
wow~ it's a bit sad to see comment 4 after I already comment 5. Anyway, thanks your information.
Comment 7 Aleksander Morgado 2017-06-12 11:42:03 UTC
(In reply to alex.tu from comment #6)
> wow~ it's a bit sad to see comment 4 after I already comment 5. Anyway,
> thanks your information.

Like I said, sorry that you took all this time to do this, but it really isn't worth doing such a long backport; especially when you can just upgrade the versions to newer stable ones without incompatibilities. :/


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.