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. Signing ATSHA Key?

Signing ATSHA Key?

Scheduled Pinned Locked Moved Troubleshooting
19 Posts 4 Posters 3.3k 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.
  • TakeroT Offline
    TakeroT Offline
    Takero
    Hardware Contributor
    wrote on last edited by
    #6

    No Prob, i hate phone typing too :-)

    I know it is possible to mix hard and soft. In my way i want to use hand signing only on my new nodes . . . i will not change all nodes yet.

    If i understood you right i have to generate the Key on my node (Lock Data is optional / i dont want to do that).

    Now i have a HARD Signing node, but Sign failed. So in my opinion i have to generate a Key on my GW too?! Right? Use this points, this the Random Key if i generate before?:

    If you do not have the ATSHA204A device and need to generate random keys:
    Enable USE_SOFT_SIGNING

    If you want to review existing EEPROM configuration to determine if anything needs to be updated:
    Make sure to disable any ATSHA204A update features if you use it (enable SKIP_KEY_STORAGE, disable LOCK_CONFIGURATION and LOCK_DATA)
    Disable STORE_SOFT_KEY
    Disable STORE_SOFT_SERIAL
    Disable STORE_AES_KEY

    After this, it it possible to communicate with the "old" Soft_Signing Nodes?

    alexsh1A 1 Reply Last reply
    0
    • TakeroT Takero

      No Prob, i hate phone typing too :-)

      I know it is possible to mix hard and soft. In my way i want to use hand signing only on my new nodes . . . i will not change all nodes yet.

      If i understood you right i have to generate the Key on my node (Lock Data is optional / i dont want to do that).

      Now i have a HARD Signing node, but Sign failed. So in my opinion i have to generate a Key on my GW too?! Right? Use this points, this the Random Key if i generate before?:

      If you do not have the ATSHA204A device and need to generate random keys:
      Enable USE_SOFT_SIGNING

      If you want to review existing EEPROM configuration to determine if anything needs to be updated:
      Make sure to disable any ATSHA204A update features if you use it (enable SKIP_KEY_STORAGE, disable LOCK_CONFIGURATION and LOCK_DATA)
      Disable STORE_SOFT_KEY
      Disable STORE_SOFT_SERIAL
      Disable STORE_AES_KEY

      After this, it it possible to communicate with the "old" Soft_Signing Nodes?

      alexsh1A Offline
      alexsh1A Offline
      alexsh1
      wrote on last edited by
      #7

      @Takero Firstly, using debug for signing is a must to understand what's going on.
      In order to have signing you must have the same key on a node and the GW. For the first time, you can generate it, but later you have to put it in the sketch and use with every node or GW.
      If you do not have it on your GW signing will fail!!!

      1 Reply Last reply
      0
      • TakeroT Offline
        TakeroT Offline
        Takero
        Hardware Contributor
        wrote on last edited by
        #8

        Thanks! Now i am on the right way :-D

        Finaly i'f got a HMAC_KEY.

        On my Soft_Signing GW i have to enable USE_SOFT_SIGNING and STORE_SOFT_KEY (with the HMAC_KEY) and run the SercurePersonalizer.ino on my GW? Right?

        alexsh1A 1 Reply Last reply
        0
        • alexsh1A Offline
          alexsh1A Offline
          alexsh1
          wrote on last edited by alexsh1
          #9

          After you generated the keys and did your first node, do the following for soft signing:

          Enable USE_SOFT_SIGNING
          Enable LOCK_CONFIGURATION
          Enable STORE_SOFT_KEY - must be the same
          Enable STORE_SOFT_SERIAL - must be individual for each node/GW
          Enable STORE_AES_KEY - must be the same

          Below the options above you have to insert your keys.

          EDIT: just corrected what you should enable

          1 Reply Last reply
          1
          • TakeroT Takero

            Thanks! Now i am on the right way :-D

            Finaly i'f got a HMAC_KEY.

            On my Soft_Signing GW i have to enable USE_SOFT_SIGNING and STORE_SOFT_KEY (with the HMAC_KEY) and run the SercurePersonalizer.ino on my GW? Right?

            alexsh1A Offline
            alexsh1A Offline
            alexsh1
            wrote on last edited by
            #10

            @Takero said:

            Thanks! Now i am on the right way :-D

            Finaly i'f got a HMAC_KEY.

            On my Soft_Signing GW i have to enable USE_SOFT_SIGNING and STORE_SOFT_KEY (with the HMAC_KEY) and run the SercurePersonalizer.ino on my GW? Right?

            Yes

            1 Reply Last reply
            0
            • alexsh1A Offline
              alexsh1A Offline
              alexsh1
              wrote on last edited by alexsh1
              #11

              ATSHA204A and soft signing are very similar in the sketch. You have to enable/disable corresponding options

              TakeroT 1 Reply Last reply
              0
              • alexsh1A alexsh1

                ATSHA204A and soft signing are very similar in the sketch. You have to enable/disable corresponding options

                TakeroT Offline
                TakeroT Offline
                Takero
                Hardware Contributor
                wrote on last edited by
                #12

                @alexsh1 Thanks! I will try it later if my doughter is sleeping.

                1 Reply Last reply
                0
                • TakeroT Offline
                  TakeroT Offline
                  Takero
                  Hardware Contributor
                  wrote on last edited by
                  #13

                  Works :+1:

                  1 Reply Last reply
                  1
                  • D Offline
                    D Offline
                    DavidZH
                    wrote on last edited by
                    #14

                    I'd like to ask a follow up question to this old topic:

                    I have been able to create a set of keys using my GW on a Moteino (16MHz).

                    Now I'd like to program the keys into a some nodes. A few of these are running a bare 328p at 1MHz as a battery sensor, but a baudrate of 115k is a bit high. I only get garbage in the serial window, so no checking if the keys are stored properly.
                    Wouldn't it be wise to lower the baudrate of that sketch to be able to accomodate slow battery sensors. I have looked to try to do it myself, but was unable to find where.

                    mfalkviddM 1 Reply Last reply
                    1
                    • D DavidZH

                      I'd like to ask a follow up question to this old topic:

                      I have been able to create a set of keys using my GW on a Moteino (16MHz).

                      Now I'd like to program the keys into a some nodes. A few of these are running a bare 328p at 1MHz as a battery sensor, but a baudrate of 115k is a bit high. I only get garbage in the serial window, so no checking if the keys are stored properly.
                      Wouldn't it be wise to lower the baudrate of that sketch to be able to accomodate slow battery sensors. I have looked to try to do it myself, but was unable to find where.

                      mfalkviddM Offline
                      mfalkviddM Offline
                      mfalkvidd
                      Mod
                      wrote on last edited by
                      #15

                      @DavidZH I think you can add

                      #define MY_BAUD_RATE 9600
                      

                      before including MySensors.h to set baud rate to 9600bps (change to even lower if you need to)

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        DavidZH
                        wrote on last edited by
                        #16

                        I had already tried that (I just did again, to be absolutely certain) but even at 4800 I still get garbage. I know 9600 baud works because of a test I had running before I tried the personalization sketch. I added the
                        #define MY_BAUD_RATE 4800 before the inclusion of the MySensors.h file.

                        mfalkviddM 1 Reply Last reply
                        0
                        • D DavidZH

                          I had already tried that (I just did again, to be absolutely certain) but even at 4800 I still get garbage. I know 9600 baud works because of a test I had running before I tried the personalization sketch. I added the
                          #define MY_BAUD_RATE 4800 before the inclusion of the MySensors.h file.

                          mfalkviddM Offline
                          mfalkviddM Offline
                          mfalkvidd
                          Mod
                          wrote on last edited by
                          #17

                          @DavidZH 115200 seems to be hardcoded in the sketch. Try changing it. Search for 115200 https://github.com/mysensors/MySensors/blob/8e1ef13804f2737079298c63bd0d8aa7b82e7f73/examples/SecurityPersonalizer/SecurityPersonalizer.ino#L717

                          1 Reply Last reply
                          1
                          • D Offline
                            D Offline
                            DavidZH
                            wrote on last edited by
                            #18

                            Thanks a bunch! That did it! I always forget to use the "find" when I'm doing things like this. And the serial.begin was in line 881, I didn't expect it to be that far down.

                            mfalkviddM 1 Reply Last reply
                            0
                            • D DavidZH

                              Thanks a bunch! That did it! I always forget to use the "find" when I'm doing things like this. And the serial.begin was in line 881, I didn't expect it to be that far down.

                              mfalkviddM Offline
                              mfalkviddM Offline
                              mfalkvidd
                              Mod
                              wrote on last edited by
                              #19

                              @DavidZH great, thanks for verifying! I have created an issue on github https://github.com/mysensors/MySensors/issues/758

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


                              20

                              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