diff --git a/library.json b/library.json index e7681df..1edc8d9 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "type": "git", "url": "https://github.com/sblantipodi/arduino_bootstrapper.git" }, - "version": "1.18.0", + "version": "1.18.1", "examples": "examples/*.cpp", "exclude": "tests", "frameworks": "arduino", diff --git a/library.properties b/library.properties index 16af547..86d8dee 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Bootstrapper -version=1.18.0 +version=1.18.1 author=Davide Perini <perini.davide@dpsoftware.org> maintainer=Davide Perini <perini.davide@dpsoftware.org> sentence=A client library for MQTT messaging. diff --git a/src/WifiManager.cpp b/src/WifiManager.cpp index bf320f8..de1b8ae 100644 --- a/src/WifiManager.cpp +++ b/src/WifiManager.cpp @@ -596,6 +596,7 @@ void WifiManager::sendImprovStateResponse(uint8_t state, bool error) { out[10] = checksum; Serial.write((uint8_t *) out, 11); Serial.write('\n'); + Serial.flush(); } void WifiManager::sendImprovRPCResponse(byte commandId) { @@ -626,6 +627,7 @@ void WifiManager::sendImprovRPCResponse(byte commandId, bool forceConnection) { out[packetLen - 1] = checksum; Serial.write((uint8_t *) out, packetLen); Serial.write('\n'); + Serial.flush(); improvActive = 1; //no longer provisioning } @@ -670,6 +672,7 @@ void WifiManager::sendImprovInfoResponse() { out[packetLen - 1] = checksum; Serial.write((uint8_t *) out, packetLen); Serial.write('\n'); + Serial.flush(); DIMPROV_PRINT("Info checksum"); DIMPROV_PRINTLN(checksum); }