diff --git a/README.md b/README.md index c1d9e84..772d307 100644 --- a/README.md +++ b/README.md @@ -201,6 +201,7 @@ The general flow of your code should be: - Secure and insecure clients can usually be mixed when using multiple connections. - The total number of connections possible varies by module - Begin your serial communication and set all your pins as required to power your module and bring it to full functionality. + - The examples attempt to guess the module's baud rate. In working code, you should use a set baud. - Wait for the module to be ready (could be as much as 6s, depending on the module) - Initialize the modem - ```modem.init()``` or ```modem.restart()``` diff --git a/examples/AllFunctions/AllFunctions.ino b/examples/AllFunctions/AllFunctions.ino index 9164899..7e6c6b5 100644 --- a/examples/AllFunctions/AllFunctions.ino +++ b/examples/AllFunctions/AllFunctions.ino @@ -137,8 +137,8 @@ void setup() { delay(6000); // Set GSM module baud rate - // TinyGsmAutoBaud(SerialAT, GSM_AUTOBAUD_MIN, GSM_AUTOBAUD_MAX); - SerialAT.begin(9600); + TinyGsmAutoBaud(SerialAT, GSM_AUTOBAUD_MIN, GSM_AUTOBAUD_MAX); + // SerialAT.begin(9600); } void loop() { diff --git a/examples/HttpClient/HttpClient.ino b/examples/HttpClient/HttpClient.ino index 25af0a9..6c99985 100644 --- a/examples/HttpClient/HttpClient.ino +++ b/examples/HttpClient/HttpClient.ino @@ -133,8 +133,8 @@ void setup() { SerialMon.println("Wait..."); // Set GSM module baud rate - // TinyGsmAutoBaud(SerialAT,GSM_AUTOBAUD_MIN,GSM_AUTOBAUD_MAX); - SerialAT.begin(9600); + TinyGsmAutoBaud(SerialAT, GSM_AUTOBAUD_MIN, GSM_AUTOBAUD_MAX); + // SerialAT.begin(9600); delay(6000); // Restart takes quite some time diff --git a/examples/HttpsClient/HttpsClient.ino b/examples/HttpsClient/HttpsClient.ino index 548414a..1d4f512 100644 --- a/examples/HttpsClient/HttpsClient.ino +++ b/examples/HttpsClient/HttpsClient.ino @@ -125,8 +125,8 @@ void setup() { SerialMon.println("Wait..."); // Set GSM module baud rate - // TinyGsmAutoBaud(SerialAT,GSM_AUTOBAUD_MIN,GSM_AUTOBAUD_MAX); - SerialAT.begin(9600); + TinyGsmAutoBaud(SerialAT, GSM_AUTOBAUD_MIN, GSM_AUTOBAUD_MAX); + // SerialAT.begin(9600); delay(6000); // Restart takes quite some time diff --git a/examples/MqttClient/MqttClient.ino b/examples/MqttClient/MqttClient.ino index f338d32..f615cca 100644 --- a/examples/MqttClient/MqttClient.ino +++ b/examples/MqttClient/MqttClient.ino @@ -177,8 +177,8 @@ void setup() { SerialMon.println("Wait..."); // Set GSM module baud rate - // TinyGsmAutoBaud(SerialAT,GSM_AUTOBAUD_MIN,GSM_AUTOBAUD_MAX); - SerialAT.begin(9600); + TinyGsmAutoBaud(SerialAT, GSM_AUTOBAUD_MIN, GSM_AUTOBAUD_MAX); + // SerialAT.begin(9600); delay(6000); // Restart takes quite some time diff --git a/examples/WebClient/WebClient.ino b/examples/WebClient/WebClient.ino index 6e0d94b..73b808f 100644 --- a/examples/WebClient/WebClient.ino +++ b/examples/WebClient/WebClient.ino @@ -128,8 +128,8 @@ void setup() { SerialMon.println("Wait..."); // Set GSM module baud rate - // TinyGsmAutoBaud(SerialAT,GSM_AUTOBAUD_MIN,GSM_AUTOBAUD_MAX); - SerialAT.begin(9600); + TinyGsmAutoBaud(SerialAT, GSM_AUTOBAUD_MIN, GSM_AUTOBAUD_MAX); + // SerialAT.begin(9600); delay(6000); // Restart takes quite some time diff --git a/tools/Diagnostics/Diagnostics.ino b/tools/Diagnostics/Diagnostics.ino index 0bf2dff..0b553a8 100644 --- a/tools/Diagnostics/Diagnostics.ino +++ b/tools/Diagnostics/Diagnostics.ino @@ -128,8 +128,8 @@ void setup() { SerialMon.println("Wait..."); // Set GSM module baud rate - // TinyGsmAutoBaud(SerialAT,GSM_AUTOBAUD_MIN,GSM_AUTOBAUD_MAX); - SerialAT.begin(9600); + TinyGsmAutoBaud(SerialAT, GSM_AUTOBAUD_MIN, GSM_AUTOBAUD_MAX); + // SerialAT.begin(9600); delay(6000); }