RC7620 TCP connection problem

I am having trouble making a TCP connection to our sever using RC7620 modem in a consistent way. I am basing the driver on the HL7692 modems that we have used before. The issue comes when bringing up the PDP, the modem goes through some cycles that are hard to catch in firmware.

AT+CGDCONT=1,"IPV4V6","our_apn"
OK

+CREG: 0

+CGREG: 0

+CREG: 2

+CGREG: 2

+CREG: 5

+CGREG: 5
AT+KCNXCFG=1,"GPRS","our_apn","apn_login","apn_password"
OK
AT+COPS=3,2
OK
AT+COPS?
+COPS: 0,2,"23201",7

OK
AT+WDSS?

+WDSS: 1,0
+WDSS: 2,1

OK
AT+KCNXTIMER=1,30,3
OK
AT+KCNXUP=1
OK


+KCNX_IND: 1,4,1



+KCNX_IND: 1,1,0


+CREG: 0

+CGREG: 0


+KCNX_IND: 1,0,0


+CREG: 2

+CGREG: 2

+CREG: 5

+CGREG: 5


+KCNX_IND: 1,4,1



+KCNX_IND: 1,1,0

AT+CGDCONT?
+CGDCONT: 1,"IP","our_apn","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
AT+CGPADDR=1
+CGPADDR: 1,172.29.78.250

OK
AT+KTCPCFG?
OK
AT+KTCPCFG=1,0,"our_server_add",80

+KTCPCFG: 1

OK
AT+KTCPCFG?

+KTCPCFG: 1,0,1,0,,"our_server_add",80,26969,0,0,0,0

OK
AT+KTCPSTART=1
CONNECT


Why does the modem soft reset after PDP is up and then raise PDP again on its own?

Is this consistent at all times?

I am struggling to test because it seems to be the reason why this modem sometimes works and sometimes it does not.

Now that I see this I can try to catch it twice, but can this be mitigated otherwise through some configuration or a parameter in the commands I am issuing?

Are you using devkit to test?
Could it be power problem?

I am using the Dev Kit to test. The DC power is plugged in and jumpers set properly. It does soft reset on LTE APN configuration with CGDCONT and on KCNXUP. Is this expected? It is not in datasheet. I will test waiting for registration after CGDCONT and waiting for +KCNX_IND: 1,1,0 twice and see.
I will also test in our hardware with delays in the firmware to see if the behavior is the same.

I also have issues with the command CGACT

>> Starting bearer and testing APN
>
AT+CGDCONT=1,"IPV4V6","our_apn"

OK
> Waiting for registration in the network (+CGREG: 1 or +CGREG: 5)

+CREG: 0

+CGREG: 0

+CREG: 2

+CGREG: 2

+CREG: 5

+CGREG: 5
AT+WDSS=1,0

OK
AT+CGACT?

+CGACT: 1,1
+CGACT: 2,0
+CGACT: 3,0

OK
AT+CGACT=0,1

ERROR
AT+CEER

+CEER: EMM detached

OK

So when +CAGCT: 1,1, there is no way of deactivating to 1,0 like the other two.
When I issue AT+CGACT=0,1. it returns error. What is the recommended way of dealing with this, it is now my hurdle to making this modem work.
The APN is fine, but this issue is detected in the firmware as APN error, simply because this command does not succeed.

You can try AT+CGATT=0


at+Cgact?                                                                       
+CGACT: 1,1                                                                     
+CGACT: 2,0                                                                     
+CGACT: 3,0                                                                     
                                                                                
OK                                                                              
at+cgact=0,1                                                                    
ERROR                                                                           
                                                                       
                                                                                
+CREG: 1,"FFFE","16E8A21",7                                                     
                                                                                
+CGREG: 1,"FFFE","16E8A21",7                                                    
at+cgatt=0                                                                      
OK                                                                              
                                                                                
+CGREG: 0                                                                       
at+Cgact?                                                                       
+CGACT: 1,0                                                                     
+CGACT: 2,0                                                                     
+CGACT: 3,0                                                                     
                                                                                
OK

BTW, I don’t see problem with TCP connection:


AT+KCNXCFG=1,"GPRS","smartone"                                                  
OK                                                                              
                                                 
AT+KCNXPROFILE=1                                                                
OK                                                                              
                                                       
                                                                                     
AT+KTCPCFG=1,0,"123.123.123.123",5044                                           
                                                                                
+KTCPCFG: 1                                                                     
                                                                                
OK                                                                              
at+ktcpcnx=1                                                                    
OK                                                                              
                                                                                
                                                                                
+KCNX_IND: 1,4,1                                                                
                                                                                
                                                                                
                                                                                
+KCNX_IND: 1,1,0                                                                
                                                                                
                                                                     
                                                                                
+KTCP_IND: 1,1

Yes thank you, I figured out I was missing AT+KTCPCFG command, Thanks for the response. AT+CGATT=0
was an option yes and it works as you indicated, eventually I did not see any difference in issuing it or not, so I am not even concerned about +CGACT: 1,1 . But I added it in the modem driver anyways and after configuration I issue AT+CGACT=1,1

As for the TCP resetting problems, it does not happen with our hardware, just with the KIT, I think the serial terminal application must be sending the command twice or something. Everything works now.

What is the difference between RC7620 and RC7620-1 because everything works on the RC7620 but the modem RC7620-1 does not respond to commands promptly after issuing AT&W.
Here is my log

ATE1

OK
ATZ

OK
AT+KSLEEP=2

OK
AT&D0

OK
AT&K3

OK
AT!MUSLEN=1

OK
AT+CPMS="ME","ME","ME"

+CPMS: 0,255,0,255,0,255

OK
AT+CNMI=2,1,0,0,0

OK
AT+CMGF=1

OK
AT+CMEE=1

OK
AT+KSREP=1

OK
AT+KSRAT=5

OK
AT+CREG=1

OK
AT+CGREG=1

OK
AT+COPS=3,2

OK
AT+COPS?

+COPS: 0,2,"23201",7

OK
AT&W

>> Starting bearer and testing APN
>
no echo
AT+CEER

+CEER: No cause information available

OK

I figured out the reason I get no echo after AT&W is because at that point, the modem UART seems to go to sleep and waits for at least one character to be sent to wake up, so after that point I have to run the command like twice to get a response in the serial terminal application.
As you can see I have already set AT+KSLEEP to 2 so UART should not sleep but it does. Is there any setting I am missing?
From what I understand, AT&W saves the settings done into the user profile and ATZ loads them. Am I doing anything wrong?

Apart from that, even if I send a wake up byte and configure bearer, TCP connection does not work on RC7620-1, it never goes up. It always times out.

>> Starting bearer and testing APN
>
no echo
AT+CGACT?

+CGACT: 1,0
+CGACT: 2,0
+CGACT: 3,0

OK
AT+CGDCONT=1,"IPV4V6","our_apn"

OK
AT+CREG=1

OK
AT+CGREG=1

OK
AT+CREG?

+CREG: 1,5

OK
> Registered in roaming network
AT+CGACT?

+CGACT: 1,0
+CGACT: 2,0
+CGACT: 3,0

OK
AT+CGACT=1,1

OK
AT+CSQ

+CSQ: 28,99

OK
AT+COPS=3,2

OK
AT+COPS?

+COPS: 0,2,"23201",2

OK
AT!GSTATUS?

!GSTATUS: 
Current Time:  48               Temperature: 32
Modem Mitigate Level: 0         ModemProc Mitigate Level: 0     
Reset Counter: 1                Mode:        ONLINE         
System mode:   WCDMA            PS state:    Attached     
IMS reg state: NOT REGISTERED   IMS mode:    Normal       
IMS Srv State: NO SMS,NO VoIP          
WCDMA band:    WCDMA 2100 
WCDMA channel: 10564
GMM (PS) state:REGISTERED       NORMAL SERVICE 
MM (CS) state: IDLE             NORMAL SERVICE 

WCDMA L1 state:L1M_DCH          LAC:         1DBC (7612)
RRC state:   CELL_DCH           UTRAN Cell ID:     003F6EA6 (4157094)
RxM RSSI C0:   -59              RxD RSSI C0:  --- 
RxM RSSI C1:    ---             RxD RSSI C1:  --- 

OK
AT+WDSS?


+WDSS: 1,0
+WDSS: 2,1

OK
AT+KCNXTIMER=1,30,3

OK
AT+KCNXUP=1

OK

After this it times out in 5 minutes without response

are they using same FW?

Here are the details for RC7620-1

AT+CGMM

RC7620-1

OK
AT+CGMI

Sierra Wireless, Incorporated

OK
AT+GMR

SWI9X07H_00.08.07.00 0ce4c1 jenkins 2021/03/17 02:18:20

OK

Manufacturer of modem:  Sierra Wireless, Incorporated
Type of modem:          RC7620-1
Modem firmware version: SWI9X07H_00.08.07.00 0ce4c1 jenkins 2021/03/17 02:18:20
Modem Baudrate:         115200

Here are the details for RC7620

AT+CGMM

RC7620

OK
AT+CGMI

Sierra Wireless, Incorporated

OK
AT+GMR

SWI9X07H_00.08.07.00 0ce4c1 jenkins 2021/03/17 02:18:20

OK

Manufacturer of modem:  Sierra Wireless, Incorporated
Type of modem:          RC7620
Modem firmware version: SWI9X07H_00.08.07.00 0ce4c1 jenkins 2021/03/17 02:18:20
Modem Baudrate:		115200

no idea, it should be the same…
is same SIM card being used?

Yes, Same SIM card. Can you confirm these two modems are not different in terms of TCP connection

i think so, didn’t you already load the same FW?

What do you mean? I sent the firmware details, from the actual AT output of the modems.
I need to know if you can reproduce it on your end for RC7620-1 with the commands I have posted here.
Am I doing anything wrong?

no problem is found:

ati3                                    
Manufacturer: Sierra Wireless, Incorporated
Model: RC7620-1                         
Revision: SWI9X07H_00.08.07.00 0ce4c1 jenkins 2021/03/17 02:18:20
IMEI: 001027009999999                   
IMEI SV: 17                             
FSN: 7T9483000706AA                     
+GCAP: +CGSM                            
                                        
OK
at!gtatus?
ERROR
at!gstatus?                                                                     
!GSTATUS:                                                                       
Current Time:  897              Temperature: 34                                 
Modem Mitigate Level: 0         ModemProc Mitigate Level: 0                     
Reset Counter: 2                Mode:        ONLINE                             
System mode:   LTE              PS state:    Attached                           
IMS reg state: UNKNOWN          IMS mode:    Not Support                        
IMS Srv State: UNKNOWN SMS,UNKNOWN VoIP                                         
LTE band:      B1               LTE bw:      15 MHz                             
LTE Rx chan:   374              LTE Tx chan: 18374                              
LTE CA state:  INACTIVE                                                         
EMM state:     Registered       Normal Service                                  
RRC state:     RRC Idle                                                         
                                                                                
PCC RxM RSSI:  -55              RSRP (dBm):  -91                                
PCC RxD RSSI:  -89              RSRP (dBm):  -127                               
Tx Power:      --               TAC:         2775 (10101)                       
RSRQ (dB):     -16              Cell ID:     00360A20 (3541536)                 
SINR (dB):      2.8                                                             
                                                                                
OK                                                                              
AT+KCNXCFG=1,"GPRS","smartone"                                                  
OK                                                                              
AT+KCNXPROFILE=1                                                                
OK                                                                              
AT+KTCPCFG=1,0,"123.123.123.123",5044                                           
                                                                                
+KTCPCFG: 1                                                                     
                                                                                
OK                                                                              
at+ktcpcnx=1                                                                    
OK                                                                              
                                                                                
                                                                                
+KCNX_IND: 1,4,1                                                                
                                                                                
                                                                                
                                                                                
+KCNX_IND: 1,1,0                                                                
                                                                                
                                                                                
                                                                                
+KTCP_IND: 1,1

I tried another modem same model and it works, I will sample our stock and see. May be just one is broken.
Thank you for the confirmation. Much appreciated.

Yes, that one old modem is not responding to TCP commands. The RC modems are working now. Thank you.