diff --git a/features/cellular/framework/AT/AT_CellularNetwork.cpp b/features/cellular/framework/AT/AT_CellularNetwork.cpp index 1457effb8d..b1d17a205a 100644 --- a/features/cellular/framework/AT/AT_CellularNetwork.cpp +++ b/features/cellular/framework/AT/AT_CellularNetwork.cpp @@ -437,11 +437,6 @@ void AT_CellularNetwork::ppp_status_cb(nsapi_event_t event, intptr_t parameter) nsapi_error_t AT_CellularNetwork::do_user_authentication() { - // try to find or create context with suitable stack - if (!get_context()) { - return NSAPI_ERROR_NO_CONNECTION; - } - // if user has defined user name and password we need to call CGAUTH before activating or modifying context if (_pwd && _uname) { _at.cmd_start("AT+CGAUTH="); diff --git a/features/cellular/framework/AT/AT_CellularNetwork.h b/features/cellular/framework/AT/AT_CellularNetwork.h index 7cc57d59fd..49be4f2524 100644 --- a/features/cellular/framework/AT/AT_CellularNetwork.h +++ b/features/cellular/framework/AT/AT_CellularNetwork.h @@ -154,6 +154,7 @@ private: void free_credentials(); nsapi_error_t open_data_channel(); + bool get_context(); bool set_new_context(int cid); nsapi_error_t delete_current_context(); @@ -179,7 +180,6 @@ protected: int _cell_id; nsapi_connection_status_t _connect_status; virtual nsapi_error_t do_user_authentication(); - bool get_context(); bool _new_context_set; bool _is_context_active; RegistrationStatus _reg_status; diff --git a/features/cellular/framework/targets/QUECTEL/UG96/QUECTEL_UG96_CellularNetwork.cpp b/features/cellular/framework/targets/QUECTEL/UG96/QUECTEL_UG96_CellularNetwork.cpp index 3de1c5f9d0..dd368b472f 100644 --- a/features/cellular/framework/targets/QUECTEL/UG96/QUECTEL_UG96_CellularNetwork.cpp +++ b/features/cellular/framework/targets/QUECTEL/UG96/QUECTEL_UG96_CellularNetwork.cpp @@ -45,11 +45,6 @@ nsapi_error_t QUECTEL_UG96_CellularNetwork::set_access_technology_impl(RadioAcce nsapi_error_t QUECTEL_UG96_CellularNetwork::do_user_authentication() { - // try to find or create context with suitable stack - if (!get_context()) { - return NSAPI_ERROR_NO_CONNECTION; - } - if (_pwd && _uname) { _at.cmd_start("AT+QICSGP="); _at.write_int(_cid);