Add stream.flush(); here and there

This commit is contained in:
Volodymyr Shymanskyy
2017-09-02 19:26:54 +03:00
parent 9f7559f9f1
commit e37b2a62e4
3 changed files with 5 additions and 1 deletions

View File

@@ -251,6 +251,7 @@ private:
return -1; return -1;
} }
stream.write((uint8_t*)buff, len); stream.write((uint8_t*)buff, len);
stream.flush();
if (waitResponse(GF(GSM_NL "SEND OK" GSM_NL)) != 1) { if (waitResponse(GF(GSM_NL "SEND OK" GSM_NL)) != 1) {
return -1; return -1;
} }

View File

@@ -411,6 +411,7 @@ public:
} }
stream.print(text); stream.print(text);
stream.write((char)0x1A); stream.write((char)0x1A);
stream.flush();
return waitResponse(60000L) == 1; return waitResponse(60000L) == 1;
} }
@@ -466,7 +467,7 @@ private:
} }
stream.write((uint8_t*)buff, len); stream.write((uint8_t*)buff, len);
stream.write((char)0x0D); stream.write((char)0x0D);
stream.flush();
if (waitResponse(30000L, GF(GSM_NL "+TCPSEND:")) != 1) { if (waitResponse(30000L, GF(GSM_NL "+TCPSEND:")) != 1) {
return 0; return 0;
} }

View File

@@ -486,6 +486,7 @@ public:
} }
stream.print(text); stream.print(text);
stream.write((char)0x1A); stream.write((char)0x1A);
stream.flush();
return waitResponse(60000L) == 1; return waitResponse(60000L) == 1;
} }
@@ -512,6 +513,7 @@ public:
stream.print(c, HEX); stream.print(c, HEX);
} }
stream.write((char)0x1A); stream.write((char)0x1A);
stream.flush();
return waitResponse(60000L) == 1; return waitResponse(60000L) == 1;
} }