From 740c109d0421aaac040bdfeb025403bcfcb2f776 Mon Sep 17 00:00:00 2001 From: WolfRorDev <58151726+WolfRorDev@users.noreply.github.com> Date: Thu, 9 May 2024 12:28:37 +0200 Subject: [PATCH] Update ArduinoCellular.cpp Fixes an error in the sendSMS function that made it impossible to send SMS. --- src/ArduinoCellular.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ArduinoCellular.cpp b/src/ArduinoCellular.cpp index 7fb8b8e..13e4f70 100644 --- a/src/ArduinoCellular.cpp +++ b/src/ArduinoCellular.cpp @@ -127,6 +127,8 @@ Time ArduinoCellular::getCellularTime(){ void ArduinoCellular::sendSMS(String number, String message){ + modem.sendAT("+CMGF=1"); + modem.waitResponse(1000); modem.sendAT(GF("+CMGS=\""), number, GF("\"")); if (modem.waitResponse(GF(">")) != 1) { } modem.stream->print(message); // Actually send the message