The right way to APN setting

Hello,
I would like to know which is the most correct procedure to set APN for TCP/IP contexts (Data) and for services such as VoLTE. I saw that APN can be set both with the AT + QICSGP command (APN with usr and pwd) and with the AT + CGDCONT command (APN without usr and pwd).
From some Tests, it occurs that using the AT+QICSGP command to set APN for the TCP/IP context, the APN parameter of the AT+CGDCONT command is also automatically set.
So the correct procedure for APN setting could be the following?
AT + CFUN = 0
AT + QICSGP = 1,1, “apn”, “username”, “password”, 3
AT + CFUN = 1

AT + QICSGP = 1
+QICSGP: 1, “apn”, “”, “”, 3

AT + CGDCONT?
+CGDCONT: 1, “IP”, “apn”, “0.0.0.0”, 0,0,0,0
+CGDCONT: 2, “IPV4V6”, “ims”, “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,1

ATI
Quectel
EC25
Revision: EC25EUXGAR08A08M1G
OK

Hi
Have you set the correct user name and password? Or please provide a complete log process for your analysis

My problem is choose the best method to set te APN of operator (both for PDP Context Data end for IMS services registration like VoLTE).
If you consider the AT commands (from AT Command manual) you can set APN by QICSGP for PDP Context Data (with user and password) or CGDCONT for IMS registration (without user and password).
Is the same APN? If No, why is not possible to set the user and password of the APN with CGDCONT?
In the most cases the operator have one APN for all services (for example Data and VoLTE) so I can consider the right way to set APN is with QICSGP like my previus post.

First method APN setting that I know
AT + CFUN = 0
AT + QICSGP = 1,1, “apn”, “username”, “password”, 3
AT + CFUN = 1

Second method APN setting that I know
AT+CFUN=4
AT+CGDCONT=1,“IPV4V6”,"apn"
AT+CFUN=1

what is the correct method? At the moment I use only the first one. It is OK?

Unless I’m mistaken, your provider is using context 2 for IMS

That one. And I also suspect that “ims” is the correct APN for IMS services.

What does the command AT$QCPDPIMSCFGE? return?

I’d expect “$QCPDPIMSCFGE: 2,1” if context 2 is configured for IMS.

Thanks for answer snowgum.

Response to the AT command:
AT$QCPDPIMSCFGE?
$QCPDPIMSCFGE: 1 , 0 , 0 , 0
$QCPDPIMSCFGE: 2 , 1 , 0 , 0
$QCPDPIMSCFGE: 3 , 1 , 0 , 0
OK

As you said the “ims” could be the APN for IMS service. Is It set automatically by operator o by the module?

In any cases this confirm that I can use the following command to set APN for both Data and VoLTE:
AT + QICSGP = 1,1, “apn”, “username”, “password”, 3
Is It Correct?

Consider that I have done some tests with different operators.
In some case the VoLTE was OK and ather Not OK. In All cases I had:
AT + CGDCONT?
+CGDCONT: 1, “IP”, “apn”, “0.0.0.0”, 0,0,0,0
+CGDCONT: 2, “IPV4V6”, “ims”, “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,1

AT$QCPDPIMSCFGE?
$QCPDPIMSCFGE: 1 , 0 , 0 , 0
$QCPDPIMSCFGE: 2 , 1 , 0 , 0
$QCPDPIMSCFGE: 3 , 1 , 0 , 0
OK

Oviusly, the “apn” was different for each operators

As I suspected, IMS is not active on context 1, but is active on context 2 (the context using the “ims” APN).

I think context 2 does not need the username and password which context 1 requires.

I also suspect you have MBN active, and that is setting these APNs. The command AT+QMBNCFG="List" will tell us.

Is auto-select of MBN file enabled? AT+QMBNCFG=“AutoSel” will show that.

Yes, You are Right:
AT+QMBNCFG=“List”
+QMBNCFG: “List”,0,1,1,“ROW_Generic_3GPP”,0x0501081F,202101071
+QMBNCFG: “List”,1,0,0,“TW_Mobile_China_VoLTE”,0x0580FB81,202104162
+QMBNCFG: “List”,2,0,0,“Bouygues_France_VoLTE”,0x05800101,201905211
+QMBNCFG: “List”,3,0,0,“Telstra-Commercial_VoLTE”,0x0580079E,202105192
+QMBNCFG: “List”,4,0,0,“Reliance_OpnMkt”,0x05011B38,202003251
+QMBNCFG: “List”,5,0,0,“Commercial-Smartfren”,0x0501250A,202012291
+QMBNCFG: “List”,6,0,0,“VF_Germany_VoLTE”,0x0502041C,202106231
+QMBNCFG: “List”,7,0,0,“Commercial-DT”,0x05011F1C,202106171
+QMBNCFG: “List”,8,0,0,“STC_Saudi_VoLTE”,0x0501FE01,201912231
+QMBNCFG: “List”,9,0,0,“TF_Spain_VoLTE”,0x05010CFA,202106171
OK

AT+QMBNCFG=“AutoSel”
+QMBNCFG: “AutoSel”,1
OK

So the name of the APN “ims” for the context 2 is contained in “ROW_Generic_3GPP”.Is that so?
How can I know the information contained in the MBN files?

I’m not 100% sure. Either that or the context 2 APN was set by a different MBN file if a different SIM was used previously.

I’ll have to leave that question for one of our friendly Quectel engineers.

What I do know from a lot of SIM swapping on different Quectel models with different MBN configurations is that active MBN files can set up multiple contexts with APNs.