Browse Source

Add stream.flush(); here and there

v_master
Volodymyr Shymanskyy 7 years ago
parent
commit
e37b2a62e4
3 changed files with 5 additions and 1 deletions
  1. +1
    -0
      TinyGsmClientESP8266.h
  2. +2
    -1
      TinyGsmClientM590.h
  3. +2
    -0
      TinyGsmClientSIM800.h

+ 1
- 0
TinyGsmClientESP8266.h 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;
} }


+ 2
- 1
TinyGsmClientM590.h 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;
} }


+ 2
- 0
TinyGsmClientSIM800.h 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;
} }


Loading…
Cancel
Save