Skip to content

Commit 7b179ed

Browse files
committed
augmentation du timout de téléchargement des SMS
1 parent 26560f7 commit 7b179ed

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

lib/gsm/src/gsm.cpp

+4-8
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ namespace GSM
270270
{
271271
return simLocked;
272272
}
273-
273+
274274
void isSimLockedAsk()
275275
{
276276
std::string o = send("AT+CPIN?", "OK");
@@ -793,7 +793,9 @@ namespace GSM
793793
{
794794
send("AT+CMGF=0", "AT+CMGF=0", 100);
795795

796-
std::string input = send("AT+CMGL=0", "AT+CMGL", 500);
796+
std::string input = send("AT+CMGL=0", "AT+CMGL", 5000); // read all messages
797+
798+
std::cout << input << std::endl;
797799

798800
std::vector<std::string> pdus;
799801

@@ -891,12 +893,6 @@ namespace GSM
891893
}
892894
}
893895

894-
if(pdus.size())
895-
{
896-
if (ExternalEvents::onNewMessage)
897-
ExternalEvents::onNewMessage();
898-
}
899-
900896
send("AT+CMGD=1,1", "AT+CMGD", 1000);
901897
}
902898

0 commit comments

Comments
 (0)