From c89af3019e9370157010e823df7b2ff3bdaee2da Mon Sep 17 00:00:00 2001 From: Sara Damiano Date: Mon, 18 Mar 2019 11:45:04 -0400 Subject: [PATCH] Implement factory restore for UBLOX LTE-M --- ...lox Cellular AT Commands R60 (UBX-13002752).pdf} | Bin src/TinyGsmClientUBLOX.h | 9 ++++++--- 2 files changed, 6 insertions(+), 3 deletions(-) rename extras/AT Command Manuals/{u-blox Cellular ATCommands R60 (UBX-13002752).pdf => u-blox Cellular AT Commands R60 (UBX-13002752).pdf} (100%) diff --git a/extras/AT Command Manuals/u-blox Cellular ATCommands R60 (UBX-13002752).pdf b/extras/AT Command Manuals/u-blox Cellular AT Commands R60 (UBX-13002752).pdf similarity index 100% rename from extras/AT Command Manuals/u-blox Cellular ATCommands R60 (UBX-13002752).pdf rename to extras/AT Command Manuals/u-blox Cellular AT Commands R60 (UBX-13002752).pdf diff --git a/src/TinyGsmClientUBLOX.h b/src/TinyGsmClientUBLOX.h index a577094..b2962d9 100644 --- a/src/TinyGsmClientUBLOX.h +++ b/src/TinyGsmClientUBLOX.h @@ -329,12 +329,15 @@ public: bool factoryDefault() { if (!isCatM) { - sendAT(GF("+UFACTORY=0,1")); // Factory + Reset + Echo Off + sendAT(GF("+UFACTORY=0,1")); // No factory restore, erase NVM waitResponse(); - sendAT(GF("+CFUN=16")); // Auto-baud + sendAT(GF("+CFUN=16")); // Reset + return waitResponse() == 1; + } + else { + sendAT(GF("&F")); // Resets the current profile, other NVM not affected return waitResponse() == 1; } - else return false; } String getModemInfo() {