Home Page Forums Raspberry Pi Shields PPP consistently terminated by peer after 30 seconds with Hologram SIM

This topic contains 3 replies, has 2 voices, and was last updated by  nate 3 weeks, 4 days ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #54392

    nate
    Participant

    I’m trying to get a stable PPP connection using the Raspberry Pi Cellular IoT HAT – LTE-M & NB-IoT & eGPRS with a Hologram SIM. I’m seeing a strange issue where the PPP connection is terminated after around 30 seconds. It doesn’t happen all the time, sometimes I can get connected and it stays connected for hours at a time.

    I followed the “PPP installer for Sixfab Shield” tutorial and selected “Raspberry Pi Cellular IoT HAT” for the device and with “CATM1” for LTE technology.

    Here is some sample log output when the connection dies after 30 seconds:

    sudo pon output:

    pppd options in effect:
    debug # (from /etc/ppp/peers/provider)
    updetach # (from /etc/ppp/peers/provider)
    dump # (from /etc/ppp/peers/provider)
    noauth # (from /etc/ppp/peers/provider)
    remotename 3gppp # (from /etc/ppp/peers/provider)
    /dev/ttyUSB3 # (from /etc/ppp/peers/provider)
    115200 # (from /etc/ppp/peers/provider)
    lock # (from /etc/ppp/peers/provider)
    connect chat -s -v -f /etc/chatscripts/chat-connect -T hologram # (from /etc/ppp/peers/provider)
    disconnect chat -s -v -f /etc/chatscripts/chat-disconnect # (from /etc/ppp/peers/provider)
    nocrtscts # (from /etc/ppp/peers/provider)
    modem # (from /etc/ppp/peers/provider)
    asyncmap 0 # (from /etc/ppp/options)
    lcp-echo-failure 4 # (from /etc/ppp/options)
    lcp-echo-interval 30 # (from /etc/ppp/options)
    hide-password # (from /etc/ppp/peers/provider)
    novj # (from /etc/ppp/peers/provider)
    novjccomp # (from /etc/ppp/peers/provider)
    ipcp-accept-local # (from /etc/ppp/peers/provider)
    ipcp-accept-remote # (from /etc/ppp/peers/provider)
    ipparam 3gppp # (from /etc/ppp/peers/provider)
    noipdefault # (from /etc/ppp/peers/provider)
    ipcp-max-failure 30 # (from /etc/ppp/peers/provider)
    defaultroute # (from /etc/ppp/peers/provider)
    usepeerdns # (from /etc/ppp/peers/provider)
    noccp # (from /etc/ppp/peers/provider)
    noipx # (from /etc/ppp/options)
    abort on (BUSY)
    abort on (NO CARRIER)
    abort on (NO DIALTONE)
    abort on (ERROR)
    abort on (NO ANSWER)
    timeout set to 200 seconds
    send (AT^M)
    expect (OK)
    ^M
    OK
    — got it

    send (ATE0^M)
    expect (OK)
    ^M
    ^M
    OK
    — got it

    send (ATI;+CSUB;+CSQ;+COPS?;+CGREG?;&D2^M)
    expect (OK)
    ^M
    ^M
    Quectel^M
    BG96^M
    Revision: BG96MAR02A08M1G^M
    ^M
    SubEdition: V05^M
    ^M
    +CSQ: 22,99^M
    ^M
    +COPS: 0,0,”AT&T Hologram”,8^M
    ^M
    +CGREG: 0,4^M
    ^M
    OK
    — got it

    send (AT+CGDCONT=1,”IP”,”hologram”^M)
    expect (OK)
    ^M
    ^M
    OK
    — got it

    send (AT+QCFG=”band”,F,400A0E189F,A0E189F,1^M)
    expect (OK)
    ^M
    ^M
    OK
    — got it

    send (AT+QCFG=”nwscanseq”,02,1^M)
    expect (OK)
    ^M
    ^M
    OK
    — got it

    send (AT+QCFG=”nwscanmode”,3,1^M)
    expect (OK)
    ^M
    ^M
    OK
    — got it

    send (AT+QCFG=”iotopmode”,0,1^M)
    expect (OK)
    ^M
    ^M
    OK
    — got it

    send (ATD*99#^M)
    expect (CONNECT)
    ^M
    ^M
    CONNECT
    — got it

    Script chat -s -v -f /etc/chatscripts/chat-connect -T hologram finished (pid 5531), status = 0x0
    Serial connection established.
    using channel 18
    Using interface ppp0
    Connect: ppp0 <–> /dev/ttyUSB3
    sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xc1bee62f> <pcomp> <accomp>]
    rcvd [LCP ConfReq id=0x4 <asyncmap 0x0> <auth chap MD5> <magic 0xe89fcf52> <pcomp> <accomp>]
    No auth is possible
    sent [LCP ConfRej id=0x4 <auth chap MD5>]
    rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xc1bee62f> <pcomp> <accomp>]
    rcvd [LCP ConfReq id=0x5 <asyncmap 0x0> <magic 0xe89fcf52> <pcomp> <accomp>]
    sent [LCP ConfAck id=0x5 <asyncmap 0x0> <magic 0xe89fcf52> <pcomp> <accomp>]
    sent [LCP EchoReq id=0x0 magic=0xc1bee62f]
    sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
    rcvd [LCP DiscReq id=0x6 magic=0xe89fcf52]
    rcvd [LCP EchoRep id=0x0 magic=0xe89fcf52 c1 be e6 2f]
    rcvd [IPCP ConfReq id=0x2]
    sent [IPCP ConfNak id=0x2 <addr 0.0.0.0>]
    rcvd [IPCP ConfNak id=0x1 <addr 10.59.18.147> <ms-dns1 212.9.0.135> <ms-dns2 212.9.0.136>]
    sent [IPCP ConfReq id=0x2 <addr 10.59.18.147> <ms-dns1 212.9.0.135> <ms-dns2 212.9.0.136>]
    rcvd [IPCP ConfReq id=0x3]
    sent [IPCP ConfAck id=0x3]
    rcvd [IPCP ConfAck id=0x2 <addr 10.59.18.147> <ms-dns1 212.9.0.135> <ms-dns2 212.9.0.136>]
    Could not determine remote IP address: defaulting to 10.64.64.64
    not replacing default route to wlan0 [192.168.1.1]
    local IP address 10.59.18.147
    remote IP address 10.64.64.64
    primary DNS address 212.9.0.135
    secondary DNS address 212.9.0.136

    pppd output:

    Oct 7 21:55:29 raspberrypi pppd[5530]: pppd options in effect:
    Oct 7 21:55:29 raspberrypi pppd[5530]: debug#011#011# (from /etc/ppp/peers/provider)
    Oct 7 21:55:29 raspberrypi pppd[5530]: updetach#011#011# (from /etc/ppp/peers/provider)
    Oct 7 21:55:29 raspberrypi pppd[5530]: dump#011#011# (from /etc/ppp/peers/provider)
    Oct 7 21:55:29 raspberrypi pppd[5530]: noauth#011#011# (from /etc/ppp/peers/provider)
    Oct 7 21:55:29 raspberrypi pppd[5530]: remotename 3gppp#011#011# (from /etc/ppp/peers/provider)
    Oct 7 21:55:29 raspberrypi pppd[5530]: /dev/ttyUSB3#011#011# (from /etc/ppp/peers/provider)
    Oct 7 21:55:29 raspberrypi pppd[5530]: 115200#011#011# (from /etc/ppp/peers/provider)
    Oct 7 21:55:29 raspberrypi pppd[5530]: lock#011#011# (from /etc/ppp/peers/provider)
    Oct 7 21:55:29 raspberrypi pppd[5530]: connect chat -s -v -f /etc/chatscripts/chat-connect -T hologram#011#011# (from /etc/ppp/peers/provider)
    Oct 7 21:55:29 raspberrypi pppd[5530]: disconnect chat -s -v -f /etc/chatscripts/chat-disconnect#011#011# (from /etc/ppp/peers/provider)
    Oct 7 21:55:29 raspberrypi pppd[5530]: nocrtscts#011#011# (from /etc/ppp/peers/provider)
    Oct 7 21:55:29 raspberrypi pppd[5530]: modem#011#011# (from /etc/ppp/peers/provider)
    Oct 7 21:55:29 raspberrypi pppd[5530]: asyncmap 0#011#011# (from /etc/ppp/options)
    Oct 7 21:55:29 raspberrypi pppd[5530]: lcp-echo-failure 4#011#011# (from /etc/ppp/options)
    Oct 7 21:55:29 raspberrypi pppd[5530]: lcp-echo-interval 30#011#011# (from /etc/ppp/options)
    Oct 7 21:55:29 raspberrypi pppd[5530]: hide-password#011#011# (from /etc/ppp/peers/provider)
    Oct 7 21:55:29 raspberrypi pppd[5530]: novj#011#011# (from /etc/ppp/peers/provider)
    Oct 7 21:55:29 raspberrypi pppd[5530]: novjccomp#011#011# (from /etc/ppp/peers/provider)
    Oct 7 21:55:29 raspberrypi pppd[5530]: ipcp-accept-local#011#011# (from /etc/ppp/peers/provider)
    Oct 7 21:55:29 raspberrypi pppd[5530]: ipcp-accept-remote#011#011# (from /etc/ppp/peers/provider)
    Oct 7 21:55:29 raspberrypi pppd[5530]: ipparam 3gppp#011#011# (from /etc/ppp/peers/provider)
    Oct 7 21:55:29 raspberrypi pppd[5530]: noipdefault#011#011# (from /etc/ppp/peers/provider)
    Oct 7 21:55:29 raspberrypi pppd[5530]: ipcp-max-failure 30#011#011# (from /etc/ppp/peers/provider)
    Oct 7 21:55:29 raspberrypi pppd[5530]: defaultroute#011#011# (from /etc/ppp/peers/provider)
    Oct 7 21:55:29 raspberrypi pppd[5530]: usepeerdns#011#011# (from /etc/ppp/peers/provider)
    Oct 7 21:55:29 raspberrypi pppd[5530]: noccp#011#011# (from /etc/ppp/peers/provider)
    Oct 7 21:55:29 raspberrypi pppd[5530]: noipx#011#011# (from /etc/ppp/options)
    Oct 7 21:55:29 raspberrypi pppd[5530]: pppd 2.4.7 started by pi, uid 0
    Oct 7 21:55:32 raspberrypi pppd[5530]: Script chat -s -v -f /etc/chatscripts/chat-connect -T hologram finished (pid 5531), status = 0x0
    Oct 7 21:55:32 raspberrypi pppd[5530]: Serial connection established.
    Oct 7 21:55:32 raspberrypi pppd[5530]: using channel 18
    Oct 7 21:55:32 raspberrypi pppd[5530]: Using interface ppp0
    Oct 7 21:55:32 raspberrypi pppd[5530]: Connect: ppp0 <–> /dev/ttyUSB3
    Oct 7 21:55:33 raspberrypi pppd[5530]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xc1bee62f> <pcomp> <accomp>]
    Oct 7 21:55:33 raspberrypi pppd[5530]: rcvd [LCP ConfReq id=0x4 <asyncmap 0x0> <auth chap MD5> <magic 0xe89fcf52> <pcomp> <accomp>]
    Oct 7 21:55:33 raspberrypi pppd[5530]: No auth is possible
    Oct 7 21:55:33 raspberrypi pppd[5530]: sent [LCP ConfRej id=0x4 <auth chap MD5>]
    Oct 7 21:55:33 raspberrypi pppd[5530]: rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xc1bee62f> <pcomp> <accomp>]
    Oct 7 21:55:33 raspberrypi pppd[5530]: rcvd [LCP ConfReq id=0x5 <asyncmap 0x0> <magic 0xe89fcf52> <pcomp> <accomp>]
    Oct 7 21:55:33 raspberrypi pppd[5530]: sent [LCP ConfAck id=0x5 <asyncmap 0x0> <magic 0xe89fcf52> <pcomp> <accomp>]
    Oct 7 21:55:33 raspberrypi pppd[5530]: sent [LCP EchoReq id=0x0 magic=0xc1bee62f]
    Oct 7 21:55:33 raspberrypi pppd[5530]: sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
    Oct 7 21:55:33 raspberrypi pppd[5530]: rcvd [LCP DiscReq id=0x6 magic=0xe89fcf52]
    Oct 7 21:55:33 raspberrypi pppd[5530]: rcvd [LCP EchoRep id=0x0 magic=0xe89fcf52 c1 be e6 2f]
    Oct 7 21:55:33 raspberrypi pppd[5530]: rcvd [IPCP ConfReq id=0x2]
    Oct 7 21:55:33 raspberrypi pppd[5530]: sent [IPCP ConfNak id=0x2 <addr 0.0.0.0>]
    Oct 7 21:55:33 raspberrypi pppd[5530]: rcvd [IPCP ConfNak id=0x1 <addr 10.59.18.147> <ms-dns1 212.9.0.135> <ms-dns2 212.9.0.136>]
    Oct 7 21:55:33 raspberrypi pppd[5530]: sent [IPCP ConfReq id=0x2 <addr 10.59.18.147> <ms-dns1 212.9.0.135> <ms-dns2 212.9.0.136>]
    Oct 7 21:55:33 raspberrypi pppd[5530]: rcvd [IPCP ConfReq id=0x3]
    Oct 7 21:55:33 raspberrypi pppd[5530]: sent [IPCP ConfAck id=0x3]
    Oct 7 21:55:33 raspberrypi pppd[5530]: rcvd [IPCP ConfAck id=0x2 <addr 10.59.18.147> <ms-dns1 212.9.0.135> <ms-dns2 212.9.0.136>]
    Oct 7 21:55:33 raspberrypi pppd[5530]: Could not determine remote IP address: defaulting to 10.64.64.64
    Oct 7 21:55:33 raspberrypi pppd[5530]: not replacing default route to wlan0 [192.168.1.1]
    Oct 7 21:55:33 raspberrypi pppd[5530]: local IP address 10.59.18.147
    Oct 7 21:55:33 raspberrypi pppd[5530]: remote IP address 10.64.64.64
    Oct 7 21:55:33 raspberrypi pppd[5530]: primary DNS address 212.9.0.135
    Oct 7 21:55:33 raspberrypi pppd[5530]: secondary DNS address 212.9.0.136
    Oct 7 21:55:33 raspberrypi pppd[5537]: Script /etc/ppp/ip-up started (pid 5538)
    Oct 7 21:55:33 raspberrypi pppd[5537]: Script /etc/ppp/ip-up finished (pid 5538), status = 0x0
    Oct 7 21:56:02 raspberrypi pppd[5537]: rcvd [LCP TermReq id=0x7]
    Oct 7 21:56:02 raspberrypi pppd[5537]: LCP terminated by peer
    Oct 7 21:56:02 raspberrypi pppd[5537]: Connect time 0.5 minutes.
    Oct 7 21:56:02 raspberrypi pppd[5537]: Sent 0 bytes, received 0 bytes.
    Oct 7 21:56:02 raspberrypi pppd[5537]: Script /etc/ppp/ip-down started (pid 5596)
    Oct 7 21:56:03 raspberrypi pppd[5537]: sent [LCP TermAck id=0x7]
    Oct 7 21:56:03 raspberrypi pppd[5537]: Modem hangup
    Oct 7 21:56:03 raspberrypi pppd[5537]: Connection terminated.
    Oct 7 21:56:03 raspberrypi pppd[5537]: Script /etc/ppp/ip-down finished (pid 5596), status = 0x0
    Oct 7 21:56:03 raspberrypi pppd[5537]: Exit.

    I thought it may have been due to the “TIMEOUT 30” setting in the generated /etc/chatscripts/chat-connect, but even after changing it “TIMEOUT 200”, I still consistently see the connection drop after 30 seconds.

    Here are relevent config files:

    # /etc/chatscripts/chat-connect
    ABORT “BUSY”
    ABORT “NO CARRIER”
    ABORT “NO DIALTONE”
    ABORT “ERROR”
    ABORT “NO ANSWER”
    TIMEOUT 200
    “” AT
    OK ATE0
    # Moved above band stuff
    OK ATI;+CSUB;+CSQ;+COPS?;+CGREG?;&D2
    #OK AT+CGDCONT=1,”IP”,”hologram”,,0,0
    OK AT+CGDCONT=1,”IP”,”hologram”

    OK AT+QCFG=”band”,F,400A0E189F,A0E189F,1
    OK AT+QCFG=”nwscanseq”,02,1
    OK AT+QCFG=”nwscanmode”,3,1
    OK AT+QCFG=”iotopmode”,0,1
    OK ATD*99#
    CONNECT

    # /etc/ppp/peers/provider
    /dev/ttyUSB3 115200
    # The chat script, customize your APN in this file
    connect ‘chat -s -v -f /etc/chatscripts/chat-connect -T hologram’
    # The close script
    disconnect ‘chat -s -v -f /etc/chatscripts/chat-disconnect’
    # Hide password in debug messages
    hide-password
    # The phone is not required to authenticate
    noauth
    # Debug info from pppd
    debug
    # If you want to use the HSDPA link as your gateway
    defaultroute
    # pppd must not propose any IP address to the peer
    noipdefault
    # No ppp compression
    novj
    novjccomp
    noccp
    ipcp-accept-local
    ipcp-accept-remote
    local
    # For sanity, keep a lock on the serial line
    lock
    modem
    dump
    updetach
    # Hardware flow control
    nocrtscts
    remotename 3gppp
    ipparam 3gppp
    ipcp-max-failure 30
    # Ask the peer for up to 2 DNS server addresses
    usepeerdns
    #persist

    I’m running on the following Raspberry Pi:

    Linux raspberrypi 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux
    Raspbian GNU/Linux 10 (buster)

    Any ideas what might be causing the timeouts?

    #54641

    nate
    Participant

    I’ve made some progress. Applying Quectel’s changes to the Linux kernel modules seem to have improved stability.

    #58397

    ensar
    Moderator

    Hi.

    What exactly did you do about Linux kernel modules?

    #58400

    nate
    Participant

    I manually applied patches to kernel modules specified in this Quectel guide:

    https://www.quectel.com/UploadImage/Downlad/Quectel_WCDMA&LTE_Linux_USB_Driver_User_Guide_V1.8.pdf

    This blog post has a good walkthrough:

    https://en.dlyang.me/install-linux-usb-driver-for-quectel-bg96/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.