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. Announcements
  3. Sensebender Micro

Sensebender Micro

Scheduled Pinned Locked Moved Announcements
584 Posts 84 Posters 401.8k Views 35 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.
  • ximinezX Offline
    ximinezX Offline
    ximinez
    wrote on last edited by
    #429

    Yup. Setting up my other sensebender as a proper signing sensor and my uno as a gateway. This will have to wait until I get a couple more working sensors.

    1 Reply Last reply
    0
    • ximinezX Offline
      ximinezX Offline
      ximinez
      wrote on last edited by
      #430

      Ok. I set up my GW, and set up my healthy sensebender as an outdoor sensor. The zombie sensor is now a working indoor sensor.
      I have enabled signing and set up whitelisting, but enabling signing debugging makes the sketch oversize, so I can't actually check if signing works - but atleast now I have two sensors.

      Domoticz up

      1 Reply Last reply
      0
      • AnticimexA Offline
        AnticimexA Offline
        Anticimex
        Contest Winner
        wrote on last edited by
        #431

        You will still be notified without verbose logging. And if you have enabled and require signing, you won't get any data if something fails (assuming signing is properly activated).

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

        ximinezX 1 Reply Last reply
        0
        • user2334U user2334

          I just received two Sensebenders, but have problems getting the device to consume little power. I get totally different values as displayed above.

          With the following sketch, I get about 5,6mA in active state and 1,6mA in sleep mode with nRF24 attached. I have compared different nRF24-chips and this one consumed the least power.

          Without the nRF24, I get 4mA and 0,025mA (=25µA) during sleep mode.

          #include <LowPower.h>
          #include "RF24.h"
          
          RF24 radio(9, 10);
          
          void setup() {
          }
          
          void loop() {
              delay(8000);
              LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
          }
          
          user2334U Offline
          user2334U Offline
          user2334
          wrote on last edited by
          #432

          @user2334 said:

          I just received two Sensebenders, but have problems getting the device to consume little power. I get totally different values as displayed above.

          With the following sketch, I get about 5,6mA in active state and 1,6mA in sleep mode with nRF24 attached. I have compared different nRF24-chips and this one consumed the least power.

          Without the nRF24, I get 4mA and 0,025mA (=25µA) during sleep mode.

          #include <LowPower.h>
          #include "RF24.h"
          
          RF24 radio(9, 10);
          
          void setup() {
          }
          
          void loop() {
              delay(8000);
              LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
          }
          

          As a follow-up to my previous posting, I can confirm, that using original nRF24-modules (best source seems to be https://www.itead.cc/nrf24l01-module.html), I get 0,023mA (=23µA) with nrf24 attached during sleep mode (no difference between the libraries JeeLib->Sleepy::loseSomeTime or LowPower->LowPower.powerDown).

          It is quite interesting, that so many nRF24 Modules (bought from eBay, from Amazon UK) are clones with higher power consumption. Some of them use 3mA, some have electrical short, ...

          1 Reply Last reply
          0
          • AnticimexA Anticimex

            You will still be notified without verbose logging. And if you have enabled and require signing, you won't get any data if something fails (assuming signing is properly activated).

            ximinezX Offline
            ximinezX Offline
            ximinez
            wrote on last edited by
            #433

            @Anticimex I've set MY_SIGNING_SOFT, MY_SIGNING_REQUEST_SIGNATURES and MY_SIGNING_NODE_WHITELIST on the GW, and reenabled (normal) debug but not signing debug since that is too big.
            With those enabled, if the sending node does not sign, I should not get this?

            0;255;3;0;9;read: 2-2-0 s=1,c=1,t=0,pt=7,l=5,sg=0:6.3
            0;255;3;0;9;read: 2-2-0 s=2,c=1,t=1,pt=2,l=2,sg=0:59

            AnticimexA 1 Reply Last reply
            0
            • ximinezX ximinez

              @Anticimex I've set MY_SIGNING_SOFT, MY_SIGNING_REQUEST_SIGNATURES and MY_SIGNING_NODE_WHITELIST on the GW, and reenabled (normal) debug but not signing debug since that is too big.
              With those enabled, if the sending node does not sign, I should not get this?

              0;255;3;0;9;read: 2-2-0 s=1,c=1,t=0,pt=7,l=5,sg=0:6.3
              0;255;3;0;9;read: 2-2-0 s=2,c=1,t=1,pt=2,l=2,sg=0:59

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

              @ximinez The GW will only require signatures from a node that in turn require signatures.
              It is the sg-flag that indicate if a message is signed, in your case, both messages are unsigned.
              If you only have node->gw communication, both gw and node has to require signatures for you to see signed messages.
              If you have gw->node communication, it is enough that the node require signatures, the gw will then sign them, no matter if the gw require signatures or not.

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

              1 Reply Last reply
              0
              • ximinezX Offline
                ximinezX Offline
                ximinez
                wrote on last edited by
                #435

                0;255;3;0;9;read: 3-3-0 s=1,c=0,t=6,pt=0,l=0,sg=0:
                0;255;3;0;9;read: 3-3-0 s=2,c=3,t=16,pt=0,l=0,sg=0:
                0;255;3;0;9;send: 0-0-3-3 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:57ACB4BD46843BFCC7ABA693CC5AA527F7724531F525338E8A
                0;255;3;0;9;read: 3-3-0 s=2,c=0,t=7,pt=0,l=0,sg=0:

                I feel more secure now :-P

                AnticimexA 1 Reply Last reply
                0
                • ximinezX ximinez

                  0;255;3;0;9;read: 3-3-0 s=1,c=0,t=6,pt=0,l=0,sg=0:
                  0;255;3;0;9;read: 3-3-0 s=2,c=3,t=16,pt=0,l=0,sg=0:
                  0;255;3;0;9;send: 0-0-3-3 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:57ACB4BD46843BFCC7ABA693CC5AA527F7724531F525338E8A
                  0;255;3;0;9;read: 3-3-0 s=2,c=0,t=7,pt=0,l=0,sg=0:

                  I feel more secure now :-P

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

                  @ximinez Hm, good, but I still see no signed message. But at least a nonce was sent

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

                  ximinezX 1 Reply Last reply
                  0
                  • AnticimexA Anticimex

                    @ximinez Hm, good, but I still see no signed message. But at least a nonce was sent

                    ximinezX Offline
                    ximinezX Offline
                    ximinez
                    wrote on last edited by
                    #437

                    @Anticimex Sensor values are getting through though. And signing is requested on both ends (for one sensor so far). I can't see any other #defines that should be set to enable signing. I get the same result on both the zombie sensor and the unmodded one.

                    I get three "sign fail" (showing up as verify fail on gw) before the sketch reaches setup(), where the ATSHA gets powered up. I will need to power the ATSHA somewhere in the mysensors library. However, once setup() is reached, the ATSHA seems to handle powering down and up just fine.

                    I can however say that it the Si7021 doesn't like being powered off and back on again after sleep. That causes the MCU to reset.

                    AnticimexA 1 Reply Last reply
                    0
                    • ximinezX ximinez

                      @Anticimex Sensor values are getting through though. And signing is requested on both ends (for one sensor so far). I can't see any other #defines that should be set to enable signing. I get the same result on both the zombie sensor and the unmodded one.

                      I get three "sign fail" (showing up as verify fail on gw) before the sketch reaches setup(), where the ATSHA gets powered up. I will need to power the ATSHA somewhere in the mysensors library. However, once setup() is reached, the ATSHA seems to handle powering down and up just fine.

                      I can however say that it the Si7021 doesn't like being powered off and back on again after sleep. That causes the MCU to reset.

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

                      @ximinez Ah, yes, on development branch the signing backend clear the sign flag when it verifies the message. so it will always show as 0 without verbose signing debug enabled.
                      I know there have been discussions about a "pre setup" to be used for early sketch init. You probably want to power the atsha for early handshaking as well to get the sketch name and such to propagate properly. @hek perhaps has the latest on such features.

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

                      ximinezX 1 Reply Last reply
                      0
                      • AnticimexA Anticimex

                        @ximinez Ah, yes, on development branch the signing backend clear the sign flag when it verifies the message. so it will always show as 0 without verbose signing debug enabled.
                        I know there have been discussions about a "pre setup" to be used for early sketch init. You probably want to power the atsha for early handshaking as well to get the sketch name and such to propagate properly. @hek perhaps has the latest on such features.

                        ximinezX Offline
                        ximinezX Offline
                        ximinez
                        wrote on last edited by ximinez
                        #439

                        I've built a nicer-looking serial gateway instead of the rather large ethernet gateway. I thought that would basically be a "slot-in" as long as I personalize the GW it with the same SOFT_HMAC_KEY, SOFT_SERIAL and AES_KEY as the original GW. Are there more steps that need to be taken to get the sensors to connect?

                        Serial Gateway

                        1 Reply Last reply
                        0
                        • ximinezX Offline
                          ximinezX Offline
                          ximinez
                          wrote on last edited by
                          #440

                          No matter what I do now, this is what I get:

                          send: 2-2-0-0 s=1,c=3,t=16,pt=0,l=0,sg=0,st=fail:
                          sign fail
                          send: 2-2-0-0 s=1,c=1,t=0,pt=7,l=5,sg=0,st=fail:26.0
                          send: 2-2-0-0 s=2,c=3,t=16,pt=0,l=0,sg=0,st=fail:
                          sign fail
                          send: 2-2-0-0 s=2,c=1,t=1,pt=2,l=2,sg=0,st=fail:34
                          send: 2-2-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=fail:
                          sign fail

                          1 Reply Last reply
                          0
                          • AnticimexA Offline
                            AnticimexA Offline
                            Anticimex
                            Contest Winner
                            wrote on last edited by
                            #441

                            You must not use the same serial across nodes. Serial have to be unique. HMAC have to be identical.

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

                            1 Reply Last reply
                            0
                            • ximinezX Offline
                              ximinezX Offline
                              ximinez
                              wrote on last edited by
                              #442

                              Yes, I know serial must be unique. Serials go in the whitelist for the corresponding node ID. It turned out to be the NRF24L01+-modules with antennas. Replaced it with a regular module and it worked fine.
                              (Which is strange, because one of those modules worked fine on the ethernet gw. It doesn't eat that much power does it?)

                              AnticimexA 1 Reply Last reply
                              0
                              • ximinezX ximinez

                                Yes, I know serial must be unique. Serials go in the whitelist for the corresponding node ID. It turned out to be the NRF24L01+-modules with antennas. Replaced it with a regular module and it worked fine.
                                (Which is strange, because one of those modules worked fine on the ethernet gw. It doesn't eat that much power does it?)

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

                                @ximinez The signing failing is due to messages not arriving (st=fail). So it is not signing that is your problem here.
                                However, with signing, messages are now "full size" which strains the RF link so if it is "weak" fewer messages get through if they are "longer". I suspect that is the problem here. Basically the usual stuff; adding caps, using a dedicated regulator and so on...

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

                                1 Reply Last reply
                                0
                                • ximinezX Offline
                                  ximinezX Offline
                                  ximinez
                                  wrote on last edited by
                                  #444

                                  Looks like it works now, but what's the deal with the initial failed signs? Look at http://pastebin.ca/3585005 (GW side) and http://pastebin.ca/3585014 (Sensor side. Not the same powerup). It starts by failing a lot, then after a while everything looks OK.

                                  AnticimexA alexsh1A 2 Replies Last reply
                                  0
                                  • ximinezX ximinez

                                    Looks like it works now, but what's the deal with the initial failed signs? Look at http://pastebin.ca/3585005 (GW side) and http://pastebin.ca/3585014 (Sensor side. Not the same powerup). It starts by failing a lot, then after a while everything looks OK.

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

                                    @ximinez difficult to say. Maybe a long stabilization period for the regulator. You could try to add a delay in early init in the library to see if it makes a difference.

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

                                    AnticimexA 1 Reply Last reply
                                    0
                                    • AnticimexA Anticimex

                                      @ximinez difficult to say. Maybe a long stabilization period for the regulator. You could try to add a delay in early init in the library to see if it makes a difference.

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

                                      @Anticimex and again, it is not failed signature errors per se. It is st=fail (transmission errors) that cause the signing backend to timeout. So it is not the performance of the atsha (or sw) that cause the issue here, it is the radio.

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

                                      1 Reply Last reply
                                      0
                                      • tbowmoT tbowmo

                                        @ximinez

                                        For my battery reporting, I have set 1.9V as 0%, 3.3V is 100%..

                                        While you're at it, also power down the external flash, as it might also contribute a bit..

                                        ximinezX Offline
                                        ximinezX Offline
                                        ximinez
                                        wrote on last edited by
                                        #447

                                        @tbowmo said:

                                        @ximinez

                                        While you're at it, also power down the external flash, as it might also contribute a bit..

                                        I forgot about the flash. That would require bootloader support though? Or is the OTA done by jumping to the bootloader while running, keeping pin states?
                                        I'm waiting for some SOIC breakouts in the mail. When I get them, I'll scavenge the ATSHA and flash module from my zombie sensor and build my own sensebender with blackjack and hookers.

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

                                          @ximinez

                                          Yes.. bootloader should probably by modified, if you decide to switch off the flash as well..

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


                                          12

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 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