Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 257661 - add modemmanager support to net-misc/networkmanager
Summary: add modemmanager support to net-misc/networkmanager
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Robert Piasek (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-04 19:42 UTC by Christian Schmitt
Modified: 2009-10-09 16:08 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
modified NM ebuild (networkmanager-0.7.0-r1.ebuild,3.79 KB, text/plain)
2009-02-04 19:44 UTC, Christian Schmitt
Details
patch for NM sources (nm-mm.patch,319.65 KB, patch)
2009-02-04 19:45 UTC, Christian Schmitt
Details | Diff
git version of modemmanager (modemmanager-9999.ebuild,971 bytes, text/plain)
2009-02-04 19:46 UTC, Christian Schmitt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Schmitt 2009-02-04 19:42:47 UTC
This slightly modified networkmanager ebuild will support a new useflag to enable modemmanager for making connections via USB-based modem devices. This made my HDSPA USB device work properly with NM.

I hope to get some feedback and testing.
Comment 1 Christian Schmitt 2009-02-04 19:44:23 UTC
Created attachment 180954 [details]
modified NM ebuild

This ebuild has a new useflag to enable or disable the modemmanager stuff. When enabled it will patch the original sources and pull in modemmanager as a dep.
Comment 2 Christian Schmitt 2009-02-04 19:45:02 UTC
Created attachment 180955 [details, diff]
patch for NM sources
Comment 3 Christian Schmitt 2009-02-04 19:46:07 UTC
Created attachment 180956 [details]
git version of modemmanager

needed primarily for debugging, but will also install some dbus configuration
Comment 4 Robert Piasek (RETIRED) gentoo-dev 2009-02-04 21:28:49 UTC
Hi Christian,

Thank you for your patch. As you probably saw, we were considering adding modemmanager support in the past (pre-0.7) in the overlay. Because modemmanager is still a moving target (no official release yet) and because networkmanger doesn't have direct support (without patching) we postponed it.

I will have a chat with modemmanager maintainer and ask about NM integration.
Comment 5 Christian Schmitt 2009-02-04 22:07:50 UTC
If you mean Tambet with developer, I talked to him on IRC today. He plans to merge the MM stuff into NM trunk soon. But even then it will take some time till it gets released, IMHO. That's why I decided to make my work of today available here.
Comment 6 Robert Piasek (RETIRED) gentoo-dev 2009-02-04 22:17:14 UTC
Yeah, I meant Tambet. I dropped him an email just a few minutes ago. Once modemmanager gets merged to the trunk, I will backport the changes to current NM. Hopefully 0.7.1 should also be available soon.

Rob
Comment 7 Robert Piasek (RETIRED) gentoo-dev 2009-02-05 23:39:49 UTC
(In reply to comment #6)
> Yeah, I meant Tambet. I dropped him an email just a few minutes ago. Once
> modemmanager gets merged to the trunk, I will backport the changes to current
> NM. Hopefully 0.7.1 should also be available soon.
> 
> Rob
> 

I've got a reply  from Tambet. It seems modemmanager-0.2 should be released shortly. After that he will push some patches to NM for proper integration.
Once it's in NM git tree - I will backport it.

Rob
Comment 8 Robert Piasek (RETIRED) gentoo-dev 2009-02-09 23:12:32 UTC
Just a quick update. It seems Tambet released ModemManager-0.2 today and pushed necessary patches to the tree. You will find updated ebuild in rbu's overlay tomorrow.

Rob
Comment 9 Robert Piasek (RETIRED) gentoo-dev 2009-02-10 13:25:34 UTC
As promised networkmanger-0.7.0-r2 is now available in rbu's overlay (with modemmanager-0.2).

This version has some patches backported from trunk and well as modemmanger support (via modemmanager use flag).

This package needs some testing as I didn't have enough time to extensively test it myself.

Please test it and report the results.

Rob
Comment 10 Christian Schmitt 2009-02-10 14:38:24 UTC
Just gave it a try on my PPC machine. It works great now and makes a mobile connection that just works. Thanks for the backporting.
Comment 11 Christian Schmitt 2009-02-10 14:50:54 UTC
Hmm, too early to tell if it works:
I am just noticing that I suddenly have a modemmanager process running, eating all my CPU time. It started roughly about 5-10 minutes after disconnecting my test connection.

Can anyone reproduce it?
Comment 12 Robert Piasek (RETIRED) gentoo-dev 2009-02-10 20:04:24 UTC
(In reply to comment #11)
> Hmm, too early to tell if it works:
> I am just noticing that I suddenly have a modemmanager process running, eating
> all my CPU time. It started roughly about 5-10 minutes after disconnecting my
> test connection.
> 
> Can anyone reproduce it?
> 
I'm afraid I can't reproduce it. After running NM for around 10 min:

$ ps ax | grep Network
 5475 ?        S      0:01 /usr/sbin/nm-system-settings --config /etc/NetworkManager/nm-system-settings.conf
 8869 ?        Ssl    0:00 /usr/sbin/NetworkManager --pid-file /var/run/NetworkManager.pid

$ ps ax | grep modem
 8880 ?        S      0:00 /usr/sbin/modem-manager

I can't see it on top/powertop/iotop. It's almost invisible (only ps ax | grep shows it's there).

I tested with Huawei E169 and it seems ok.
Comment 13 Christian Schmitt 2009-02-11 12:34:39 UTC
Still debugging the issue, but I found another bug: modemmanager does not compile with stable glib. I had to keyword it unstable to make it work.
Comment 14 Christian Schmitt 2009-02-13 18:26:30 UTC
...and here is a patch that should solve the CPU issue:
http://cgit.freedesktop.org/ModemManager/ModemManager/commit/?id=13facad4fa3be24d07768892135caebd88e95fcc
Comment 15 Robert Piasek (RETIRED) gentoo-dev 2009-02-14 12:12:44 UTC
(In reply to comment #14)
> ...and here is a patch that should solve the CPU issue:
> http://cgit.freedesktop.org/ModemManager/ModemManager/commit/?id=13facad4fa3be24d07768892135caebd88e95fcc
> 

Hi Christian,

Did you try this patch yourself? Does it fix it for you?

R
Comment 16 Robert Piasek (RETIRED) gentoo-dev 2009-02-14 12:18:12 UTC
(In reply to comment #13)
> Still debugging the issue, but I found another bug: modemmanager does not
> compile with stable glib. I had to keyword it unstable to make it work.
> 
modemmanager requires:
PKG_CHECK_MODULES(MM, dbus-glib-1 >= 0.75 glib-2.0 >= 2.14 gmodule-2.0 gobject-2.0 hal)

most dependencies are satisfied by networkmanager's dependencies.

If it doesn't compile fine with glib 2.16.6 (last mark stable in gentoo), than that's a bug in modemmanager.
Comment 17 Christian Schmitt 2009-02-14 12:19:04 UTC
Sorry, I was not able to test it until now since I had problems with the applet. Now it's working again and I can confirm that the patch solves the problem.
Comment 18 Christian Schmitt 2009-02-14 12:20:40 UTC
(In reply to comment #16)

> If it doesn't compile fine with glib 2.16.6 (last mark stable in gentoo), than
> that's a bug in modemmanager.
> 

Ok, then I will discuss this with the MM dev.
Comment 19 Robert Piasek (RETIRED) gentoo-dev 2009-02-14 12:53:20 UTC
(In reply to comment #17)
> Sorry, I was not able to test it until now since I had problems with the
> applet. Now it's working again and I can confirm that the patch solves the
> problem.
> 

Great. Thanks for testing. Patch backported in rbu's overlay.

When it comes to glib, I couldn't test it myself. It seems downgrading glib is the best way to mess up your system (after downgrade revdep-rebuild wanted to reinstall half of my system: 
Total: 149 packages (2 upgrades, 147 rebuilds), 126.31 MBytes to download )
Comment 20 Christian Schmitt 2009-02-16 12:22:18 UTC
Ok, I also found the problem that leads to the compile error with glib-2.16. It is a missing #include <signal.h> in main.c of MM. See this commit here:
http://cgit.freedesktop.org/ModemManager/ModemManager/diff/src/main.c?id=bef9c48ffc926b97a7c0b1d56b9de751e37efe69
Comment 21 Robert Piasek (RETIRED) gentoo-dev 2009-09-22 14:00:43 UTC
I've start shipping NM-0.8_pre version, which include modemmanager support.

Backporting current code to work with 0.7.x was a way too much overhead.