Linux之pppd拨号成功后自动挂断

Ubuntu 16.04 系统 
// 手动 PPPD 拨号 ...


OK

+CSQ: 23,99

OK
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
AT+CRSM=176,12258,0,0,10
+CRSM: 144,0,"98681011180171850491"
23:44:16.054558 dial.go:103: ICCID >>> /dev/shm/3g_iccid

OK
AT+CFUN=1
OK
AT+CGDCONT=1,"IP","UNINET",,0,0
OK
ATDT*99#
CONNECT
Serial connection established.
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB2
PAP authentication succeeded
Could not determine remote IP address: defaulting to 10.64.64.64
local  IP address 10.112.218.220
remote IP address 10.64.64.64
primary   DNS address 202.106.195.68
secondary DNS address 202.106.46.151
Modem hangup // 自动挂断 .... <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Connect time 0.5 minutes.
Sent 846 bytes, received 532 bytes.
Connection terminated.
// syslog 日志
Aug  3 23:44:14 danoo-desktop pppd[3294]: pppd 2.4.7 started by root, uid 0
Aug  3 23:44:15 danoo-desktop chat[3297]: abort on (NO CARRIER)
Aug  3 23:44:15 danoo-desktop chat[3297]: abort on (NO DIALTONE)
Aug  3 23:44:15 danoo-desktop chat[3297]: abort on (ERROR)
Aug  3 23:44:15 danoo-desktop chat[3297]: abort on (NO ANSWER)
Aug  3 23:44:15 danoo-desktop chat[3297]: abort on (BUSY)
Aug  3 23:44:15 danoo-desktop chat[3297]: send (AT^M)
Aug  3 23:44:15 danoo-desktop chat[3297]: expect (OK)
Aug  3 23:44:15 danoo-desktop chat[3297]: ^M
Aug  3 23:44:15 danoo-desktop chat[3297]: OK
Aug  3 23:44:15 danoo-desktop chat[3297]:  -- got it
Aug  3 23:44:15 danoo-desktop chat[3297]: send (ATZ+CSQ^M)
Aug  3 23:44:15 danoo-desktop chat[3297]: expect (OK)
Aug  3 23:44:15 danoo-desktop chat[3297]: ^M
Aug  3 23:44:15 danoo-desktop chat[3297]: ^M
Aug  3 23:44:15 danoo-desktop chat[3297]: +CSQ: 23,99^M
Aug  3 23:44:15 danoo-desktop chat[3297]: ^M
Aug  3 23:44:15 danoo-desktop chat[3297]: OK
Aug  3 23:44:15 danoo-desktop chat[3297]:  -- got it
Aug  3 23:44:15 danoo-desktop chat[3297]: send (ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0^M)
Aug  3 23:44:15 danoo-desktop chat[3297]: expect (OK)
Aug  3 23:44:15 danoo-desktop chat[3297]: ^M
Aug  3 23:44:15 danoo-desktop chat[3297]: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0^M^M
Aug  3 23:44:15 danoo-desktop chat[3297]: OK
Aug  3 23:44:15 danoo-desktop chat[3297]:  -- got it
Aug  3 23:44:15 danoo-desktop chat[3297]: send (AT+CRSM=176,12258,0,0,10^M)
Aug  3 23:44:16 danoo-desktop chat[3297]: expect (OK)
Aug  3 23:44:16 danoo-desktop chat[3297]: ^M
Aug  3 23:44:16 danoo-desktop chat[3297]: AT+CRSM=176,12258,0,0,10^M^M
Aug  3 23:44:16 danoo-desktop chat[3297]: +CRSM: 144,0,"98681011180171850491"^M
Aug  3 23:44:16 danoo-desktop chat[3297]: ^M
Aug  3 23:44:16 danoo-desktop chat[3297]: OK
Aug  3 23:44:16 danoo-desktop chat[3297]:  -- got it
Aug  3 23:44:16 danoo-desktop chat[3297]: send (AT+CFUN=1^M)
Aug  3 23:44:16 danoo-desktop chat[3297]: expect (OK)
Aug  3 23:44:16 danoo-desktop chat[3297]: ^M
Aug  3 23:44:16 danoo-desktop chat[3297]: AT+CFUN=1^M^M
Aug  3 23:44:16 danoo-desktop chat[3297]: OK
Aug  3 23:44:16 danoo-desktop chat[3297]:  -- got it
Aug  3 23:44:16 danoo-desktop chat[3297]: send (AT+CGDCONT=1,"IP","UNINET",,0,0^M)
Aug  3 23:44:16 danoo-desktop chat[3297]: expect (OK)
Aug  3 23:44:16 danoo-desktop chat[3297]: ^M
Aug  3 23:44:16 danoo-desktop chat[3297]: AT+CGDCONT=1,"IP","UNINET",,0,0^M^M
Aug  3 23:44:16 danoo-desktop chat[3297]: OK
Aug  3 23:44:16 danoo-desktop chat[3297]:  -- got it
Aug  3 23:44:16 danoo-desktop chat[3297]: send (ATDT*99#^M)
Aug  3 23:44:16 danoo-desktop chat[3297]: expect (CONNECT)
Aug  3 23:44:16 danoo-desktop chat[3297]: ^M
Aug  3 23:44:16 danoo-desktop chat[3297]: ATDT*99#^M^M
Aug  3 23:44:16 danoo-desktop chat[3297]: CONNECT
Aug  3 23:44:16 danoo-desktop chat[3297]:  -- got it
Aug  3 23:44:16 danoo-desktop pppd[3294]: Serial connection established.
Aug  3 23:44:16 danoo-desktop pppd[3294]: Using interface ppp0
Aug  3 23:44:16 danoo-desktop pppd[3294]: Connect: ppp0 <--> /dev/ttyUSB2
Aug  3 23:44:16 danoo-desktop NetworkManager[706]: nm_device_get_device_type: assertion 'NM_IS_DEVICE (self)' failed
Aug  3 23:44:16 danoo-desktop NetworkManager[706]: <info>  [1533311056.6215] manager: (ppp0): new Generic device (/org/freedesktop/NetworkManager/Devices/6)
Aug  3 23:44:16 danoo-desktop NetworkManager[706]: <info>  [1533311056.6410] devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Aug  3 23:44:16 danoo-desktop NetworkManager[706]: <info>  [1533311056.6411] device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
Aug  3 23:44:17 danoo-desktop pppd[3294]: PAP authentication succeeded
Aug  3 23:44:20 danoo-desktop pppd[3294]: Could not determine remote IP address: defaulting to 10.64.64.64
Aug  3 23:44:20 danoo-desktop pppd[3294]: local  IP address 10.112.218.220
Aug  3 23:44:20 danoo-desktop pppd[3294]: remote IP address 10.64.64.64
Aug  3 23:44:20 danoo-desktop pppd[3294]: primary   DNS address 202.106.195.68
Aug  3 23:44:20 danoo-desktop pppd[3294]: secondary DNS address 202.106.46.151
Aug  3 23:44:22 danoo-desktop ntpd[1755]: Listen normally on 9 ppp0 10.112.218.220:123
Aug  3 23:44:22 danoo-desktop ntpd[1755]: new interface(s) found: waking up resolver
Aug  3 23:44:44 danoo-desktop ModemManager[683]: <warn>  (ttyUSB0): close blocked by driver for more than 7 seconds!
Aug  3 23:44:45 danoo-desktop kernel: [  383.578029] usb 1-3: USB disconnect, device number 15
Aug  3 23:44:45 danoo-desktop kernel: [  383.578867] generic ttyUSB0: generic converter now disconnected from ttyUSB0
Aug  3 23:44:45 danoo-desktop kernel: [  383.578906] usbserial_generic 1-3:1.0: device disconnected
Aug  3 23:44:45 danoo-desktop kernel: [  383.579319] generic ttyUSB2: generic converter now disconnected from ttyUSB2
Aug  3 23:44:45 danoo-desktop kernel: [  383.579340] usbserial_generic 1-3:1.1: device disconnected
Aug  3 23:44:45 danoo-desktop kernel: [  383.590752] generic ttyUSB3: generic converter now disconnected from ttyUSB3
Aug  3 23:44:45 danoo-desktop kernel: [  383.590782] usbserial_generic 1-3:1.2: device disconnected
Aug  3 23:44:45 danoo-desktop kernel: [  383.591157] generic ttyUSB4: generic converter now disconnected from ttyUSB4
Aug  3 23:44:45 danoo-desktop kernel: [  383.591186] usbserial_generic 1-3:1.3: device disconnected
Aug  3 23:44:45 danoo-desktop kernel: [  383.591619] generic ttyUSB5: generic converter now disconnected from ttyUSB5
Aug  3 23:44:45 danoo-desktop kernel: [  383.591637] usbserial_generic 1-3:1.4: device disconnected
Aug  3 23:44:45 danoo-desktop kernel: [  383.593423] generic ttyUSB6: generic converter now disconnected from ttyUSB6
Aug  3 23:44:45 danoo-desktop kernel: [  383.593457] usbserial_generic 1-3:1.5: device disconnected
Aug  3 23:44:45 danoo-desktop NetworkManager[706]: <error> [1533311085.5562] platform-linux: do-change-link[7]: failure changing link: failure 19 (No such device)
Aug  3 23:44:45 danoo-desktop pppd[3294]: Modem hangup
Aug  3 23:44:45 danoo-desktop NetworkManager[706]: <warn>  [1533311085.5562] device (ppp0): failed to disable userspace IPv6LL address handling
Aug  3 23:44:45 danoo-desktop pppd[3294]: Connect time 0.5 minutes.
Aug  3 23:44:45 danoo-desktop pppd[3294]: Sent 846 bytes, received 532 bytes.
Aug  3 23:44:45 danoo-desktop pppd[3294]: Connection terminated.
Aug  3 23:44:45 danoo-desktop ModemManager[683]: <info>  (tty/ttyUSB2): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb1/1-3
Aug  3 23:44:45 danoo-desktop ModemManager[683]: <warn>  (ttyUSB2) could not open serial device (2)
Aug  3 23:44:45 danoo-desktop ModemManager[683]: <warn>  (ttyUSB3) could not open serial device (2)
Aug  3 23:44:45 danoo-desktop ModemManager[683]: <warn>  (ttyUSB4) could not open serial device (2)
Aug  3 23:44:45 danoo-desktop ModemManager[683]: <info>  (tty/ttyUSB0): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb1/1-3
// 发现断开都是由 ModemManager -> close blocked by driver for more than 7 seconds! 之后断开 ...
// 所以尝试卸掉该软件后解决 sudo apt-get remove modemmanager
What is ModemManager?
ModemManager is a DBus-activated daemon which controls mobile broadband (2G/3G/4G) devices and connections. Whether built-in devices, USB dongles, bluetooth-paired telephones, or professional RS232/USB devices with external power supplies, ModemManager is able to prepare and configure the modems and setup connections with them.

1.x is the stable series of ModemManager using the improved /org/freedesktop/ModemManager1 interface.
// 就是说这个一个管理守护程序,负责2g/3g/4g, RS232/USB等,如果手动执行pppd标号貌似没有得到它的授权 ... 给你干掉了 ... 猜的 ...