Raspberry-Pi

XLinux PPP: wvdial exit code 16 no debug details

  • July 25, 2019

我正在嘗試在 Rapsbian RPi 上使用 3G USB 調製解調器,一切順利,除了由於某種原因 PPP 與退出程式碼 16 斷開連接。我啟用了調試模式,但它什麼也沒說,除了身份驗證成功.

請參閱以下詳細資訊:

WvDial: Internet dialer version 1.61
Initializing modem.
Sending: ATZ
ATZ
OK
Sending: AT+CPIN=XXXX
AT+CPIN=XXXX
OK
Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
Sending: AT+CGDCONT=1,"IP","internet"
AT+CGDCONT=1,"IP","internet"
OK
Modem initialized.
Sending: ATD*99#
Waiting for carrier.
ATD*99#
CONNECT 3600000
Carrier detected.  Starting PPP immediately.
Starting pppd at Sun Dec  7 22:23:20 2014
Pid of pppd: 2967
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
Using interface ppp0
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
Authentication (CHAP) started
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
Authentication (CHAP) successful
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
pppd: 8�f[01]P�f[01]h�f[01]��f[01]؉f[01]0�f[01]
Disconnecting at Sun Dec  7 22:23:24 2014
The PPP daemon has died: A modem hung up the phone (exit code = 16)
man pppd explains pppd error codes in more detail.
Try again and look into /var/log/messages and the wvdial and pppd man pages for more information.
Auto Reconnect will be attempted in 5 seconds

/var/log/messages 顯示:

Dec  7 22:58:45 raspberrypi pppd[3779]: pppd 2.4.5 started by root, uid 0
Dec  7 22:58:45 raspberrypi pppd[3779]: Using interface ppp0
Dec  7 22:58:45 raspberrypi pppd[3779]: Connect: ppp0 <--> /dev/ttyUSB2
Dec  7 22:58:45 raspberrypi pppd[3779]: CHAP authentication succeeded
Dec  7 22:58:45 raspberrypi pppd[3779]: CHAP authentication succeeded
Dec  7 22:58:48 raspberrypi pppd[3779]: Modem hangup
Dec  7 22:58:48 raspberrypi pppd[3779]: Connection terminated.
Dec  7 22:58:48 raspberrypi pppd[3779]: Exit.

我確實想通了。問題是在輸入 SIM 卡 PIN 後,wvdial 繼續撥號。這太快了。輸入 PIN 後,卡需要時間註冊到網路。

我創建了撥號腳本,一個只需輸入 PIN 碼,等待 20 秒,然後另一個撥打 3G 網路,現在它可以可靠地工作。

引用自:https://unix.stackexchange.com/questions/172526