From 0019157eb62aab669d81b3e56a2ce692c63431d6 Mon Sep 17 00:00:00 2001 From: Volodymyr Shymanskyy Date: Thu, 1 Dec 2016 15:26:48 +0200 Subject: [PATCH] Add tools --- tools/AT_Debug/AT_Debug.ino | 36 +++++++++++++++++++++++++++++ tools/FactoryReset/FactoryReset.ino | 29 +++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 tools/AT_Debug/AT_Debug.ino create mode 100644 tools/FactoryReset/FactoryReset.ino diff --git a/tools/AT_Debug/AT_Debug.ino b/tools/AT_Debug/AT_Debug.ino new file mode 100644 index 0000000..8423c55 --- /dev/null +++ b/tools/AT_Debug/AT_Debug.ino @@ -0,0 +1,36 @@ +/************************************************************** + * + * To run this tool, you need to install StreamDebugger library: + * https://github.com/vshymanskyy/StreamDebugger + * + **************************************************************/ + +#include +#include + +char apn[] = "YourAPN"; +char user[] = ""; +char pass[] = ""; + +StreamDebugger GsmSerial(Serial1, Serial); +GsmClient gsm(GsmSerial); + +void setup() { + // Set console baud rate + Serial.begin(115200); + delay(10); + + // Set GSM module baud rate + GsmSerial.begin(115200); + delay(3000); + + gsm.networkConnect(apn, user, pass); + + // Access AT commands from Serial + GsmSerial.directAccess(); +} + +void loop() { + +} + diff --git a/tools/FactoryReset/FactoryReset.ino b/tools/FactoryReset/FactoryReset.ino new file mode 100644 index 0000000..f882fa1 --- /dev/null +++ b/tools/FactoryReset/FactoryReset.ino @@ -0,0 +1,29 @@ +/************************************************************** + * + * To run this tool, you need to install StreamDebugger library: + * https://github.com/vshymanskyy/StreamDebugger + * + **************************************************************/ + +#include +#include + +StreamDebugger GsmSerial(Serial1, Serial); +GsmClient gsm(GsmSerial); + +void setup() { + // Set console baud rate + Serial.begin(115200); + delay(10); + + // Set GSM module baud rate + GsmSerial.begin(115200); + delay(3000); + + // Return to factory configuration + gsm.factoryDefault(); +} + +void loop() { + +}