[EC20] Airtel M2M SIM support

I am testing an application for sending data via MQTT, what I have is an Airtel M2M SIM card. I am not able to activate PDP context.
Log:

AT+COPS?

+COPS: 1,0,"IND airtel airtel",0

OK
Device is currently on "IND airtel airtel" network.

AT+QNWINFO

+QNWINFO: "EDGE","40495","GSM 1800",759

OK
AT+QSPN

+QSPN: "IND airtel","airtel","airtel",0,"40495"

OK
AT+CGATT

ERROR
AT+CGATT?

+CGATT: 1

OK
AT+CGDCONT? 

+CGDCONT: 1,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.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","SOS","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,1

OK
AT+CGDCONT=1,"IP","airtelgprs.com"

OK
AT+CGDCONT?

+CGDCONT: 1,"IP","airtelgprs.com","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","SOS","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,1

OK
AT+CGACT=1,1

ERROR

There are no issues while using normal SIM cards. I do not have any experience working with M2M Sim Cards so any help is appreciated.

Hello,

Please use at+qiact=1 to activate PDN context. +CGATT is used to attach/dettach PS service while PDN activating and deactivating using +QIACT.

Best Regards,

AT+QIACT=1 always return ERROR for me.

The procedure that I am following for normal consumer 4G SIM is this:

ATE0
OK
AT+CGDCONT=1,"IPV4V6","www"
OK
AT+CGACT=1,1
OK
AT+QMTCFG="recv/mode",0,0,1
OK
AT+QMTCFG="ssl",0,1,0
OK

AT+QMTOPEN=0,"<host>",<port>
OK

+QMTOPEN: 0,0
AT+QMTCONN=0,"clientExample","<username>","<password>"
OK

+QMTCONN: 0,0,0

AT+QMTPUBEX=0,0,0,0,"test/",12
>Hello! World

This works without any issue.

I am not able to use the same procedure for my m2m Sim which is registered to a 2G network ( fails at CGACT). My application require both to work.
Am I doing anything wrong, is there any extra procedure for 2G networks.

M2M SIM usually have special APN name, do you set the correct APN? There’re two possibilities caused CGACT fail:

  1. Incorrect APN. (There should be instructions when you bought this SIM)
  2. You sim card is only allowed in CAT-M or CAT-NB network what most of M2M sim card are applied in.

I tried putting the SIM in my phone and note the autodetected APN. The phone successfully connected to the network and the APN was airtelgprs.com which is basically the public APN. Another APN was given to me by my client. Will either of these work?

As for the second part how do I diagnose what network is supported? NB-IoT is not yet supported in India.

You could try to set a blank APN(AT+CGDCONT=1,“IP,”"), then network will issurance a correct APN to device, but that depands on network supports this feature.

Actually, make sure what’s the root cause, we need inestigate the signaling message. If blank APN still doesn’t help, I suggest to ask you network provider to check you sim card service and APN name.

The client gave me the APN for the M2M sim in this format -> “TEST,APN,test” . Is this a valid apn? AT+CGDCONT=1,“IP”,“TEST,APN,test” always return ERROR.

It’s really strange. I had never seen this format. Do you confirm it comma"," or dot"."?
Anyway, you could try to set these format: “TEST,APN,test”, “TEST.APN.test”, “test”, “TEST”
With APN including comma, CGDCONT command will report ERROR, please use AT+QICSGP instead of AT+CGDCONT.

AT+QICSGP=1,1,“TEST,APN,test”

Btw, have you tried the blank APN setting?

Sir, what is the difference between +CGDCONT and +QICSGP?
NB: This should be compatible with 2G,3G & 4G network.
Also the SIM I was given has whitelisting implemented. I am in the process of negotiating access, I will test after that.
NB: Blank APN worked for non whitelisted M2M SIM cards. Does this mean the module can automatically resolve to the right custom APN setting?

+QICSGP has username and password setting while +CGDCONT doesn’t.

Blank APN worked for non whitelisted M2M SIM cards. Does this mean the module can automatically resolve to the right custom APN setting? => In most of carriers, it’s yes. You could also check what APN wsa given by network by command AT+CGCONTRDP

Best Regards,

AT+CGCONTRDP doesnt seem to return anything.

Which netowrork did you connected to, 2G,3G,or 4G. If 2G/3G, you need to activate PDP first. AT+QIACT=1.

Best Regards,

Testing on my normal 3G M2M SIM, (previously set to blank APN and rebooted) AT+CGCONTRDP=1 returns no APN setting after AT+QIACT=1.

Also +CGACT vs +QIACT? I usually use +CGACT.

Edit: Correct APN value returned for consumer SIM card.
Edit2: Also It just output whatever APN that was manually set for that particular SIM.

Did you get “OK” after AT+QIACT=1?

CGACT and QIACT have the same effects. CGACT is 3GPP specific, QIACT is Quectel specific.

Yes I did get OK.

Is it better for code portability to use +CGACT?

If you get OK after AT+QIACT=1, you should get response from AT+CGCONTRDP including IP address, DNS server and APN name.
You could share the UART input output logs.

Best Regards,