Jump to content

Photo

NetworkManager doesn't start ModemManager

- - - - - modemmanager networkmanager

3 replies to this topic

#1
NikosAlexandris

NikosAlexandris

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts
  • LocationSwitzerland

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.g...23a9d0d6a43ca9a.

 

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


Nikos Alexandris | Remote Sensing *
GPG Key Fingerprint 6F9D4506F3CA28380974D31A9053534B693C4FB3


#2
sputnik

sputnik

    Advanced Member

  • Members
  • PipPipPip
  • 117 posts

Well, there's this: http://www.freedeskt...ager/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.



#3
NikosAlexandris

NikosAlexandris

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts
  • LocationSwitzerland

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.


Nikos Alexandris | Remote Sensing *
GPG Key Fingerprint 6F9D4506F3CA28380974D31A9053534B693C4FB3


#4
drobbins

drobbins

    Administrator

  • Administrators
  • 140 posts

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





Reply to this topic



  



Also tagged with one or more of these keywords: modemmanager, networkmanager

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users