From 3c4ebbe310264ed1cf00a96ecd88c323e501f8e9 Mon Sep 17 00:00:00 2001 From: Patrick Fallberg Date: Tue, 27 Oct 2015 18:53:33 +0100 Subject: [PATCH] Fixed bug in nonce exchange Nonce-state machine got locked in SIGN_OK state. --- libraries/MySensors/core/MyTransport.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/MySensors/core/MyTransport.cpp b/libraries/MySensors/core/MyTransport.cpp index 84f11c7..77a86bc 100644 --- a/libraries/MySensors/core/MyTransport.cpp +++ b/libraries/MySensors/core/MyTransport.cpp @@ -24,7 +24,7 @@ bool _autoFindParent; uint8_t _failedTransmissions; #ifdef MY_SIGNING_FEATURE - bool _signingNonceStatus; + uint8_t _signingNonceStatus; #endif #ifdef MY_OTA_FIRMWARE_FEATURE @@ -390,6 +390,7 @@ boolean transportSendRoute(MyMessage &message) { type != I_ID_REQUEST && type != I_ID_RESPONSE && type != I_FIND_PARENT && type != I_FIND_PARENT_RESPONSE))) { // Send nonce-request + _signingNonceStatus=SIGN_WAITING_FOR_NONCE; if (!_sendRoute(build(_msgTmp, _nc.nodeId, message.destination, message.sensor, C_INTERNAL, I_GET_NONCE, false).set(""))) { debug(PSTR("nonce tr err\n")); return false;