Connect to MTQ-H5-B01 via PPP over uart/serial

Home Forums Dragonfly Connect to MTQ-H5-B01 via PPP over uart/serial

This topic contains 4 replies, has 2 voices, and was last updated by  Kyle Bruneau 2 years, 8 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #20240

    Kyle Bruneau
    Participant

    Hello,

    I was looking to find out if there is any literature on how to establish a connection to the MTQ-H5-B01 via PPP over uart/serial, from another processor, running a Linux distribution (kernel v4.9).

    An example of what I am looking for, if it exists, https://nimbelink.com/Documentation/Skywire/4G_LTE_Cat_3/30058_NL-SW-LTE-TSVG_PPP.pdf

    Thank you for your time.

    #20247

    Lonny Knudson
    Moderator

    Hi Kyle,
    The serial (UART) interface on the MTQ-H5-B01 models does not connect directly to the serial port on HE910 radio module. I don’t think a ppp link would work over the serial port on the B01 builds.
    For this use case I would recommend using the B02 model. On the B02 builds the UART pins connect directly to a serial port on the HE910 module.

    Here is a simple H5-Linux PPP Example.

    Step 1.
    ——-
    Use a text editor to create a peer file containing the lines in the example below. (/dev/ttyACM0 may need to be something like /dev/ttyS0 for a serial build).
    Save the file as /etc/ppp/peers/H5-peer.

    Example peer file:

    /dev/ttyACM0
    connect “/usr/sbin/chat -v -f /etc/chatscripts/H5-chat”
    noipdefault
    usepeerdns
    defaultroute
    noauth

    Step 2.
    ——-
    Use a text editor to create a chat script containing the lines in the example below.
    In this example [APN] should be replaced with the APN assigned by your cellular provider.
    Save the file as /etc/chatscripts/H5-chat

    Example chat script:

    ABORT “ERROR”
    ABORT “NO CARRIER”
    ABORT “BUSY”
    “” at+cgdcont=1,”IP”,”[APN]”
    OK atd*99***1#
    CONNECT “”

    Step 3.
    ——-
    Use the following command line to start pppd:

    pppd debug call H5-peer

    This command line enables logging of debug information and tells pppd to use the peer file referenced by the call option.
    After about 20-30 seconds type ifconfig and see if a ppp interface is listed.
    If not, check syslog for pppd and chat events. Normally pppd/chat logging is written to /var/log/syslog (could vary depending on syslog configuration).

    The above example should be able to establish a ppp link using a -H5 product. You may need to alter the config files to optimize for your application.

    #21750

    Kyle Bruneau
    Participant

    Hello,

    I have another question concerning this topic, using a MTQ-LVW3-B02 model modem, and I am getting a error when trying to set AT+CGDCONT.

    The modem is on ttyS2, linux kernel version 4.9.24.

    under /etc/ppp/peers/provider

    # example configuration for a dialup connection authenticated with PAP or CHAP
    #
    # This is the default configuration used by pon(1) and poff(1).
    # See the manual page pppd(8) for information on all the options.

    # MUST CHANGE: replace myusername@realm with the PPP login name given to
    # your by your provider.
    # There should be a matching entry with the password in /etc/ppp/pap-secrets
    # and/or /etc/ppp/chap-secrets.
    # user “myusername@realm”

    # MUST CHANGE: replace ******** with the phone number of your provider.
    # The /etc/chatscripts/pap chat script may be modified to change the
    # modem initialization string.
    connect “/usr/sbin/chat -v -t6 -f /etc/chatscripts/provider”

    # Serial device to which the modem is connected.
    /dev/ttyS2

    # Speed of the serial line.
    115200

    # Assumes that your IP address is allocated dynamically by the ISP.
    noipdefault
    # Try to get the name server addresses from the ISP.
    usepeerdns
    # Use this connection as the default route.
    defaultroute

    # Makes pppd “dial again” when the connection is lost.
    persist

    # Do not ask the remote to authenticate.
    noauth
    debug

    under /etc/chatscripts/provider,

    # You can use this script unmodified to connect to sites which allow
    # authentication via PAP, CHAP and similar protocols.
    # This script can be shared among different pppd peer configurations.
    # To use it, add something like this to your /etc/ppp/peers/ file:
    #
    # connect “/usr/sbin/chat -v -f /etc/chatscripts/pap -T PHONE-NUMBER”
    # user YOUR-USERNAME-IN-PAP-SECRETS
    # noauth

    # Uncomment the following line to see the connect speed.
    # It will be logged to stderr or to the file specified with the -r chat option.
    #REPORT CONNECT

    ABORT BUSY
    ABORT VOICE
    ABORT “NO CARRIER”
    ABORT “NO DIALTONE”
    ABORT “NO DIAL TONE”
    “” “AT”
    OK AT+CMEE=1
    OK AT+CPIN?
    OK AT+CGDCONT=1,”IP”,”XXXX.VZWSTATIC”
    OK AT+CGDCONT?
    OK ATD*99***1#
    CONNECT “”

    My output is fine until the AT+CGDCONT line is called, at which point I get a CME Error of 3, which the documentation says is “operation not allowed”.

    Referencing the following document,

    https://www.multitech.com/documents/publications/reference-guides/telit_le910_v2_series_at_commands_reference_guide_r2_80446st10707a.pdf

    If I start a minicom session and try the following,

    AT+CPIN?
    +CPIN: READY

    AT+CSQ
    +CSQ: 27,4

    AT+CREG?
    +CREG: 0,3

    AT+CGDCONT=?
    +CGDCONT: (1-4),”IP”,,,0,(0-4),(0,1),(0,1),(0,1),(0,1)
    +CGDCONT: (1-4),”IPV6″,,,0,(0-4),(0,1),(0,1),(0,1),(0,1)
    +CGDCONT: (1-4),”IPV4V6″,,,0,(0-4),(0,1),(0,1),(0,1),(0,1)

    AT+CGDCONT?
    +CGDCONT: 1,”IPV4V6″,”vzwims”,”",0,0
    +CGDCONT: 2,”IPV4V6″,”vzwadmin”,”",0,0
    +CGDCONT: 3,”IPV4V6″,”vzwinternet”,”",0,0

    AT+CMEE=2
    OK

    AT+CGDCONT=1,”IPV4V6″,”XXXX.VZWSTATIC”
    +CME ERROR: operation not allowed

    AT+CGDCONT=1,”IPV4V6″,”vzwims”
    OK
    ATD*99***1#
    NO CARRIER

    Any thoughts or pointers would be greatly appreciated.

    #21751

    Lonny Knudson
    Moderator

    Hi Kyle,
    The Verizon LTE modems use several factory programmed APNs. The APNs programmed in PDP context profiles 1 & 2 can not be overwritten. You need to use PDP context 3 for your data link (ATD*99***3# rather than ATD*99***1#). In addition I recommend removing the +CGDCONT command from your chat script. For most accounts the network will manage your APN setting and there shouldn’t be any automated process trying to overwrite the APN.

    Here is an example chat script that should work for the -LVW3 modems.

    ABORT “ERROR”
    ABORT “NO CARRIER”
    ABORT “BUSY”
    “” AT+CGREG?
    OK AT+CSQ
    OK atd*99***3#
    CONNECT “

    #21753

    Kyle Bruneau
    Participant

    Hi Lonny,

    Thank you for the assistance. I edited the chat script to be identical to what you supplied.

    As a separate check,

    AT+CGDCONT=3,”IP”,”XXXX.vzwstatic”
    OK

    AT+CGDCONT?
    +CGDCONT: 1,”IPV4V6″,”vzwims”,”",0,0
    +CGDCONT: 2,”IPV4V6″,”vzwadmin”,”",0,0
    +CGDCONT: 3,”IP”,”XXXX.vzwstatic”,”",0,0

    ATD*99***3#
    CONNECT
    ~}#þ!}!}!} }8}”}&} } } } }#}$þ#}%}&þ}$.¬}’}”}(}”‘þ~~}#þ!}!}!} }8}”}&} } } } }#}$þ#}%}&þ}$.¬}’}”}(}”‘þ~~}#þ!}!}!} }8}”}&} } } } }#}$þ#}%}&þ}$.¬}’}”}(}”‘þ~~}#þ!}!}!} }8}”}&} } } } }#}$þ#}%}&þ}$.¬}’}”}(}”‘þ~~}#þ!}!}!} }8}”}&} } } } }#} ~
    NO CARRIER

    AT+CGDCONT=3,”IPV4V6″,”vzwinternet”
    OK

    AT+CGDCONT?
    +CGDCONT: 1,”IPV4V6″,”vzwims”,”",0,0
    +CGDCONT: 2,”IPV4V6″,”vzwadmin”,”",0,0
    +CGDCONT: 3,”IPV4V6″,”vzwinternet”,”",0,0

    ATD*99***3#
    CONNECT
    ~}#þ!}!}!} }8}”}&} } } } }#}$þ#}%}&@}-i}’}”}(}”b~~}#þ!}!}!} }8}”}&} } } } }#}$þ#}%}&@}-i}’}”}(}”b~~}#þ!}!}!} }8}”}&} } } } }#}$þ#}%}&@}-i}’}”}(}”b~~}#þ!}!}!} }8}”}&} } } } }#}$þ#}%}&@}-i ~
    NO CARRIER

    Thoughts?

    • This reply was modified 2 years, 8 months ago by  Kyle Bruneau.
Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.