Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. Encryption with RFM69 [solved]

Encryption with RFM69 [solved]

Scheduled Pinned Locked Moved Troubleshooting
13 Posts 3 Posters 986 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Les

    Hey Everyone. I'm using the example sketch from Mysensors MQTT Gateway and node.
    I've added the standard RFM69HW items and the node sends data to the gateway.

    It would be nice to use signing/encryption so looking through the forums I found:

    #define MY_SECURITY_SIMPLE_PASSWD "123456789"
    #define MY_SIGNING_SOFT_RANDOMSEED_PIN A0
    

    Using A0 since it is the only analogue pin I have on the Wemos D1 mini.

    I pasted the same string to both the node and the gw and while I see they are trying to communicate but get SIGN FAIL.

    So I would like to ask if someone has seen a tutorial or knows what needs to be enable for encryption?

    AnticimexA Offline
    AnticimexA Offline
    Anticimex
    Contest Winner
    wrote on last edited by
    #3

    @les here are all the security related flags documentation.

    Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

    L 1 Reply Last reply
    1
    • AnticimexA Anticimex

      @les here are all the security related flags documentation.

      L Offline
      L Offline
      Les
      wrote on last edited by
      #4

      @anticimex Thanks for the tips. I did review those pages and based on that it seems that #define MY_SECURITY_SIMPLE_PASSWD "yourpassword" is all that would be required unless you would like to personalize. I would like to keep it simple though.

      AnticimexA 1 Reply Last reply
      0
      • L Les

        @anticimex Thanks for the tips. I did review those pages and based on that it seems that #define MY_SECURITY_SIMPLE_PASSWD "yourpassword" is all that would be required unless you would like to personalize. I would like to keep it simple though.

        AnticimexA Offline
        AnticimexA Offline
        Anticimex
        Contest Winner
        wrote on last edited by
        #5

        @les right, but you also write that you were interested in encryption and not signing, so it is not the correct flag in that case. And also, note that you need the same flag on all nodes and gw if you use one that enable encryption.

        Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

        L 1 Reply Last reply
        1
        • AnticimexA Anticimex

          @les right, but you also write that you were interested in encryption and not signing, so it is not the correct flag in that case. And also, note that you need the same flag on all nodes and gw if you use one that enable encryption.

          L Offline
          L Offline
          Les
          wrote on last edited by
          #6

          @anticimex according to the documentation

          MY_SECURITY_SIMPLE_PASSWD Enables security (signing and encryption) without the need for personalization
          

          So the connection should be encrypted and signed without anything else (other than putting the same define statement on all nodes with the same password).

          AnticimexA 1 Reply Last reply
          1
          • L Les

            @anticimex according to the documentation

            MY_SECURITY_SIMPLE_PASSWD Enables security (signing and encryption) without the need for personalization
            

            So the connection should be encrypted and signed without anything else (other than putting the same define statement on all nodes with the same password).

            AnticimexA Offline
            AnticimexA Offline
            Anticimex
            Contest Winner
            wrote on last edited by
            #7

            @les correct.
            Have you checked the troubleshooting section in the docs regarding signibg issues? There is also a more verbose debug flag available.

            Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

            1 Reply Last reply
            0
            • L Offline
              L Offline
              Les
              wrote on last edited by
              #8

              @anticimex said in Encryption with RFM69:

              roubleshooting section in the docs regarding signibg iss

              I see that now, will give it a shot.

              1 Reply Last reply
              0
              • K Offline
                K Offline
                kimot
                wrote on last edited by
                #9

                #define MY_RFM69_ENABLE_ENCRYPTION

                All nodes and gateway must have this enabled, and all must be personalized with the same AES key.
                You need a helper-sketch specifically for this purpose

                • SecurityPersonalizer.ino
                L 1 Reply Last reply
                0
                • K kimot

                  #define MY_RFM69_ENABLE_ENCRYPTION

                  All nodes and gateway must have this enabled, and all must be personalized with the same AES key.
                  You need a helper-sketch specifically for this purpose

                  • SecurityPersonalizer.ino
                  L Offline
                  L Offline
                  Les
                  wrote on last edited by
                  #10

                  @kimot Ok, thanks for that info, I thought with MY_SECURITY_SIMPLE_PASSWD you didn't need to personalize. If I'm reading the instruction properly flash securitypersonal.ino to device, copy out the key and then paste to all nodes. Which sounds simple. Have I missed anything?

                  AnticimexA 1 Reply Last reply
                  0
                  • L Les

                    @kimot Ok, thanks for that info, I thought with MY_SECURITY_SIMPLE_PASSWD you didn't need to personalize. If I'm reading the instruction properly flash securitypersonal.ino to device, copy out the key and then paste to all nodes. Which sounds simple. Have I missed anything?

                    AnticimexA Offline
                    AnticimexA Offline
                    Anticimex
                    Contest Winner
                    wrote on last edited by
                    #11

                    @les correct, no personalization needed. But with that flag, all nodes in your network need to share it. And memory requirements increase significantly so pay attention to the compiler log regarding warnings on memory use.

                    Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                    1 Reply Last reply
                    0
                    • L Offline
                      L Offline
                      Les
                      wrote on last edited by
                      #12

                      I added the following to the top of my code:
                      #define MY_DEBUG
                      #define MY_DEBUG_VERBOSE_SIGNING
                      #define MY_SECURITY_SIMPLE_PASSWD "testpass"

                      And it works now....not sure if having the Security above the radio information helped, but it does work now :)

                      AnticimexA 1 Reply Last reply
                      0
                      • L Les

                        I added the following to the top of my code:
                        #define MY_DEBUG
                        #define MY_DEBUG_VERBOSE_SIGNING
                        #define MY_SECURITY_SIMPLE_PASSWD "testpass"

                        And it works now....not sure if having the Security above the radio information helped, but it does work now :)

                        AnticimexA Offline
                        AnticimexA Offline
                        Anticimex
                        Contest Winner
                        wrote on last edited by
                        #13

                        @les great! We'll, the debug flags should not help getting things to work, only provide additional information if it doesn't.
                        All configuration flags need to be placed prior to any header include directives. Else they will have no effect.
                        Anyway, glad it worked out in the end.

                        Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        31

                        Online

                        11.7k

                        Users

                        11.2k

                        Topics

                        113.1k

                        Posts


                        Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • MySensors
                        • OpenHardware.io
                        • Categories
                        • Recent
                        • Tags
                        • Popular