File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
features/cellular/easy_cellular Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -436,8 +436,6 @@ void CellularConnectionFSM::state_sim_pin()
436
436
retry_state_or_fail ();
437
437
return ;
438
438
}
439
- _cellularDevice->close_sim ();
440
- _sim = NULL ;
441
439
if (_plmn) {
442
440
enter_to_state (STATE_MANUAL_REGISTERING_NETWORK);
443
441
} else {
@@ -485,6 +483,8 @@ void CellularConnectionFSM::state_attaching()
485
483
{
486
484
_cellularDevice->set_timeout (TIMEOUT_CONNECT);
487
485
if (_network->set_attach () == NSAPI_ERROR_OK) {
486
+ _cellularDevice->close_sim ();
487
+ _sim = NULL ;
488
488
enter_to_state (STATE_ACTIVATING_PDP_CONTEXT);
489
489
} else {
490
490
retry_state_or_fail ();
Original file line number Diff line number Diff line change @@ -117,9 +117,9 @@ class CellularConnectionFSM
117
117
*/
118
118
CellularDevice *get_device ();
119
119
120
- /* * Get cellular sim interface. SIM interface is released after SIM is open and ready for use ( moving from STATE_SIM_PIN to next state) .
121
- * After SIM interface is closed this method will return NULL. SIM interface can be created again via CellularDevice
122
- * which you can get with the method get_device().
120
+ /* * Get cellular sim interface. SIM interface is released when moving from STATE_ATTACHING_NETWORK to STATE_ACTIVATING_PDP_CONTEXT .
121
+ * After SIM interface is closed this method will return NULL and any instances fetched via this method are invalid.
122
+ * SIM interface can be created again via CellularDevice which you can get with the method get_device().
123
123
* @return sim interface, NULL on failure
124
124
*/
125
125
CellularSIM *get_sim ();
You can’t perform that action at this time.
0 commit comments