The story is not so important for this question, but here it is: the GPRS modem is locked-in to the vendor's software (it doesn't work, if it doesn't receive a correct response to a "challenge" it prints from time to time). To use it under Linux, someone has reverse-engineered/disassembled that code, and now there is a daemon-like program which scans for the device to appear and then starts sending special commands to it. The source of this program has been lost, so we cannot rewrite it.

If the daemon is run before NetworkManager starts connecting, NetworkManager fails because of some access conflict. If the daemon is run after the PPP connection has been established, the connection is broken (probably because it interferes with it, at the initial stage, perhaps.) But I've found out that if the daemon is started and then pppd is run manually, everything works fine.

But people use NetworkManager.

How does one make NetworkManager run another program before pppd for a specific connection? (I know a hack to do this for any connection: simply substitute the pppd binary with a wrapper! Perhaps, it's even not so bad, except for intruding into a distro's package, which means that our wrapper would be overwritten with a package upgrade.)

A simpler question: How does one make NetworkManager use another program instead of standard pppd (without replacing pppd at its standard location)?

A harder question: How does one make NetworkManager run this special program if it is going to use some defined model of GPRS modem?

  • 1
    So, this daemon has to be started before ppp0 is up ? You might want to try with a dispatcher script in /etc/NetworkManager/dispatcher.d/pre-up.d/ see sample here – don_crissti Mar 31 '15 at 19:51
  • @don_crissti Yes, correct, before ppp0. Thanks a lot for your advice! I didn't know about this directory. I should really try your suggestion before making a wrapper around pppd. I'm not yet quite sure whether these pre-up.d/ scripts are run sufficiently early not disturb pppd's negotiations... only an experiment will tell. – imz -- Ivan Zakharyaschev Mar 31 '15 at 20:41
  • @don_crissti Let us see whether it is already implemented... "pre-up isn’t implemented and seems will never be" -- November 16, 2011 at 13:47:37 techytalk.info/… – imz -- Ivan Zakharyaschev Mar 31 '15 at 20:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.