Connect to MTQ-H5-B01 via PPP over uart/serial
- This topic has 4 replies, 2 voices, and was last updated 7 years, 5 months ago by
Kyle Bruneau.
-
AuthorPosts
-
July 19, 2017 at 11:02 am #20240
Kyle Bruneau
ParticipantHello,
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.
July 19, 2017 at 11:30 am #20247Lonny Knudson
BlockedHi 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
noauthStep 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-chatExample 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.
November 14, 2017 at 1:11 pm #21750Kyle Bruneau
ParticipantHello,
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
debugunder /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 CONNECTABORT 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,
If I start a minicom session and try the following,
AT+CPIN?
+CPIN: READYAT+CSQ
+CSQ: 27,4AT+CREG?
+CREG: 0,3AT+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,0AT+CMEE=2
OKAT+CGDCONT=1,”IPV4V6″,”XXXX.VZWSTATIC”
+CME ERROR: operation not allowedAT+CGDCONT=1,”IPV4V6″,”vzwims”
OK
ATD*99***1#
NO CARRIERAny thoughts or pointers would be greatly appreciated.
November 14, 2017 at 2:08 pm #21751Lonny Knudson
BlockedHi 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 “November 14, 2017 at 3:56 pm #21753Kyle Bruneau
ParticipantHi 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”
OKAT+CGDCONT?
+CGDCONT: 1,”IPV4V6″,”vzwims”,””,0,0
+CGDCONT: 2,”IPV4V6″,”vzwadmin”,””,0,0
+CGDCONT: 3,”IP”,”XXXX.vzwstatic”,””,0,0ATD*99***3#
CONNECT
~}#þ!}!}!} }8}”}&} } } } }#}$þ#}%}&þ}$.¬}’}”}(}”‘þ~~}#þ!}!}!} }8}”}&} } } } }#}$þ#}%}&þ}$.¬}’}”}(}”‘þ~~}#þ!}!}!} }8}”}&} } } } }#}$þ#}%}&þ}$.¬}’}”}(}”‘þ~~}#þ!}!}!} }8}”}&} } } } }#}$þ#}%}&þ}$.¬}’}”}(}”‘þ~~}#þ!}!}!} }8}”}&} } } } }#} ~
NO CARRIERAT+CGDCONT=3,”IPV4V6″,”vzwinternet”
OKAT+CGDCONT?
+CGDCONT: 1,”IPV4V6″,”vzwims”,””,0,0
+CGDCONT: 2,”IPV4V6″,”vzwadmin”,””,0,0
+CGDCONT: 3,”IPV4V6″,”vzwinternet”,””,0,0ATD*99***3#
CONNECT
~}#þ!}!}!} }8}”}&} } } } }#}$þ#}%}&@}-i}’}”}(}”b~~}#þ!}!}!} }8}”}&} } } } }#}$þ#}%}&@}-i}’}”}(}”b~~}#þ!}!}!} }8}”}&} } } } }#}$þ#}%}&@}-i}’}”}(}”b~~}#þ!}!}!} }8}”}&} } } } }#}$þ#}%}&@}-i ~
NO CARRIERThoughts?
-
This reply was modified 7 years, 5 months ago by
Kyle Bruneau.
-
This reply was modified 7 years, 5 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.