Signing with Raspberry Pi Gateway



  • Hi, I tried to set up a mysensors network (I don't plan to use any existing controller because I want to create it by myself to use it with my own home automation software)

    I'm using the MQTT Gateway with the radio RF24 connected to my Raspberry Pi's GPIO and a relay node. I was able to make it working without signing, whitelisting, ecnryption etc.

    The problem is that when I tried to enable signing it stopped working

    #define MY_SIGNING_SOFT
    #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7
    #define MY_SIGNING_REQUEST_SIGNATURES
    #define MY_RF24_ENABLE_ENCRYPTION
    #define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x0F,0xAF,0xB3,0x3E,0x86,0x45,0xB1,0x94,0xBE}}}
    

    In the node's logs it fails with !TSM:FPAR:NO REPLYm while commenting MY_RF24_ENABLE_ENCRYPTION, it connects but when I try to change the relay's status it logs !TSF:MSG:SIGN VERIFY FAIL

    Of course I've setted up the gateway with:
    sudo mysgw --gen-soft-serial-key
    then sudo mysgw --set-soft-serial-key to set the generated key. Same thing for soft-hmac-key and aes-key.

    Then I've done the personalization by flashing this sketch

    It didn't work


  • Contest Winner

    @marco-realacci please upgrade to version 2.2.0 and use the personalizer and the documented flow for that version.
    But in general, it seem pretty clear that your nodes and gw does not agree on the keys you use. Since you have to disable encryption and then get verification failures.


  • Contest Winner

    @marco-realacci also, make sure your gw is configured to use the same secret hmac and AES key as your nodes use.


Log in to reply
 

Suggested Topics

  • 3
  • 2
  • 2
  • 24
  • 1
  • 10

22
Online

11.2k
Users

11.1k
Topics

112.5k
Posts