From 57514b7c4d80d2116078a7917abf19a9c755d6cb Mon Sep 17 00:00:00 2001 From: Francesco Stefanni Date: Fri, 12 Mar 2021 15:27:57 +0100 Subject: [PATCH] Supported factory reset for sim7000 --- src/TinyGsmClientSIM7000.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/TinyGsmClientSIM7000.h b/src/TinyGsmClientSIM7000.h index 756f0d3..7512bbb 100644 --- a/src/TinyGsmClientSIM7000.h +++ b/src/TinyGsmClientSIM7000.h @@ -201,7 +201,18 @@ class TinyGsmSim7000 : public TinyGsmModem, } bool factoryDefaultImpl() { // these commands aren't supported - return false; + sendAT(GF("&FZE0&W")); // Factory + Reset + Echo Off + Write + waitResponse(); + sendAT(GF("+IPR=0")); // Auto-baud + waitResponse(); + sendAT(GF("+IFC=0,0")); // No Flow Control + waitResponse(); + sendAT(GF("+ICF=3,3")); // 8 data 0 parity 1 stop + waitResponse(); + sendAT(GF("+CSCLK=0")); // Disable Slow Clock + waitResponse(); + sendAT(GF("&W")); // Write configuration + return waitResponse() == 1; } /*