Whitelist not wirking from sensor to gateway



  • Hello,
    I am trying to set up a gateway-sensor setup. The sensor is based on the following; when the temperature (which is attached to arduino port 3) is reaching a certain point, the relay (port d4) should activate. All this is managed by a controller.
    The issue is, that I am trying to use whitelisting. I am able to accomplish everything without whitelisting. I added the serial of the gateway in the node-code (which has the temp dht11 and relay attached to it). And to the W5100 I added the serial of the sensor-node in the whitelist.
    The issuer is, that it seems that the gateway is receiving proper signing from the sensor-node, but when sending a command from the controller to the sensor-node (to activate the relay), it looks like the gateway is getting a SIGNING FAILED message. I don’t understand why; I added the gateway serial to the sensor-node (so it should accept commands from the gateway), but it still fails.
    This is the sensor-node code for whitelist:

    #define MY_NODE_ID 1
    
    
    // #define MY_SIGNING_SOFT
    // #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7
    // #define MY_SIGNING_REQUEST_SIGNATURES
    // #define MY_SIGNING_NODE_WHITELISTING {{.nodeId = 1,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}},{.nodeId = 2,.serial = {0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09}}}
    
    
    // Select soft/hardware signing method
    #define MY_SIGNING_SOFT //!< Software signing
    //#define MY_SIGNING_ATSHA204 //!< Hardware signing using ATSHA204A
    
    // Enable node whitelisting
    #define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0xA0,0xB1,0x71,0xFA,0xC5,0x62,0x96,0xF1,0xD9}}} // for gateway
    
    //#define MY_SIGNING_NODE_WHITELISTING {{{.nodeId = GATEWAY_ADDRESS,.serial = {0x4E,0xD3,0xAD,0x93,0xC6,0xF2,0xC6,0xF3,0x25}},{.nodeId = 2,.serial = {0xDC,0x1E,0x7F,0x20,0x62,0x2F,0xD3,0x04,0x29}}}
    
    // Enable this if you want destination node to sign all messages sent to this node.
    #define MY_SIGNING_REQUEST_SIGNATURES
    
    
    // SETTINGS FOR MY_SIGNING_SOFT
    #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7 //!< Unconnected analog pin for random seed
    
    // SETTINGS FOR MY_SIGNING_ATSHA204
    //#define MY_SIGNING_ATSHA204_PIN 17 //!< A3 - pin where ATSHA204 is attached
    

    And here is the code at the gateway:

    #define MY_NODE_ID 0
    
    // #define MY_SIGNING_SOFT
    // #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7
    // #define MY_SIGNING_REQUEST_SIGNATURES
    // #define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}},{.nodeId = 2,.serial = {0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09}}}
    
    
    
    // Select soft/hardware signing method
    #define MY_SIGNING_SOFT //!< Software signing
    //#define MY_SIGNING_ATSHA204 //!< Hardware signing using ATSHA204A
    
    // Enable node whitelisting
    #define MY_SIGNING_NODE_WHITELISTING {{.nodeId = 1,.serial = {0xB0,0x23,0xE6,0x8E,0x74,0x14,0x78,0x3B,0x3F}}} // for temp sensor DCC-arduino
    
    //#define MY_SIGNING_NODE_WHITELISTING {{.nodeId = 0,.serial = {0x4E,0xD3,0xAD,0x93,0xC6,0xF2,0xC6,0xF3,0x25}},{.nodeId = 1,.serial = {0xDC,0x1E,0x7F,0x20,0x62,0x2F,0xD3,0x04,0x29}}}
    
    //7C6389F07EF41C360A764100B8F18F45D6274116F3C287907087BBCD92E55DB5
    
    
    // Enable this if you want destination node to sign all messages sent to this node.
    #define MY_SIGNING_REQUEST_SIGNATURES
    
    
    // SETTINGS FOR MY_SIGNING_SOFT
    #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7 //!< Unconnected analog pin for random seed
    

    Here is the code at MyConfig.h:

    /**********************************
    *  Message Signing Settings
    ***********************************/
    /**
     * @def MY_SIGNING_ATSHA204
     * @brief Enables HW backed signing functionality in library.
     *
     * For any signing related functionality to be included, this define or @ref MY_SIGNING_SOFT has to be enabled.
     */
    //#define MY_SIGNING_ATSHA204
    
    /**
     * @def MY_SIGNING_SOFT
     * @brief Enables SW backed signing functionality in library.
     *
     * For any signing related functionality to be included, this define or @ref MY_SIGNING_ATSHA204 has to be enabled.
     */
    #define MY_SIGNING_SOFT
    
    /**
     * @def MY_SIGNING_REQUEST_SIGNATURES
     * @brief Enable this to inform gateway to sign all messages sent to this node.
     *
     * If used for a gateway, gateway will only request signatures from nodes that in turn
     * request signatures from gateway.
     */
    #define MY_SIGNING_REQUEST_SIGNATURES
    
    /**
     * @def MY_SIGNING_GW_REQUEST_SIGNATURES_FROM_ALL
     * @brief Enable this to have gateway require all nodes in the network to sign messages sent to it. @ref MY_SIGNING_REQUEST_SIGNATURES must also be set.
     *
     * Use this for maximum security, but be aware that every single node will have to be personalized before they can be used.
     * Note that if this is enabled, and whitelisting is also enabled, whitelisting will also be in effect for all nodes.
     */
    #define MY_SIGNING_GW_REQUEST_SIGNATURES_FROM_ALL
    
    /**
     * @def MY_VERIFICATION_TIMEOUT_MS
     * @brief Define a suitable timeout for a signature verification session
     *
     * Consider the turnaround from a nonce being generated to a signed message being received
     * which might vary, especially in networks with many hops. 5s ought to be enough for anyone.
     */
    #ifndef MY_VERIFICATION_TIMEOUT_MS
    #define MY_VERIFICATION_TIMEOUT_MS 5000
    #endif
    
    /**
     * @def MY_SIGNING_NODE_WHITELISTING
     * @brief Enable to turn on whitelisting
     *
     * When enabled, a signing node will salt the signature with it's unique signature and nodeId.<br>
     * The verifying node will look up the sender in a local table of trusted nodes and
     * do the corresponding salting in order to verify the signature.<br>
     * For this reason, if whitelisting is enabled on one of the nodes in a sign-verify pair, both
     * nodes have to implement whitelisting for this to work.<br>
     * Note that a node can still transmit a non-salted message (i.e. have whitelisting disabled)
     * to a node that has whitelisting enabled (assuming the receiver does not have a matching entry
     * for the sender in it's whitelist). The whitelist to use is defined as the value of the flag.
     */
    //#define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}}}
    #define MY_SIGNING_NODE_WHITELISTING {{.nodeId = 0,.serial = {0x4E,0xD3,0xAD,0x93,0xC6,0xF2,0xC6,0xF3,0x25}},{.nodeId = 2,.serial = {0xDC,0x1E,0x7F,0x20,0x62,0x2F,0xD3,0x04,0x29}}}
    
    
    /**
     * @def MY_SIGNING_ATSHA204_PIN
     * @brief Atsha204 default pin setting
     *
     * Pin where ATSHA204 is attached
     */
    #ifndef MY_SIGNING_ATSHA204_PIN
    #define MY_SIGNING_ATSHA204_PIN 17
    #endif
    
    /**
     * @def MY_SIGNING_SOFT_RANDOMSEED_PIN
     * @brief Pin used for random generation in soft signing
     *
     * Do not connect anything to this when soft signing is enabled
     */
    #ifndef MY_SIGNING_SOFT_RANDOMSEED_PIN
    #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7
    #endif
    

    Just by the way, I did use the same soft HMAC key when generating the serials for gateway and sensor.
    Please let me know. Thank you all!
    Output of debug gateway:

    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGAS-,VER=2.1.1
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;MCO:REG:NOT NEEDED
    IP: 192.168.0.249
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:PINGED,ID=1,HP=1
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0103
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0103
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=16,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=0,ft=0,st=OK:CDBB80B75188E97C55019080B5DBC7B88E56C99B1F9DEE5637
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=0,t=17,pt=0,l=5,sg=1:2.1.1
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:389E3C0D6BC371BC3FC6306D86F6AD770D710692432EEFF172
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=6,pt=1,l=1,sg=1:0
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:2B05EA69845A4099778574B94125A5464F30707E44C3B73753
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=11,pt=0,l=14,sg=1:Relay & Button
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:126653A761529A780711A7D6248C373A7E47D268A1C97AB3A9
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=12,pt=0,l=3,sg=1:1.0
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=5,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:6417C73230C80E12FD0CD54F9E7711E53E755884D51FF1E570
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=5,c=0,t=3,pt=0,l=0,sg=1:
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:74DFCAA97CD3310E6FD38B5F9F6CA9A02EAE9B5CB0B1A2460E
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=11,pt=0,l=22,sg=1:TemperatureAndHumidity
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:46F02801A65114F751195785F8F9F745595F8AD87280F5FE53
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=12,pt=0,l=3,sg=1:1.1
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=0,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:352C2B939E76A8E8E29E3B7BF3A1241103A0CC58BE4B419927
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=0,c=0,t=7,pt=0,l=0,sg=1:
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:432E9E2657025B581CBE5BE2E3CE640A011B913FAEA14CF46C
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=1,c=0,t=6,pt=0,l=0,sg=1:
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=26,pt=1,l=1,sg=1:2
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK:
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=17,pt=6,l=25,sg=0:CC21BFDF07D45E8E37774543D43D3C7DDC651C9AC1EC4C9A1F
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=27,pt=1,l=1,sg=1,ft=0,st=OK:1
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:BD94EB12AAE16A17BDCE22A888E91A3AC43143ABD2409C17CF
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=1,c=1,t=0,pt=7,l=5,sg=1:22.0
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=0,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:E3DD12079E4659DE001223D557048F89E311A6F0602C1979EF
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=0,c=1,t=1,pt=7,l=5,sg=1:45.0
    0;255;3;0;9;Eth: connect
    0;255;3;0;9;Eth: 0;0;3;0;2;
    0;255;3;0;9;Eth: 0;0;3;0;2;Get Version
    0;255;3;0;9;Eth: 0;0;3;0;18;PING
    0;255;3;0;9;Eth: 1;5;1;1;2;0
    0;255;3;0;9;!TSF:MSG:SEND,0-0-1-1,s=5,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=NACK:
    0;255;3;0;9;!TSF:MSG:SIGN FAIL
    0;255;3;0;9;Eth: 1;5;1;1;2;0
    0;255;3;0;9;!TSF:MSG:SEND,0-0-1-1,s=5,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=NACK:
    0;255;3;0;9;!TSF:MSG:SIGN FAIL
    0;255;3;0;9;Eth: 0;0;3;0;18;PING
    

    Output of debug sensor-node:

    0 MCO:BGN:INIT NODE,CP=RNNNAS-,VER=2.1.1
    41 MCO:BGN:BFR
    58 TSM:INIT
    70 TSF:WUR:MS=0
    93 TSM:INIT:TSP OK
    112 TSM:INIT:STATID=1
    136 TSF:SID:OK,ID=1
    156 TSM:FPAR
    205 TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    458 TSF:MSG:READ,0-0-1,s=255,c=3,t=8,pt=1,l=1,sg=1:0
    514 TSF:MSG:FPAR OK,ID=0,D=1
    2278 TSM:FPAR:OK
    2295 TSM:ID
    2308 TSM:ID:OK
    2324 TSM:UPL
    2339 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
    4411 TSM:UPL
    4426 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
    4757 TSF:MSG:READ,0-0-1,s=255,c=3,t=25,pt=1,l=1,sg=0:1
    4814 TSF:MSG:PONG RECV,HP=1
    4844 TSM:UPL:OK
    4860 TSM:READY:ID=1,PAR=0,DIS=1
    4895 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0103
    4970 TSF:MSG:READ,0-0-1,s=255,c=3,t=15,pt=6,l=2,sg=0:0103
    5032 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK:
    5127 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=0:CDBB80B75188E97C55019080B5DBC7B88E56C99B1F9DEE5637
    5329 TSF:MSG:SEND,1-1-0-0,s=255,c=0,t=17,pt=0,l=5,sg=1,ft=0,st=OK:2.1.1
    5407 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    5569 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:389E3C0D6BC371BC3FC6306D86F6AD770D710692432EEFF172
    5772 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=6,pt=1,l=1,sg=1,ft=0,st=OK:0
    7843 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    7923 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:2B05EA69845A4099778574B94125A5464F30707E44C3B73753
    8126 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=11,pt=0,l=14,sg=1,ft=0,st=OK:Relay & Button
    8214 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    8377 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:126653A761529A780711A7D6248C373A7E47D268A1C97AB3A9
    8580 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=12,pt=0,l=3,sg=1,ft=0,st=OK:1.0
    8654 TSF:MSG:SEND,1-1-0-0,s=5,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    8815 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:6417C73230C80E12FD0CD54F9E7711E53E755884D51FF1E570
    9018 TSF:MSG:SEND,1-1-0-0,s=5,c=0,t=3,pt=0,l=0,sg=1,ft=0,st=OK:
    9088 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    9249 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:74DFCAA97CD3310E6FD38B5F9F6CA9A02EAE9B5CB0B1A2460E
    9452 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=11,pt=0,l=22,sg=1,ft=0,st=OK:TemperatureAndHumidity
    9548 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    9711 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:46F02801A65114F751195785F8F9F745595F8AD87280F5FE53
    9913 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=12,pt=0,l=3,sg=1,ft=0,st=OK:1.1
    9989 TSF:MSG:SEND,1-1-0-0,s=0,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    10149 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:352C2B939E76A8E8E29E3B7BF3A1241103A0CC58BE4B419927
    10353 TSF:MSG:SEND,1-1-0-0,s=0,c=0,t=7,pt=0,l=0,sg=1,ft=0,st=OK:
    10423 TSF:MSG:SEND,1-1-0-0,s=1,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    10583 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:432E9E2657025B581CBE5BE2E3CE640A011B913FAEA14CF46C
    10786 TSF:MSG:SEND,1-1-0-0,s=1,c=0,t=6,pt=0,l=0,sg=1,ft=0,st=OK:
    10854 MCO:REG:REQ
    10875 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=26,pt=1,l=1,sg=1,ft=0,st=OK:2
    11003 TSF:MSG:READ,0-0-1,s=255,c=3,t=16,pt=0,l=0,sg=0:
    11077 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=17,pt=6,l=25,sg=0,ft=0,st=OK:CC21BFDF07D45E8E37774543D43D3C7DDC651C9AC1EC4C9A1F
    11291 TSF:MSG:READ,0-0-1,s=255,c=3,t=27,pt=1,l=1,sg=1:1
    11440 MCO:PIM:NODE REG=1
    11466 MCO:BGN:STP
    11486 MCO:SLP:MS=1000,SMS=0,I1=255,M1=255,I2=255,M2=255
    11544 MCO:SLP:TPD
    11564 MCO:SLP:WUP=-1
    11585 MCO:BGN:INIT OK,TSP=1
    11639 TSF:MSG:SEND,1-1-0-0,s=1,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    11717 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:BD94EB12AAE16A17BDCE22A888E91A3AC43143ABD2409C17CF
    11921 TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=0,pt=7,l=5,sg=1,ft=0,st=OK:22.0
    T: 22.00
    11996 TSF:MSG:SEND,1-1-0-0,s=0,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    12155 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:E3DD12079E4659DE001223D557048F89E311A6F0602C1979EF
    12358 TSF:MSG:SEND,1-1-0-0,s=0,c=1,t=1,pt=7,l=5,sg=1,ft=0,st=OK:45.0
    H: 45.00
    12431 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
    12500 MCO:SLP:TPD
    12519 MCO:SLP:WUP=-1
    12563 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
    12622 MCO:SLP:TPD
    12642 MCO:SLP:WUP=-1
    12686 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
    12745 MCO:SLP:TPD
    

    Thanks for your help!!


  • Contest Winner

    @karelsmits
    Hi,
    could you please provide the logs with verbose signing debug enabled.
    Also, have you validated with the security personalizer that you have the correct serial in the whitelists on both node and gateway?



  • Below is the settings I used with the SecurityPersonalizer.ino, I do notice now (with the verbose signing enabled, that the HMAC key does not match, even though you could see from the serial output that I used the same to generate the serials for the gateway and node:

    =====================================gateway:
    
    Personalization sketch for MySensors usage.
    -------------------------------------------
    Using this user supplied soft HMAC key:
    #define MY_SOFT_HMAC_KEY 0x75,0x58,0x79,0x5B,0x8A,0x17,0xFC,0x7B,0x6E,0x53,0x8E,0x30,0xD5,0x14,0xDD,0x7C,0x86,0x3F,0x8E,0x33,0xA1,0x54,0xE5,0x09,0xD9,0x4C,0x49,0xDE,0xEF,0xE6,0xEA,0x23
    This value will be stored in EEPROM as soft serial:
    #define MY_SOFT_SERIAL 0xA0,0xB1,0x71,0xFA,0xC5,0x62,0x96,0xF1,0xD9
    Using this user supplied AES key:
    #define MY_AES_KEY 0xC5,0x87,0x79,0x06,0xE9,0x3C,0x0B,0x91,0x3C,0xD6,0xB6,0x05,0x64,0xD5,0xE9,0x18
    EEPROM configuration:
    SOFT_HMAC_KEY | 7558795B8A17FC7B6E538E30D514DD7C863F8E33A154E509D94C49DEEFE6EA23
    SOFT_SERIAL   | A0B171FAC56296F1D9
    AES_KEY       | C5877906E93C0B913CD6B60564D5E918
    --------------------------------
    Personalization is now complete.
    
    Sensor node:
    Personalization sketch for MySensors usage.
    -------------------------------------------
    Using this user supplied soft HMAC key:
    #define MY_SOFT_HMAC_KEY 0x75,0x58,0x79,0x5B,0x8A,0x17,0xFC,0x7B,0x6E,0x53,0x8E,0x30,0xD5,0x14,0xDD,0x7C,0x86,0x3F,0x8E,0x33,0xA1,0x54,0xE5,0x09,0xD9,0x4C,0x49,0xDE,0xEF,0xE6,0xEA,0x23
    This value will be stored in EEPROM as soft serial:
    #define MY_SOFT_SERIAL 0xB0,0x23,0xE6,0x8E,0x74,0x14,0x78,0x3B,0x3F
    Using this user supplied AES key:
    #define MY_AES_KEY 0xC5,0x87,0x79,0x06,0xE9,0x3C,0x0B,0x91,0x3C,0xD6,0xB6,0x05,0x64,0xD5,0xE9,0x18
    EEPROM configuration:
    SOFT_HMAC_KEY | 7558795B8A17FC7B6E538E30D514DD7C863F8E33A154E509D94C49DEEFE6EA23
    SOFT_SERIAL   | B023E68E7414783B3F
    AES_KEY       | C5877906E93C0B913CD6B60564D5E918
    --------------------------------
    Personalization is now complete.
    

    Where did I go wrong, or what else is wrong. Thanks!
    Debug is below:

    Gateway:
    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGAS-,VER=2.1.1
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;MCO:REG:NOT NEEDED
    IP: 192.168.0.249
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: A32644FAF9873B1928DBA958C28ADD65EE6124BEF279A13C5100000000000000
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:A32644FAF9873B1928DBA958C28ADD65EE6124BEF279A13C51
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=11,pt=0,l=22,sg=1:TemperatureAndHumidity
    0;255;3;0;9;Signature in message: 01CD1C
    0;255;3;0;9;Message to process: 0100B6030BFF54656D7065726174757265416E6448756D6964697479
    0;255;3;0;9;Current nonce: A32644FAF9873B1928DBA958C28ADD65EE6124BEF279A13C51AAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: 7706426564FE57CAAEA11A8ADAA14F183087ED555F3711464D771AB3ED3C9323
    0;255;3;0;9;SHA256: 27CD1C4A537AC7DACC8BF91594D4EDAF962393C2B1C99C95075170F64406BAAD
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: 299EFBD3E478F83AB907954202484FDDD517F42B82EDFBCF15AAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:299EFBD3E478F83AB907954202484FDDD517F42B82EDFBCF15
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=12,pt=0,l=3,sg=1:1.1
    0;255;3;0;9;Signature in message: 01CB19527B5B728708B43AAEC818FD91968808B34DDF
    0;255;3;0;9;Message to process: 01001E030CFF312E31
    0;255;3;0;9;Current nonce: 299EFBD3E478F83AB907954202484FDDD517F42B82EDFBCF15AAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: 3FE658AEDD29C670BEBC1BD7C0648103DA1E9A7B434252637589AD85C101D684
    0;255;3;0;9;SHA256: BACB19527B5B728708B43AAEC818FD91968808B34DDF6D7EC38027CD740A8F90
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=0,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: 1D86F9BA8F4A57E7F735C9C90B92BB007DD1B21759FBA5A1D4AAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:1D86F9BA8F4A57E7F735C9C90B92BB007DD1B21759FBA5A1D4
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=0,c=0,t=7,pt=0,l=0,sg=1:
    0;255;3;0;9;Signature in message: 016ADFB67F2E7AA29A62758B8DED6BA4445DCD50E5D43A6BB1
    0;255;3;0;9;Message to process: 010006000700
    0;255;3;0;9;Current nonce: 1D86F9BA8F4A57E7F735C9C90B92BB007DD1B21759FBA5A1D4AAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: 1D3F2387700161E5E7F91D8884A35050DDEA6031BBD394E9BB6380768B45B4E2
    0;255;3;0;9;SHA256: D86ADFB67F2E7AA29A62758B8DED6BA4445DCD50E5D43A6BB132A4EEB6DDDFFC
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: 2FA7278301DF11A478579ED0052E1E3F5374F4797D16E909A1AAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:2FA7278301DF11A478579ED0052E1E3F5374F4797D16E909A1
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=1,c=0,t=6,pt=0,l=0,sg=1:
    0;255;3;0;9;Signature in message: 0137133BA006F1055A77CC818F6DEA8794BE062951DDA8E4B1
    0;255;3;0;9;Message to process: 010006000601
    0;255;3;0;9;Current nonce: 2FA7278301DF11A478579ED0052E1E3F5374F4797D16E909A1AAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: 4A37BA5E250329F7A25933F5FEB0942B23C0A8F541EF32420EFDD60C6348722D
    0;255;3;0;9;SHA256: C437133BA006F1055A77CC818F6DEA8794BE062951DDA8E4B137CFE94EDDE9CD
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=26,pt=1,l=1,sg=1:2
    0;255;3;0;9;Skipping security for command 3 type 26
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK:
    0;255;3;0;9;Nonce requested from 1. Waiting...
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=17,pt=6,l=25,sg=0:C944AFD1C5122A0BFE35688614CE0AEC5014EF342809631212
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;Nonce received from 1.
    0;255;3;0;9;Proceeding with signing...
    0;255;3;0;9;Message to process: 00010E231BFF01
    0;255;3;0;9;Current nonce: C944AFD1C5122A0BFE35688614CE0AEC5014EF342809631212AAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: 00AAE164745F6ED4DF7763E03AC018F1770139E16D50432E4933BE2A8A477898
    0;255;3;0;9;SHA256: 6DD0A65CCEB888592ABC7B700BA3D37430963FD260F1A84C7D28E17C19E550AF
    0;255;3;0;9;Signature in message: 01D0A65CCEB888592ABC7B700BA3D37430963FD260F1A84C
    0;255;3;0;9;Message signed
    0;255;3;0;9;Message to send has been signed
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=27,pt=1,l=1,sg=1,ft=0,st=OK:1
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: 861F99C1366BA4A1C01A03015C6A3F0C03C692E4FDAE490429AAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:861F99C1366BA4A1C01A03015C6A3F0C03C692E4FDAE490429
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=1,c=1,t=0,pt=7,l=5,sg=1:21.0
    0;255;3;0;9;Signature in message: 011538815F551510B343CAF23DD479E8DB58C001
    0;255;3;0;9;Message to process: 01002EE100010000A84101
    0;255;3;0;9;Current nonce: 861F99C1366BA4A1C01A03015C6A3F0C03C692E4FDAE490429AAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: A65541EEBA5E51C9D168F50B1AED7958B48645AD3D9CD0BD8A21D9B3544FDBE7
    0;255;3;0;9;SHA256: 64FBD77F2F2EB9AD031A619E29808059B5DAF9A2A214E4BB0AC2661C80801FF5
    0;255;3;0;9;Signature bad: 01FBD77F2F2EB9AD031A619E29808059B5DAF9A2
    0;255;3;0;9;Signature verification failed!
    0;255;3;0;9;!TSF:MSG:SIGN VERIFY FAIL
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=0,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: 85DE10FA1E868ACEE3930FE5B3170D441B2F1CC89A14BB1979AAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:85DE10FA1E868ACEE3930FE5B3170D441B2F1CC89A14BB1979
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=0,c=1,t=1,pt=7,l=5,sg=1:46.0
    0;255;3;0;9;Signature in message: 0150C530844128121E1E6EE1F31F27C2162C8231
    0;255;3;0;9;Message to process: 01002EE101000000384201
    0;255;3;0;9;Current nonce: 85DE10FA1E868ACEE3930FE5B3170D441B2F1CC89A14BB1979AAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: 014E462C1402CB244B8CEB46BEF6D3490002DBF95809DDA87217F4F1D3A7BF8F
    0;255;3;0;9;SHA256: F1B8DE6DC1D2B17E2E27D930EC9FF3AC430AEC728118B85E44434FA8A62520A7
    0;255;3;0;9;Signature bad: 01B8DE6DC1D2B17E2E27D930EC9FF3AC430AEC72
    0;255;3;0;9;Signature verification failed!
    0;255;3;0;9;!TSF:MSG:SIGN VERIFY FAIL
    
    Sensor node:
    0 MCO:BGN:INIT NODE,CP=RNNNAS-,VER=2.1.1
    41 MCO:BGN:BFR
    58 TSM:INIT
    70 TSF:WUR:MS=0
    93 TSM:INIT:TSP OK
    112 TSM:INIT:STATID=1
    136 TSF:SID:OK,ID=1
    156 TSM:FPAR
    171 Will not sign message for destination 255 as it does not require it
    280 TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    2353 !TSM:FPAR:NO REPLY
    2377 TSM:FPAR
    2392 Will not sign message for destination 255 as it does not require it
    2503 TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    4404 TSF:MSG:READ,0-0-1,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    4460 Skipping security for command 3 type 8
    4506 TSF:MSG:FPAR OK,ID=0,D=1
    4577 TSM:FPAR:OK
    4594 TSM:ID
    4606 TSM:ID:OK
    4623 TSM:UPL
    4636 Skipping security for command 3 type 24
    4685 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
    4897 TSF:MSG:READ,0-0-1,s=255,c=3,t=25,pt=1,l=1,sg=0:1
    4956 Skipping security for command 3 type 25
    5002 TSF:MSG:PONG RECV,HP=1
    5031 TSM:UPL:OK
    5048 TSM:READY:ID=1,PAR=0,DIS=1
    5082 Signing required
    5105 Whitelisting required
    5133 Skipping security for command 3 type 15
    5184 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0103
    5258 Waiting for GW to send signing preferences...
    5602 TSF:MSG:READ,0-0-1,s=255,c=3,t=15,pt=6,l=2,sg=0:0103
    5662 Skipping security for command 3 type 15
    5709 Mark node 0 as one that require signed messages
    5765 Mark node 0 as one that require whitelisting
    5817 Skipping security for command 3 type 16
    5866 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK:
    5936 Nonce requested from 0. Waiting...
    6144 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=0:61472C0608B0A9EB29E9B3C70F9D7F6FD09BCB87F733B08F7D
    6253 Skipping security for command 3 type 17
    6300 Nonce received from 0.
    6330 Proceeding with signing...
    Message to process: 01002E0011FF322E312E31
    Current nonce: 61472C0608B0A9EB29E9B3C70F9D7F6FD09BCB87F733B08F7DAAAAAAAAAAAAAA
    HMAC: 01E9469D9B0A8E83EF7C29625D14DD63FB9CA5D7D69FE1154337A30A021B3208
    SHA256: 0822C73BAF43DD88FDC68C48AE623E98209F3A7DF9FCA19D3B0F85BF1F741B3F
    Signature in message: 0122C73BAF43DD88FDC68C48AE623E98209F3A7D
    6657 Message signed
    6745 Message to send has been signed
    6786 TSF:MSG:SEND,1-1-0-0,s=255,c=0,t=17,pt=0,l=5,sg=1,ft=0,st=OK:2.1.1
    6861 Skipping security for command 3 type 16
    6910 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    6980 Nonce requested from 0. Waiting...
    7556 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:AC0F413FA6A514F6BFA3B83C115154F54790801FF8AE22841D
    7665 Skipping security for command 3 type 17
    7712 Nonce received from 0.
    7741 Proceeding with signing...
    Message to process: 01000E2306FF00
    Current nonce: AC0F413FA6A514F6BFA3B83C115154F54790801FF8AE22841DAAAAAAAAAAAAAA
    HMAC: 40265CF5C94E46D211045580B861C7A323A5787D86CDD9EEA9E372317DAE8813
    SHA256: D8D4F9E9760D3D9A946F480C2BCCF883B222D792268C616F93DC963A343A5E30
    Signature in message: 01D4F9E9760D3D9A946F480C2BCCF883B222D792268C616F
    8068 Message signed
    8156 Message to send has been signed
    8198 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=6,pt=1,l=1,sg=1,ft=0,st=OK:0
    10267 Skipping security for command 3 type 16
    10317 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    10388 Nonce requested from 0. Waiting...
    15431 Message to send could not be signed!
    15475 !TSF:MSG:SIGN FAIL
    15502 Skipping security for command 3 type 16
    15553 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=1,st=OK:
    15624 Nonce requested from 0. Waiting...
    20667 Message to send could not be signed!
    20711 !TSF:MSG:SIGN FAIL
    20738 Skipping security for command 3 type 16
    20789 TSF:MSG:SEND,1-1-0-0,s=5,c=3,t=16,pt=0,l=0,sg=1,ft=1,st=OK:
    20857 Nonce requested from 0. Waiting...
    25900 Message to send could not be signed!
    25944 !TSF:MSG:SIGN FAIL
    25970 Skipping security for command 3 type 16
    26021 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=1,st=OK:
    26092 Nonce requested from 0. Waiting...
    26299 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:A32644FAF9873B1928DBA958C28ADD65EE6124BEF279A13C51
    26409 Skipping security for command 3 type 17
    26458 Nonce received from 0.
    26487 Proceeding with signing...
    Message to process: 0100B6030BFF54656D7065726174757265416E6448756D6964697479
    Current nonce: A32644FAF9873B1928DBA958C28ADD65EE6124BEF279A13C51AAAAAAAAAAAAAA
    HMAC: 7706426564FE57CAAEA11A8ADAA14F183087ED555F3711464D771AB3ED3C9323
    SHA256: 27CD1C4A537AC7DACC8BF91594D4EDAF962393C2B1C99C95075170F64406BAAD
    Signature in message: 01CD1C
    26815 Message signed
    26905 Message to send has been signed
    26947 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=11,pt=0,l=22,sg=1,ft=0,st=OK:TemperatureAndHumidity
    27042 Skipping security for command 3 type 16
    27092 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    27164 Nonce requested from 0. Waiting...
    27736 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:299EFBD3E478F83AB907954202484FDDD517F42B82EDFBCF15
    27846 Skipping security for command 3 type 17
    27894 Nonce received from 0.
    27925 Proceeding with signing...
    Message to process: 01001E030CFF312E31
    Current nonce: 299EFBD3E478F83AB907954202484FDDD517F42B82EDFBCF15AAAAAAAAAAAAAA
    HMAC: 3FE658AEDD29C670BEBC1BD7C0648103DA1E9A7B434252637589AD85C101D684
    SHA256: BACB19527B5B728708B43AAEC818FD91968808B34DDF6D7EC38027CD740A8F90
    Signature in message: 01CB19527B5B728708B43AAEC818FD91968808B34DDF
    28252 Message signed
    28342 Message to send has been signed
    28384 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=12,pt=0,l=3,sg=1,ft=0,st=OK:1.1
    28457 Skipping security for command 3 type 16
    28509 TSF:MSG:SEND,1-1-0-0,s=0,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    28577 Nonce requested from 0. Waiting...
    29150 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:1D86F9BA8F4A57E7F735C9C90B92BB007DD1B21759FBA5A1D4
    29260 Skipping security for command 3 type 17
    29308 Nonce received from 0.
    29338 Proceeding with signing...
    Message to process: 010006000700
    Current nonce: 1D86F9BA8F4A57E7F735C9C90B92BB007DD1B21759FBA5A1D4AAAAAAAAAAAAAA
    HMAC: 1D3F2387700161E5E7F91D8884A35050DDEA6031BBD394E9BB6380768B45B4E2
    SHA256: D86ADFB67F2E7AA29A62758B8DED6BA4445DCD50E5D43A6BB132A4EEB6DDDFFC
    Signature in message: 016ADFB67F2E7AA29A62758B8DED6BA4445DCD50E5D43A6BB1
    29666 Message signed
    29755 Message to send has been signed
    29798 TSF:MSG:SEND,1-1-0-0,s=0,c=0,t=7,pt=0,l=0,sg=1,ft=0,st=OK:
    29865 Skipping security for command 3 type 16
    29916 TSF:MSG:SEND,1-1-0-0,s=1,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    29985 Nonce requested from 0. Waiting...
    30557 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:2FA7278301DF11A478579ED0052E1E3F5374F4797D16E909A1
    30667 Skipping security for command 3 type 17
    30715 Nonce received from 0.
    30746 Proceeding with signing...
    Message to process: 010006000601
    Current nonce: 2FA7278301DF11A478579ED0052E1E3F5374F4797D16E909A1AAAAAAAAAAAAAA
    HMAC: 4A37BA5E250329F7A25933F5FEB0942B23C0A8F541EF32420EFDD60C6348722D
    SHA256: C437133BA006F1055A77CC818F6DEA8794BE062951DDA8E4B137CFE94EDDE9CD
    Signature in message: 0137133BA006F1055A77CC818F6DEA8794BE062951DDA8E4B1
    31074 Message signed
    31163 Message to send has been signed
    31205 TSF:MSG:SEND,1-1-0-0,s=1,c=0,t=6,pt=0,l=0,sg=1,ft=0,st=OK:
    31273 MCO:REG:REQ
    31292 Skipping security for command 3 type 26
    31343 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=26,pt=1,l=1,sg=1,ft=0,st=OK:2
    31862 TSF:MSG:READ,0-0-1,s=255,c=3,t=16,pt=0,l=0,sg=0:
    31921 Skipping security for command 3 type 16
    SHA256: C944AFD1C5122A0BFE35688614CE0AEC5014EF34280963121200000000000000
    31992 Skipping security for command 3 type 17
    32110 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=17,pt=6,l=25,sg=0,ft=0,st=OK:C944AFD1C5122A0BFE35688614CE0AEC5014EF342809631212
    32234 Transmitted nonce
    32858 TSF:MSG:READ,0-0-1,s=255,c=3,t=27,pt=1,l=1,sg=1:1
    Signature in message: 01D0A65CCEB888592ABC7B700BA3D37430963FD260F1A84C
    Message to process: 00010E231BFF01
    Current nonce: C944AFD1C5122A0BFE35688614CE0AEC5014EF342809631212AAAAAAAAAAAAAA
    HMAC: B0A2CE42D6C8D5C2E536F0623D42DD7906416B6F1C9C29D2F3F29FDF71F8674D
    SHA256: D667EA1AC54C5DCC60EC65460E7BF6637C6D767457894D45359457871B5FC647
    Signature bad: 0167EA1AC54C5DCC60EC65460E7BF6637C6D767457894D45
    33276 Signature verification failed!
    33383 !TSF:MSG:SIGN VERIFY FAIL
    33417 MCO:BGN:STP
    33436 MCO:SLP:MS=1000,SMS=0,I1=255,M1=255,I2=255,M2=255
    33495 MCO:SLP:TPD
    33514 MCO:SLP:WUP=-1
    33536 MCO:BGN:INIT OK,TSP=1
    33587 Skipping security for command 3 type 16
    33638 TSF:MSG:SEND,1-1-0-0,s=1,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    33707 Nonce requested from 0. Waiting...
    33913 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:861F99C1366BA4A1C01A03015C6A3F0C03C692E4FDAE490429
    34024 Skipping security for command 3 type 17
    34072 Nonce received from 0.
    34103 Proceeding with signing...
    Message to process: 01002EE100010000A84101
    Current nonce: 861F99C1366BA4A1C01A03015C6A3F0C03C692E4FDAE490429AAAAAAAAAAAAAA
    HMAC: 33F5DB30601220F5DBE0C1671EF230D741298E59C76088211A55F9FCEBA3D51F
    SHA256: F71538815F551510B343CAF23DD479E8DB58C001841F4DFB95B0C55AE5951DAB
    Signature in message: 011538815F551510B343CAF23DD479E8DB58C001
    34430 Message signed
    34520 Message to send has been signed
    34562 TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=0,pt=7,l=5,sg=1,ft=0,st=OK:21.0
    T: 21.00
    34656 Skipping security for command 3 type 16
    34707 TSF:MSG:SEND,1-1-0-0,s=0,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    34776 Nonce requested from 0. Waiting...
    35482 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:85DE10FA1E868ACEE3930FE5B3170D441B2F1CC89A14BB1979
    35593 Skipping security for command 3 type 17
    35641 Nonce received from 0.
    35671 Proceeding with signing...
    Message to process: 01002EE101000000384201
    Current nonce: 85DE10FA1E868ACEE3930FE5B3170D441B2F1CC89A14BB1979AAAAAAAAAAAAAA
    HMAC: 1633381545CBE6D28AF5CFE4A6A327B33A67B0DFAF1EA34D0537C52C4139217D
    SHA256: 3C50C530844128121E1E6EE1F31F27C2162C8231058F664B0D62653602F02CF8
    Signature in message: 0150C530844128121E1E6EE1F31F27C2162C8231
    35998 Message signed
    36088 Message to send has been signed
    36130 TSF:MSG:SEND,1-1-0-0,s=0,c=1,t=1,pt=7,l=5,sg=1,ft=0,st=OK:46.0
    H: 46.00
    36203 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
    36272 MCO:SLP:TPD
    36291 MCO:SLP:WUP=-1
    36335 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
    36395 MCO:SLP:TPD
    36414 MCO:SLP:WUP=-1
    36458 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
    36517 MCO:SLP:TPD
    36536 MCO:SLP:WUP=-1
    36580 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
    36639 MCO:SLP:TPD
    36659 MCO:SLP:WUP=-1
    36703 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
    36762 MCO:SLP:TPD
    36782 MCO:SLP:WUP=-1
    36825 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
    36885 MCO:SLP:TPD
    

    Thank you


  • Contest Winner

    @karelsmits
    Your configuration looks good, but I cannot see that the debug output fits what is supposed to be printed for version 2.1.1.
    Are you sure your library is in a clean state?
    When I look on github for version 2.1.1, I would expect more whitelisting related debug prints.

    I also cannot find the "0103" message in the gateway log which should inform it that the node require whitelisting.
    The node has received it from the GW I can see though.
    So it could be that the node knows about the GWs preference, but the GW does not know that the node also require whitelisting.

    The node got configured here:

    5184 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0103
    5258 Waiting for GW to send signing preferences...
    5602 TSF:MSG:READ,0-0-1,s=255,c=3,t=15,pt=6,l=2,sg=0:0103
    5662 Skipping security for command 3 type 15
    5709 Mark node 0 as one that require signed messages
    5765 Mark node 0 as one that require whitelisting
    

    But I don't see anything like that in the GW log. So my guess is that the GW does not salt the signatures properly according to the nodes expectations. So the node fails to verify the messages, while the GW knows that the node will salt the signatures, so it will be able to verify messages from the node.

    Could you try to reset the GW and then the node, and see if the node manages to inform the GW properly?



  • I redid the code, by downloading the latest edition of mysensors (2.1.1 - Latest Release). Here is the error log from the gateway.

    Gateway:
    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGAS-,VER=2.1.1
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;MCO:REG:NOT NEEDED
    IP: 192.168.0.249
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    0;255;3;0;9;TSF:MSG:READ,1-1-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:BC
    0;255;3;0;9;TSF:MSG:FPAR REQ,ID=1
    0;255;3;0;9;TSF:PNG:SEND,TO=0
    0;255;3;0;9;TSF:CKU:OK
    0;255;3;0;9;TSF:MSG:GWL OK
    0;255;3;0;9;Skipping security for command 3 type 8
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    0;255;3;0;9;Skipping security for command 3 type 24
    0;255;3;0;9;TSF:MSG:PINGED,ID=1,HP=1
    0;255;3;0;9;Skipping security for command 3 type 25
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0103
    0;255;3;0;9;Skipping security for command 3 type 15
    0;255;3;0;9;Mark node 1 as one that require signed messages
    0;255;3;0;9;Mark node 1 as one that require whitelisting
    0;255;3;0;9;Informing node 1 that we require signatures
    0;255;3;0;9;Informing node 1 that we require whitelisting
    0;255;3;0;9;Skipping security for command 3 type 15
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0103
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=16,pt=0,l=0,sg=0:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: 635ADD8607ED079B85C15D6CEF0303ECFD6389962B963EAA0500000000000000
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=0,ft=0,st=OK:635ADD8607ED079B85C15D6CEF0303ECFD6389962B963EAA05
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=0,t=17,pt=0,l=5,sg=1:2.1.1
    0;255;3;0;9;Signature in message: 01779AE68396C7000C2AA6302F0DE89070F7D8CB
    0;255;3;0;9;Message to process: 01002E0011FF322E312E31
    0;255;3;0;9;Current nonce: 635ADD8607ED079B85C15D6CEF0303ECFD6389962B963EAA05AAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: 2A6B189942AC438855B0FFF007580356C85AAED0C6C2331AA2EBD96AD8D694E5
    0;255;3;0;9;SHA256: D159F7F5DD1FE7912ADCC2C67AF7B0B01363C49A04F4CCF3E91E9D8DB5938E01
    0;255;3;0;9;Signature bad: 0159F7F5DD1FE7912ADCC2C67AF7B0B01363C49A
    0;255;3;0;9;Signature verification failed!
    0;255;3;0;9;!TSF:MSG:SIGN VERIFY FAIL
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: 701A70E84569482F1E26A0C65DCC936B8248FD88168E723095AAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:701A70E84569482F1E26A0C65DCC936B8248FD88168E723095
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=6,pt=1,l=1,sg=1:0
    0;255;3;0;9;Signature in message: 01C9468DBD954A8DC8C7D38B144FD1303CAFD01EB84F3CB6
    0;255;3;0;9;Message to process: 01000E2306FF00
    0;255;3;0;9;Current nonce: 701A70E84569482F1E26A0C65DCC936B8248FD88168E723095AAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: 337DDA1FA458CE0BFBCE84CB2531D23A3D7E34AAD2AE87EE090B1DF04DA5B7FA
    0;255;3;0;9;SHA256: 5F0BE66667527FF2C4639DE12B6BC39F8D99C00AF30C785D676246CF86FF6046
    0;255;3;0;9;Signature bad: 010BE66667527FF2C4639DE12B6BC39F8D99C00AF30C785D
    0;255;3;0;9;Signature verification failed!
    0;255;3;0;9;!TSF:MSG:SIGN VERIFY FAIL
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: CD1F75695EDE349716A2C0939011673583E68955F1226D2845AAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:CD1F75695EDE349716A2C0939011673583E68955F1226D2845
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=11,pt=0,l=14,sg=1:Relay & Button
    0;255;3;0;9;Signature in message: 01A2AB3419826F0361B5E6
    0;255;3;0;9;Message to process: 010076030BFF52656C6179202620427574746F6E
    0;255;3;0;9;Current nonce: CD1F75695EDE349716A2C0939011673583E68955F1226D2845AAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: 8F08FA3DF87C992BD66F382D912B862536EB79750BE8B7DF2699330FA6204251
    0;255;3;0;9;SHA256: 5A123CB37F6CA6D015B6E61D48E1F2F64E3BA890FE614B4C92AE3972B28FE061
    0;255;3;0;9;Signature bad: 01123CB37F6CA6D015B6E6
    0;255;3;0;9;Signature verification failed!
    0;255;3;0;9;!TSF:MSG:SIGN VERIFY FAIL
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: 4AA750027BA8D55571FEAB998D9EAA50C11D040628125C3AD3AAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:4AA750027BA8D55571FEAB998D9EAA50C11D040628125C3AD3
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=12,pt=0,l=3,sg=1:1.0
    0;255;3;0;9;Signature in message: 0186E4183F7C79D8E810E7B3F1ACBDA258FFEDBF7BFB
    0;255;3;0;9;Message to process: 01001E030CFF312E30
    0;255;3;0;9;Current nonce: 4AA750027BA8D55571FEAB998D9EAA50C11D040628125C3AD3AAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: 16142EF6048B9BD4FFB7541F38E250DB3569FDC548E476933255B579668769BE
    0;255;3;0;9;SHA256: DB85915DF555538FA84F4F6BF810FC646C2E94B1F0333862ED67F0DC8559A921
    0;255;3;0;9;Signature bad: 0185915DF555538FA84F4F6BF810FC646C2E94B1F033
    0;255;3;0;9;Signature verification failed!
    0;255;3;0;9;!TSF:MSG:SIGN VERIFY FAIL
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=5,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: 591F249BF6AA89AFADCF3213B362C2011D78F009E371E2893CAAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:591F249BF6AA89AFADCF3213B362C2011D78F009E371E2893C
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=5,c=0,t=3,pt=0,l=0,sg=1:
    0;255;3;0;9;Signature in message: 012F3F8F18555E4872180C9A3F6BB69FCBCB520B13A9A5E0BF
    0;255;3;0;9;Message to process: 010006000305
    0;255;3;0;9;Current nonce: 591F249BF6AA89AFADCF3213B362C2011D78F009E371E2893CAAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: AE537B78F59F3BBF57CE197D7233315CD924DC04470F86A4CC92D57184E546D7
    0;255;3;0;9;SHA256: 893FCC47C0EBD7EB457456F5498DB1DA0FE7C70B706AABE6D7E94CDA3477B291
    0;255;3;0;9;Signature bad: 013FCC47C0EBD7EB457456F5498DB1DA0FE7C70B706AABE6D7
    0;255;3;0;9;Signature verification failed!
    0;255;3;0;9;!TSF:MSG:SIGN VERIFY FAIL
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: E8D883F495AF21515C912E25659740392A47E35A433FDD99E7AAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:E8D883F495AF21515C912E25659740392A47E35A433FDD99E7
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=11,pt=0,l=22,sg=1:TemperatureAndHumidity
    0;255;3;0;9;Signature in message: 013680
    0;255;3;0;9;Message to process: 0100B6030BFF54656D7065726174757265416E6448756D6964697479
    0;255;3;0;9;Current nonce: E8D883F495AF21515C912E25659740392A47E35A433FDD99E7AAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: 58D0F9A87240B44F6A67C4282BCD28E1D7AD181EE0FB916A56AE931117FBAC43
    0;255;3;0;9;SHA256: E6E566363EF09FABD3DA06B632F95B620AE6DFA620BF14254D8A534C05BFE05D
    0;255;3;0;9;Signature bad: 01E566
    0;255;3;0;9;Signature verification failed!
    0;255;3;0;9;!TSF:MSG:SIGN VERIFY FAIL
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: 73E9D69B277B1E0BEB5ECAD5CD86DB4B249995508431170B0EAAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:73E9D69B277B1E0BEB5ECAD5CD86DB4B249995508431170B0E
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=12,pt=0,l=3,sg=1:1.1
    0;255;3;0;9;Signature in message: 0194F9156C1D1CAB891F415C60278725B2A030DC3600
    0;255;3;0;9;Message to process: 01001E030CFF312E31
    0;255;3;0;9;Current nonce: 73E9D69B277B1E0BEB5ECAD5CD86DB4B249995508431170B0EAAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: F2A05E6320CB0143CDD25C862489C3E3B711E654FCDBE93DAC77E5D2226441B3
    0;255;3;0;9;SHA256: 6EE086304E95BD00371FAC38825EB122C680B7A4CA6D1CA29C6F7E2D1D0D82A1
    0;255;3;0;9;Signature bad: 01E086304E95BD00371FAC38825EB122C680B7A4CA6D
    0;255;3;0;9;Signature verification failed!
    0;255;3;0;9;!TSF:MSG:SIGN VERIFY FAIL
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=0,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: 233BAC8C23F612E195F353CDDA4DC2372C87BC608E6D676878AAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:233BAC8C23F612E195F353CDDA4DC2372C87BC608E6D676878
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=0,c=0,t=7,pt=0,l=0,sg=1:
    0;255;3;0;9;Signature in message: 01046A6A668F9A4DA69DE94708162812A50ED241CB9395113B
    0;255;3;0;9;Message to process: 010006000700
    0;255;3;0;9;Current nonce: 233BAC8C23F612E195F353CDDA4DC2372C87BC608E6D676878AAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: A131C90326E31F93B59455FD2152AD491C530667AF46B36BDA9300EFA5EEFD7B
    0;255;3;0;9;SHA256: 3BB11EB543513CAA63FDE1D695D4B575B613FA091680AA6769E88A12ABDEC903
    0;255;3;0;9;Signature bad: 01B11EB543513CAA63FDE1D695D4B575B613FA091680AA6769
    0;255;3;0;9;Signature verification failed!
    0;255;3;0;9;!TSF:MSG:SIGN VERIFY FAIL
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: 64191BC91B3DE6C290B9E7E1F67800BDB8E974E2EC2C036316AAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:64191BC91B3DE6C290B9E7E1F67800BDB8E974E2EC2C036316
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=1,c=0,t=6,pt=0,l=0,sg=1:
    0;255;3;0;9;Signature in message: 01D710CFA4D8A468B30FA3BADDD985A6152FD3AE3A32385FCA
    0;255;3;0;9;Message to process: 010006000601
    0;255;3;0;9;Current nonce: 64191BC91B3DE6C290B9E7E1F67800BDB8E974E2EC2C036316AAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: 42A9625E80384D4A2F6F2DFF26C67CF8EC53C15AD1F34FF2C5BFE920E907E7A2
    0;255;3;0;9;SHA256: 6B5B67E9826562660840EB12BD25592DD94020FDB19DAD0F7C131833FC2EB761
    0;255;3;0;9;Signature bad: 015B67E9826562660840EB12BD25592DD94020FDB19DAD0F7C
    0;255;3;0;9;Signature verification failed!
    0;255;3;0;9;!TSF:MSG:SIGN VERIFY FAIL
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=26,pt=1,l=1,sg=1:2
    0;255;3;0;9;Skipping security for command 3 type 26
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK:
    0;255;3;0;9;Nonce requested from 1. Waiting...
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=17,pt=6,l=25,sg=0:58D7A7CB82C6F505B3DFA9FDBF9B5F4FA37EC9DD24E8678C97
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;Nonce received from 1.
    0;255;3;0;9;Proceeding with signing...
    0;255;3;0;9;Message to process: 00010E231BFF01
    0;255;3;0;9;Current nonce: 58D7A7CB82C6F505B3DFA9FDBF9B5F4FA37EC9DD24E8678C97AAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: B37650AA6C8D0E1B5FAE0707F73A27DA692350D7B2B28E8BD28BF20BF5F29BEF
    0;255;3;0;9;SHA256: 49DFDE1EDF6520D9E631ED9273E6078024CB044F6B0DF64AB50F528E8D94A1CA
    0;255;3;0;9;Signature in message: 01DFDE1EDF6520D9E631ED9273E6078024CB044F6B0DF64A
    0;255;3;0;9;Message signed
    0;255;3;0;9;Message to send has been signed
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=27,pt=1,l=1,sg=1,ft=0,st=OK:1
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: 9D2BDD2FACC4709213B5B111A55C8CBEED0E413492D0DD1CDBAAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:9D2BDD2FACC4709213B5B111A55C8CBEED0E413492D0DD1CDB
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=1,c=1,t=0,pt=7,l=5,sg=1:21.0
    0;255;3;0;9;Signature in message: 01E0544023E531C09CFE802850439D34997E85E0
    0;255;3;0;9;Message to process: 01002EE100010000A84101
    0;255;3;0;9;Current nonce: 9D2BDD2FACC4709213B5B111A55C8CBEED0E413492D0DD1CDBAAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: 776B37A0659B82546BA948FDD1677DD044FC3280D03AAE99F3B014CEB3A77A3F
    0;255;3;0;9;SHA256: 8303F1968F614D18BD23169B7334857E04A586C0520489061280682A86CF73EC
    0;255;3;0;9;Signature bad: 0103F1968F614D18BD23169B7334857E04A586C0
    0;255;3;0;9;Signature verification failed!
    0;255;3;0;9;!TSF:MSG:SIGN VERIFY FAIL
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=0,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: A58B01866F7DBF6E248DF75227EB49FBA430BFC144DFB85D4FAAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:A58B01866F7DBF6E248DF75227EB49FBA430BFC144DFB85D4F
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=0,c=1,t=1,pt=7,l=5,sg=1:49.0
    0;255;3;0;9;Signature in message: 0148A1408041EBB978E098504E6342E2D09DA2F9
    0;255;3;0;9;Message to process: 01002EE101000000444201
    0;255;3;0;9;Current nonce: A58B01866F7DBF6E248DF75227EB49FBA430BFC144DFB85D4FAAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: 2E879E98A64074D1C89CCC1391553D6216D59A01B0C8ADBD05D550ED3494C295
    0;255;3;0;9;SHA256: 166860778F1647E299AAF08F1521297128246EEA22A9148D2B8E44F940B7CC3D
    0;255;3;0;9;Signature bad: 016860778F1647E299AAF08F1521297128246EEA
    0;255;3;0;9;Signature verification failed!
    0;255;3;0;9;!TSF:MSG:SIGN VERIFY FAIL
    
    Sensor node:
    0 MCO:BGN:INIT NODE,CP=RNNNAS-,VER=2.1.1
    3 MCO:BGN:BFR
    5 TSM:INIT
    6 TSF:WUR:MS=0
    12 TSM:INIT:TSP OK
    14 TSM:INIT:STATID=1
    16 TSF:SID:OK,ID=1
    18 TSM:FPAR
    19 Will not sign message for destination 255 as it does not require it
    60 TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    531 TSF:MSG:READ,0-0-1,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    536 Skipping security for command 3 type 8
    539 TSF:MSG:FPAR OK,ID=0,D=1
    2067 TSM:FPAR:OK
    2068 TSM:ID
    2069 TSM:ID:OK
    2071 TSM:UPL
    2072 Skipping security for command 3 type 24
    2078 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
    2097 TSF:MSG:READ,0-0-1,s=255,c=3,t=25,pt=1,l=1,sg=0:1
    2102 Skipping security for command 3 type 25
    2106 TSF:MSG:PONG RECV,HP=1
    2108 TSM:UPL:OK
    2110 TSM:READY:ID=1,PAR=0,DIS=1
    2113 Signing required
    2115 Whitelisting required
    2117 Skipping security for command 3 type 15
    2123 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0103
    2129 Waiting for GW to send signing preferences...
    2159 TSF:MSG:READ,0-0-1,s=255,c=3,t=15,pt=6,l=2,sg=0:0103
    2164 Skipping security for command 3 type 15
    2168 Mark node 0 as one that require signed messages
    2173 Mark node 0 as one that require whitelisting
    2178 Skipping security for command 3 type 16
    2184 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK:
    2190 Nonce requested from 0. Waiting...
    2222 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=0:635ADD8607ED079B85C15D6CEF0303ECFD6389962B963EAA05
    2231 Skipping security for command 3 type 17
    2235 Nonce received from 0.
    2238 Proceeding with signing...
    Message to process: 01002E0011FF322E312E31
    Current nonce: 635ADD8607ED079B85C15D6CEF0303ECFD6389962B963EAA05AAAAAAAAAAAAAA
    HMAC: D2C5F779BE860E0BFB66A0F619BACB0B88B9104197DC43FAE0BB91D6F771130E
    SHA256: 67779AE68396C7000C2AA6302F0DE89070F7D8CB0DE16284892E168E2B02DDA0
    Signature in message: 01779AE68396C7000C2AA6302F0DE89070F7D8CB
    2344 Message signed
    2352 Message to send has been signed
    2357 TSF:MSG:SEND,1-1-0-0,s=255,c=0,t=17,pt=0,l=5,sg=1,ft=0,st=OK:2.1.1
    2364 Skipping security for command 3 type 16
    2370 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    2376 Nonce requested from 0. Waiting...
    2529 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:701A70E84569482F1E26A0C65DCC936B8248FD88168E723095
    2538 Skipping security for command 3 type 17
    2542 Nonce received from 0.
    2545 Proceeding with signing...
    Message to process: 01000E2306FF00
    Current nonce: 701A70E84569482F1E26A0C65DCC936B8248FD88168E723095AAAAAAAAAAAAAA
    HMAC: F0E805F26B0CD17B8282B3DBD98EA50BC4BD7AD5C3B946FF540FDE606ABFA34A
    SHA256: 74C9468DBD954A8DC8C7D38B144FD1303CAFD01EB84F3CB6306C4EA3F90D6394
    Signature in message: 01C9468DBD954A8DC8C7D38B144FD1303CAFD01EB84F3CB6
    2652 Message signed
    2659 Message to send has been signed
    2665 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=6,pt=1,l=1,sg=1,ft=0,st=OK:0
    4671 Skipping security for command 3 type 16
    4677 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    4683 Nonce requested from 0. Waiting...
    4715 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:CD1F75695EDE349716A2C0939011673583E68955F1226D2845
    4725 Skipping security for command 3 type 17
    4729 Nonce received from 0.
    4731 Proceeding with signing...
    Message to process: 010076030BFF52656C6179202620427574746F6E
    Current nonce: CD1F75695EDE349716A2C0939011673583E68955F1226D2845AAAAAAAAAAAAAA
    HMAC: 0C37B5A3CE49E63747A7298EA8733A27FD8AA4F52FCB188CFC92D9A77881B77F
    SHA256: 73A2AB3419826F0361B5E66936FC2F94E0C436E9CB6D61F1C7FA57C8A79A276A
    Signature in message: 01A2AB3419826F0361B5E6
    4838 Message signed
    4845 Message to send has been signed
    4851 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=11,pt=0,l=14,sg=1,ft=0,st=OK:Relay & Button
    4858 Skipping security for command 3 type 16
    4866 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    4872 Nonce requested from 0. Waiting...
    5022 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:4AA750027BA8D55571FEAB998D9EAA50C11D040628125C3AD3
    5031 Skipping security for command 3 type 17
    5036 Nonce received from 0.
    5039 Proceeding with signing...
    Message to process: 01001E030CFF312E30
    Current nonce: 4AA750027BA8D55571FEAB998D9EAA50C11D040628125C3AD3AAAAAAAAAAAAAA
    HMAC: 143B7FA1E433427A97AF9085B47418088349385FD64B8A461E99A2FDB2E642A2
    SHA256: 3586E4183F7C79D8E810E7B3F1ACBDA258FFEDBF7BFB3CB9B1EAD8A645AF87F2
    Signature in message: 0186E4183F7C79D8E810E7B3F1ACBDA258FFEDBF7BFB
    5145 Message signed
    5152 Message to send has been signed
    5158 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=12,pt=0,l=3,sg=1,ft=0,st=OK:1.0
    5165 Skipping security for command 3 type 16
    5171 TSF:MSG:SEND,1-1-0-0,s=5,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    5177 Nonce requested from 0. Waiting...
    5329 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:591F249BF6AA89AFADCF3213B362C2011D78F009E371E2893C
    5340 Skipping security for command 3 type 17
    5344 Nonce received from 0.
    5346 Proceeding with signing...
    Message to process: 010006000305
    Current nonce: 591F249BF6AA89AFADCF3213B362C2011D78F009E371E2893CAAAAAAAAAAAAAA
    HMAC: E73D1E22383313729323B1295ADC66501F0840E4E3AD43BA755D5B556EF6608F
    SHA256: 7C2F3F8F18555E4872180C9A3F6BB69FCBCB520B13A9A5E0BF5B8FE4353203C4
    Signature in message: 012F3F8F18555E4872180C9A3F6BB69FCBCB520B13A9A5E0BF
    5452 Message signed
    5459 Message to send has been signed
    5466 TSF:MSG:SEND,1-1-0-0,s=5,c=0,t=3,pt=0,l=0,sg=1,ft=0,st=OK:
    5472 Skipping security for command 3 type 16
    5478 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    5484 Nonce requested from 0. Waiting...
    5638 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:E8D883F495AF21515C912E25659740392A47E35A433FDD99E7
    5647 Skipping security for command 3 type 17
    5651 Nonce received from 0.
    5654 Proceeding with signing...
    Message to process: 0100B6030BFF54656D7065726174757265416E6448756D6964697479
    Current nonce: E8D883F495AF21515C912E25659740392A47E35A433FDD99E7AAAAAAAAAAAAAA
    HMAC: 784C2D238D4B5C2233FC45251847A638A292EC4E308BC93A95055DEE5BC5FC14
    SHA256: 4136807B84DBF7CF7ABBCCD1CAC78E289FB39E060B699D7A6B10C9C5831994FF
    Signature in message: 013680
    5761 Message signed
    5768 Message to send has been signed
    5774 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=11,pt=0,l=22,sg=1,ft=0,st=OK:TemperatureAndHumidity
    5782 Skipping security for command 3 type 16
    5788 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    5794 Nonce requested from 0. Waiting...
    5947 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:73E9D69B277B1E0BEB5ECAD5CD86DB4B249995508431170B0E
    5956 Skipping security for command 3 type 17
    5960 Nonce received from 0.
    5962 Proceeding with signing...
    Message to process: 01001E030CFF312E31
    Current nonce: 73E9D69B277B1E0BEB5ECAD5CD86DB4B249995508431170B0EAAAAAAAAAAAAAA
    HMAC: 378FEA52C9235CADF20041F6ED4FA21FB5FFFAF7B2E104ECD111049D3643B7CD
    SHA256: 7494F9156C1D1CAB891F415C60278725B2A030DC3600A2FEDC44E1CB88EE05B6
    Signature in message: 0194F9156C1D1CAB891F415C60278725B2A030DC3600
    6069 Message signed
    6077 Message to send has been signed
    6082 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=12,pt=0,l=3,sg=1,ft=0,st=OK:1.1
    6089 Skipping security for command 3 type 16
    6095 TSF:MSG:SEND,1-1-0-0,s=0,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    6102 Nonce requested from 0. Waiting...
    6254 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:233BAC8C23F612E195F353CDDA4DC2372C87BC608E6D676878
    6263 Skipping security for command 3 type 17
    6267 Nonce received from 0.
    6270 Proceeding with signing...
    Message to process: 010006000700
    Current nonce: 233BAC8C23F612E195F353CDDA4DC2372C87BC608E6D676878AAAAAAAAAAAAAA
    HMAC: 65B760FEACE7F3773A162428F31841D7133E7E74E57FB0E4C58F5370EAC2C899
    SHA256: 16046A6A668F9A4DA69DE94708162812A50ED241CB9395113BCF2AAFAA8F9F6A
    Signature in message: 01046A6A668F9A4DA69DE94708162812A50ED241CB9395113B
    6377 Message signed
    6384 Message to send has been signed
    6390 TSF:MSG:SEND,1-1-0-0,s=0,c=0,t=7,pt=0,l=0,sg=1,ft=0,st=OK:
    6395 Skipping security for command 3 type 16
    6403 TSF:MSG:SEND,1-1-0-0,s=1,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    6409 Nonce requested from 0. Waiting...
    6561 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:64191BC91B3DE6C290B9E7E1F67800BDB8E974E2EC2C036316
    6572 Skipping security for command 3 type 17
    6576 Nonce received from 0.
    6578 Proceeding with signing...
    Message to process: 010006000601
    Current nonce: 64191BC91B3DE6C290B9E7E1F67800BDB8E974E2EC2C036316AAAAAAAAAAAAAA
    HMAC: 9D76E2E5E11AF40E3663096488DBC4C8DF685497CA8C5071A472AC5E3F1F08E0
    SHA256: F4D710CFA4D8A468B30FA3BADDD985A6152FD3AE3A32385FCA5BC0698FF98FB3
    Signature in message: 01D710CFA4D8A468B30FA3BADDD985A6152FD3AE3A32385FCA
    6684 Message signed
    6691 Message to send has been signed
    6697 TSF:MSG:SEND,1-1-0-0,s=1,c=0,t=6,pt=0,l=0,sg=1,ft=0,st=OK:
    6704 MCO:REG:REQ
    6705 Skipping security for command 3 type 26
    6712 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=26,pt=1,l=1,sg=1,ft=0,st=OK:2
    6846 TSF:MSG:READ,0-0-1,s=255,c=3,t=16,pt=0,l=0,sg=0:
    6851 Skipping security for command 3 type 16
    SHA256: 58D7A7CB82C6F505B3DFA9FDBF9B5F4FA37EC9DD24E8678C9700000000000000
    6871 Skipping security for command 3 type 17
    6883 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=17,pt=6,l=25,sg=0,ft=0,st=OK:58D7A7CB82C6F505B3DFA9FDBF9B5F4FA37EC9DD24E8678C97
    6893 Transmitted nonce
    7026 TSF:MSG:READ,0-0-1,s=255,c=3,t=27,pt=1,l=1,sg=1:1
    Signature in message: 01DFDE1EDF6520D9E631ED9273E6078024CB044F6B0DF64A
    Message to process: 00010E231BFF01
    Current nonce: 58D7A7CB82C6F505B3DFA9FDBF9B5F4FA37EC9DD24E8678C97AAAAAAAAAAAAAA
    HMAC: C571E596B10436BEE9D0B919A8291506AAA575DF35440AD067A955F3DD59DC59
    SHA256: 8093DAB94D88CD2E779CB207C957276B474CD6D58877337A1F0E06412D098E05
    Signature bad: 0193DAB94D88CD2E779CB207C957276B474CD6D58877337A
    7141 Signature verification failed!
    7149 !TSF:MSG:SIGN VERIFY FAIL
    7152 MCO:BGN:STP
    7154 MCO:SLP:MS=1000,SMS=0,I1=255,M1=255,I2=255,M2=255
    7159 MCO:SLP:TPD
    7161 MCO:SLP:WUP=-1
    7163 MCO:BGN:INIT OK,TSP=1
    7187 Skipping security for command 3 type 16
    7194 TSF:MSG:SEND,1-1-0-0,s=1,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    7200 Nonce requested from 0. Waiting...
    7232 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:9D2BDD2FACC4709213B5B111A55C8CBEED0E413492D0DD1CDB
    7241 Skipping security for command 3 type 17
    7245 Nonce received from 0.
    7248 Proceeding with signing...
    Message to process: 01002EE100010000A84101
    Current nonce: 9D2BDD2FACC4709213B5B111A55C8CBEED0E413492D0DD1CDBAAAAAAAAAAAAAA
    HMAC: 13318A49861D23D2F161DC7CD30045236A29E6ABEACA8CBAB536D8C489354A94
    SHA256: 64E0544023E531C09CFE802850439D34997E85E0549E73CD10AABAC2F5DBDA1E
    Signature in message: 01E0544023E531C09CFE802850439D34997E85E0
    7355 Message signed
    7362 Message to send has been signed
    7368 TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=0,pt=7,l=5,sg=1,ft=0,st=OK:21.0
    T: 21.00
    7374 Skipping security for command 3 type 16
    7382 TSF:MSG:SEND,1-1-0-0,s=0,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    7388 Nonce requested from 0. Waiting...
    7539 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:A58B01866F7DBF6E248DF75227EB49FBA430BFC144DFB85D4F
    7548 Skipping security for command 3 type 17
    7553 Nonce received from 0.
    7556 Proceeding with signing...
    Message to process: 01002EE101000000444201
    Current nonce: A58B01866F7DBF6E248DF75227EB49FBA430BFC144DFB85D4FAAAAAAAAAAAAAA
    HMAC: 999CC7109C1EABF2BE1E0EBE8E70AC2814D4A797C5D4B2EFEAECAEB0F312394A
    SHA256: FB48A1408041EBB978E098504E6342E2D09DA2F9C08E87D8C930344A6261C640
    Signature in message: 0148A1408041EBB978E098504E6342E2D09DA2F9
    7662 Message signed
    7669 Message to send has been signed
    7675 TSF:MSG:SEND,1-1-0-0,s=0,c=1,t=1,pt=7,l=5,sg=1,ft=0,st=OK:49.0
    H: 49.00
    7682 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
    7687 MCO:SLP:TPD
    

    Could it be that the serial doesn’t match? Even though I copy/pasted the output from SecurityPersonalizer.ino, meaning it maybe did’t save into the EEPROM?

    Thanks!


  • Contest Winner

    @karelsmits it is very odd. I would expect the log mention whitelisting information. Yet there is nothing in the messages concerning signing that indicate it tries to find a entry or that it does not find an entry. It simply looks like the backend has not realized whitelisting is activated. Still, it communicate the requirements properly.
    If you look at the backends (MySigningAtsha204Soft.cpp) there are some conditional behaviour there with is activated if a whitelist is defined.



  • What would be my options?
    Do you by any chance have a sample gateway and a node (both with whitelisting) that I could compare my code with, to see where it has gone wrong.

    And also what about how I verify the EEPROM serial-info.

    Thank you in advance.


  • Contest Winner

    @karelsmits I don't have something from the master branch. But I have verified that the beta (development branch) works with whitelisting. The personalizer dumps the eeprom contents and from the logs you posted above I verified that the contents match the configuration.
    Could you try to add some additional prints in the back end to verify it actually executes the whitelisting logic? If I look at github there should be prints that I can't find in your logs. So I suspect the whitelisting management is not fully working, but I am pretty sure it has been verified in the latest release.
    You are sure you run a vanilla release without local modifications?



  • Okay here is the gateway code:

    /**
     * The MySensors Arduino library handles the wireless radio link and protocol
     * between your home built sensors/actuators and HA controller of choice.
     * The sensors forms a self healing radio network with optional repeaters. Each
     * repeater and gateway builds a routing tables in EEPROM which keeps track of the
     * network topology allowing messages to be routed to nodes.
     *
     * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
     * Copyright (C) 2013-2015 Sensnology AB
     * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
     *
     * Documentation: http://www.mysensors.org
     * Support Forum: http://forum.mysensors.org
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License
     * version 2 as published by the Free Software Foundation.
     *
     *******************************
     *
     * REVISION HISTORY
     * Version 1.0 - Henrik EKblad
     * Contribution by a-lurker and Anticimex,
     * Contribution by Norbert Truchsess <norbert.truchsess@t-online.de>
     * Contribution by Tomas Hozza <thozza@gmail.com>
     *
     *
     * DESCRIPTION
     * The EthernetGateway sends data received from sensors to the ethernet link.
     * The gateway also accepts input on ethernet interface, which is then sent out to the radio network.
     *
     * The GW code is designed for Arduino 328p / 16MHz.  ATmega168 does not have enough memory to run this program.
     *
     * LED purposes:
     * - To use the feature, uncomment MY_DEFAULT_xxx_LED_PIN in the sketch below
     * - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved
     * - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
     * - ERR (red) - fast blink on error during transmission error or recieve crc error
     *
     * See http://www.mysensors.org/build/ethernet_gateway for wiring instructions.
     *
     */
    
    // Enable debug prints to serial monitor
    #define MY_DEBUG
    #define MY_DEBUG_VERBOSE_SIGNING
    
    // Enable and select radio type attached
    #define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69
    
    // Enable gateway ethernet module type
    #define MY_GATEWAY_W5100
    
    // W5100 Ethernet module SPI enable (optional if using a shield/module that manages SPI_EN signal)
    //#define MY_W5100_SPI_EN 4
    
    // Enable Soft SPI for NRF radio (note different radio wiring is required)
    // The W5100 ethernet module seems to have a hard time co-operate with
    // radio on the same spi bus.
    #if !defined(MY_W5100_SPI_EN) && !defined(ARDUINO_ARCH_SAMD)
    #define MY_SOFTSPI
    #define MY_SOFT_SPI_SCK_PIN 14
    #define MY_SOFT_SPI_MISO_PIN 16
    #define MY_SOFT_SPI_MOSI_PIN 15
    #endif
    
    // When W5100 is connected we have to move CE/CSN pins for NRF radio
    #ifndef MY_RF24_CE_PIN
    #define MY_RF24_CE_PIN 5
    #endif
    #ifndef MY_RF24_CS_PIN
    #define MY_RF24_CS_PIN 6
    #endif
    
    // Enable to UDP
    //#define MY_USE_UDP
    
    #define MY_IP_ADDRESS 192,168,0,249   // If this is disabled, DHCP is used to retrieve address
    // Renewal period if using DHCP
    //#define MY_IP_RENEWAL_INTERVAL 60000
    // The port to keep open on node server mode / or port to contact in client mode
    #define MY_PORT 5487
    
    // Controller ip address. Enables client mode (default is "server" mode).
    // Also enable this if MY_USE_UDP is used and you want sensor data sent somewhere.
    //#define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 254
    
    // The MAC address can be anything you want but should be unique on your network.
    // Newer boards have a MAC address printed on the underside of the PCB, which you can (optionally) use.
    // Note that most of the Ardunio examples use  "DEAD BEEF FEED" for the MAC address.
    //#define MY_MAC_ADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
    
    // Enable inclusion mode
    #define MY_INCLUSION_MODE_FEATURE
    // Enable Inclusion mode button on gateway
    //#define MY_INCLUSION_BUTTON_FEATURE
    // Set inclusion mode duration (in seconds)
    #define MY_INCLUSION_MODE_DURATION 60
    // Digital pin used for inclusion mode button
    //#define MY_INCLUSION_MODE_BUTTON_PIN  3
    
    // Set blinking period
    #define MY_DEFAULT_LED_BLINK_PERIOD 300
    
    // Flash leds on rx/tx/err
    // Uncomment to override default HW configurations
    #define MY_DEFAULT_ERR_LED_PIN 7  // Error led pin
    #define MY_DEFAULT_RX_LED_PIN  8  // Receive led pin
    #define MY_DEFAULT_TX_LED_PIN  9  // Transmit led pin
    
    
    #if defined(MY_USE_UDP)
    #include <EthernetUdp.h>
    #endif
    #include <Ethernet.h>
    #include <MySensors.h>
    
    //===============
    
    // Select soft/hardware signing method
    #define MY_SIGNING_SOFT //!< Software signing
    //#define MY_SIGNING_ATSHA204 //!< Hardware signing using ATSHA204A
    
    // Enable node whitelisting
    #define MY_SIGNING_NODE_WHITELISTING {{.nodeId = 1,.serial = {0xA0,0xB1,0x71,0xFA,0xC5,0x62,0x96,0xF1,0xD8}}} // for sensor
    
    //#define MY_SIGNING_NODE_WHITELISTING {{{.nodeId = GATEWAY_ADDRESS,.serial = {0x4E,0xD3,0xAD,0x93,0xC6,0xF2,0xC6,0xF3,0x25}},{.nodeId = 2,.serial = {0xDC,0x1E,0x7F,0x20,0x62,0x2F,0xD3,0x04,0x29}}}
    
    // Enable this if you want destination node to sign all messages sent to this node.
    #define MY_SIGNING_REQUEST_SIGNATURES
    
    /**
     * @def MY_SIGNING_GW_REQUEST_SIGNATURES_FROM_ALL
     * @brief Enable this to have gateway require all nodes in the network to sign messages sent to it. @ref MY_SIGNING_REQUEST_SIGNATURES must also be set.
     *
     * Use this for maximum security, but be aware that every single node will have to be personalized before they can be used.
     * Note that if this is enabled, and whitelisting is also enabled, whitelisting will also be in effect for all nodes.
     */
    #define MY_SIGNING_GW_REQUEST_SIGNATURES_FROM_ALL
    
    
    // SETTINGS FOR MY_SIGNING_SOFT
    #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7 //!< Unconnected analog pin for random seed
    
    
    //===========================
    
    void setup()
    {
    }
    
    void loop()
    {
    }
    

    Here is the Sensor-node code:

    /**
     * The MySensors Arduino library handles the wireless radio link and protocol
     * between your home built sensors/actuators and HA controller of choice.
     * The sensors forms a self healing radio network with optional repeaters. Each
     * repeater and gateway builds a routing tables in EEPROM which keeps track of the
     * network topology allowing messages to be routed to nodes.
     *
     * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
     * Copyright (C) 2013-2015 Sensnology AB
     * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
     *
     * Documentation: http://www.mysensors.org
     * Support Forum: http://forum.mysensors.org
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License
     * version 2 as published by the Free Software Foundation.
     *
     *******************************
     *
     * REVISION HISTORY
     * Version 1.0: Henrik EKblad
     * Version 1.1 - 2016-07-20: Converted to MySensors v2.0 and added various improvements - Torben Woltjen (mozzbozz)
     * 
     * DESCRIPTION
     * This sketch provides an example of how to implement a humidity/temperature
     * sensor using a DHT11/DHT-22.
     *  
     * For more information, please visit:
     * http://www.mysensors.org/build/humidity
     * 
     */
    
    // Enable debug prints
    #define MY_DEBUG
    #define MY_DEBUG_VERBOSE_SIGNING
    
    // Enable and select radio type attached 
    #define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69
    //#define MY_RS485
    
    #include <SPI.h>
    #include <MySensors.h>  
    #include <DHT.h>
    
    // Set this to the pin you connected the DHT's data pin to
    #define DHT_DATA_PIN 3
    
    // Set this offset if the sensor has a permanent small offset to the real temperatures
    #define SENSOR_TEMP_OFFSET 0
    
    // Sleep time between sensor updates (in milliseconds)
    // Must be >1000ms for DHT22 and >2000ms for DHT11
    static const uint64_t UPDATE_INTERVAL = 60000;
    
    // Force sending an update of the temperature after n sensor reads, so a controller showing the
    // timestamp of the last update doesn't show something like 3 hours in the unlikely case, that
    // the value didn't change since;
    // i.e. the sensor would force sending an update every UPDATE_INTERVAL*FORCE_UPDATE_N_READS [ms]
    static const uint8_t FORCE_UPDATE_N_READS = 10;
    
    #define CHILD_ID_HUM 0
    #define CHILD_ID_TEMP 1
    
    
    //===============
    
    #define MY_NODE_ID 1
    
    
    // Select soft/hardware signing method
    #define MY_SIGNING_SOFT //!< Software signing
    //#define MY_SIGNING_ATSHA204 //!< Hardware signing using ATSHA204A
    
    // Enable node whitelisting
    #define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0xA0,0xB1,0x71,0xFA,0xC5,0x62,0x96,0xF1,0xD9}}} // for gateway
    
    
    // Enable this if you want destination node to sign all messages sent to this node.
    #define MY_SIGNING_REQUEST_SIGNATURES
    
    /**
     * @def MY_SIGNING_GW_REQUEST_SIGNATURES_FROM_ALL
     * @brief Enable this to have gateway require all nodes in the network to sign messages sent to it. @ref MY_SIGNING_REQUEST_SIGNATURES must also be set.
     *
     * Use this for maximum security, but be aware that every single node will have to be personalized before they can be used.
     * Note that if this is enabled, and whitelisting is also enabled, whitelisting will also be in effect for all nodes.
     */
    #define MY_SIGNING_GW_REQUEST_SIGNATURES_FROM_ALL
    
    
    // SETTINGS FOR MY_SIGNING_SOFT
    #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7 //!< Unconnected analog pin for random seed
    
    
    //===========================
    
    
    
    float lastTemp;
    float lastHum;
    uint8_t nNoUpdatesTemp;
    uint8_t nNoUpdatesHum;
    bool metric = true;
    
    MyMessage msgHum(CHILD_ID_HUM, V_HUM);
    MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
    DHT dht;
    
    
    void presentation()  
    { 
      // Send the sketch version information to the gateway
      sendSketchInfo("TemperatureAndHumidity", "1.1");
    
      // Register all sensors to gw (they will be created as child devices)
      present(CHILD_ID_HUM, S_HUM);
      present(CHILD_ID_TEMP, S_TEMP);
    
      metric = getControllerConfig().isMetric;
    }
    
    
    void setup()
    {
      dht.setup(DHT_DATA_PIN); // set data pin of DHT sensor
      if (UPDATE_INTERVAL <= dht.getMinimumSamplingPeriod()) {
        Serial.println("Warning: UPDATE_INTERVAL is smaller than supported by the sensor!");
      }
      // Sleep for the time of the minimum sampling period to give the sensor time to power up
      // (otherwise, timeout errors might occure for the first reading)
      sleep(dht.getMinimumSamplingPeriod());
    }
    
    
    void loop()      
    {  
      // Force reading sensor, so it works also after sleep()
      dht.readSensor(true);
    
      // Get temperature from DHT library
      float temperature = dht.getTemperature();
      if (isnan(temperature)) {
        Serial.println("Failed reading temperature from DHT!");
      } else if (temperature != lastTemp || nNoUpdatesTemp == FORCE_UPDATE_N_READS) {
        // Only send temperature if it changed since the last measurement or if we didn't send an update for n times
        lastTemp = temperature;
        if (!metric) {
          temperature = dht.toFahrenheit(temperature);
        }
        // Reset no updates counter
        nNoUpdatesTemp = 0;
        temperature += SENSOR_TEMP_OFFSET;
        send(msgTemp.set(temperature, 1));
    
        #ifdef MY_DEBUG
        Serial.print("T: ");
        Serial.println(temperature);
        #endif
      } else {
        // Increase no update counter if the temperature stayed the same
        nNoUpdatesTemp++;
      }
    
      // Get humidity from DHT library
      float humidity = dht.getHumidity();
      if (isnan(humidity)) {
        Serial.println("Failed reading humidity from DHT");
      } else if (humidity != lastHum || nNoUpdatesHum == FORCE_UPDATE_N_READS) {
        // Only send humidity if it changed since the last measurement or if we didn't send an update for n times
        lastHum = humidity;
        // Reset no updates counter
        nNoUpdatesHum = 0;
        send(msgHum.set(humidity, 1));
    
        #ifdef MY_DEBUG
        Serial.print("H: ");
        Serial.println(humidity);
        #endif
      } else {
        // Increase no update counter if the humidity stayed the same
        nNoUpdatesHum++;
      }
    
      // Sleep for a while to save energy
      sleep(UPDATE_INTERVAL); 
    }
    

    And here is the signing code at MyConfig.h:

    #define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0xA0,0xB1,0x71,0xFA,0xC5,0x62,0x96,0xF1,0xD9}},{.nodeId = 1,.serial = {0xA0,0xB1,0x71,0xFA,0xC5,0x62,0x96,0xF1,0xD8}}}
    
    /**
     * @def MY_SIGNING_ATSHA204_PIN
     * @brief Atsha204 default pin setting
     *
     * Pin where ATSHA204 is attached
     */
    #ifndef MY_SIGNING_ATSHA204_PIN
    #define MY_SIGNING_ATSHA204_PIN 17
    #endif
    
    /**
     * @def MY_SIGNING_SOFT_RANDOMSEED_PIN
     * @brief Pin used for random generation in soft signing
     *
     * Do not connect anything to this when soft signing is enabled
     */
    #ifndef MY_SIGNING_SOFT_RANDOMSEED_PIN
    #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7
    #endif
    

    And this is pretty much Vanilla, as you can see.
    Thanks for your help!


  • Contest Winner

    @karelsmits I am not talking about your sketch, I am talking about the MySensors library.



  • what files in the library do you mean?


  • Contest Winner

    @karelsmits the one I mentioned above.
    However, I do notice one important thing here; you have made changes to MyConfig.h. You should not enable the flags for signing and whitelisting in that file. You do that in your sketch. If you have defined them in two places, you don't know which setting is used. Revert the signing settings you tweaked in MyConfig.h and use the settings in your sketches (the GW and the node).



  • Thank you so much for your help so far, especially the myconfig.h file that it should not be modified regarding signing.
    Now I have the following error:

    Gateway:
    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGAS-,VER=2.1.1
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;MCO:REG:NOT NEEDED
    IP: 192.168.0.249
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    0;255;3;0;9;TSF:MSG:READ,1-1-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:BC
    0;255;3;0;9;TSF:MSG:FPAR REQ,ID=1
    0;255;3;0;9;TSF:PNG:SEND,TO=0
    0;255;3;0;9;TSF:CKU:OK
    0;255;3;0;9;TSF:MSG:GWL OK
    0;255;3;0;9;Will not sign message for destination 1 as it does not require it
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:PINGED,ID=1,HP=1
    0;255;3;0;9;Will not sign message for destination 1 as it does not require it
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0101
    0;255;3;0;9;Mark node 1 as one that require signed messages
    0;255;3;0;9;Mark node 1 as one that do not require whitelisting
    0;255;3;0;9;Informing node 1 that we require signatures
    0;255;3;0;9;Informing node 1 that we do not require whitelisting
    0;255;3;0;9;Skipping security for command 3 type 15
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=16,pt=0,l=0,sg=0:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: FA0CEF05B11135F19B646D3FA36FE1BCFCC8DAC1A3773BDC7900000000000000
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=0,ft=0,st=OK:FA0CEF05B11135F19B646D3FA36FE1BCFCC8DAC1A3773BDC79
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=0,t=18,pt=0,l=5,sg=1:2.1.1
    0;255;3;0;9;Signature in message: 01EDFE67C83BA7ADD4B868950DA55ADF92E74C2D
    0;255;3;0;9;Message to process: 01002E0012FF322E312E31
    0;255;3;0;9;Current nonce: FA0CEF05B11135F19B646D3FA36FE1BCFCC8DAC1A3773BDC79AAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: 41EDFE67C83BA7ADD4B868950DA55ADF92E74C2D89903167166C396470C02F3E
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: D92FBB57AB79BCCC3E9452F7E4B876FFFBC7FE47C2AD0613C8AAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:D92FBB57AB79BCCC3E9452F7E4B876FFFBC7FE47C2AD0613C8
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=6,pt=1,l=1,sg=1:0
    0;255;3;0;9;Signature in message: 01815088794CC5704C5790821D82DFD0435B5A47B4FBC14C
    0;255;3;0;9;Message to process: 01000E2306FF00
    0;255;3;0;9;Current nonce: D92FBB57AB79BCCC3E9452F7E4B876FFFBC7FE47C2AD0613C8AAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: 1D815088794CC5704C5790821D82DFD0435B5A47B4FBC14C745AA2B639D4D9DA
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: E38FE6554A3AE6D02B91B69EE2B67602506D8308DB5D4EAF3EAAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:E38FE6554A3AE6D02B91B69EE2B67602506D8308DB5D4EAF3E
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=11,pt=0,l=5,sg=1:Relay
    0;255;3;0;9;Signature in message: 01E3BCEFCF2F06C922BD6D487BBA7E67C9B717BC
    0;255;3;0;9;Message to process: 01002E030BFF52656C6179
    0;255;3;0;9;Current nonce: E38FE6554A3AE6D02B91B69EE2B67602506D8308DB5D4EAF3EAAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: 4BE3BCEFCF2F06C922BD6D487BBA7E67C9B717BCF2852083854E7555620473AD
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: 2385BA03A156C8D203085EE05B480A4819CC88E82D9BA6209FAAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:2385BA03A156C8D203085EE05B480A4819CC88E82D9BA6209F
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=12,pt=0,l=3,sg=1:1.0
    0;255;3;0;9;Signature in message: 01DDCD53799743889B645AC6524B32B4AEB4B71E368C
    0;255;3;0;9;Message to process: 01001E030CFF312E30
    0;255;3;0;9;Current nonce: 2385BA03A156C8D203085EE05B480A4819CC88E82D9BA6209FAAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: F3DDCD53799743889B645AC6524B32B4AEB4B71E368CCE2BE60CC00E0AD2D183
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: F1048244D308662147413A8531A71EF5C5E241710A859D7562AAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:F1048244D308662147413A8531A71EF5C5E241710A859D7562
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=1,c=0,t=3,pt=0,l=0,sg=1:
    0;255;3;0;9;Signature in message: 01E5C5B659AF41CC4B5C9315F94E1A22E2DF10FAD361061CB3
    0;255;3;0;9;Message to process: 010006000301
    0;255;3;0;9;Current nonce: F1048244D308662147413A8531A71EF5C5E241710A859D7562AAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: 4EE5C5B659AF41CC4B5C9315F94E1A22E2DF10FAD361061CB3DB7925952BFDAE
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: 24D0165B9B9152F2003597B3747DC61B9C67C595A1518C31BDAAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:24D0165B9B9152F2003597B3747DC61B9C67C595A1518C31BD
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=11,pt=0,l=22,sg=1:TemperatureAndHumidity
    0;255;3;0;9;Signature in message: 013E8E
    0;255;3;0;9;Message to process: 0100B6030BFF54656D7065726174757265416E6448756D6964697479
    0;255;3;0;9;Current nonce: 24D0165B9B9152F2003597B3747DC61B9C67C595A1518C31BDAAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: 513E8E942127E5E2D512CE288F2B7E6418B8809F69B8B1EAE20D97A4407F9C86
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: F95653815901C8FACA219583E9C6FEA53596238E460528DA6AAAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:F95653815901C8FACA219583E9C6FEA53596238E460528DA6A
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=12,pt=0,l=3,sg=1:1.1
    0;255;3;0;9;Signature in message: 01FD4A335914B1FA7065E23D2B0C98FFB67E06B582AA
    0;255;3;0;9;Message to process: 01001E030CFF312E31
    0;255;3;0;9;Current nonce: F95653815901C8FACA219583E9C6FEA53596238E460528DA6AAAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: 22FD4A335914B1FA7065E23D2B0C98FFB67E06B582AA0C8B3865B44CE9E1D49E
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=0,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: D356C66B145EA4E7DCF69EC5B3C20E38D6046C50A4FEACE71BAAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:D356C66B145EA4E7DCF69EC5B3C20E38D6046C50A4FEACE71B
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=0,c=0,t=7,pt=0,l=0,sg=1:
    0;255;3;0;9;Signature in message: 01E7923AA716F2CE850EB4A27962F15BF36941D559BA1DCF45
    0;255;3;0;9;Message to process: 010006000700
    0;255;3;0;9;Current nonce: D356C66B145EA4E7DCF69EC5B3C20E38D6046C50A4FEACE71BAAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: F4E7923AA716F2CE850EB4A27962F15BF36941D559BA1DCF45C1821C7AD8E479
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: E4DDE1558F406F93C24ACC4978B5DAD078700CB3E898D665BBAAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:E4DDE1558F406F93C24ACC4978B5DAD078700CB3E898D665BB
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=1,c=0,t=6,pt=0,l=0,sg=1:
    0;255;3;0;9;Signature in message: 01D9D7F016D4900614542F96199D1C1848E66826E164117C3F
    0;255;3;0;9;Message to process: 010006000601
    0;255;3;0;9;Current nonce: E4DDE1558F406F93C24ACC4978B5DAD078700CB3E898D665BBAAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: 17D9D7F016D4900614542F96199D1C1848E66826E164117C3F91395B119DB817
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=26,pt=1,l=1,sg=1:2
    0;255;3;0;9;Skipping security for command 3 type 26
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK:
    0;255;3;0;9;Nonce requested from 1. Waiting...
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=17,pt=6,l=25,sg=0:70A5921ABD527FBF58E2644ACAC3EB9D7D190A1ECFA2B45BB4
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;Nonce received from 1.
    0;255;3;0;9;Proceeding with signing...
    0;255;3;0;9;Message to process: 00010E231BFF01
    0;255;3;0;9;Current nonce: 70A5921ABD527FBF58E2644ACAC3EB9D7D190A1ECFA2B45BB4AAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: 417F60D164B7EF1EE9F5664945AEE360F44F196E52428D274230D8D0DB830028
    0;255;3;0;9;Signature in message: 017F60D164B7EF1EE9F5664945AEE360F44F196E52428D27
    0;255;3;0;9;Message signed
    0;255;3;0;9;Message to send has been signed
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=27,pt=1,l=1,sg=1,ft=0,st=OK:1
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: B946C285F3F5F9204731209AF33E759FF1F604EADDAC89BE1CAAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:B946C285F3F5F9204731209AF33E759FF1F604EADDAC89BE1C
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=1,c=1,t=0,pt=7,l=5,sg=1:24.0
    0;255;3;0;9;Signature in message: 01E74C2A504B304F48E28201FBB2B85E10BD50EB
    0;255;3;0;9;Message to process: 01002EE100010000C04101
    0;255;3;0;9;Current nonce: B946C285F3F5F9204731209AF33E759FF1F604EADDAC89BE1CAAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: 69EB3E1CFCF0B6629300837110B152CA8F7A0E2D53A4C8BFEBE4903F1B090864
    0;255;3;0;9;Signature bad: 01EB3E1CFCF0B6629300837110B152CA8F7A0E2D
    0;255;3;0;9;Signature verification failed!
    0;255;3;0;9;!TSF:MSG:SIGN VERIFY FAIL
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=0,c=3,t=16,pt=0,l=0,sg=1:
    0;255;3;0;9;Skipping security for command 3 type 16
    0;255;3;0;9;SHA256: AC6CB618B3BB07F385D25228E62B753BF888DA6351087FD39DAAAAAAAAAAAAAA
    0;255;3;0;9;Skipping security for command 3 type 17
    0;255;3;0;9;TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:AC6CB618B3BB07F385D25228E62B753BF888DA6351087FD39D
    0;255;3;0;9;Transmitted nonce
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=0,c=1,t=1,pt=7,l=5,sg=1:46.0
    0;255;3;0;9;Signature in message: 0151796D338A1717D7B544C78054CBE9E39D901D
    0;255;3;0;9;Message to process: 01002EE101000000384201
    0;255;3;0;9;Current nonce: AC6CB618B3BB07F385D25228E62B753BF888DA6351087FD39DAAAAAAAAAAAAAA
    0;255;3;0;9;HMAC: A54694E7B219D7065CFD2D3C449350372739185EAC6EE5376C0E10561344CB12
    0;255;3;0;9;Signature bad: 014694E7B219D7065CFD2D3C449350372739185E
    0;255;3;0;9;Signature verification failed!
    0;255;3;0;9;!TSF:MSG:SIGN VERIFY FAIL
    
    Node:
    0 MCO:BGN:INIT REPEATER,CP=RNNRAS-,VER=2.1.1
    3 MCO:BGN:BFR
    5 TSM:INIT
    6 TSF:WUR:MS=0
    13 TSM:INIT:TSP OK
    15 TSF:SID:OK,ID=1
    16 TSM:FPAR
    17 Will not sign message for destination 255 as it does not require it
    59 TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    203 TSF:MSG:READ,0-0-1,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    207 Skipping security for command 3 type 8
    211 TSF:MSG:FPAR OK,ID=0,D=1
    2066 TSM:FPAR:OK
    2067 TSM:ID
    2068 TSM:ID:OK
    2070 TSM:UPL
    2071 Will not sign message for destination 0 as it does not require it
    2079 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
    2096 TSF:MSG:READ,0-0-1,s=255,c=3,t=25,pt=1,l=1,sg=0:1
    2101 Skipping security for command 3 type 25
    2105 TSF:MSG:PONG RECV,HP=1
    2107 TSM:UPL:OK
    2109 TSM:READY:ID=1,PAR=0,DIS=1
    2112 Signing required
    2114 Will not sign message for destination 0 as it does not require it
    2121 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101
    2128 Waiting for GW to send signing preferences...
    2158 TSF:MSG:READ,0-0-1,s=255,c=3,t=15,pt=6,l=2,sg=0:0101
    2163 Skipping security for command 3 type 15
    2167 Mark node 0 as one that require signed messages
    2171 Mark node 0 as one that do not require whitelisting
    2181 Skipping security for command 3 type 16
    2186 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK:
    2192 Nonce requested from 0. Waiting...
    2225 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=0:FA0CEF05B11135F19B646D3FA36FE1BCFCC8DAC1A3773BDC79
    2234 Skipping security for command 3 type 17
    2238 Nonce received from 0.
    2240 Proceeding with signing...
    Message to process: 01002E0012FF322E312E31
    Current nonce: FA0CEF05B11135F19B646D3FA36FE1BCFCC8DAC1A3773BDC79AAAAAAAAAAAAAA
    HMAC: 41EDFE67C83BA7ADD4B868950DA55ADF92E74C2D89903167166C396470C02F3E
    Signature in message: 01EDFE67C83BA7ADD4B868950DA55ADF92E74C2D
    2334 Message signed
    2341 Message to send has been signed
    2348 TSF:MSG:SEND,1-1-0-0,s=255,c=0,t=18,pt=0,l=5,sg=1,ft=0,st=OK:2.1.1
    2354 Skipping security for command 3 type 16
    2361 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    2367 Nonce requested from 0. Waiting...
    2492 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:D92FBB57AB79BCCC3E9452F7E4B876FFFBC7FE47C2AD0613C8
    2501 Skipping security for command 3 type 17
    2505 Nonce received from 0.
    2508 Proceeding with signing...
    Message to process: 01000E2306FF00
    Current nonce: D92FBB57AB79BCCC3E9452F7E4B876FFFBC7FE47C2AD0613C8AAAAAAAAAAAAAA
    HMAC: 1D815088794CC5704C5790821D82DFD0435B5A47B4FBC14C745AA2B639D4D9DA
    Signature in message: 01815088794CC5704C5790821D82DFD0435B5A47B4FBC14C
    2601 Message signed
    2609 Message to send has been signed
    2615 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=6,pt=1,l=1,sg=1,ft=0,st=OK:0
    4621 Skipping security for command 3 type 16
    4627 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    4633 Nonce requested from 0. Waiting...
    4665 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:E38FE6554A3AE6D02B91B69EE2B67602506D8308DB5D4EAF3E
    4675 Skipping security for command 3 type 17
    4679 Nonce received from 0.
    4681 Proceeding with signing...
    Message to process: 01002E030BFF52656C6179
    Current nonce: E38FE6554A3AE6D02B91B69EE2B67602506D8308DB5D4EAF3EAAAAAAAAAAAAAA
    HMAC: 4BE3BCEFCF2F06C922BD6D487BBA7E67C9B717BCF2852083854E7555620473AD
    Signature in message: 01E3BCEFCF2F06C922BD6D487BBA7E67C9B717BC
    4775 Message signed
    4783 Message to send has been signed
    4789 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=11,pt=0,l=5,sg=1,ft=0,st=OK:Relay
    4795 Skipping security for command 3 type 16
    4802 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    4808 Nonce requested from 0. Waiting...
    4933 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:2385BA03A156C8D203085EE05B480A4819CC88E82D9BA6209F
    4942 Skipping security for command 3 type 17
    4946 Nonce received from 0.
    4950 Proceeding with signing...
    Message to process: 01001E030CFF312E30
    Current nonce: 2385BA03A156C8D203085EE05B480A4819CC88E82D9BA6209FAAAAAAAAAAAAAA
    HMAC: F3DDCD53799743889B645AC6524B32B4AEB4B71E368CCE2BE60CC00E0AD2D183
    Signature in message: 01DDCD53799743889B645AC6524B32B4AEB4B71E368C
    5043 Message signed
    5050 Message to send has been signed
    5056 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=12,pt=0,l=3,sg=1,ft=0,st=OK:1.0
    5062 Skipping security for command 3 type 16
    5069 TSF:MSG:SEND,1-1-0-0,s=1,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    5075 Nonce requested from 0. Waiting...
    5200 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:F1048244D308662147413A8531A71EF5C5E241710A859D7562
    5210 Skipping security for command 3 type 17
    5214 Nonce received from 0.
    5217 Proceeding with signing...
    Message to process: 010006000301
    Current nonce: F1048244D308662147413A8531A71EF5C5E241710A859D7562AAAAAAAAAAAAAA
    HMAC: 4EE5C5B659AF41CC4B5C9315F94E1A22E2DF10FAD361061CB3DB7925952BFDAE
    Signature in message: 01E5C5B659AF41CC4B5C9315F94E1A22E2DF10FAD361061CB3
    5310 Message signed
    5317 Message to send has been signed
    5323 TSF:MSG:SEND,1-1-0-0,s=1,c=0,t=3,pt=0,l=0,sg=1,ft=0,st=OK:
    5329 Skipping security for command 3 type 16
    5336 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    5342 Nonce requested from 0. Waiting...
    5468 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:24D0165B9B9152F2003597B3747DC61B9C67C595A1518C31BD
    5477 Skipping security for command 3 type 17
    5481 Nonce received from 0.
    5483 Proceeding with signing...
    Message to process: 0100B6030BFF54656D7065726174757265416E6448756D6964697479
    Current nonce: 24D0165B9B9152F2003597B3747DC61B9C67C595A1518C31BDAAAAAAAAAAAAAA
    HMAC: 513E8E942127E5E2D512CE288F2B7E6418B8809F69B8B1EAE20D97A4407F9C86
    Signature in message: 013E8E
    5577 Message signed
    5584 Message to send has been signed
    5591 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=11,pt=0,l=22,sg=1,ft=0,st=OK:TemperatureAndHumidity
    5599 Skipping security for command 3 type 16
    5605 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    5611 Nonce requested from 0. Waiting...
    5736 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:F95653815901C8FACA219583E9C6FEA53596238E460528DA6A
    5746 Skipping security for command 3 type 17
    5750 Nonce received from 0.
    5752 Proceeding with signing...
    Message to process: 01001E030CFF312E31
    Current nonce: F95653815901C8FACA219583E9C6FEA53596238E460528DA6AAAAAAAAAAAAAAA
    HMAC: 22FD4A335914B1FA7065E23D2B0C98FFB67E06B582AA0C8B3865B44CE9E1D49E
    Signature in message: 01FD4A335914B1FA7065E23D2B0C98FFB67E06B582AA
    5847 Message signed
    5854 Message to send has been signed
    5860 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=12,pt=0,l=3,sg=1,ft=0,st=OK:1.1
    5866 Skipping security for command 3 type 16
    5872 TSF:MSG:SEND,1-1-0-0,s=0,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    5878 Nonce requested from 0. Waiting...
    6003 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:D356C66B145EA4E7DCF69EC5B3C20E38D6046C50A4FEACE71B
    6013 Skipping security for command 3 type 17
    6018 Nonce received from 0.
    6020 Proceeding with signing...
    Message to process: 010006000700
    Current nonce: D356C66B145EA4E7DCF69EC5B3C20E38D6046C50A4FEACE71BAAAAAAAAAAAAAA
    HMAC: F4E7923AA716F2CE850EB4A27962F15BF36941D559BA1DCF45C1821C7AD8E479
    Signature in message: 01E7923AA716F2CE850EB4A27962F15BF36941D559BA1DCF45
    6114 Message signed
    6121 Message to send has been signed
    6127 TSF:MSG:SEND,1-1-0-0,s=0,c=0,t=7,pt=0,l=0,sg=1,ft=0,st=OK:
    6132 Skipping security for command 3 type 16
    6139 TSF:MSG:SEND,1-1-0-0,s=1,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    6146 Nonce requested from 0. Waiting...
    6270 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:E4DDE1558F406F93C24ACC4978B5DAD078700CB3E898D665BB
    6280 Skipping security for command 3 type 17
    6284 Nonce received from 0.
    6287 Proceeding with signing...
    Message to process: 010006000601
    Current nonce: E4DDE1558F406F93C24ACC4978B5DAD078700CB3E898D665BBAAAAAAAAAAAAAA
    HMAC: 17D9D7F016D4900614542F96199D1C1848E66826E164117C3F91395B119DB817
    Signature in message: 01D9D7F016D4900614542F96199D1C1848E66826E164117C3F
    6380 Message signed
    6387 Message to send has been signed
    6393 TSF:MSG:SEND,1-1-0-0,s=1,c=0,t=6,pt=0,l=0,sg=1,ft=0,st=OK:
    6400 MCO:REG:REQ
    6401 Skipping security for command 3 type 26
    6408 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=26,pt=1,l=1,sg=1,ft=0,st=OK:2
    6514 TSF:MSG:READ,0-0-1,s=255,c=3,t=16,pt=0,l=0,sg=0:
    6519 Skipping security for command 3 type 16
    SHA256: 70A5921ABD527FBF58E2644ACAC3EB9D7D190A1ECFA2B45BB400000000000000
    6539 Skipping security for command 3 type 17
    6551 TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=17,pt=6,l=25,sg=0,ft=0,st=OK:70A5921ABD527FBF58E2644ACAC3EB9D7D190A1ECFA2B45BB4
    6561 Transmitted nonce
    6681 TSF:MSG:READ,0-0-1,s=255,c=3,t=27,pt=1,l=1,sg=1:1
    Signature in message: 017F60D164B7EF1EE9F5664945AEE360F44F196E52428D27
    Message to process: 00010E231BFF01
    Current nonce: 70A5921ABD527FBF58E2644ACAC3EB9D7D190A1ECFA2B45BB4AAAAAAAAAAAAAA
    HMAC: 71BFB4D075B6FC246460FC35C2173D8DBD366ABF0A6ED0C23FA2F84AC4293267
    Signature bad: 01BFB4D075B6FC246460FC35C2173D8DBD366ABF0A6ED0C2
    6782 Signature verification failed!
    6791 !TSF:MSG:SIGN VERIFY FAIL
    6794 MCO:BGN:STP
    6796 MCO:SLP:MS=1000,SMS=0,I1=255,M1=255,I2=255,M2=255
    6801 !MCO:SLP:REP
    7803 MCO:BGN:INIT OK,TSP=1
    7827 Skipping security for command 3 type 16
    7834 TSF:MSG:SEND,1-1-0-0,s=1,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    7840 Nonce requested from 0. Waiting...
    7872 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:B946C285F3F5F9204731209AF33E759FF1F604EADDAC89BE1C
    7881 Skipping security for command 3 type 17
    7885 Nonce received from 0.
    7888 Proceeding with signing...
    Message to process: 01002EE100010000C04101
    Current nonce: B946C285F3F5F9204731209AF33E759FF1F604EADDAC89BE1CAAAAAAAAAAAAAA
    HMAC: 4BE74C2A504B304F48E28201FBB2B85E10BD50EB7C577F3F443691573796A4F6
    Signature in message: 01E74C2A504B304F48E28201FBB2B85E10BD50EB
    7982 Message signed
    7989 Message to send has been signed
    7995 TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=0,pt=7,l=5,sg=1,ft=0,st=OK:24.0
    T: 24.00
    8002 Skipping security for command 3 type 16
    8008 TSF:MSG:SEND,1-1-0-0,s=0,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    8014 Nonce requested from 0. Waiting...
    8153 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:AC6CB618B3BB07F385D25228E62B753BF888DA6351087FD39D
    8162 Skipping security for command 3 type 17
    8166 Nonce received from 0.
    8169 Proceeding with signing...
    Message to process: 01002EE101000000384201
    Current nonce: AC6CB618B3BB07F385D25228E62B753BF888DA6351087FD39DAAAAAAAAAAAAAA
    HMAC: EB51796D338A1717D7B544C78054CBE9E39D901D56F76EBA9A61CC753EFADB59
    Signature in message: 0151796D338A1717D7B544C78054CBE9E39D901D
    8262 Message signed
    8269 Message to send has been signed
    8275 TSF:MSG:SEND,1-1-0-0,s=0,c=1,t=1,pt=7,l=5,sg=1,ft=0,st=OK:46.0
    H: 46.00
    8283 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
    8288 !MCO:SLP:REP
    68311 Skipping security for command 3 type 16
    68317 TSF:MSG:SEND,1-1-0-0,s=0,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    68323 Nonce requested from 0. Waiting...
    68356 TSF:MSG:READ,0-0-1,s=255,c=3,t=17,pt=6,l=25,sg=1:8A0A85658B3A6AA9ABBBDC34E3B6891159CF3BD3369A0334BA
    68365 Skipping security for command 3 type 17
    68369 Nonce received from 0.
    68372 Proceeding with signing...
    Message to process: 01002EE101000000344201
    Current nonce: 8A0A85658B3A6AA9ABBBDC34E3B6891159CF3BD3369A0334BAAAAAAAAAAAAAAA
    HMAC: 6D6A1E530B4840BFF51DD3D926CEE1761909EB6F458B16F0D7CF2EBBB48321CB
    Signature in message: 016A1E530B4840BFF51DD3D926CEE1761909EB6F
    68465 Message signed
    68473 Message to send has been signed
    68482 TSF:MSG:SEND,1-1-0-0,s=0,c=1,t=1,pt=7,l=5,sg=1,ft=0,st=OK:45.0
    H: 45.00
    68489 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
    68494 !MCO:SLP:REP
    

    This is without using whitelisting, just signing. The node and gateway are both working in regular mode. I am able to send a command through Domoticz to turn on/off the relay and also see the temperature sensor attached to the same arduino.
    All I added to the scetches of the GW and node was the following:

    // Select soft/hardware signing method
    #define MY_SIGNING_SOFT //!< Software signing
    //#define MY_SIGNING_ATSHA204 //!< Hardware signing using ATSHA204A
    
    // Enable node whitelisting
    //#define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}}}
    // Enable this if you want destination node to sign all messages sent to this node.
    #define MY_SIGNING_REQUEST_SIGNATURES
    
    
    // SETTINGS FOR MY_SIGNING_SOFT
    #define MY_SIGNING_SOFT_RANDOMSEED_PIN A5 //!< Unconnected analog pin for random seed
    
    // SETTINGS FOR MY_SIGNING_ATSHA204
    //#define MY_SIGNING_ATSHA204_PIN 17 //!< A3 - pin where ATSHA204 is attached
    

    What step am I missing?
    Thanks


  • Contest Winner

    @karelsmits Any configuration settings you do in your sketch MUST be placed before

    #include <MySensors.h>
    

  • Contest Winner

    @karelsmits Also, you cannot have the same whitelist on both GW and node. Each have their own serial, and nodeId so they have different whitelists. You had this in your original settings. They were correct and in line with the personalization data you provided.
    Just make sure that these settings take place before including MySensors.h and make sure you don't have settings in MyConfig.h that would override the settings you do in your sketch,


  • Contest Winner

    @karelsmits
    I have checked your most recent log and it looks very strange. Signatures are correctly verified in one direction but not the other.
    I honestly have no explanation for how this is possible.
    Could you try the beta version? That I have verified myself to be working.
    But be advised; you will have to re-run the personalization procedure if you do that. Details are here.
    The beta also provide some other security related options that you could try.
    Firstly I recommend that you define MY_SIGNING_WEAK_SECURITY since security is a bit tighter for the next release (a GW will remember and not reset the signing preferences of a node unless that flag is set, and that could be a pain when testing signing but not committing to stick with it).



  • okay will do and post you. thank again.
    BTW where do i find the beta link?



  • sorry, but do you mind pointing the beta link you're referring to?
    thanks.


  • Contest Winner



  • Hi, thanks for your help so far.
    I am usinf the version you recommended. Now the signing seems to work, because I get a confirmation message from the gateway and the node. For some reason the gateway reports that the connection is dropped, it keeps on happening. What is wrong?
    I am only using signing, not whitelisting
    When signing is disabled, everything is working.
    Just FYI,I did not change anything in MyConfig.h

    Gateway:
    __  __       ____
    |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
    | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
    | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
    |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
            |___/                      2.2.0-beta
    
    17 MCO:BGN:INIT GW,CP=RNNGAS--,VER=2.2.0-beta
    49 SGN:PER:OK
    79 SGN:INI:BND OK
    81 TSM:INIT
    82 TSF:WUR:MS=0
    90 TSM:INIT:TSP OK
    91 TSM:INIT:GW MODE
    93 TSM:READY:ID=0,PAR=0,DIS=0
    96 MCO:REG:NOT NEEDED
    IP: 192.168.0.249
    1398 MCO:BGN:STP
    1400 MCO:BGN:INIT OK,TSP=1
    2089 TSF:MSG:READ,9-9-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    2095 TSF:MSG:BC
    2097 TSF:MSG:FPAR REQ,ID=9
    2099 TSF:CKU:OK,FCTRL
    2101 TSF:MSG:GWL OK
    2158 SGN:SKP:MSG CMD=3,TYPE=8
    2164 TSF:MSG:SEND,0-0-9-9,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    4141 TSF:MSG:READ,9-9-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    4146 SGN:SKP:MSG CMD=3,TYPE=24
    4149 TSF:MSG:PINGED,ID=9,HP=1
    4151 SGN:SKP:MSG CMD=3,TYPE=25
    4158 TSF:MSG:SEND,0-0-9-9,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
    4180 TSF:MSG:READ,9-9-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0101
    4186 SGN:SKP:MSG CMD=3,TYPE=15
    4189 SGN:PRE:SGN REQ,FROM=9
    4192 SGN:PRE:SGN REQ,TO=9
    4194 SGN:PRE:WHI NREQ,TO=9
    4196 SGN:SKP:MSG CMD=3,TYPE=15
    4201 TSF:MSG:SEND,0-0-9-9,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101
    4207 SGN:PRE:XMT,TO=9
    4215 TSF:MSG:READ,9-9-0,s=255,c=3,t=16,pt=0,l=0,sg=0:
    4220 SGN:SKP:MSG CMD=3,TYPE=16
    4238 SGN:SKP:MSG CMD=3,TYPE=17
    4246 TSF:MSG:SEND,0-0-9-9,s=255,c=3,t=17,pt=6,l=25,sg=0,ft=0,st=OK:<NONCE>
    4253 SGN:NCE:XMT,TO=0
    4355 TSF:MSG:READ,9-9-0,s=255,c=0,t=17,pt=0,l=10,sg=1:2.2.0-beta
    4361 SGN:BND:NONCE=4F5AD49AA0F433BE26060A9B1C55F23CC577EA281775DC0B02AAAAAAAAAAAAAA
    4448 SGN:BND:HMAC=78CCB5B0692D9B11DDE1FFB97C0DE0A17040DD6D55BC5BF357163635ACAAE484
    4456 SGN:VER:OK
    4458 TSF:MSG:READ,9-9-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
    4462 SGN:SKP:MSG CMD=3,TYPE=16
    4480 SGN:SKP:MSG CMD=3,TYPE=17
    4486 TSF:MSG:SEND,0-0-9-9,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
    4492 SGN:NCE:XMT,TO=0
    4594 TSF:MSG:READ,9-9-0,s=255,c=3,t=6,pt=1,l=1,sg=1:0
    4599 SGN:BND:NONCE=A7CA0C7EF09F65DE5D02E9351E48E2A3D6DBF3537ECCF333F4AAAAAAAAAAAAAA
    4686 SGN:BND:HMAC=E731F01B8DF928A36DACBBCDE45651A4B7BE0B1D1248FAB2936CADC0BE85B9AF
    4694 SGN:VER:OK
    6606 TSF:MSG:READ,9-9-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
    6611 SGN:SKP:MSG CMD=3,TYPE=16
    6628 SGN:SKP:MSG CMD=3,TYPE=17
    6634 TSF:MSG:SEND,0-0-9-9,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
    6641 SGN:NCE:XMT,TO=0
    6743 TSF:MSG:READ,9-9-0,s=255,c=3,t=11,pt=0,l=11,sg=1:Secure Lock
    6749 SGN:BND:NONCE=CFCF368C893918E8B30F5BB9BD05BE2137CE6BC1C9D0A0C46AAAAAAAAAAAAAAA
    6836 SGN:BND:HMAC=E8CCAAE5D1577EFAE089947D520345555DF0A2A7038CDB17E8B9D897C41B5137
    6844 SGN:VER:OK
    6846 TSF:MSG:READ,9-9-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
    6850 SGN:SKP:MSG CMD=3,TYPE=16
    6867 SGN:SKP:MSG CMD=3,TYPE=17
    6874 TSF:MSG:SEND,0-0-9-9,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
    6880 SGN:NCE:XMT,TO=0
    6985 TSF:MSG:READ,9-9-0,s=255,c=3,t=12,pt=0,l=3,sg=1:1.0
    6990 SGN:BND:NONCE=81349D41F58F0A4219206D8C6A6C5CD822CD125BA0E22C1D08AAAAAAAAAAAAAA
    7077 SGN:BND:HMAC=144CC1F339C5D15BADE41B8CB8EC95FC6AAA37249EB4198169206F8D2116B6C0
    7085 SGN:VER:OK
    7087 TSF:MSG:READ,9-9-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
    7092 SGN:SKP:MSG CMD=3,TYPE=16
    7109 SGN:SKP:MSG CMD=3,TYPE=17
    7114 TSF:MSG:SEND,0-0-9-9,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
    7121 SGN:NCE:XMT,TO=0
    7224 TSF:MSG:READ,9-9-0,s=1,c=0,t=19,pt=0,l=14,sg=1:SecureActuator
    7230 SGN:BND:NONCE=80764434FE2DB0B952CE5DB13822E08EA76E4CC32848155EBCAAAAAAAAAAAAAA
    7317 SGN:BND:HMAC=7EBFF55E368306D2C1E9A0339DED228E80A0887140052FA13AABF1E5FE533218
    7324 SGN:VER:OK
    7326 TSF:MSG:READ,9-9-0,s=255,c=3,t=26,pt=1,l=1,sg=1:2
    7331 SGN:SKP:MSG CMD=3,TYPE=26
    7334 SGN:SKP:MSG CMD=3,TYPE=16
    7340 TSF:MSG:SEND,0-0-9-9,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    7346 SGN:SGN:NCE REQ,TO=9
    9250 TSF:MSG:READ,9-9-0,s=255,c=3,t=26,pt=1,l=1,sg=1:2
    9255 SGN:SKP:MSG CMD=3,TYPE=26
    9259 SGN:SKP:MSG CMD=3,TYPE=16
    9264 TSF:MSG:SEND,58-80-9-77,s=67,c=7,t=32,pt=2,l=10,sg=0,ft=0,st=OK:17485
    9270 SGN:SGN:NCE REQ,TO=9
     __  __       ____
    |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
    | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
    | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
    |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
            |___/                      2.2.0-beta
    
    18 MCO:BGN:INIT GW,CP=RNNGAS--,VER=2.2.0-beta
    50 SGN:PER:OK
    77 SGN:INI:BND OK
    79 TSM:INIT
    80 TSF:WUR:MS=0
    88 TSM:INIT:TSP OK
    90 TSM:INIT:GW MODE
    91 TSM:READY:ID=0,PAR=0,DIS=0
    94 MCO:REG:NOT NEEDED
    IP: 192.168.0.249
    1397 MCO:BGN:STP
    1398 MCO:BGN:INIT OK,TSP=1
    1988 TSF:MSG:READ,9-9-0,s=255,c=3,t=26,pt=1,l=1,sg=1:2
    1993 SGN:SKP:MSG CMD=3,TYPE=26
    1996 SGN:SKP:MSG CMD=3,TYPE=16
    2000 TSF:MSG:SEND,0-0-9-9,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK:
    2007 SGN:SGN:NCE REQ,TO=9
    2030 TSF:MSG:READ,9-9-0,s=255,c=3,t=17,pt=6,l=25,sg=0:<NONCE>
    2035 SGN:SKP:MSG CMD=3,TYPE=17
    2038 SGN:NCE:FROM=9
    2040 SGN:NCE:15!=9 (DROPPED)
     __  __       ____
    |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
    | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
    | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
    |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
            |___/                      2.2.0-beta
    
    18 MCO:BGN:INIT GW,CP=RNNGAS--,VER=2.2.0-beta
    51 SGN:PER:OK
    80 SGN:INI:BND OK
    82 TSM:INIT
    83 TSF:WUR:MS=0
    91 TSM:INIT:TSP OK
    92 TSM:INIT:GW MODE
    94 TSM:READY:ID=0,PAR=0,DIS=0
    97 MCO:REG:NOT NEEDED
    IP: 192.168.0.249
    1399 MCO:BGN:STP
    1401 MCO:BGN:INIT OK,TSP=1
    1956 TSF:MSG:READ,9-9-0,s=255,c=3,t=26,pt=1,l=1,sg=1:2
    1961 SGN:SKP:MSG CMD=3,TYPE=26
    1965 SGN:SKP:MSG CMD=3,TYPE=16
    1969 TSF:MSG:SEND,0-0-9-9,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK:
    1975 SGN:SGN:NCE REQ,TO=9
    1998 TSF:MSG:READ,9-9-0,s=255,c=3,t=17,pt=6,l=25,sg=0:<NONCE>
    2003 SGN:SKP:MSG CMD=3,TYPE=17
    2007 SGN:NCE:FROM=9
    2009 SGN:NCE:7!=9 (DROPPED)
     __  __       ____
    |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
    | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
    | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
    |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
            |___/                      2.2.0-beta
    
    18 MCO:BGN:INIT GW,CP=RNNGAS--,VER=2.2.0-beta
    51 SGN:PER:OK
    79 SGN:INI:BND OK
    81 TSM:INIT
    82 TSF:WUR:MS=0
    90 TSM:INIT:TSP OK
    92 TSM:INIT:GW MODE
    94 TSM:READY:ID=0,PAR=0,DIS=0
    96 MCO:REG:NOT NEEDED
    IP: 192.168.0.249
    1399 MCO:BGN:STP
    1401 MCO:BGN:INIT OK,TSP=1
    1965 TSF:MSG:READ,9-9-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
    1969 SGN:SKP:MSG CMD=3,TYPE=16
    1986 SGN:SKP:MSG CMD=3,TYPE=17
    1991 TSF:MSG:SEND,0-0-9-9,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
    1998 SGN:NCE:XMT,TO=0
    2101 TSF:MSG:READ,9-9-0,s=255,c=3,t=23,pt=0,l=3,sg=1:LDB
    2107 SGN:BND:NONCE=82C773EAE20327A3D8AF62421F246E67B56C3B228CA6370164AAAAAAAAAAAAAA
    2194 SGN:BND:HMAC=52A2F9D7C90A5A8EB3B5820C654689041561D8FB42BCE89A7B9A91B3D73353E2
    2201 SGN:VER:OK
    
    Node:
    __  __       ____
    |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
    | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
    | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
    |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
            |___/                      2.2.0-beta
    
    17 MCO:BGN:INIT NODE,CP=RNNNAS--,VER=2.2.0-beta
    49 SGN:PER:OK
    77 SGN:INI:BND OK
    79 TSM:INIT
    80 TSF:WUR:MS=0
    88 TSM:INIT:TSP OK
    89 TSF:SID:OK,ID=9
    91 TSM:FPAR
    92 SGN:SGN:NREQ=255
    129 TSF:MSG:SEND,9-9-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    2137 !TSM:FPAR:NO REPLY
    2139 TSM:FPAR
    2140 SGN:SGN:NREQ=255
    2177 TSF:MSG:SEND,9-9-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    4185 !TSM:FPAR:NO REPLY
    4187 TSM:FPAR
    4188 SGN:SGN:NREQ=255
    4225 TSF:MSG:SEND,9-9-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    4265 TSF:MSG:READ,0-0-9,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    4270 SGN:SKP:MSG CMD=3,TYPE=8
    4273 TSF:MSG:FPAR OK,ID=0,D=1
    6233 TSM:FPAR:OK
    6234 TSM:ID
    6235 TSM:ID:OK
    6237 TSM:UPL
    6238 SGN:SKP:MSG CMD=3,TYPE=24
    6242 TSF:MSG:SEND,9-9-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
    6259 TSF:MSG:READ,0-0-9,s=255,c=3,t=25,pt=1,l=1,sg=0:1
    6263 SGN:SKP:MSG CMD=3,TYPE=25
    6266 TSF:MSG:PONG RECV,HP=1
    6269 TSM:UPL:OK
    6270 TSM:READY:ID=9,PAR=0,DIS=1
    6274 SGN:PRE:SGN REQ
    6276 SGN:PRE:WHI NREQ
    6278 SGN:SKP:MSG CMD=3,TYPE=15
    6282 TSF:MSG:SEND,9-9-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101
    6289 SGN:PRE:XMT,TO=0
    6291 SGN:PRE:WAIT GW
    6301 TSF:MSG:READ,0-0-9,s=255,c=3,t=15,pt=6,l=2,sg=0:0101
    6307 SGN:SKP:MSG CMD=3,TYPE=15
    6309 SGN:PRE:SGN REQ,FROM=0
    6312 SGN:SKP:MSG CMD=3,TYPE=16
    6317 TSF:MSG:SEND,9-9-0-0,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK:
    6323 SGN:SGN:NCE REQ,TO=0
    6347 TSF:MSG:READ,0-0-9,s=255,c=3,t=17,pt=6,l=25,sg=0:<NONCE>
    6352 SGN:SKP:MSG CMD=3,TYPE=17
    6355 SGN:NCE:FROM=0
    6358 SGN:BND:NONCE=4F5AD49AA0F433BE26060A9B1C55F23CC577EA281775DC0B02AAAAAAAAAAAAAA
    6445 SGN:BND:HMAC=78CCB5B0692D9B11DDE1FFB97C0DE0A17040DD6D55BC5BF357163635ACAAE484
    6452 SGN:SGN:SGN
    6456 TSF:MSG:SEND,9-9-0-0,s=255,c=0,t=17,pt=0,l=10,sg=1,ft=0,st=OK:2.2.0-beta
    6463 SGN:SKP:MSG CMD=3,TYPE=16
    6469 TSF:MSG:SEND,9-9-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    6475 SGN:SGN:NCE REQ,TO=0
    6586 TSF:MSG:READ,0-0-9,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
    6592 SGN:SKP:MSG CMD=3,TYPE=17
    6594 SGN:NCE:FROM=0
    6596 SGN:BND:NONCE=A7CA0C7EF09F65DE5D02E9351E48E2A3D6DBF3537ECCF333F4AAAAAAAAAAAAAA
    6684 SGN:BND:HMAC=E731F01B8DF928A36DACBBCDE45651A4B7BE0B1D1248FAB2936CADC0BE85B9AF
    6691 SGN:SGN:SGN
    6695 TSF:MSG:SEND,9-9-0-0,s=255,c=3,t=6,pt=1,l=1,sg=1,ft=0,st=OK:0
    8702 SGN:SKP:MSG CMD=3,TYPE=16
    8708 TSF:MSG:SEND,9-9-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    8714 SGN:SGN:NCE REQ,TO=0
    8734 TSF:MSG:READ,0-0-9,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
    8740 SGN:SKP:MSG CMD=3,TYPE=17
    8743 SGN:NCE:FROM=0
    8745 SGN:BND:NONCE=CFCF368C893918E8B30F5BB9BD05BE2137CE6BC1C9D0A0C46AAAAAAAAAAAAAAA
    8833 SGN:BND:HMAC=E8CCAAE5D1577EFAE089947D520345555DF0A2A7038CDB17E8B9D897C41B5137
    8840 SGN:SGN:SGN
    8844 TSF:MSG:SEND,9-9-0-0,s=255,c=3,t=11,pt=0,l=11,sg=1,ft=0,st=OK:Secure Lock
    8851 SGN:SKP:MSG CMD=3,TYPE=16
    8857 TSF:MSG:SEND,9-9-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    8863 SGN:SGN:NCE REQ,TO=0
    8974 TSF:MSG:READ,0-0-9,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
    8980 SGN:SKP:MSG CMD=3,TYPE=17
    8982 SGN:NCE:FROM=0
    8984 SGN:BND:NONCE=81349D41F58F0A4219206D8C6A6C5CD822CD125BA0E22C1D08AAAAAAAAAAAAAA
    9071 SGN:BND:HMAC=144CC1F339C5D15BADE41B8CB8EC95FC6AAA37249EB4198169206F8D2116B6C0
    9079 SGN:SGN:SGN
    9086 TSF:MSG:SEND,9-9-0-0,s=255,c=3,t=12,pt=0,l=3,sg=1,ft=0,st=OK:1.0
    9093 SGN:SKP:MSG CMD=3,TYPE=16
    9098 TSF:MSG:SEND,9-9-0-0,s=1,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    9104 SGN:SGN:NCE REQ,TO=0
    9216 TSF:MSG:READ,0-0-9,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
    9221 SGN:SKP:MSG CMD=3,TYPE=17
    9224 SGN:NCE:FROM=0
    9226 SGN:BND:NONCE=80764434FE2DB0B952CE5DB13822E08EA76E4CC32848155EBCAAAAAAAAAAAAAA
    9313 SGN:BND:HMAC=7EBFF55E368306D2C1E9A0339DED228E80A0887140052FA13AABF1E5FE533218
    9320 SGN:SGN:SGN
    9324 TSF:MSG:SEND,9-9-0-0,s=1,c=0,t=19,pt=0,l=14,sg=1,ft=0,st=OK:SecureActuator
    9332 MCO:REG:REQ
    9333 SGN:SKP:MSG CMD=3,TYPE=26
    9339 TSF:MSG:SEND,9-9-0-0,s=255,c=3,t=26,pt=1,l=1,sg=1,ft=0,st=OK:2
    9441 TSF:MSG:READ,0-0-9,s=255,c=3,t=16,pt=0,l=0,sg=1:
    9445 !TSF:MSG:PVER,1=2
    11346 SGN:SKP:MSG CMD=3,TYPE=26
    11352 TSF:MSG:SEND,9-9-0-0,s=255,c=3,t=26,pt=1,l=1,sg=1,ft=0,st=OK:2
    11364 TSF:MSG:READ,58-80-77,s=67,c=7,t=32,pt=2,l=10,sg=0:17485
    11369 !TSF:MSG:PVER,3=2
    13358 SGN:SKP:MSG CMD=3,TYPE=26
    13363 TSF:MSG:SEND,9-9-0-0,s=255,c=3,t=26,pt=1,l=1,sg=1,ft=0,st=OK:2
    13374 TSF:MSG:READ,0-0-9,s=255,c=3,t=16,pt=0,l=0,sg=0:
    13379 SGN:SKP:MSG CMD=3,TYPE=16
    13382 SGN:NCE:LEFT=4
    13399 SGN:SKP:MSG CMD=3,TYPE=17
    13404 TSF:MSG:SEND,9-9-0-0,s=255,c=3,t=17,pt=6,l=25,sg=0,ft=0,st=OK:<NONCE>
    13411 SGN:NCE:XMT,TO=9
    15369 SGN:SKP:MSG CMD=3,TYPE=26
    15374 TSF:MSG:SEND,9-9-0-0,s=255,c=3,t=26,pt=1,l=1,sg=1,ft=0,st=OK:2
    15385 TSF:MSG:READ,0-0-9,s=255,c=3,t=16,pt=0,l=0,sg=0:
    15390 SGN:SKP:MSG CMD=3,TYPE=16
    15393 SGN:NCE:LEFT=3
    15410 SGN:SKP:MSG CMD=3,TYPE=17
    15415 TSF:MSG:SEND,9-9-0-0,s=255,c=3,t=17,pt=6,l=25,sg=0,ft=0,st=OK:<NONCE>
    15422 SGN:NCE:XMT,TO=9
    17382 MCO:NLK:NODE LOCKED. TO UNLOCK, GND PIN 14 AND RESET
    17387 SGN:SKP:MSG CMD=3,TYPE=16
    17392 TSF:MSG:SEND,9-9-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
    17398 SGN:SGN:NCE REQ,TO=0
    17420 TSF:MSG:READ,0-0-9,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
    17425 SGN:SKP:MSG CMD=3,TYPE=17
    17428 SGN:NCE:FROM=0
    17430 SGN:BND:NONCE=82C773EAE20327A3D8AF62421F246E67B56C3B228CA6370164AAAAAAAAAAAAAA
    17517 SGN:BND:HMAC=52A2F9D7C90A5A8EB3B5820C654689041561D8FB42BCE89A7B9A91B3D73353E2
    17525 SGN:SGN:SGN
    17529 TSF:MSG:SEND,9-9-0-0,s=255,c=3,t=23,pt=0,l=3,sg=1,ft=0,st=OK:LDB
    17536 MCO:NLK:TSL
    

    Thank you



  • This is my node code regarding signing:

    #define MY_NODE_ID 5
     
    #define MY_DEBUG //!< Enable debug prints to serial monitor
    #define MY_DEBUG_VERBOSE_SIGNING //!< Enable signing related debug prints to serial monitor
    #define MY_NODE_LOCK_FEATURE //!< Enable lockdown of node if suspicious activity is detected
    
    // Enable and select radio type attached
    #define MY_RADIO_NRF24 //!< NRF24L01 radio driver
    //#define MY_RADIO_RFM69 //!< RFM69 radio driver
    
    // Select soft/hardware signing method
    #define MY_SIGNING_SOFT //!< Software signing
    //#define MY_SIGNING_ATSHA204 //!< Hardware signing using ATSHA204A
    
    // Enable node whitelisting
    //#define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}}}
    // Enable this if you want destination node to sign all messages sent to this node.
    //#define MY_SIGNING_REQUEST_SIGNATURES
    
    
    // SETTINGS FOR MY_SIGNING_SOFT
    #define MY_SIGNING_SOFT_RANDOMSEED_PIN A5 //!< Unconnected analog pin for random seed
    
    // SETTINGS FOR MY_SIGNING_ATSHA204
    #define MY_SIGNING_ATSHA204_PIN 17 //!< A3 - pin where ATSHA204 is attached
    

  • Contest Winner

    @karelsmits on beta with all debugging enabled and signing, code gets so large that the stack becomes too small. This can cause "cheap" gateways to crash and reboot. I am guessing you run some atmga328p based gw right?
    Try to disable at least the verbose debug, possible all debug on the GW and it should run better.



  • Dear Anticimex,
    Thank you so much for helping out.
    This is what I had to do to solve this:
    I used the development edition of mysensors, I had to disable debugging, because indeed I use cheap boards. Then I also had to use the personalizer from the development and not change anything in the config file.
    I just have 1 more question for now. Everything is secured for now, the only thing which isn’t, according to my understanding, is that any controller could communicate with my Ethernet gateway. Of course I could specify the ip address of the controller I want to use in the Ethernet gateway ino file configurations, but an ip address could easily be “doubled” either by causing an ip-conflict, or just plugging out or somehow disabling my controller.
    So, the question is; how can a code or something be specified, besides the ipaddress, in the gateway. And with that security code only, the gateway will be able to be controlled by a controller device like eg Domoticz.
    .Thank you.


  • Contest Winner

    @karelsmits great that you got it up and running at last!
    Regarding gateway security, the security of the library is limited to the OTA parts. It is assumed that you connect your gateway to a secure environment. Your LAN or USB host. If criminals can access your LAN you have a bigger problem than somebody spoofing your controller



  • when it says in the gateway code:

    // The MAC address can be anything you want but should be unique on your network.
    // Newer boards have a MAC address printed on the underside of the PCB, which you can (optionally) use.
    // Note that most of the Ardunio examples use  "DEAD BEEF FEED" for the MAC address.
    //#define MY_MAC_ADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
    

    which mac address is this referring to? the gateway? the controller?
    And what happens if it doesn't match?

    thanks


  • Contest Winner

    @karelsmits this is rather off topic. I suggest you move that question to a different thread as it has no relation to signing or security.


Log in to reply
 

Suggested Topics

1
Online

11.4k
Users

11.1k
Topics

112.7k
Posts