From e37b2a62e4be3f530db59bb055bebe0409f74f5b Mon Sep 17 00:00:00 2001 From: Volodymyr Shymanskyy Date: Sat, 2 Sep 2017 19:26:54 +0300 Subject: [PATCH] Add stream.flush(); here and there --- TinyGsmClientESP8266.h | 1 + TinyGsmClientM590.h | 3 ++- TinyGsmClientSIM800.h | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/TinyGsmClientESP8266.h b/TinyGsmClientESP8266.h index 28bfc9f..75155b2 100644 --- a/TinyGsmClientESP8266.h +++ b/TinyGsmClientESP8266.h @@ -251,6 +251,7 @@ private: return -1; } stream.write((uint8_t*)buff, len); + stream.flush(); if (waitResponse(GF(GSM_NL "SEND OK" GSM_NL)) != 1) { return -1; } diff --git a/TinyGsmClientM590.h b/TinyGsmClientM590.h index 3e79fbc..47eb014 100644 --- a/TinyGsmClientM590.h +++ b/TinyGsmClientM590.h @@ -411,6 +411,7 @@ public: } stream.print(text); stream.write((char)0x1A); + stream.flush(); return waitResponse(60000L) == 1; } @@ -466,7 +467,7 @@ private: } stream.write((uint8_t*)buff, len); stream.write((char)0x0D); - + stream.flush(); if (waitResponse(30000L, GF(GSM_NL "+TCPSEND:")) != 1) { return 0; } diff --git a/TinyGsmClientSIM800.h b/TinyGsmClientSIM800.h index b341b51..20af6db 100644 --- a/TinyGsmClientSIM800.h +++ b/TinyGsmClientSIM800.h @@ -486,6 +486,7 @@ public: } stream.print(text); stream.write((char)0x1A); + stream.flush(); return waitResponse(60000L) == 1; } @@ -512,6 +513,7 @@ public: stream.print(c, HEX); } stream.write((char)0x1A); + stream.flush(); return waitResponse(60000L) == 1; }