Hi
I sometimes get the condition where wip_bearerStart() returns -27 (in progress), but I never get any call-back to indicate success or failure. After 1 minute I grow tired of waiting and try to re-connect; I call wip_bearerStop(), which also returns -27 and no further call-backs.
Calling wip_bearerOpen() after this returns -21 (already open) and then wip_bearerStart() returns -28 (bad state). Still wip_bearerStop() returns -27.
If I call wip_bearerClose() it returns 0 (OK). wip_bearerOpen() now again returns 0, and wip_bearerStart() returns -29 (Error from link layer initialization).
Herewhit some debug (not the standard traces I see on this forum, but betetr than nothing)
(09:30:29.0) gsmctl: mx_gsmcontrolApnAttach wip_netInit() returns 0
(09:30:29.0) gsmctl: mx_gsmcontrolApnAttach wip_bearerOpen() returns 0
(09:30:29.0) gsmctl: mx_gsmcontrolApnAttach "ci.co.za", "", ""
(09:30:29.0) gsmctl: mx_gsmcontrolApnAttach wip_bearerSetOpts() returns 0
(09:30:29.0) gsmctl: mx_gsmcontrolApnAttach wip_bearerStart() returns -27
// in progress
[ADL_CALL_EVENT_NO_CARRIER]
...
(09:31:37.0) gsmctl: mx_gsmcontrolApnAttach TIMEOUT
(09:31:37.0) gsmctl: GSMTriggerCommand GCMD_CLOSE_APN
(09:31:38.0) gsmctl: GSMControl : CmdAct=1 CmdId=2 EngMode=1
(09:31:38.0) gsmctl: mx_gsmcontrolSocketClose socket already closed
(09:31:38.0) gsmctl: mx_gsmcontrolApnClose wip_bearerStop() returns -27
// in progress
...
(09:32:37.0) gsmctl: GSMTriggerCommand GCMD_APN_ATTACH
(09:32:38.0) gsmctl: GSMControl : CmdAct=1 CmdId=7 EngMode=1
(09:32:38.0) gsmctl: mx_gsmcontrolApnAttach wip_netInit() returns 0
(09:32:38.0) gsmctl: mx_gsmcontrolApnAttach wip_bearerOpen() returns -21
// already open
(09:32:38.0) gsmctl: mx_gsmcontrolApnAttach "ci.co.za", "", ""
(09:32:38.0) gsmctl: mx_gsmcontrolApnAttach wip_bearerSetOpts() returns 0
(09:32:38.0) gsmctl: mx_gsmcontrolApnAttach wip_bearerStart() returns -28
// bad state
(09:32:38.0) gsmctl: GSMTriggerCommand GCMD_CLOSE_APN
(09:32:39.0) gsmctl: GSMControl : CmdAct=1 CmdId=2 EngMode=1
(09:32:39.0) gsmctl: mx_gsmcontrolSocketClose socket already closed
(09:32:39.0) gsmctl: mx_gsmcontrolApnClose wip_bearerStop() returns -27
// in progress
...
(09:39:53.2) testAt: wip_bearerClose() returns 0
...
(09:40:45.0) gsmctl: GSMTriggerCommand GCMD_APN_ATTACH
(09:40:46.0) gsmctl: GSMControl : CmdAct=1 CmdId=7 EngMode=1
(09:40:46.0) gsmctl: mx_gsmcontrolApnAttach wip_netInit() returns 0
(09:40:46.0) gsmctl: mx_gsmcontrolApnAttach wip_bearerOpen() returns 0
(09:40:46.0) gsmctl: mx_gsmcontrolApnAttach "ci.co.za", "", ""
(09:40:46.0) gsmctl: mx_gsmcontrolApnAttach wip_bearerSetOpts() returns 0
(09:40:46.0) gsmctl: mx_gsmcontrolApnAttach wip_bearerStart() returns -29
// Error from link layer initialization
(09:40:46.0) gsmctl: GSMTriggerCommand GCMD_CLOSE_APN
(09:40:47.0) gsmctl: GSMControl : CmdAct=1 CmdId=2 EngMode=1
(09:40:47.0) gsmctl: mx_gsmcontrolSocketClose socket already closed
(09:40:47.0) gsmctl: mx_gsmcontrolApnClose wip_bearerStop() returns 0
My call back function prints debug upon entry, which I never receive, so I know I’m not missing the success/fail call-back.
This behaviour is only observed when the planets allign, and solar activity flares up (i.e. not very often, but enough to be problematic). The only way I can recover the WIP stack when this happes is to restart the module using AT+CFUN=1.
Has anybody seen this before? Is there any way to recover from this? Is there something I’m doing wrong, or something I can do to prevent this? Can the ADL_CALL_EVENT_NO_CARRIER call-back be any indication of what is happening?
Thanks