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:
- Socket is configured (
AT+KTCPCFG=1...
) and a connection is started (AT+KTCPCNX=1
) - The socket state is polled with
AT+KTCPSTAT=1
- The modem replies
+KTCPSTAT: 1,5,0,0
(socket is defined but not used, tcp_notif=‘TCP connection error’) - The connection is restarted with
AT+KTCPCNX=1
and polled again withAT+KTCPSTAT=1
- The modem replies
+KTCPSTAT: 1,0,0,0
(socket is defined but not used, tcp_notif=‘Network error’) - Steps 4-5 repeat for about 4 minutes
- The modem replies with
+KTCPSTAT: 2,0,0,0
(socket is connecting) - 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?