WIP Bearer State Machine


I have a couple of questions about the WIP Bearer State Machine.

After receiving BEV_IP_DISCONNECTED I get to the Peer Disconnecting state, and if I do a bearerStop, I get to the DISCONNECTED state and must wait for a BEV_STOPPED event. This sounds OK, and I can just wait at BEV_STOPPED to restart the connection or close the bearer. However, there’s also a transition labeled “disconnection done” that happens without calling bearerStop, and that takes me to the DISCONNECTED state without getting the BEV_STOPPED event…Question is, when does this happens, and how can I know I’m in the DISCONNECTED state in this case? I need to know when I get to that state so I can restart or close the bearer gracefully. Maybe it happens only if I ignore the BEV_IP_DISCONNECTED event and do not stop the bearer?

The bearerStart can return OK or WIP_BERR_OK_INPROGRESS. If it returns OK, the transition to CONNECTED will be immediate, and the BEV_IP_CONNECTED event will not be generated, right?

I’m having some modem resets when GRPS connection fails and probably is because of how I’m handling the opening/closing of the bearer…



After I call wip_bearerStart( b), the BEV_IP_CONNECTED is generated.