We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b6208c commit c597d84Copy full SHA for c597d84
features/cellular/easy_cellular/CellularConnectionFSM.cpp
@@ -152,6 +152,18 @@ bool CellularConnectionFSM::open_sim()
152
return false;
153
}
154
155
+ if (state == CellularSIM::SimStatePinNeeded) {
156
+ if (strlen(_sim_pin)) {
157
+ tr_info("SIM pin required, entering pin: %s", _sim_pin);
158
+ nsapi_error_t err = _sim->set_pin(_sim_pin);
159
+ if (err) {
160
+ tr_error("SIM pin set failed with: %d, bailing out...", err);
161
+ }
162
+ } else {
163
+ tr_warn("PIN required but No SIM pin provided.");
164
165
166
+
167
if (_event_status_cb) {
168
_event_status_cb((nsapi_event_t)CellularSIMStatusChanged, state);
169
0 commit comments