AT Command

Description

AT+CGDCONT AT commands sets the PDP context parameters such as PDP type (IP, IPV6, PPP, X.25 etc), APN, data compression, header compression etc.

Usage
Command Possible response(s)
+CGDCONT=[[,[,[,[,[,[,[,[,[,]]]]]]]]]] OK ERROR
+CGDCONT? [+CGDCONT: ,,,,,[,[,[,[,]]]]] [+CGDCONT: ,,,,,[,[,[,[,]]]] [...]]
+CGDCONT=? +CGDCONT: (range of supporteds),,,,(list of supporteds),(list of supporteds),(list of supporteds),(list of supporteds),(list of supporteds),(list of supporteds) [+CGDCONT: (range of supporteds),,,,(list of supporteds),(list of supporteds),(list of supporteds),(list of supporteds),(list of supporteds),(list of supporteds) [...]]

Examples

What are the supported PDP contexts?
AT+CDGCONT=?

+CGDCONT: (1-10),("IP"),,,(0-1),(0-1)
+CGDCONT: (1-10),("IPV6"),,,(0-1),(0-1)

OK

Define a PDP Context. First parameter is the Context ID, second is the type of IP connection and third is the APN
AT+CDGCONT=1,"IP","epc.tmobile.com"
OK

Get the list of currently defined PDP Contexts
AT+CDGCONT?

+CGDCONT: 1,"IP","epc.tmobile.com","0.0.0.0",0,0
+CGDCONT: 2,"IP","isp.cingular","0.0.0.0",0,0
+CGDCONT: 3,"IP","","0.0.0.0",0,0

OK

KeywordsAT+CGDCONT syntax, examples, parameters, error, input, response.

Try this script included in AT Command Tester Tool.

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//Script-at_cgdcont.at

//Test AT+CGDCONT AT command

//AT+CGDCONT command is used to define PDP context

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 

//List of supported responses

AT+CGDCONT=?

 

//WAIT for 1 sec

WAIT=1

 

//Get the current list of PDP profiles

AT+CGDCONT?

 

//WAIT for 1 sec

WAIT=1

 

//Set APN of PDP context 1. Network provider has unique APN

//Configure for IP address to be dynamically allocated.

//PDP data and header compression is set to off

//Configure for IP protocol

AT+CGDCONT= 1,"IP","epc.tmobile.com","0.0.0.0",0,0

 

//Get the current list of PDP profiles

AT+CGDCONT?

 

//WAIT for 1 sec

WAIT=1

 

//Set up PDP context 2.

//Set up IPV6 as data protocol.

//Configure for IP address to be dynamically allocated.

//PDP data and header compression is set to on

AT+CGDCONT= 2,"IPV6","vzwinternet","0.0.0.0",1,1

 

//Get the current list of PDP profiles

AT+CGDCONT?

 

//WAIT for 1 sec

WAIT=1

 

//Set up PDP context 3.

//Set up dual IP stack IPV4V6 as data protocol.

//Configure for IP address to be dynamically allocated.

//PDP data compression is set to V.42bis

AT+CGDCONT= 3,"IPV4V6","iot.aer.net","0.0.0.0",0,0

 

//WAIT for 1 sec

WAIT=1

 

//Get the current list of PDP profiles

AT+CGDCONT?

 


Output of above script in AT Command Tester Tool.

AT+CGDCONT=?

+CGDCONT: (1-24,100-179),"IP",,,(0-2),(0-4),(0-1),(0-1)

+CGDCONT: (1-24,100-179),"PPP",,,(0-2),(0-4),(0-1),(0-1)

+CGDCONT: (1-24,100-179),"IPV6",,,(0-2),(0-4),(0-1),(0-1)

+CGDCONT: (1-24,100-179),"IPV4V6",,,(0-2),(0-4),(0-1),(0-1)

 

OK

Error updating PDP context profile -  (1-24,100-179),"IP",,,(0-2),(0-4),(0-1),(0-1)

 

AT+CGDCONT?

+CGDCONT: 1,"IP","","0.0.0.0",0,0,0,0

+CGDCONT: 2,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0

+CGDCONT: 3,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0

 

OK

Following connection profiles are available,

 

CID-> 1

PDP Type->IP

APN->

PDP Address->0.0.0.0

Data Compression->0

Header Compression->0

 

CID-> 2

PDP Type->IPV4V6

APN->

PDP Address->0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0

Data Compression->0

Header Compression->0

 

CID-> 3

PDP Type->IPV4V6

APN->

PDP Address->0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0

Data Compression->0

Header Compression->0

AT+CGDCONT= 1,"IP","epc.tmobile.com","0.0.0.0",0,0

OK

PDP Context list updated sucessfully

 

AT+CGDCONT?

+CGDCONT: 1,"IP","epc.tmobile.com","0.0.0.0",0,0,0,0

+CGDCONT: 2,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0

+CGDCONT: 3,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0

 

OK

Following connection profiles are available,

 

CID-> 1

PDP Type->IP

APN->epc.tmobile.com

PDP Address->0.0.0.0

Data Compression->0

Header Compression->0

 

CID-> 2

PDP Type->IPV4V6

APN->

PDP Address->0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0

Data Compression->0

Header Compression->0

 

CID-> 3

PDP Type->IPV4V6

APN->

PDP Address->0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0

Data Compression->0

Header Compression->0

AT+CGDCONT?

+CGDCONT: 1,"IP","epc.tmobile.com","0.0.0.0",0,0,0,0

+CGDCONT: 2,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0

+CGDCONT: 3,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0

 

OK

Following connection profiles are available,

 

CID-> 1

PDP Type->IP

APN->epc.tmobile.com

PDP Address->0.0.0.0

Data Compression->0

Header Compression->0

 

CID-> 2

PDP Type->IPV4V6

APN->

PDP Address->0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0

Data Compression->0

Header Compression->0

 

CID-> 3

PDP Type->IPV4V6

APN->

PDP Address->0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0

Data Compression->0

Header Compression->0

AT+CGDCONT= 2,"IPV6","vzwinternet","0.0.0.0",1,1

ERROR

Error updating PDP context profile.Mobile error codes are not enabled.

 

AT+CGDCONT?

+CGDCONT: 1,"IP","epc.tmobile.com","0.0.0.0",0,0,0,0

+CGDCONT: 2,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0

+CGDCONT: 3,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0

 

OK

Following connection profiles are available,

 

CID-> 1

PDP Type->IP

APN->epc.tmobile.com

PDP Address->0.0.0.0

Data Compression->0

Header Compression->0

 

CID-> 2

PDP Type->IPV4V6

APN->

PDP Address->0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0

Data Compression->0

Header Compression->0

 

CID-> 3

PDP Type->IPV4V6

APN->

PDP Address->0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0

Data Compression->0

Header Compression->0

AT+CGDCONT= 3,"IPV4V6","iot.aer.net","0.0.0.0",0,0

OK

PDP Context list updated sucessfully

 

AT+CGDCONT?

+CGDCONT: 1,"IP","epc.tmobile.com","0.0.0.0",0,0,0,0

+CGDCONT: 2,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0

+CGDCONT: 3,"IPV4V6","iot.aer.net","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0

 

OK

Following connection profiles are available,

 

CID-> 1

PDP Type->IP

APN->epc.tmobile.com

PDP Address->0.0.0.0

Data Compression->0

Header Compression->0

 

CID-> 2

PDP Type->IPV4V6

APN->

PDP Address->0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0

Data Compression->0

Header Compression->0

 

CID-> 3

PDP Type->IPV4V6

APN->iot.aer.net

PDP Address->0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0

Data Compression->0

Header Compression->0

AT+CGDCONT?

+CGDCONT: 1,"IP","epc.tmobile.com","0.0.0.0",0,0,0,0

+CGDCONT: 2,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0

+CGDCONT: 3,"IPV4V6","iot.aer.net","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0

 

OK

Following connection profiles are available,

 

CID-> 1

PDP Type->IP

APN->epc.tmobile.com

PDP Address->0.0.0.0

Data Compression->0

Header Compression->0

 

CID-> 2

PDP Type->IPV4V6

APN->

PDP Address->0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0

Data Compression->0

Header Compression->0

 

CID-> 3

PDP Type->IPV4V6

APN->iot.aer.net

PDP Address->0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0

Data Compression->0

Header Compression->0

 

 


With Online AT Command Tester tool, you can get,add, delete and edit PDP contexts stored on the device.

Users can also test the AT command under the ‘Command Mode’ tab of the AT Command Tester.

Under “Script Mode’ tab, users can send batch of AT commands to the device,