We are using M66FA module Revision: M66FAR01A12BT
Lately we are having trouble managing the PDP context activation, checking current status and managing deactivation, activation etc. Once we have configured the APN using AT+QIREGAPP AT+CGDCONT, To activate, we can use:
and deactivate using:
in the majority of cases these work, conditional on GPRS service and correct APN configuration. All good
From time to time we see issues with bad PDP context. Sometimes we ‘think’ we have an active context but we cant open TCP sockets and sometimes the reverse
we can check status of pdp context using:
AT+QILOCIP - check for an IP address or ERROR
all good so far.
The problem is that neither method appears to be giving us a reliable indication of pdp context status. We may see an IP address when we appear to have no active context (cant open sockets) and when we have a bad APN or when we force deactivation with either command, the status still shows as active. This is confirmed to be false when we fail to open TCP sockets as usual etc. etc.
At any time when we deactivate pdp, we first close any open sockets. ditto before we try to re-configure the APN address.
Checking this is essential to reliable communication and elegant module management. Currently when things get in a mess and we have conflicting info on the pdp context, we can reboot the module and it comes back online as expected, but we would prefer to avoid that for many reasons, not least of which is the risk of HW damage if we reboot too often.
So the question - how to reliably check pdp context activation status on M66FA?
or maybe we are going about it all wrong in the first place?