We use wip_TCPClientCreateOpts to create a connection to a server via GPRS whenever there is data to send. The socket connection is not kept open, but closed as soon as the is sent. We use a timer to open the connection when needed. The timer runs every 3 seconds.
The above works exactly as expected, except if the server is stopped for an hour or more. Instead of getting the normal WIP_CEV_ERROR event with WIP_CERR_TIMOUT error code, the wip_TCPClientCreateOpts call fails immediately (returns NULL). At this point, GPRS is still up as indicated by AT+CGREG and AT+CGATT.
Since there is no valid channel, I cannot call wip_getOpts to get the error, so how do we diagnose this?