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?