How to setup apn, user, password and auth for PPP connection

Hello,

I use ppp connection. I have set APN by AT+CGDCONT command. Now I want use APN with user, password and authentication method. What AT command provide it? AT+CGCONT only have APN parameter.

Thank you.

You could try the AT command
AT+QICSGP

You can find it in the TCP/IP AT application note.

I have already tried this command:
AT+QICSGP=1,1,“internet”,“”,“”,0
then I activated context by using:
AT+QIACT=1
Unfortunately ATD*99# returns ERROR

+CME ERROR: Operation not allowed

The way you tried ppp is wrong.

Please try the Linux PPP script.

#!/bin/sh

#quectel-pppd devname apn user password
echo "quectel-pppd options in effect:"
QL_DEVNAME=/dev/ttyUSB3
QL_APN=3gnet
QL_USER=user
QL_PASSWORD=passwd
QL_PDP=1
QL_IP=IP #IP, IPV4, IPV6, IPV4V6
if [ $# -ge 1 ]; then
	QL_DEVNAME=$1	
	echo "devname   $QL_DEVNAME    # (from command line)"
else
	echo "devname   $QL_DEVNAME    # (default)"
fi
if [ $# -ge 2 ]; then
	QL_APN=$2	
	echo "apn       $QL_APN    # (from command line)"
else
	echo "apn       $QL_APN    # (default)"
fi
if [ $# -ge 3 ]; then
	QL_USER=$3	
	echo "user      $QL_USER   # (from command line)"
else
	echo "user      $QL_USER   # (default)"
fi
if [ $# -ge 4 ]; then
	QL_PASSWORD=$4	
	echo "password  $QL_PASSWORD   # (from command line)"
else
	echo "password  $QL_PASSWORD   # (default)"
fi

CONNECT="'chat -s -v ABORT BUSY ABORT \"NO CARRIER\" ABORT \"NO DIALTONE\" ABORT ERROR ABORT \"NO ANSWER\" TIMEOUT 30 \
\"\" AT OK ATE0 OK ATI\;+CSUB\;+CSQ\;+CPIN?\;+COPS?\;+CGREG?\;\&D2 \
OK AT+CGDCONT=$QL_PDP,\\\"$QL_IP\\\",\\\"$QL_APN\\\",,0,0 OK ATD*99***$QL_PDP# CONNECT'"

OPTIONS="noauth debug defaultroute noipdefault novj novjccomp noccp ipcp-accept-local ipcp-accept-remote ipcp-max-configure 30 local lock modem dump nodetach nocrtscts usepeerdns"

if [ "$QL_IP" == "IPV6" ]; then
OPTIONS="$OPTIONS noip +ipv6"
fi
if [ "$QL_IP" == "IPV4V6" ]; then
OPTIONS="$OPTIONS +ipv6"
fi

pppd $QL_DEVNAME 115200 user "$QL_USER" password "$QL_PASSWORD" \
connect "'$CONNECT'" \
disconnect 'chat -s -v ABORT ERROR ABORT "NO DIALTONE" SAY "\nSending break to the modem\n" "" +++ "" +++ "" +++ SAY "\nGood bay\n"' \
$OPTIONS &



Modem will be used in embedded system without Linux. But I can see that user and password isn’t set by AT command, instead of that it is set in PPP session, is that correct?

Please check my Linux script.
You can run it

ppp_script.sh /dev/ttyUSBx APN user passwd

The APN user passwd is set with AT command in the script.

ATD*99# will be called but you can not take it as PPP call.