Jump to content
Read the Funtoo Newsletter: Summer 2023 ×
  • 0

NetworkManager doesn't start ModemManager


NikosAlexandris

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)?

Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

  • 0
  • Funtoo Linux BDFL

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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...