Do need to stop Bee
This commit is contained in:
@@ -105,19 +105,20 @@ public:
|
|||||||
// This is a hack to shut the socket by setting the timeout to zero and
|
// This is a hack to shut the socket by setting the timeout to zero and
|
||||||
// then sending an empty line to the server.
|
// then sending an empty line to the server.
|
||||||
virtual void stop() {
|
virtual void stop() {
|
||||||
// at->streamClear(); // Empty anything in the buffer
|
at->streamClear(); // Empty anything in the buffer
|
||||||
// at->commandMode();
|
at->commandMode();
|
||||||
// at->sendAT(GF("TM0")); // Set socket timeout to 0;
|
at->sendAT(GF("TM0")); // Set socket timeout to 0;
|
||||||
// at->waitResponse();
|
// Per documentation: If you change the TM value while in Transparent Mode,
|
||||||
// at->writeChanges();
|
// the current connection is immediately closed.
|
||||||
// at->exitCommand();
|
// NOTE: Above applies to all cellular models, uncertain if it applies
|
||||||
// at->streamWrite("");
|
// to the WiFi models.
|
||||||
// at->commandMode();
|
at->waitResponse();
|
||||||
// at->sendAT(GF("TM64")); // Set socket timeout back to 10 seconds;
|
at->writeChanges();
|
||||||
// at->waitResponse();
|
at->sendAT(GF("TM64")); // Set socket timeout back to 10 seconds;
|
||||||
// at->writeChanges();
|
at->waitResponse();
|
||||||
// at->exitCommand();
|
at->writeChanges();
|
||||||
// at->streamClear(); // Empty anything remaining in the buffer
|
at->exitCommand();
|
||||||
|
at->streamClear(); // Empty anything remaining in the buffer
|
||||||
sock_connected = false;
|
sock_connected = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user