Jump to content
Funtoo Linux
  • 0
Sign in to follow this  
NikosAlexandris

NetworkManager doesn't start ModemManager

Question

I am manually connecting to WWAN via a Sierra EM7345 modem. The NetworkManager doens't seem to start ModemManager. Only if the latter is ran manually, it then appeas in NM. It is the same problem discussed at http://forums-web2.gentoo.org/viewtopic-t-994224.html?sid=643d116182decb2cf23a9d0d6a43ca9a.

 

Is there a way to fix this?  Add MM as a service (openrc)?

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Well, there's this: http://www.freedesktop.org/wiki/Software/ModemManager/Debugging/.  Of course, instead of the systemd commands, replace with /etc/init.d/NetworkManager stop, etc.

Is it a service?  It has an entry in /etc/init.d?  Then it's easy, you can put it in rc-update, which is really just a wrapper for putting links in /etc/runlevels.

You could create a service file in /etc/init.d , it wouldn't be too difficult, just use existing files as a guide.

If not, then you can put it in your /etc/local.d/*.start file.  Create one if you don't have one already, there is an explanation file in that directory.  Something like this would work:

/usr/sbin/ModemManager
/etc/init.d/NetworkManager restart

Or if there is a timing error with the startup of NetworkManager that way you can always do it with a startup file, say in your home directory.  It'll have to be owned by root and you'll have to add it to /etc/sudoers by way of sudo visudo, an entry like

<username> ALL = NOPASSWD: /home/<username>/<filename>

.  This file would be like:

#!/bin/bash
killall networkmanager
/usr/sbin/ModemManager
/etc/init.d/NetworkManager start

Then start that file with sudo <filename> in your desktop startup stuff or .xinitrc if you use that.

Listed in order of preference.  I don't have ModemManager, so I can only suggest general ways of handling it.

Share this post


Link to post
Share on other sites
  • 0

Besides the binary (under /usr/sbin), the include files, the librairies and various xml files (under /usr/share), there is only one related conf file:

/etc/dbus-1/system.d/org.freedesktop.ModemManager1.conf

There is no related ModemManager entry in /etc/init.d. I will try to create a "service" out of it. If this won't work out, then I will try the "local.d" suggestion. Note, the Mobile Broadband option appears automatically once ModemManager is launched manually (as root, of course), while NetworkManager is doing its work, and it works as well. Thus, there is probably no need to restart the NetworkManager.

 

Thank you for your time.

Share this post


Link to post
Share on other sites
  • 0

I think maybe the best approach is to create an /etc/init.d/ModemManager and add a "depend" entry to NetworkManager that says "use ModemManager". Then if you want ModemManager to be started prior to NetworkManager, you would add your ModemManager script to the default runlevel.

 

depend{ use foo; } in an OpenRC script means "start foo first if it is already enabled for this runlevel."

 

depend{ need foo; } means "start foo first, even if it hasn't been added to this runlevel."

Share this post


Link to post
Share on other sites
Guest
You are commenting as a guest. If you have an account, please sign in.
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×