Skip to content

Commit 15f0288

Browse files
committed
GSM: change restart flag default value to false
1 parent d323ce9 commit 15f0288

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Diff for: libraries/GSM/src/GSM.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ int arduino::GSMClass::begin(const char* pin, const char* apn, const char* usern
5959
digitalWrite(MBED_CONF_GEMALTO_CINTERION_RST, LOW);
6060

6161
/* Reset module if needed */
62-
if (restart || isCmuxEnable()) {
62+
const bool emergencyReset = restart || isCmuxEnable();
63+
DEBUG_INFO("Emergency reset %s", emergencyReset ? "enabled" : "disabled");
64+
if (emergencyReset) {
6365
reset();
6466
}
6567

Diff for: libraries/GSM/src/GSM.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class GSMClass : public MbedSocketClass {
8686
*
8787
* return: 0 in case of success, negative number in case of failure
8888
*/
89-
int begin(const char* pin, const char* apn, const char* username, const char* password, RadioAccessTechnologyType rat = CATNB, uint32_t band = BAND_20, bool restart = true);
89+
int begin(const char* pin, const char* apn, const char* username, const char* password, RadioAccessTechnologyType rat = CATNB, uint32_t band = BAND_20, bool restart = false);
9090

9191
/*
9292
* Disconnect from the network

0 commit comments

Comments
 (0)