Pppd always fails after modem reset


We’re running a Linux based system connected by USB to a HL7800. On /dev/ttyACM0 we normally monitor and configure the modem. And on /dev/ttyACM1 we run pppd initialized with a chat script. Basically using the setup from AN AirPrime_HL78xx_Establishing_a_PPP_Session_with_a_Linux_Host_Rev1_0.

We have however noticed that after every modem reset (both hard and soft, and cold boot) pppd fails to connect with “Connect script failed”. But the second time pppd is started it will always connect as expected, assuming network registration is ok etc.
Even if we wait for a couple of minutes after resetting the modem before starting pppd it will still fail on the first run. And the second run it will connect almost instantly.

Looking at the chat log of a failed attempt we can see that the modem is spamming a lot of ERROR and spaces. Same thing if we read directly from the /dev/ttyACM1 device after reset.

This is not a huge problem since it can be worked around by restarting the pppd process. Still annoying since it increases the time before we can connect.

So we’re wondering if this is normal behavior or is there anything we can do to avoid it?

Btw, we see the same behavior on both FW 4.6.9 and 4.4.14.

Thanks for your help!

do you have the chat log?

There should be no problem for dial up:

do you have the chat log?

Sure, I have attached it and chatscript+ppp options.
This is when running pppd directly (no wvdial), like:

root@dev:~# pppd /dev/ttyACM1 921600 nodetach                                                                                                                                                                                                                                                                    
Connect script failed

Edit: Now attached them.

ppp-options.txt (122 Bytes)
hl78xx-chat.txt (146 Bytes)
chat.txt (915 Bytes)

I don’t see you are sending atd*99 like this

I don’t see you are sending atd*99 like this

No but it’s in the chat script:

"" AT
OK "ATD*99***1#"

So I would guess it’s not sent because chat never receives an OK for the initial AT. But instead it receives some +CEREG ... and finally aborts on ERROR. If I remove the ABORT ERROR from the script then the chat log is filled of ERRORS and whitespaces.

Probably you need to wait for the registration complete to start the ppp dial up in order not to receive the cereg notification

Yes, seems like when CEREG URC is enabled these messages appear on both ttyACM0 and ttyACM1. Which conflicts with what the chat script expects first run, while second run these messages has already been read. Still not clear to me what these errors popping up are but think we understand the main problem now anyway.

Thanks for your help @jyijyi !

Not sure if at+cereg=0 (which is to disable the notification) can solve your problem
You can give a try.

If it could be set for one of the tty’s it would be a potential fix, but seems to be same for all. Hence losing the notifications we want on ttyACM0.