Linux PPP:如何调试退出代码 = 16 的断开连接?

fre*_*set 5 debian modem mobile ppp wvdial

我在我的 ARM Linux 嵌入式系统上使用pppdwvdial。我有一个通过串行端口连接的 CDMA 调制解调器,并且正在连接到 Verizon 网络。我看到每天pppd有几次退出,退出代码为 16(请参阅下面日志中的确切消息)。我如何找出导致这些断开连接的原因?特别是该LCP terminated by peer消息表明了什么?

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.
Run Code Online (Sandbox Code Playgroud)

小智 5

重要提示:您始终可以使用本地选项覆盖默认选项。

man pppd

   /etc/ppp/options
          System default options for pppd, read before user default 
          options or command-line options.
Run Code Online (Sandbox Code Playgroud)

并且

~/.ppprc
/etc/ppp/options.ttyname
/etc/ppp/peers
Run Code Online (Sandbox Code Playgroud)

你应该启用调试选项(有时也启用 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)).
Run Code Online (Sandbox Code Playgroud)

您的退出代码

   EXIT STATUS
      16     The link was terminated by the modem hanging up.
Run Code Online (Sandbox Code Playgroud)

等等。

您的错误是LCP terminated by peer 有几个链接解释了如何修复它:

you'll need to pass "refuse-eap" option to pppd. 乌班图

lcp_term_authentication

或者只是检查您的凭据。