Recovery from tcp_notif >= 0?

What is the expected recovery path when opening a TCP socket and receiving a tcp_notif status code >= 0?

When opening a TCP socket with a RC7620, we frequently get the following situation:

  1. Socket is configured (AT+KTCPCFG=1...) and a connection is started (AT+KTCPCNX=1)
  2. The socket state is polled with AT+KTCPSTAT=1
  3. The modem replies +KTCPSTAT: 1,5,0,0 (socket is defined but not used, tcp_notif=‘TCP connection error’)
  4. The connection is restarted with AT+KTCPCNX=1 and polled again with AT+KTCPSTAT=1
  5. The modem replies +KTCPSTAT: 1,0,0,0 (socket is defined but not used, tcp_notif=‘Network error’)
  6. Steps 4-5 repeat for about 4 minutes
  7. The modem replies with +KTCPSTAT: 2,0,0,0 (socket is connecting)
  8. The status is polled until +KTCPSTAT: 3,-1,0,0 (socket is connected) is received

Note that in step 3 we also receive +KTCPSTAT: 1,3,0,0 (tcp_notif=‘DNS error’), followed by +KTCPSTAT: 1,0,0,0 (tcp_notif=‘Network error’), but the socket still eventually opens as above after about 4 minutes of this.

However we also encounter situations where the modem never recovers and reports +KTCPSTAT: 1,0,0,0 always (many hours).

What is the expected way to recover from this situation? I cannot find any guidance in the documentation. Is it expected that the socket is deleted (AT+KTCPDEL=1) and then reconfigured and restarted (step 1 above), or is it expected to reset the modem with AT!RESET, or is there some other strategy?

Is the module receiving good signal?

you can first try reconnect after entering the following first:

AT+ktcpclose=1
at+ktcpdel=1

AT+KTCPCLOSE=1 will always report a +CME ERROR: 922 (Error due to invalid state of session) when tcp_notif >= 0.

We will try deleting the socket, reconfiguring and reconnecting.