Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 59a7e4a

Browse files
committedOct 15, 2024
GSM: remove isReady
1 parent a47ad45 commit 59a7e4a

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed
 

‎libraries/GSM/src/GSM.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,6 @@ int arduino::GSMClass::begin(const char* pin, const char* apn, const char* usern
6666
_device = _context->get_device();
6767
_device->modem_debug_on(_at_debug);
6868

69-
if (!isReady()) {
70-
DEBUG_ERROR("Cellular device not ready");
71-
return 0;
72-
}
73-
7469
_device->set_cmux_status_flag(_cmuxGSMenable);
7570
_device->set_retry_timeout_array(_retry_timeout, sizeof(_retry_timeout) / sizeof(_retry_timeout[0]));
7671
_device->attach(mbed::callback(this, &GSMClass::onStatusChange));
@@ -170,22 +165,7 @@ void arduino::GSMClass::reset() {
170165
delay(1);
171166
}
172167

173-
bool arduino::GSMClass::isReady(const int timeout) {
174-
if (!_device) {
175-
DEBUG_ERROR("No device found");
176-
return false;
177-
}
178168

179-
const unsigned int start = millis();
180-
while (_device->is_ready() != NSAPI_ERROR_OK) {
181169

182-
if (millis() - start > timeout) {
183-
DEBUG_WARNING("Timeout waiting device ready");
184-
return false;
185-
}
186-
delay(100);
187-
}
188-
return true;
189-
}
190170

191171
arduino::GSMClass GSM;

‎libraries/GSM/src/GSM.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ class GSMClass : public MbedSocketClass {
150150
void onStatusChange(nsapi_event_t ev, intptr_t in);
151151

152152
void reset();
153-
bool isReady(const int timeout = 5000);
154153
};
155154

156155
}

0 commit comments

Comments
 (0)
Please sign in to comment.