6

I'm using pppd and wvdial on my ARM Linux embedded system. I have a CDMA modem connected via a serial port and am connecting to the Verizon network. I am seeing that several times per day pppd exits with exit code 16 (see exact message from log below). How do I work out what is causing these disconnects? In particular what does the LCP terminated by peer message indicate?

Feb 18 12:31:04 ts7600-47aad3 pppd[3242]: LCP terminated by peer
Feb 18 12:31:04 ts7600-47aad3 pppd[3242]: Connect time 0.6 minutes.
Feb 18 12:31:04 ts7600-47aad3 pppd[3242]: Sent 1044 bytes, received 0 bytes.
Feb 18 12:31:04 ts7600-47aad3 pppd[3242]: restoring old default route to eth0 [1
92.168.98.1]
Feb 18 12:31:07 ts7600-47aad3 pppd[3242]: Connection terminated.
Feb 18 12:31:07 ts7600-47aad3 pppd[3242]: Modem hangup
Feb 18 12:31:07 ts7600-47aad3 pppd[3242]: Exit.
Feb 18 12:31:07 ts7600-47aad3 wvdial: Disconnecting at Tue Feb 18 12:31:07 2014
Feb 18 12:31:07 ts7600-47aad3 wvdial: The PPP daemon has died: A modem hung up t
he phone (exit code = 16)
Feb 18 12:31:07 ts7600-47aad3 wvdial: man pppd explains pppd error codes in more
 detail.
fred basset
  • 1,025
  • 3
  • 15
  • 22

1 Answers1

5

Important: you can always override your default options with local options.

from man pppd

   /etc/ppp/options
          System default options for pppd, read before user default 
          options or command-line options.

and also

~/.ppprc
/etc/ppp/options.ttyname
/etc/ppp/peers

you should enable debug options (sometimes also kdebug)

   debug  Enables connection debugging facilities.  If this option
   is given, pppd will log the contents of all control packets  sent  
   or  received  in a readable form.  The packets are logged 
   through syslog with facility daemon and level debug.  This 
   information can be directed to  a  file  by  setting  
   up  /etc/syslog.conf  appropriately  (see  sys-log.conf(5)).

your exit codes

   EXIT STATUS
      16     The link was terminated by the modem hanging up.

and so on.

Your error is LCP terminated by peer there are several links which explain how to fix it:

you'll need to pass "refuse-eap" option to pppd. ubuntu

lcp_term_authentication

or simply check your credentials.

  • 1
    I've got debugging turned on in my options. Do you know what the message "LCP terminated by peer" indicates? I'd like to find the root cause of the disconnects. – fred basset Feb 19 '14 at 21:28
  • 1
    Looks like my problem was a hardware problem, power supply was occasionally cutting out causing the disconnect. – fred basset Feb 23 '14 at 17:52
  • Yeah, reason for this are often weak capacitors. With a little soldering skills you can replace them. –  Feb 23 '14 at 19:10