<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Gateway fails with `!TSF:MSG:SIGN VERIFY FAIL` after period of time]]></title><description><![CDATA[<p dir="auto">Hi there,<br />
Im trying to make gateway &lt;&gt; node communication with signing.<br />
So far so go, but after some period of time gateway starts to discard messages from the node with <code>!TSF:MSG:SIGN VERIFY FAIL</code>, more interesting is that hmac starting to repeat itself even though <code>nonce</code> is different.</p>
<p dir="auto">my gateway is adafruit feather esp-wroom-32<br />
and the node is arduino pro mini.</p>
<p dir="auto">gateway sketch:</p>
<pre><code> /*
 * | IO   | RF24 | RFM69 | RFM95 |
 * |------|------|-------|-------|
 * | MOSI | 18   | 23    | 23    |
 * | MISO | 19   | 19    | 19    |
 * | SCK  | 5    | 18    | 18    |
 * | CSN  | 32   | 5     | 5     |
 * | CE   | 15   | -     | -     |
 * | RST  | -    | 17    | 17    |
 * | IRQ  | 16*  | 16    | 16    |
 * * = optional
 */

#define MY_RADIO_RF24
#define MY_RF24_PA_LEVEL RF24_PA_LOW
#define MY_GATEWAY_SERIAL
//#define MY_GATEWAY_ESP32

#define MY_SIGNING_SOFT
#define MY_SIGNING_REQUEST_SIGNATURES

#define MY_DEBUG
#define MY_DEBUG_VERBOSE
#define MY_DEBUG_VERBOSE_GATEWAY
#define MY_DEBUG_VERBOSE_SIGNING
#define MY_DEBUG_VERBOSE_RF24
#define MY_DEBUG_VERBOSE_TRANSPORT

#define MY_RF24_CE_PIN 15
#define MY_RF24_CS_PIN 32

#include &lt;MySensors.h&gt;

#define DOOR1_ID 1
#define DOOR2_ID 2
#define DOOR1_PIN  34
#define DOOR2_PIN  39
#define LED_PIN  13

// false - closed, true - opened
bool door1State = false;
bool door2State = false;
bool setupDone = false;

MyMessage door1Msg(DOOR1_ID, V_TRIPPED);
MyMessage door2Msg(DOOR2_ID, V_TRIPPED);

void setup() {
  if (!setupDone) {
    Serial.begin(115200);
    Serial.println(F("--------SETUP----------"));
    Serial.print(F("Door 1 [ID,PIN]:"));
    Serial.print("[");
    Serial.print(DOOR1_ID);
    Serial.print(",");
    Serial.print(DOOR1_PIN);
    Serial.println("]");
    Serial.print(F("Door 2 [ID,PIN]:"));
    Serial.print("[");
    Serial.print(DOOR2_ID);
    Serial.print(",");
    Serial.print(DOOR2_PIN);
    Serial.println("]");
    // setup led
    pinMode(LED_PIN, OUTPUT);
    digitalWrite(LED_PIN, LOW);
    // Setup the button
    pinMode(DOOR1_PIN, OUTPUT);
    digitalWrite(DOOR1_PIN, LOW);
    pinMode(DOOR2_PIN, OUTPUT);
    digitalWrite(DOOR2_PIN, LOW);
    Serial.println(F("------END-SETUP--------"));
    setupDone = true;
  }
}

void presentation() {
  Serial.println(F("--------PRESENTATION----------"));
  present(DOOR1_ID, S_DOOR);
  present(DOOR2_ID, S_DOOR);
  Serial.println(F("------END-PRESENTATION--------"));
}

void loop() {
//  wait(3000);
//  toggleDoor(door1State, DOOR1_PIN);
}

void toggleDoor(bool &amp;door, int Pin) {
  Serial.println(F("------TOGGLE-DOOR------"));
  Serial.print(F("----CURRENT-STATE-----"));
  Serial.println(door);
  Serial.print(F("------NEW-STATE-------"));
  Serial.println(!door);
  digitalWrite(Pin, !door);
  door = !door;
  digitalWrite(LED_PIN, HIGH);
  wait(500);
  digitalWrite(LED_PIN, LOW);
  Serial.println(F("----TOGGLE-DOOR-END----"));
}

void setDoor(int Pin, bool state) {
  Serial.println(F("------SET-DOOR------"));
  Serial.print(F("------NEW-STATE-------"));
  Serial.println(state);
  digitalWrite(Pin, state);
  Serial.println(F("----SET-DOOR-END----"));
}

void receive(const MyMessage &amp;message) {
  Serial.println(F("**************************"));
//  Serial.println(message.sensor);
//  Serial.println(message.getBool());
  setDoor(DOOR1_PIN, message.getBool() ? HIGH : LOW);
  setDoor(LED_PIN, message.getBool() ? HIGH : LOW);
  Serial.println(F("**************************"));
}
</code></pre>
<p dir="auto">and logs of course</p>
<pre><code>0;255;3;0;9;753145 RF24:RXM:LEN=32
0;255;3;0;9;753145 RF24:WBR:REG=7,VAL=64
0;255;3;0;9;753152 TSF:MSG:READ,200-200-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
0;255;3;0;9;753158 SGN:SKP:MSG CMD=3,TYPE=16
0;255;3;0;9;753162 SGN:SKP:MSG CMD=3,TYPE=17
0;255;3;0;9;753166 RF24:SPL
0;255;3;0;9;753168 RF24:WBR:REG=0,VAL=14
0;255;3;0;9;753172 RF24:OWP:RCPT=200
0;255;3;0;9;753175 RF24:WBR:REG=10,VAL=200
0;255;3;0;9;753179 RF24:WBR:REG=16,VAL=200
0;255;3;0;9;753183 RF24:TXM:TO=200,LEN=32
0;255;3;0;9;753187 RF24:FTX
0;255;3;0;9;753191 RF24:WBR:REG=7,VAL=112
0;255;3;0;9;753195 RF24:STL
0;255;3;0;9;753198 RF24:WBR:REG=0,VAL=15
0;255;3;0;9;753201 RF24:WBR:REG=10,VAL=0
0;255;3;0;9;753205 TSF:MSG:SEND,0-0-200-200,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:&lt;NONCE&gt;
0;255;3;0;9;753213 SGN:NCE:XMT,TO=0
0;255;3;0;9;753239 RF24:RXM:LEN=32
0;255;3;0;9;753242 RF24:WBR:REG=7,VAL=64
0;255;3;0;9;753246 TSF:MSG:READ,200-200-0,s=1,c=1,t=16,pt=1,l=1,sg=1:0
0;255;3;0;9;753252 SGN:BND:NONCE=D164391B20DC295376C8E09354D434582F0DC30F016A52479BAAAAAAAAAAAAAA
0;255;3;0;9;753261 SGN:BND:HMAC=6CDC43FB161E4E391D390360DB2BEBCCC152ACA11E7CA065DD0B94A959F741DD
0;255;3;0;9;753269 SGN:VER:OK
200;1;1;0;16;0
**************************
------SET-DOOR------
------NEW-STATE-------0
----SET-DOOR-END----
------SET-DOOR------
------NEW-STATE-------0
----SET-DOOR-END----
**************************
0;255;3;0;9;754247 RF24:RXM:LEN=32
0;255;3;0;9;754248 RF24:WBR:REG=7,VAL=64
0;255;3;0;9;754254 TSF:MSG:READ,200-200-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
0;255;3;0;9;754260 SGN:SKP:MSG CMD=3,TYPE=16
0;255;3;0;9;754264 SGN:SKP:MSG CMD=3,TYPE=17
0;255;3;0;9;754268 RF24:SPL
0;255;3;0;9;754271 RF24:WBR:REG=0,VAL=14
0;255;3;0;9;754274 RF24:OWP:RCPT=200
0;255;3;0;9;754278 RF24:WBR:REG=10,VAL=200
0;255;3;0;9;754281 RF24:WBR:REG=16,VAL=200
0;255;3;0;9;754285 RF24:TXM:TO=200,LEN=32
0;255;3;0;9;754289 RF24:FTX
0;255;3;0;9;754294 RF24:WBR:REG=7,VAL=112
0;255;3;0;9;754297 RF24:STL
0;255;3;0;9;754300 RF24:WBR:REG=0,VAL=15
0;255;3;0;9;754303 RF24:WBR:REG=10,VAL=0
0;255;3;0;9;754307 TSF:MSG:SEND,0-0-200-200,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:&lt;NONCE&gt;
0;255;3;0;9;754315 SGN:NCE:XMT,TO=0
0;255;3;0;9;754344 RF24:RXM:LEN=32
0;255;3;0;9;754347 RF24:WBR:REG=7,VAL=64
0;255;3;0;9;754351 TSF:MSG:READ,200-200-0,s=1,c=1,t=16,pt=1,l=1,sg=1:1
0;255;3;0;9;754357 SGN:BND:NONCE=AFE71178BFCBA61E1B4E45069BC27C393FF472DAD9708554B0AAAAAAAAAAAAAA
0;255;3;0;9;754366 SGN:BND:HMAC=80BB77E707A32E538A523D9303A294AAEA9248E4A381DDEA2622C4DFF56FAB2F
0;255;3;0;9;754374 SGN:VER:OK
200;1;1;0;16;1
**************************
------SET-DOOR------
------NEW-STATE-------1
----SET-DOOR-END----
------SET-DOOR------
------NEW-STATE-------1
----SET-DOOR-END----
**************************
0;255;3;0;9;755353 RF24:RXM:LEN=32
0;255;3;0;9;755354 RF24:WBR:REG=7,VAL=64
0;255;3;0;9;755360 TSF:MSG:READ,200-200-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
0;255;3;0;9;755366 SGN:SKP:MSG CMD=3,TYPE=16
0;255;3;0;9;755370 SGN:SKP:MSG CMD=3,TYPE=17
0;255;3;0;9;755374 RF24:SPL
0;255;3;0;9;755377 RF24:WBR:REG=0,VAL=14
0;255;3;0;9;755380 RF24:OWP:RCPT=200
0;255;3;0;9;755384 RF24:WBR:REG=10,VAL=200
0;255;3;0;9;755388 RF24:WBR:REG=16,VAL=200
0;255;3;0;9;755391 RF24:TXM:TO=200,LEN=32
0;255;3;0;9;755395 RF24:FTX
0;255;3;0;9;755400 RF24:WBR:REG=7,VAL=112
0;255;3;0;9;755403 RF24:STL
0;255;3;0;9;755406 RF24:WBR:REG=0,VAL=15
0;255;3;0;9;755410 RF24:WBR:REG=10,VAL=0
0;255;3;0;9;755413 TSF:MSG:SEND,0-0-200-200,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:&lt;NONCE&gt;
0;255;3;0;9;755421 SGN:NCE:XMT,TO=0
0;255;3;0;9;755447 RF24:RXM:LEN=32
0;255;3;0;9;755450 RF24:WBR:REG=7,VAL=64
0;255;3;0;9;755454 TSF:MSG:READ,200-200-0,s=1,c=1,t=16,pt=1,l=1,sg=1:0
0;255;3;0;9;755460 SGN:BND:NONCE=96129CDFD7F5FE1E605EE4417AFEBADAF0DDC811061D3C4BB7AAAAAAAAAAAAAA
0;255;3;0;9;755469 SGN:BND:HMAC=CE92862B63DCFA51BFC5B5DE06EB05D6C6011E635942496E3A0BAE9E308468EF
0;255;3;0;9;755477 !SGN:VER:FAIL
0;255;3;0;9;755480 !TSF:MSG:SIGN VERIFY FAIL
0;255;3;0;9;756453 RF24:RXM:LEN=32
0;255;3;0;9;756457 RF24:WBR:REG=7,VAL=64
0;255;3;0;9;756460 TSF:MSG:READ,200-200-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
0;255;3;0;9;756466 SGN:SKP:MSG CMD=3,TYPE=16
0;255;3;0;9;756470 SGN:SKP:MSG CMD=3,TYPE=17
0;255;3;0;9;756474 RF24:SPL
0;255;3;0;9;756477 RF24:WBR:REG=0,VAL=14
0;255;3;0;9;756481 RF24:OWP:RCPT=200
0;255;3;0;9;756484 RF24:WBR:REG=10,VAL=200
0;255;3;0;9;756488 RF24:WBR:REG=16,VAL=200
0;255;3;0;9;756492 RF24:TXM:TO=200,LEN=32
0;255;3;0;9;756495 RF24:FTX
0;255;3;0;9;756500 RF24:WBR:REG=7,VAL=112
0;255;3;0;9;756504 RF24:STL
0;255;3;0;9;756506 RF24:WBR:REG=0,VAL=15
0;255;3;0;9;756510 RF24:WBR:REG=10,VAL=0
0;255;3;0;9;756513 TSF:MSG:SEND,0-0-200-200,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:&lt;NONCE&gt;
0;255;3;0;9;756522 SGN:NCE:XMT,TO=0
0;255;3;0;9;756547 RF24:RXM:LEN=32
0;255;3;0;9;756550 RF24:WBR:REG=7,VAL=64
0;255;3;0;9;756554 TSF:MSG:READ,200-200-0,s=1,c=1,t=16,pt=1,l=1,sg=1:1
0;255;3;0;9;756560 SGN:BND:NONCE=467C892D4751208A64E62071FBC3B95D033601292DBAF6820EAAAAAAAAAAAAAA
0;255;3;0;9;756569 SGN:BND:HMAC=0192862B63DCFA51BFC5B5DE06EB05D6C6011E635942496E3A0BAE9E308468EF
0;255;3;0;9;756577 !SGN:VER:FAIL
0;255;3;0;9;756580 !TSF:MSG:SIGN VERIFY FAIL
0;255;3;0;9;757555 RF24:RXM:LEN=32
0;255;3;0;9;757559 RF24:WBR:REG=7,VAL=64
0;255;3;0;9;757562 TSF:MSG:READ,200-200-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
0;255;3;0;9;757568 SGN:SKP:MSG CMD=3,TYPE=16
0;255;3;0;9;757572 SGN:SKP:MSG CMD=3,TYPE=17
0;255;3;0;9;757576 RF24:SPL
0;255;3;0;9;757579 RF24:WBR:REG=0,VAL=14
0;255;3;0;9;757583 RF24:OWP:RCPT=200
0;255;3;0;9;757586 RF24:WBR:REG=10,VAL=200
0;255;3;0;9;757590 RF24:WBR:REG=16,VAL=200
0;255;3;0;9;757594 RF24:TXM:TO=200,LEN=32
0;255;3;0;9;757597 RF24:FTX
0;255;3;0;9;757602 RF24:WBR:REG=7,VAL=112
0;255;3;0;9;757606 RF24:STL
0;255;3;0;9;757608 RF24:WBR:REG=0,VAL=15
0;255;3;0;9;757612 RF24:WBR:REG=10,VAL=0
0;255;3;0;9;757615 TSF:MSG:SEND,0-0-200-200,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:&lt;NONCE&gt;
0;255;3;0;9;757624 SGN:NCE:XMT,TO=0
0;255;3;0;9;757649 RF24:RXM:LEN=32
0;255;3;0;9;757652 RF24:WBR:REG=7,VAL=64
0;255;3;0;9;757656 TSF:MSG:READ,200-200-0,s=1,c=1,t=16,pt=1,l=1,sg=1:0
0;255;3;0;9;757662 SGN:BND:NONCE=14448FC426B549E2C9599037C968D800DF1A3B8431A4ABEE41AAAAAAAAAAAAAA
0;255;3;0;9;757671 SGN:BND:HMAC=0192862B63DCFA51BFC5B5DE06EB05D6C6011E635942496E3A0BAE9E308468EF
0;255;3;0;9;757679 !SGN:VER:FAIL
0;255;3;0;9;757682 !TSF:MSG:SIGN VERIFY FAIL
0;255;3;0;9;758657 RF24:RXM:LEN=32
0;255;3;0;9;758661 RF24:WBR:REG=7,VAL=64
0;255;3;0;9;758664 TSF:MSG:READ,200-200-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
0;255;3;0;9;758670 SGN:SKP:MSG CMD=3,TYPE=16
0;255;3;0;9;758674 SGN:SKP:MSG CMD=3,TYPE=17
0;255;3;0;9;758678 RF24:SPL
0;255;3;0;9;758681 RF24:WBR:REG=0,VAL=14
0;255;3;0;9;758685 RF24:OWP:RCPT=200
0;255;3;0;9;758688 RF24:WBR:REG=10,VAL=200
0;255;3;0;9;758692 RF24:WBR:REG=16,VAL=200
0;255;3;0;9;758696 RF24:TXM:TO=200,LEN=32
0;255;3;0;9;758699 RF24:FTX
0;255;3;0;9;758704 RF24:WBR:REG=7,VAL=112
0;255;3;0;9;758708 RF24:STL
0;255;3;0;9;758710 RF24:WBR:REG=0,VAL=15
0;255;3;0;9;758714 RF24:WBR:REG=10,VAL=0
0;255;3;0;9;758717 TSF:MSG:SEND,0-0-200-200,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:&lt;NONCE&gt;
0;255;3;0;9;758726 SGN:NCE:XMT,TO=0
0;255;3;0;9;758751 RF24:RXM:LEN=32
0;255;3;0;9;758754 RF24:WBR:REG=7,VAL=64
0;255;3;0;9;758758 TSF:MSG:READ,200-200-0,s=1,c=1,t=16,pt=1,l=1,sg=1:1
0;255;3;0;9;758764 SGN:BND:NONCE=7A7528C48A41B48167A5085B0850F83B2274F9CB12CCD1E254AAAAAAAAAAAAAA
0;255;3;0;9;758773 SGN:BND:HMAC=0192862B63DCFA51BFC5B5DE06EB05D6C6011E635942496E3A0BAE9E308468EF
</code></pre>
]]></description><link>https://forum.mysensors.org/topic/11861/gateway-fails-with-tsf-msg-sign-verify-fail-after-period-of-time</link><generator>RSS for Node</generator><lastBuildDate>Wed, 18 Nov 2026 18:00:37 GMT</lastBuildDate><atom:link href="https://forum.mysensors.org/topic/11861.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 17 Dec 2021 16:04:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Gateway fails with `!TSF:MSG:SIGN VERIFY FAIL` after period of time on Wed, 22 Dec 2021 15:52:35 GMT]]></title><description><![CDATA[<p dir="auto">another update:<br />
another (same) board found, and tested... problem persists.<br />
"Verify fail" starts between 670 and 690 message received ...<br />
it looks like something get full and nonce is not included in hmac generation.</p>
]]></description><link>https://forum.mysensors.org/post/111370</link><guid isPermaLink="true">https://forum.mysensors.org/post/111370</guid><dc:creator><![CDATA[Elin Angelow]]></dc:creator><pubDate>Wed, 22 Dec 2021 15:52:35 GMT</pubDate></item><item><title><![CDATA[Reply to Gateway fails with `!TSF:MSG:SIGN VERIFY FAIL` after period of time on Tue, 21 Dec 2021 13:03:58 GMT]]></title><description><![CDATA[<p dir="auto">Another clue is that it stops generating correct hmac after request 686</p>
]]></description><link>https://forum.mysensors.org/post/111359</link><guid isPermaLink="true">https://forum.mysensors.org/post/111359</guid><dc:creator><![CDATA[Elin Angelow]]></dc:creator><pubDate>Tue, 21 Dec 2021 13:03:58 GMT</pubDate></item></channel></rss>