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. Hardware
  3. Sensebender Gateway with NRF24 PA and Hardsigning and Encryption

Sensebender Gateway with NRF24 PA and Hardsigning and Encryption

Scheduled Pinned Locked Moved Hardware
24 Posts 5 Posters 5.7k Views 4 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.
  • M Offline
    M Offline
    meddie
    wrote on last edited by
    #14

    Hi,
    me again, today i installed the arduino ide on a other pc and it works now i could compile and upload the sketch. But when i user the Gateway5100 Sketch and put as ip Adresse 172.16.0.25 i could not ping the gateway.
    Do i have to config the pins that connected to the ethernet modul? A similar problem i had with my nrf24 modul when i connect it the gateway dont start. (i dont get any data on the serial port)
    Thank you a lot!
    Greets Eddie

    1 Reply Last reply
    0
    • M Offline
      M Offline
      meddie
      wrote on last edited by
      #15

      Hi,
      i did it! The gateway has worked fine all the time! When i have uploaded the GatewayW5100 Sketch and connected the Eternet Module and the NRF24 Modul, then i didnt get anythin on Serial Monitor but i think its correct so, because FHEM (my Controller) shows me that the Sensebender Gateway is connected and added one new Device.

      Then i tried to upload the Sketch from second post, and get some errors, i had to delete this Line
      #include <drivers/ATSHA204/ATSHA204.cpp>

      then i could compile and upload the sketch but i get three warnings:

      c:/users/meddie/appdata/local/arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .bss by 4 bytes

      c:/users/meddie/appdata/local/arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .bss by 4 bytes

      c:/users/meddie/appdata/local/arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .bss by 4 bytes

      I dont know what this means, but it looks like the gateway is working. FHEM continues showing as connected!

      Do you know what this warning does mean?
      Thanks a lot!

      1 Reply Last reply
      0
      • magpernM Offline
        magpernM Offline
        magpern
        wrote on last edited by
        #16

        Is it correct, that if you want to enable ATSHA204A chip in gateway, you need to enable this in MyConfig.h?

        //#define MY_SIGNING_ATSHA204
        

        If I do, I get a lot of compile errors, see below, if I don't enable it, it compiles fine. It is development branch (I guess...). Setting up the environment is quite the trial and error

        In file included from C:\Users\aaa\Documents\Arduino\libraries\MySensors\examples\SensebenderGatewaySerial\SensebenderGatewaySerial.ino:86:0:
        
        C:\Users\aaa\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:6:16: error: redefinition of 'uint8_t device_pin'
        
         static uint8_t device_pin;
        
                        ^
        
        In file included from C:\Users\aaa\Documents\Arduino\libraries\MySensors/MySensors.h:166:0,
        
                         from C:\Users\aaa\Documents\Arduino\libraries\MySensors\examples\SensebenderGatewaySerial\SensebenderGatewaySerial.ino:84:
        
        C:\Users\aaa\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:6:16: error: 'uint8_t device_pin' previously declared here
        
         static uint8_t device_pin;
        
                        ^
        
        In file included from C:\Users\aaa\Documents\Arduino\libraries\MySensors\examples\SensebenderGatewaySerial\SensebenderGatewaySerial.ino:86:0:
        
        C:\Users\aaa\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'void swi_set_signal_pin(uint8_t)':
        
        C:\Users\aaa\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:23:13: error: redefinition of 'void swi_set_signal_pin(uint8_t)'
        
         static void swi_set_signal_pin(uint8_t is_high)
        
                     ^
        
        and a lot more...
        
        AnticimexA 1 Reply Last reply
        0
        • magpernM magpern

          Is it correct, that if you want to enable ATSHA204A chip in gateway, you need to enable this in MyConfig.h?

          //#define MY_SIGNING_ATSHA204
          

          If I do, I get a lot of compile errors, see below, if I don't enable it, it compiles fine. It is development branch (I guess...). Setting up the environment is quite the trial and error

          In file included from C:\Users\aaa\Documents\Arduino\libraries\MySensors\examples\SensebenderGatewaySerial\SensebenderGatewaySerial.ino:86:0:
          
          C:\Users\aaa\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:6:16: error: redefinition of 'uint8_t device_pin'
          
           static uint8_t device_pin;
          
                          ^
          
          In file included from C:\Users\aaa\Documents\Arduino\libraries\MySensors/MySensors.h:166:0,
          
                           from C:\Users\aaa\Documents\Arduino\libraries\MySensors\examples\SensebenderGatewaySerial\SensebenderGatewaySerial.ino:84:
          
          C:\Users\aaa\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:6:16: error: 'uint8_t device_pin' previously declared here
          
           static uint8_t device_pin;
          
                          ^
          
          In file included from C:\Users\aaa\Documents\Arduino\libraries\MySensors\examples\SensebenderGatewaySerial\SensebenderGatewaySerial.ino:86:0:
          
          C:\Users\aaa\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'void swi_set_signal_pin(uint8_t)':
          
          C:\Users\aaa\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:23:13: error: redefinition of 'void swi_set_signal_pin(uint8_t)'
          
           static void swi_set_signal_pin(uint8_t is_high)
          
                       ^
          
          and a lot more...
          
          AnticimexA Offline
          AnticimexA Offline
          Anticimex
          Contest Winner
          wrote on last edited by Anticimex
          #17

          @Magnus-Pernemark normally, you don't change MyConfig.h, you just use it as reference. And then you set your defines in your sketch prior to include mysensors.h.

          I think there was a problem in the official release that the SenseBender gw sketch included some files for self testing that is not really needed (or more correctly, it included them without considering the atsha flag), so you can probably strip them from the sketch or conditionally include them. I believe it was fixed on beta. But perhaps it is still in there.

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

          magpernM 1 Reply Last reply
          0
          • AnticimexA Anticimex

            @Magnus-Pernemark normally, you don't change MyConfig.h, you just use it as reference. And then you set your defines in your sketch prior to include mysensors.h.

            I think there was a problem in the official release that the SenseBender gw sketch included some files for self testing that is not really needed (or more correctly, it included them without considering the atsha flag), so you can probably strip them from the sketch or conditionally include them. I believe it was fixed on beta. But perhaps it is still in there.

            magpernM Offline
            magpernM Offline
            magpern
            wrote on last edited by
            #18

            @Anticimex Ah, I was under the impression that the SenseBender Gateway, came with default serial sketch without signing and you had to enable signing by your self if you want it. And some how in MyConfig.h (not MySensors.h) this sounded like something that needs to be changed (comment said so).

            /**
             * @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
            

            So after configuring the ATSHA chip and uploading the serialgateway to the GW, without altering any code, it will start using the ATSHA chip and reject those without?

            Is it the same with Sensebender Micro? If it has a ATSHA chip it will use it, if it doesn't it will not?

            I run the development branch code, 2.2.2-beta

            AnticimexA 1 Reply Last reply
            0
            • magpernM magpern

              @Anticimex Ah, I was under the impression that the SenseBender Gateway, came with default serial sketch without signing and you had to enable signing by your self if you want it. And some how in MyConfig.h (not MySensors.h) this sounded like something that needs to be changed (comment said so).

              /**
               * @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
              

              So after configuring the ATSHA chip and uploading the serialgateway to the GW, without altering any code, it will start using the ATSHA chip and reject those without?

              Is it the same with Sensebender Micro? If it has a ATSHA chip it will use it, if it doesn't it will not?

              I run the development branch code, 2.2.2-beta

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

              @Magnus-Pernemark no, it is not enabled by default. But the SenseBender gw sketch also include self test logic used in the factory that test atsha204a communication. But this code is always included, so if you do enable the signing using atsha204a, it includes some code twice. So the sketch would only include the atsha stuff if the define isn't set.

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

              magpernM 1 Reply Last reply
              0
              • AnticimexA Anticimex

                @Magnus-Pernemark no, it is not enabled by default. But the SenseBender gw sketch also include self test logic used in the factory that test atsha204a communication. But this code is always included, so if you do enable the signing using atsha204a, it includes some code twice. So the sketch would only include the atsha stuff if the define isn't set.

                magpernM Offline
                magpernM Offline
                magpern
                wrote on last edited by
                #20

                @Anticimex I'm sorry, my vacation brain just cannot comprehend all these terms (I don't think it would even if I wasn't on vecaction :) My four hour experience with c/c++ surely has its limits).

                Is it safe to say, the GW sketch does not use the ATSHA chip, and the sketch needs some modification for it to start using it?

                In the mean-time, I'll try it out with the default sketch. It looks like the GW and the bender are talking to each other

                AnticimexA 1 Reply Last reply
                0
                • magpernM magpern

                  @Anticimex I'm sorry, my vacation brain just cannot comprehend all these terms (I don't think it would even if I wasn't on vecaction :) My four hour experience with c/c++ surely has its limits).

                  Is it safe to say, the GW sketch does not use the ATSHA chip, and the sketch needs some modification for it to start using it?

                  In the mean-time, I'll try it out with the default sketch. It looks like the GW and the bender are talking to each other

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

                  @Magnus-Pernemark no, I am saying that the sketch use the atsha by default for self testing. It is not using it by default for signing. And the problem is that if you want to use it for signing it has already included some code for self testing that it shouldn't in that case. If you are not able to code c i suggest hanging on some time for someone to fix the problem. I can't do it at the moment since I am on the road. Ping @tbowmo

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

                  1 Reply Last reply
                  0
                  • tbowmoT Offline
                    tbowmoT Offline
                    tbowmo
                    Admin
                    wrote on last edited by
                    #22

                    @Magnus-Pernemark

                    You need to enable signing with
                    #define MY_SIGNING_ATSHA204

                    This will make the sketch break though, as it includes the atsha204 driver already (and the library wants to include it as well)

                    To remove the error comment out the following line (it's line 86 in the original source)

                    #include <drivers/ATSHA204/ATSHA204.cpp> 
                    

                    (Reference to the line in github :
                    https://github.com/mysensors/MySensors/blob/master/examples/SensebenderGatewaySerial/SensebenderGatewaySerial.ino#L86)

                    As an alternative, you can load the standard GatewaySerial sketch.. The only difference to the SensebenderGatewaySerial, is that the later includes test routines used in the factory.

                    @Anticimex I don't think that I made a PR for conditionally include the atsha driver, as the error still persists in dev branch..

                    AnticimexA 1 Reply Last reply
                    0
                    • tbowmoT tbowmo

                      @Magnus-Pernemark

                      You need to enable signing with
                      #define MY_SIGNING_ATSHA204

                      This will make the sketch break though, as it includes the atsha204 driver already (and the library wants to include it as well)

                      To remove the error comment out the following line (it's line 86 in the original source)

                      #include <drivers/ATSHA204/ATSHA204.cpp> 
                      

                      (Reference to the line in github :
                      https://github.com/mysensors/MySensors/blob/master/examples/SensebenderGatewaySerial/SensebenderGatewaySerial.ino#L86)

                      As an alternative, you can load the standard GatewaySerial sketch.. The only difference to the SensebenderGatewaySerial, is that the later includes test routines used in the factory.

                      @Anticimex I don't think that I made a PR for conditionally include the atsha driver, as the error still persists in dev branch..

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

                      @tbowmo no, but I remember that another user had the same issue and agreed to file a pr but perhaps he never got around to it. Should just be a matter of adding a ifndef though.

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

                      magpernM 1 Reply Last reply
                      0
                      • AnticimexA Anticimex

                        @tbowmo no, but I remember that another user had the same issue and agreed to file a pr but perhaps he never got around to it. Should just be a matter of adding a ifndef though.

                        magpernM Offline
                        magpernM Offline
                        magpern
                        wrote on last edited by
                        #24

                        @Anticimex @tbowmo an #ifndef made it work and sketch compiled.

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


                        29

                        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