Add stream.flush(); here and there
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
@@ -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;
|
||||||
}
|
}
|
||||||
|
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user