APN settings for 2G/3G/4G SIM on EC20 module

Hello everyone,

I am working on an OpenWRT project with EC20 module. I am using EC20 module in ECM mode. With default SIM settings, I am able to get the internet connection through EC20.

However, the user should be able to configure following settings:

APN, username, password, WAN IP address (for Fixed IP SIM), Authentication type (None/PAP/CHAP/both), dial string

The SIM type can be 2G/3G/4G.

I had figured out a command sequence to configure these settings:
AT+CFUN=0
AT+QICSGP=1,3,“apn”,“username”,“password”,3
AT+CGDCONT=1,“IPV4V6”,“apn”,“135.152.191.150”,0,0,0,0
AT+CFUN=1
AT+CGACT=1,1
ATD*99#

All the commands get proper responses, and after ATD command it responses back with
CONNECT 150000000

After that it doesn’t accept any commands. I need to type +++, I think it’s exits and responds back with
NO CARRIER. and I am able to send the command again.

Above testing was done on 4G SIM. (The operator is 4G only cellular network. 2G/3G is not supported).

My queries are:

  1. I believe dial-up command ATD*99# is required for 2G/3G networks only, and not 4G. Is this correct?

  2. Is above command sequence correct to have internet connection on 2G/3G/4G networks? do I need to have different command sequences for 2G/3G/4G?

  3. I am assuming that if I have fixed IP SIM from network provider, i need to set PDP address as fixed IP assigned by network provider as shown in above in AT+CGDCONT command. Is that correct?

Hi @user0805

  1. I believe dial-up command ATD*99# is required for 2G/3G networks only, and not 4G. Is this correct?
    Dial-up instructions are applicable to both 234G networks.

  2. Is above command sequence correct to have internet connection on 2G/3G/4G networks? do I need to have different command sequences for 2G/3G/4G?
    Correct, 234G is fine, no need to distinguish.

  3. I am assuming that if I have fixed IP SIM from network provider, i need to set PDP address as fixed IP assigned by network provider as shown in above in AT+CGDCONT command. Is that correct?
    There is no need to configure an IP address, the network will assign an IP address to the UE.