XBee 3 LTE-M pppd problem

Hi,

I’m having a problem with the XBee 3 LTE-M module. When using pppd to connect to the LTE network it hangs up and freezes - if the pppd is run right after our device is powered on. If I wait 3-5 mins and then run pppd - it works just fine.
I have followed the guide from here: https://www.digi.com/resources/documentation/Digidocs/90002258/#tasks/t_ppp_lte-m_nbiot.htm?Highlight=pppd

Here is a log from pppd executed right after power on:
$ pppd updetach

OK

OK

OK

OK

OK

CONNECTScript /usr/sbin/chat -V -t 60 -f /etc/ppp/chat finished (pid 608), status = 0x0
Serial connection established.
using channel 1
Using interface ppp0
Connect: ppp0 <–> /dev/ppp_direct_usb
sent [LCP ConfReq id=0x1 ]
rcvd [LCP ConfReq id=0x0 ]
No auth is possible
sent [LCP ConfRej id=0x0 ]
rcvd [LCP ConfAck id=0x1 ]
rcvd [LCP ConfReq id=0x1 ]
sent [LCP ConfAck id=0x1 ]
sent [CCP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 ]
Modem hangup
Connection terminated.

Here, after waiting around 5 mins:
$ pppd updetach

OK

OK

OK

OK

OK

CONNECTScript /usr/sbin/chat -V -t 60 -f /etc/ppp/chat finished (pid 638), status = 0x0
Serial connection established.
using channel 1
Using interface ppp0
Connect: ppp0 <–> /dev/ppp_direct_usb
sent [LCP ConfReq id=0x1 ]
rcvd [LCP ConfReq id=0x0 ]
No auth is possible
sent [LCP ConfRej id=0x0 ]
rcvd [LCP ConfAck id=0x1 ]
rcvd [LCP ConfReq id=0x1 ]
sent [LCP ConfAck id=0x1 ]
sent [CCP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 ]
rcvd [LCP DiscReq id=0x2 magic=0x81c57386]
rcvd [LCP ProtRej id=0x3 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
Protocol-Reject for ‘Compression Control Protocol’ (0x80fd) received
rcvd [IPCP ConfReq id=0x0]
sent [IPCP ConfNak id=0x0 ]
rcvd [IPCP ConfRej id=0x1 ]
sent [IPCP ConfReq id=0x2 ]
rcvd [IPCP ConfReq id=0x1]
sent [IPCP ConfAck id=0x1]
rcvd [IPCP ConfNak id=0x2 ]
sent [IPCP ConfReq id=0x3 ]
rcvd [IPCP ConfAck id=0x3 ]
Could not determine remote IP address: defaulting to 10.64.64.64
local IP address 10.218.3.3
remote IP address 10.64.64.64
primary DNS address 8.8.8.8
secondary DNS address 8.8.4.4
[…]

I tried some AT commands to check if the modem has found the network right after boot, but all of them are returning that the modem has found the GSM network and is connected…

My current solution for connecting to the network on our device is to add a 5 minute delay before starting pppd. Is there any way to check if the XBee is ready for pppd connection?

I am not sure but you should be able to once power is stable request a connection. You should be able to query what connections exist and their state. I would give it a few seconds after that reports a connection.