title: PPPD: Modem Hangup After PAP Authentication Success
body: <p>I am trying to connect to the internet with SIM7600 module - <a href="https://www.waveshare.com/sim7600e-h-4g-hat.htm" rel="nofollow noreferrer">https://www.waveshare.com/sim7600e-h-4g-hat.htm</a></p>
  <p>Used following <code>chat</code> and <code>dial</code> files:</p>
  <pre><code>pi@raspberrypi:~ $ sudo pppd call dial
  abort on (BUSY)
  abort on (NO ANSWER)
  pi@raspberrypi:~ $ cat /etc/ppp/chat
  # 
  # chat script 
  # 
  # 
          ABORT           'BUSY'
          ABORT           'NO ANSWER'
          ABORT           'NO CARRIER'
          ABORT           'NO DIALTONE'
          ABORT           '\nRINGING\r\n\r\nRINGING\r'
          SAY                     &quot;modem init: press &lt;ctrl&gt;-C to disconnect\n&quot;
  
  
          ''              '+++ATH'
  #       OK              'ATZ'
  #       OK              'ATQ0 V1 E1 S0=0 &amp;C1 &amp;D2 +FCLASS=0'
  #       OK              'AT+IFC=0,0'
  #       OK              'AT&amp;W'
          SAY             &quot;Before Connecting\n&quot;
  
  #       OK              'AT+CSOCKAUTH=,,&quot;WAP@WAP&quot;,&quot;&quot;'
          OK              'AT+CGDCONT=1,&quot;IP&quot;,&quot;AIRTELWAP.ES&quot;'
          SAY             &quot;\n + defining PDP context\n&quot;
  
  #       OK              'ATD#777'
          OK              'ATD*99#'
          SAY             &quot;Number Dialled\n&quot;
  
  #       OK              'AT+CGATT=1'
          SAY             &quot;\n + attaching&quot;
  # simcom
  #       OK              'AT+CIPSTART'
  #       SAY             &quot;\n + attaching to GPRS&quot;
  
          SAY             &quot;\n + requesting data connection&quot;
  #       CONNECT         ''
          CONNECT         \d\c
          SAY             &quot;\n + connected&quot;
  pi@raspberrypi:~ $ sudo cat /etc/ppp/peers/dial
  #
  # pppd options
  #
  modem
  debug
  #logfile /var/ppplog 
  nodetach 
  /dev/ttyUSB2
  115200
  receive-all
  #defaultroute
  noipdefault
  -chap
  usepeerdns
  #mtu 1500
  -crtscts
  ipcp-accept-local
  ipcp-accept-remote
  lock
  #nodeflate
  noauth
  novj
  nobsdcomp
  novjccomp
  nopcomp
  noaccomp
  asyncmap 0
  user &quot;WAP@WAP&quot;
  password &quot;&quot;
  
  #lcp-echo-failure 0
  #lcp-echo-interval 0
  
  # Chat scripts
  connect &quot;/usr/sbin/chat -v -s -f /etc/ppp/chat&quot;
  </code></pre>
  <p>But modem hangup after authentication:</p>
  <pre><code>abort on (BUSY)
  abort on (NO ANSWER)
  abort on (NO CARRIER)
  abort on (NO DIALTONE)
  abort on (\nRINGING\r\n\r\nRINGING\r)
  modem init: press &lt;ctrl&gt;-C to disconnect
  send (+++ATH^M)
  Before Connecting
  expect (OK)
  ATH^M^M
  OK
   -- got it
  
  send (AT+CGDCONT=1,&quot;IP&quot;,&quot;AIRTELWAP.ES&quot;^M)
  
   + defining PDP context
  expect (OK)
  ^M
  AT+CGDCONT=1,&quot;IP&quot;,&quot;AIRTELWAP.ES&quot;^M^M
  OK
   -- got it
  
  send (ATD*99#^M)
  Number Dialled
  
   + attaching
  expect (CONNECT)ta connection
  ^M
  ATD*99#^M^M
  CONNECT
   -- got it
  
  send (\d)
  
  Script /usr/sbin/chat -v -s -f /etc/ppp/chat finished (pid 21132), status = 0x0
  Serial connection established.
  using channel 5
  Using interface ppp0
  Connect: ppp0 &lt;--&gt; /dev/ttyUSB2
  sent [LCP ConfReq id=0x1 &lt;asyncmap 0x0&gt; &lt;magic 0x6956f661&gt;]
  rcvd [LCP ConfReq id=0x13 &lt;asyncmap 0x0&gt; &lt;auth chap MD5&gt; &lt;magic 0xd148b499&gt; &lt;pcomp&gt; &lt;accomp&gt;]
  sent [LCP ConfRej id=0x13 &lt;pcomp&gt; &lt;accomp&gt;]
  rcvd [LCP ConfAck id=0x1 &lt;asyncmap 0x0&gt; &lt;magic 0x6956f661&gt;]
  rcvd [LCP ConfReq id=0x14 &lt;asyncmap 0x0&gt; &lt;auth chap MD5&gt; &lt;magic 0xd148b499&gt;]
  sent [LCP ConfNak id=0x14 &lt;auth pap&gt;]
  rcvd [LCP ConfReq id=0x15 &lt;asyncmap 0x0&gt; &lt;auth pap&gt; &lt;magic 0xd148b499&gt;]
  sent [LCP ConfAck id=0x15 &lt;asyncmap 0x0&gt; &lt;auth pap&gt; &lt;magic 0xd148b499&gt;]
  sent [LCP EchoReq id=0x0 magic=0x6956f661]
  sent [PAP AuthReq id=0x1 user=&quot;WAP@WAP&quot; password=&lt;hidden&gt;]
  rcvd [LCP DiscReq id=0x16 magic=0xd148b499]
  rcvd [LCP EchoRep id=0x0 magic=0xd148b499 69 56 f6 61]
  rcvd [PAP AuthAck id=0x1 &quot;&quot;]
  PAP authentication succeeded
  sent [IPCP ConfReq id=0x1 &lt;addr 0.0.0.0&gt; &lt;ms-dns1 0.0.0.0&gt; &lt;ms-dns2 0.0.0.0&gt;]
  Modem hangup
  Connection terminated.
  </code></pre>
  <p>I have added <code>nodeflate</code> to <code>/etc/ppp/options</code> file to disable compression.</p>
  <p>Does anyone have same issue with this modem?</p>