HL8518 PPPD fails - modem hangup

Hi,

I’m trying to use a HL8518 device to establish a PPP connection using PPPD on a linux (debian) based board.
I’ve used various modems and it works fine with them but not for the HL8518. The chat script seems to be executed properly but when PPPD tries to establish the connection, it fails. I’m sure that the sim card is working properly and that the APN and login/password parameters are correct.

Execution trace :

Script /usr/sbin/chat -s -v -f /tmp/connect_script finished (pid 665), status = 0x0
Serial connection established.
using channel 1
Using interface ppp0
Connect: ppp0 <--> /dev/ttyACM0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x476ae9e5> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x96a24aa4> <pcomp> <accomp>]
sent [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x96a24aa4> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x96a24aa4> <pcomp> <accomp>]
sent [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x96a24aa4> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x96a24aa4> <pcomp> <accomp>]
sent [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x96a24aa4> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x476ae9e5> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x96a24aa4> <pcomp> <accomp>]
sent [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x96a24aa4> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x96a24aa4> <pcomp> <accomp>]
sent [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x96a24aa4> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x96a24aa4> <pcomp> <accomp>]
sent [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x96a24aa4> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x476ae9e5> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x96a24aa4> <pcomp> <accomp>]
sent [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x96a24aa4> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x96a24aa4> <pcomp> <accomp>]
sent [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x96a24aa4> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x96a24aa4> <pcomp> <accomp>]
sent [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x96a24aa4> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x476ae9e5> <pcomp> <accomp>]
Modem hangup
Connection terminated.

Here is the connection chat script :

ABORT       BUSY
ABORT       VOICE
ABORT       "NO CARRIER"
ABORT       "NO DIALTONE"
ABORT       "NO DIAL TONE"
ABORT       "NO ANSWER"
ABORT       "DELAYED"
ABORT       "ERROR"
ABORT       "+CGATT: 0"
ABORT       "+CREG: 0,0"
ABORT       "+CREG: 0,2"
ABORT       "+CREG: 0,3"
ABORT       "+CREG: 0,4"
'' "\rATZ"
OK AT+CREG?
OK AT+CGATT=1
OK      AT+CGDCONT=1,"IP","orange"
OK-AT-OK "ATD*99#"
CONNECT \d\c

Thanks for your answers,
Regards,

Raphael

@raphaelruet_nexelis,

What firmware do you have running on the unit and can you give the PPP options file? Attached is the PPP setup I use successfully from my test Linux machine.

ppp.tar (60 KB)

Regards

Matt

Hi @mlw,

Thanks for your answer. The software version is BHL85xx.5.14.4.0.20151030.x6255
Here are the PPP parameters used :

/usr/sbin/pppd hide-password connect "/usr/sbin/chat -s -v -f /tmp/connect_script" debug /dev/ttyACM0 115200 defaultroute noipdefault user orange usepeerdns noccp novjccomp novj nodetach password orange noauth disconnect "/usr/sbin/chat -s -v -f /tmp/diconnect_script"

I also tried with the parameters from the options file you provided and also the the content of your chat-connect script instead of mine without success, here is the log :

abort on (BUSY)
abort on (NO CARRIER)
abort on (ERROR)
abort on (NO ANSWER)
send (at^M)
expect (OK)
^M
OK
-- got it
send (ate0^M)
expect (OK)
^M
^M
OK
-- got it
send (atd*99***1#^M)
expect (CONNECT)
^M
^M
CONNECT
-- got it

Script /usr/sbin/chat -s -v -f /tmp/connect_script finished (pid 1414), status = 0x0
Serial connection established.
using channel 14
Using interface ppp0
Connect: ppp0 &lt;--&gt; /dev/ttyACM0
rcvd [LCP ConfReq id=0x1 &lt;asyncmap 0x0&gt; &lt;magic 0x3d7790b7&gt; &lt;pcomp&gt; &lt;accomp&gt;]
sent [LCP ConfReq id=0x1 &lt;asyncmap 0x0&gt; &lt;magic 0xb948dc65&gt; &lt;pcomp&gt; &lt;accomp&gt;]
sent [LCP ConfAck id=0x1 &lt;asyncmap 0x0&gt; &lt;magic 0x3d7790b7&gt; &lt;pcomp&gt; &lt;accomp&gt;]
rcvd [LCP ConfAck id=0x1 &lt;asyncmap 0x0&gt; &lt;magic 0xb948dc65&gt; &lt;pcomp&gt; &lt;accomp&gt;]
sent [LCP EchoReq id=0x0 magic=0xb948dc65]
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;]
rcvd [LCP EchoRep id=0x0 magic=0x3d7790b7]
rcvd [LCP TermReq id=0x2]
LCP terminated by peer
sent [LCP TermAck id=0x2]
Modem hangup
Connection terminated. 

Thanks for your help
Regards

Raphael

Hi,

I have finally found the issue. My chat script was partially incorrect. The one you provided was correct but the provider configuration was not referencing your chat script but /etc/chatscripts/pap instead when I tried your configuration. Once corrected, everything seems to work.

Anyway, thanks a lot !

Raphaël