# RC7620 TCP connection problem

**URL:** https://forum.sierrawireless.com/t/rc7620-tcp-connection-problem/27680
**Category:** RC76
**Created:** [August 22, 2022, 11:03am UTC](https://forum.sierrawireless.com/t/rc7620-tcp-connection-problem/27680 "2022-08-22T11:03:53Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![jan.krchnak](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@jan.krchnak](https://forum.sierrawireless.com/u/jan.krchnak)
#### Post date: [August 22, 2022, 11:03am UTC](https://forum.sierrawireless.com/t/rc7620-tcp-connection-problem/27680/1 "2022-08-22T11:03:54Z")

</div>

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.

```auto
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?

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)
#### Post date: [August 22, 2022, 11:20am UTC](https://forum.sierrawireless.com/t/rc7620-tcp-connection-problem/27680/2 "2022-08-22T11:20:24Z")

</div>

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

---

<div class="post-metadata">

### Author: ![jan.krchnak](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@jan.krchnak](https://forum.sierrawireless.com/u/jan.krchnak)
#### Post date: [August 22, 2022, 11:25am UTC](https://forum.sierrawireless.com/t/rc7620-tcp-connection-problem/27680/3 "2022-08-22T11:25:12Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![jan.krchnak](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@jan.krchnak](https://forum.sierrawireless.com/u/jan.krchnak)
#### Post date: [August 22, 2022, 12:18pm UTC](https://forum.sierrawireless.com/t/rc7620-tcp-connection-problem/27680/4 "2022-08-22T12:18:54Z")

</div>

I also have issues with the command CGACT

```auto
>> 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.

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)
#### Post date: [August 22, 2022, 2:43pm UTC](https://forum.sierrawireless.com/t/rc7620-tcp-connection-problem/27680/5 "2022-08-22T14:43:59Z")

</div>

You can try AT+CGATT=0

```auto

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

```

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)
#### Post date: [August 22, 2022, 2:55pm UTC](https://forum.sierrawireless.com/t/rc7620-tcp-connection-problem/27680/6 "2022-08-22T14:55:40Z")

</div>

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

```auto

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

```

---

<div class="post-metadata">

### Author: ![jan.krchnak](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@jan.krchnak](https://forum.sierrawireless.com/u/jan.krchnak)
#### Post date: [August 23, 2022, 8:10am UTC](https://forum.sierrawireless.com/t/rc7620-tcp-connection-problem/27680/7 "2022-08-23T08:10:57Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![jan.krchnak](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@jan.krchnak](https://forum.sierrawireless.com/u/jan.krchnak)
#### Post date: [August 23, 2022, 9:47am UTC](https://forum.sierrawireless.com/t/rc7620-tcp-connection-problem/27680/8 "2022-08-23T09:47:34Z")

</div>

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

```auto
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?

---

<div class="post-metadata">

### Author: ![jan.krchnak](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@jan.krchnak](https://forum.sierrawireless.com/u/jan.krchnak)
#### Post date: [August 23, 2022, 11:03am UTC](https://forum.sierrawireless.com/t/rc7620-tcp-connection-problem/27680/9 "2022-08-23T11:03:33Z")

</div>

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.

```auto
>> 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

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)
#### Post date: [August 23, 2022, 11:06am UTC](https://forum.sierrawireless.com/t/rc7620-tcp-connection-problem/27680/10 "2022-08-23T11:06:57Z")

</div>

are they using same FW?

---

<div class="post-metadata">

### Author: ![jan.krchnak](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@jan.krchnak](https://forum.sierrawireless.com/u/jan.krchnak)
#### Post date: [August 23, 2022, 11:15am UTC](https://forum.sierrawireless.com/t/rc7620-tcp-connection-problem/27680/11 "2022-08-23T11:15:20Z")

</div>

Here are the details for RC7620-1

```auto
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

```

---

<div class="post-metadata">

### Author: ![jan.krchnak](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@jan.krchnak](https://forum.sierrawireless.com/u/jan.krchnak)
#### Post date: [August 23, 2022, 11:17am UTC](https://forum.sierrawireless.com/t/rc7620-tcp-connection-problem/27680/12 "2022-08-23T11:17:17Z")

</div>

Here are the details for RC7620

```auto
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

```

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)
#### Post date: [August 23, 2022, 11:19am UTC](https://forum.sierrawireless.com/t/rc7620-tcp-connection-problem/27680/13 "2022-08-23T11:19:21Z")

</div>

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

---

<div class="post-metadata">

### Author: ![jan.krchnak](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@jan.krchnak](https://forum.sierrawireless.com/u/jan.krchnak)
#### Post date: [August 23, 2022, 11:24am UTC](https://forum.sierrawireless.com/t/rc7620-tcp-connection-problem/27680/14 "2022-08-23T11:24:05Z")

</div>

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

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)
#### Post date: [August 23, 2022, 11:31am UTC](https://forum.sierrawireless.com/t/rc7620-tcp-connection-problem/27680/15 "2022-08-23T11:31:06Z")

</div>

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

---

<div class="post-metadata">

### Author: ![jan.krchnak](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@jan.krchnak](https://forum.sierrawireless.com/u/jan.krchnak)
#### Post date: [August 23, 2022, 11:33am UTC](https://forum.sierrawireless.com/t/rc7620-tcp-connection-problem/27680/16 "2022-08-23T11:33:35Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)
#### Post date: [August 23, 2022, 12:15pm UTC](https://forum.sierrawireless.com/t/rc7620-tcp-connection-problem/27680/17 "2022-08-23T12:15:43Z")

</div>

no problem is found:

```auto
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

```

---

<div class="post-metadata">

### Author: ![jan.krchnak](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@jan.krchnak](https://forum.sierrawireless.com/u/jan.krchnak)
#### Post date: [August 23, 2022, 12:17pm UTC](https://forum.sierrawireless.com/t/rc7620-tcp-connection-problem/27680/18 "2022-08-23T12:17:48Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![jan.krchnak](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@jan.krchnak](https://forum.sierrawireless.com/u/jan.krchnak)
#### Post date: [August 24, 2022, 12:09pm UTC](https://forum.sierrawireless.com/t/rc7620-tcp-connection-problem/27680/19 "2022-08-24T12:09:43Z")

</div>

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