Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. tomkxy
    3. Posts
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by tomkxy

    • sendHeartbeat in binding?

      What is required in MySensors nodes to make the send heartbeat option in the binding actually work. Do I need to explicitly include code in my node implementations? What happens if my nodes are sleeping?

      posted in OpenHAB
      tomkxy
      tomkxy
    • RE: Cannot get Sensebender_GW / W5100 to connect to router.

      @johnrob said in Cannot get Sensebender_GW / W5100 to connect to router.:

      From what I see you probably should try to define an IP address in your sketch...

      #define MY_IP_ADDRESS 192,xxx,xxx,xx7

      posted in Development
      tomkxy
      tomkxy
    • RE: ClearEprom does not work for Sensebender GW

      The changed the sketch as follows:

      #define MY_CORE_ONLY
      
      #include <MySensors.h>
      
      void setup()
      {
      
      	unsigned long enter = hwMillis();
        while (hwMillis() - enter < (unsigned long)15000);
      
      	Serial.begin(MY_BAUD_RATE);
      
        Serial.print("EEPROM_LOCAL_CONFIG_ADDRESS: ");
        Serial.println(EEPROM_LOCAL_CONFIG_ADDRESS);
      	Serial.println("Started clearing. Please wait...");
      	for (int i=0; i<EEPROM_LOCAL_CONFIG_ADDRESS; i++) {
      		hwWriteConfig(i,0xFF);
      	}
      	Serial.println("Clearing done. You're ready to go!");
      }
      
      void loop()
      {
      	// Nothing to do here...
      }
      

      The output is:

      EEPROM_LOCAL_CONFIG_ADDRESS: 413
      Started clearing. Please wait...

      I use the following versions:
      My Arduino version is: 1.8.5
      MySensors Board Version: 1.0.5
      Arduino SAMD Board Version: 1.6.11 (M3), 1.6.17 (M0+)

      Interesting observation which might be hinting at a fundamental problem:
      I need to double the baud rate in the serial monitor. So in order to get any output I need to set the baud rate to 230400

      posted in Troubleshooting
      tomkxy
      tomkxy
    • ClearEprom does not work for Sensebender GW

      I just tried to delete the EEPROM of my Sensebender GW with the sample sketch coming with the MySensor library (ClearEepromConfig) It does not seem to work. At least as far I can deduce from the debug statements I inserted. I put a print just before the for loop in the setup function and one after hwWriteConfig. The code does not reach the hwWriteConfig.

      I am using MySensors 2.1.1

      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Sensebender GW no output on serial

      Ok, now I think I have a workaround...The sketch SecurityPersonalizer gave me the right hint. I need to extend the waiting time in setup. If I extend it to around 10secs it seems to work.

      void setup()
      {
          unsigned long enter = hwMillis();
          while (hwMillis() - enter < (unsigned long)10000);
          Serial.begin(115200);
          Serial.println("here you go");
      }
      
      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Sensebender GW no output on serial

      Ok. I have some new findings. Serial.print works after I sent a couple of thousands. Here is some code (not nice, but anyway...)

      This will not print anything in the Serial Monitor:

      #define MY_CORE_ONLY
      
      #include <MySensors.h>
      
      int i = 0;
      void setup()
      {
          Serial.begin(9600);
          for (; i< 10000; i++) {
            Serial.println(i);
          }
          
      
      }
      
      void loop()
      {
          if (i < 150000) {
            i = 200000;
            Serial.println("Started clearing. Please wait...");
      
            Serial.println("Clearing done.");
          }
      
      }
      

      Changing the loop end in the for loop in setup to 50000 for example, Serial.prints show up.

      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Sensebender GW no output on serial

      Version 2.1.1

      posted in Troubleshooting
      tomkxy
      tomkxy
    • Sensebender GW no output on serial

      After being away for almost one year. I picked up some of my stuff lying around in my cellar πŸ™‚ Part of that is a Sensebender Gateway which is supposed to replace my current ATMega Gateway. However, I have a really strange behavior (Arduino 1.8.5):

      • Uploaded Gateway5100 code -> I can see in my OpenHab controller that it works
      • However, I cannot see any output from serial.println. - I tried other MySensor sketches, like SecurityPersonalizer -> doesn't work

      I tried it with some of the basic Arduino sketches where no MySensor code is involved: This works.

      I tried a re-install of Arduino, also deleting everything under /Users/tom/Library/Arduino15 and installed the boards (MySensors SAMD Boards 1.05) again.

      I am really stuck. Any ideas are highly appreciated.

      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: MySensors 2.0.0 Released

      @Anticimex said:

      πŸ“£ We are happy to announce a major release of the MySensors library to 2.0.0!
      For details, see here.
      Doxygen links on the master github frontpage are not working. These are the correct links:
      master development

      Thanks a lot for that great piece of work!!!

      posted in Announcements
      tomkxy
      tomkxy
    • RE: Manufacture a custom wristband

      @nemik said:

      My advice would be to visit Alibaba and try to find someone who sells the product most similar to what you want. Then reach out to them about modifying it and branding it for you.
      Some sell iBeacons and such in wristbands already, so it might not be too big of a stretch for them to customize it with some other electronics that you might have in mind.

      Good luck!

      Thanks!

      posted in General Discussion
      tomkxy
      tomkxy
    • RE: Meet in MalmΓΆ, Summer 2016?

      Looks like you had a good time πŸ™‚

      posted in General Discussion
      tomkxy
      tomkxy
    • RE: Multisensor PIR based on IKEA Molgan

      @TimO said:

      @tomkxy Nice write up! Do you have an idea on the accuracy of the humidity sensor within the case?

      I did some comparison measure regarding temp and humidity. I place an open Sensebender just beside the modded Molgan. The humidity measured at the Molgan was about 11% lower than the humidity measured by the open Sensebender. With respect to temp the Molgans temp was about 6% lower than the temp measured by the open Sensebender.

      posted in My Project
      tomkxy
      tomkxy
    • Manufacture a custom wristband

      I know that this is not a MySensor topic, but I guess there are a couple of users in this forum who might give me some direction. Provided that I would like to manufacture a wristband having some electronics on board. How would you go with the wristband? Is somebody aware of companies offering customized wristbands?

      posted in General Discussion
      tomkxy
      tomkxy
    • RE: Ceech-Board Buyers

      I bought twice @ceech and delivery was prompt. Also all questions I had were promptly answered. So I would buy from ceech again without hesitating.

      posted in Hardware
      tomkxy
      tomkxy
    • RE: Multisensor PIR based on IKEA Molgan

      I made a couple of additional modifications based on posts here and google results:

      • put a short wait before the node goes to sleep -> based on reports from that forum
      • read the motion pin twice with a small wait in between
      • put a small alu foil between the radio and the PCB -> there are some reports in the internet that RF interference could cause false triggers

      I had a close look at the sensor today and everything looked okay so far. However, I was moving into the room in and out. Let's see what the result tomorrow will be.

      posted in My Project
      tomkxy
      tomkxy
    • RE: Multisensor PIR based on IKEA Molgan

      I googled a bit regarding PIR false alarms and found a couple of links. Apart from small bugs - which I have not in the room - air vents could trigger false alarms. Thus, I put back the plastic dome and now have sind 4 hours no false alarms. I am now convinced that my false alarms a most probably triggered by placement and may be air vents.

      http://de.actmeters.com/advice/five-causes-of-pir-false-alarms/
      https://www.youtube.com/watch?v=h0bp91xy5vY
      http://www.hkvstar.com/technology-news/how-to-install-pir-sensor-minimize-the-false-alarm.html

      posted in My Project
      tomkxy
      tomkxy
    • RE: Signing: no active verification session?

      @anticimex Thanks to your excellent working, it is working now.

      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Help Debug st=fail

      Did you try different radios? Anyway, I would try to solder a cap on the radio.

      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Help Debug st=fail

      @tcontrada Do you use signing? What is the range of distances you tried. A couple of weeks ago I had to realize that if put my nodes to near to each other I received transmission failures.

      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Multisensor PIR based on IKEA Molgan

      @Yveaux Unfortunately, I still get false triggers. Do you also use a sensebender? Any ideas, what I can try. I tapped into as you suggested to the second battery.

      posted in My Project
      tomkxy
      tomkxy
    • RE: Multisensor PIR based on IKEA Molgan

      @Yveaux @dynamite Thanks for your suggestion. I followed @Yveaux suggestion and tapped the power for the sensebender after the second battery. It is now working for 2 hours without any false triggers. I will continue the test (for test purposes the sensor is sitting in a room with usually has no movement).

      posted in My Project
      tomkxy
      tomkxy
    • RE: Multisensor PIR based on IKEA Molgan

      @dynamite I see no clear pattern for the false triggers. Most of the time it is after about 7 minutes. But not strictly. Sometimes more than a half hour.. Well if I would power the sense bender directly from the battery I either would have to use a regulator or remove one of the batteries. Would the PIR still work reliable with about 2.4V? Would it make sense to try a capacitor between the 3V where I power the sense bender from to ground?

      posted in My Project
      tomkxy
      tomkxy
    • RE: Help Debug st=fail

      I think you have a problem with your radio. The st=fail means that the message could not be delivered.

      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Multisensor PIR based on IKEA Molgan

      I just realized that I see a lot of false triggers. Anybody else having that experience? Any idea how sensitivity of the PIR can be reduced?

      posted in My Project
      tomkxy
      tomkxy
    • RE: Multisensor PIR based on IKEA Molgan

      @TimO said:

      @tomkxy Nice write up! Do you have an idea on the accuracy of the humidity sensor within the case?

      Sorry, just saw that you asked about the humidity sensor. No, I have no idea yet. Need to make some comparison measures.

      posted in My Project
      tomkxy
      tomkxy
    • RE: Multisensor PIR based on IKEA Molgan

      @TimO said:

      @tomkxy Nice write up! Do you have an idea on the accuracy of the humidity sensor within the case?

      I just put it up in my one of my rooms. It works at least at a distance of about 4m. I will try to do some measure at what distance it is working. I'll post the results.

      posted in My Project
      tomkxy
      tomkxy
    • RE: Multisensor PIR based on IKEA Molgan

      @dynamite said:

      @tomkxy Nice write up of the "conversion". One remark to save some time... instead of removing R12 to R16 you can just remove R17 ... same result less effort.

      Thanks for pointing that out!

      posted in My Project
      tomkxy
      tomkxy
    • RE: Multisensor PIR based on IKEA Molgan

      I put a more complete write up of my mod from the previous post on my blog including the link to the sketch.

      posted in My Project
      tomkxy
      tomkxy
    • RE: Conceptual security question

      @Anticimex Ok. I have to admit I do not know enough about how whitelisting actual works and in particular on what info it is based. I somehow assumed that in combination with signatures a node which has been once whitelisted can send messages (including whatever id is required to identify him on the whitelist) to the gateway ensuring that those messages cannot be tampered with or faked by a non "authorized" node. So that even an attacker know about the id he cannot make use of it unless he has access to the shared key.

      posted in Development
      tomkxy
      tomkxy
    • RE: Conceptual security question

      @Anticimex Did you every think about making the whitelisting feature more dynamic. What I mean is pushing the inclusion mode or however it is called to the gateway. Only when the gateway is in this "inclusion" mode it will add new sensors being presented to it into the whitelist. From my point of view this would increase usability of the whitelisting feature quite significantly without sacrificing security. In its given form, I think whitelisting is practical usable only in a static scenario where your sensor network is defined and is not expected to change a lot.

      Why do I think security would not be sacrificed: In order to activate "inclusion" at the gateway you need physical access to it. So as long as access to the gateway is physically secured overall security is not really negatively impacted (apart from the time window where the gateway is in inclusion mode).

      Just my thoughts. What do you think?

      posted in Development
      tomkxy
      tomkxy
    • RE: Multisensor PIR based on IKEA Molgan

      Here is my a picture of my modded version alt text. I used a Sensebender which is perfect for that use case having already a ATSHA204 and temp/humid sensor on board.

      posted in My Project
      tomkxy
      tomkxy
    • RE: πŸ’¬ Sensebender Gateway

      @tbowmo Congrats! That piece of hardware looks cool. I am interested to replace my current gateway with such a puppy.

      posted in OpenHardware.io
      tomkxy
      tomkxy
    • RE: Conceptual security question

      @mfalkvidd said:

      @tomkxy I wouldn't call jamming unrealistic. Jamming a radio signal is pretty easy.

      Yes, I am aware that jamming a radio signal is not that difficult. What I wanted to say is that the overall scenario might be doable but it is much too complicated. It would be much easier to jam the whole radio network in which case signing makes no difference.

      posted in Development
      tomkxy
      tomkxy
    • RE: Conceptual security question

      @mfalkvidd said:

      From what I have understood, nodes decide that messages to them must be signed.

      So a door lock would typically require signed messages.

      The attacker can certainly introduce a fake door lock into your network, and that fake door lock could open without requiring signatures. But unless the attacker fools you into physically replacing your door lock with the fake lock, you will still be safe.

      The attacker can introduce a fake "open door switch" node that doesn't send signatures. But since your real door lock still requires signatures, your real lock will refuse to open even if the fake node sends an unsigned message to your door lock.

      So I think you are trying to protect yourself against an attack model that doesn't exist.

      @Anticimex will probably correct me if I am wrong πŸ™‚

      @mfalkvidd The scenario I was thinking about - and probably it is too far fetched - is let's say a PIR which would trigger an alarm. If an attacker would have a non-signing PIR which uses the same node-id as the real one. The fake one sends 0. The real one would still be there but could be jammed while the fake one is still sending...
      Ok....while writing that and reflecting on it I agree that my scenario is highly theoretical and as long as the "attacked" node cannot be just "replaced" rather unrealistic.

      posted in Development
      tomkxy
      tomkxy
    • RE: Conceptual security question

      @martinhjelmare said:

      @tomkxy

      Yes, I believe so. Security will always come at a usability cost. But I would probably not whitelist all nodes, only the ones that are exposed to being stolen or play a very important role from a security perspective, eg part of an alarm system or similar.

      I agree with you that security comes with a cost. However, that does not mean that you automatically sacrifice usability. Btw, my scenario is not about stolen nodes, it is about an attacker coming into reach of your network and just presenting an existing node without use of signing.

      I coud imagine that whitelisting could be done dynamically. In order to include a sensor into the network a kind of inclusion (may we have that already, I do not know how inclusion right now works) needs to be active. If inclusion is active a node will be included into the whitelist. Since the start of inclusion requires physical access to the gateway this could be pretty secure, assuming that physical access deemed to be secure.

      posted in Development
      tomkxy
      tomkxy
    • RE: Battery powered PIR and temp/humid sensor

      @Mark-Swift I used a ProMini 3.3v. Unfortunately, I have no schematic. Since I used breakout boards anyway this is not a big deal. You connect those boards to your power, ground and a digital pin or on SCA, SCL pins. I don't know what the power consumption of the Nano's is. So that is something you have to try out.

      posted in Development
      tomkxy
      tomkxy
    • RE: Battery powered PIR and temp/humid sensor

      I used this one one which is rather expensive. I do not remember, however whether I bought really at Sparkfun or some other place. That were one of my first purchases when I started with all that crazy stuff πŸ™‚

      posted in Development
      tomkxy
      tomkxy
    • RE: Conceptual security question

      @martinhjelmare said:

      I imagine that whitelisting the node in question would prohibit it from start using unsigned messages without updating the whitelist at the gateway.

      Since the whitelist includes the serial, this would for sure prevent the "attach" I described. However, as far as I know the whitelist sits compiled in the gateway code which is pretty secure but very hard to extend and maintain.

      posted in Development
      tomkxy
      tomkxy
    • RE: Signing: no active verification session?

      Here are the log files. They are not in sync from the beginning. Further there re message from a node 27 which can be ignored. Best is probably to work from the end.

      Node log

      Starting sensor (RNNNAS, 2.0.0-beta)
      Radio init successful.
      Signing required
      Skipping security for command 3 type 15
      send: 32-32-0-0 s=255,c=3,t=15,pt=0,l=2,sg=0,st=ok:
      Waiting for GW to send signing preferences...
      Skipping security for command 3 type 15
      read: 0-0-32 s=255,c=3,t=15,pt=0,l=2,sg=0:
      Mark node 0 as one that require signed messages
      Mark node 0 as one that do not require whitelisting
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:F0E3953E5E27A57274D53B6F0B2C4098EBD0F6A84345DE7135
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204Soft
      Message to process: 2000560011FF322E302E302D62657461
      Current nonce: F0E3953E5E27A57274D53B6F0B2C4098EBD0F6A84345DE7135AAAAAAAAAAAAAA
      HMAC: DC73D1128E9B00E6E0FFA12AE46CBBD6BE0F3103FDFDE2D718A52AC530A852F9
      Signature in message: 0173D1128E9B00E6E0FFA12AE46CBB
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=0,t=17,pt=0,l=10,sg=1,st=ok:2.0.0-beta
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:E574F30C89052CFEA25ACB6D9B3B4E8CA0D462DF4770ECF72F
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204Soft
      Message to process: 20000E2306FF00
      Current nonce: E574F30C89052CFEA25ACB6D9B3B4E8CA0D462DF4770ECF72FAAAAAAAAAAAAAA
      HMAC: 556E870FC4662534A18B29FB7A48440B7C745E15FF82EA34E806F9C372B6FDA9
      Signature in message: 016E870FC4662534A18B29FB7A48440B7C745E15FF82EA34
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=6,pt=1,l=1,sg=1,st=ok:0
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:10C33355BD231F7BB5E53E7E39372DE1C3053161AE04D74494
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204Soft
      Message to process: 20008E030BFF53656E736562656E646572204D6963726F
      Current nonce: 10C33355BD231F7BB5E53E7E39372DE1C3053161AE04D74494AAAAAAAAAAAAAA
      HMAC: F272ECC9E1B27FF3C089905712EDF1793D146865CE2AF9252D27FAFF953BA64F
      Signature in message: 0172ECC9E1B27FF3
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=11,pt=0,l=17,sg=1,st=ok:Sensebender Micro
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:3B91B8117E813E6F0E12221791A78309559E5052097A420E8A
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204Soft
      Message to process: 20001E030CFF312E35
      Current nonce: 3B91B8117E813E6F0E12221791A78309559E5052097A420E8AAAAAAAAAAAAAAA
      HMAC: 23E348148A34E8BE86788E5AA5F45F8F675089068DA52BC6C4C27D0B8DCA70C3
      Signature in message: 01E348148A34E8BE86788E5AA5F45F8F675089068DA5
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=12,pt=0,l=3,sg=1,st=ok:1.5
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=0,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:694B1F7903CB8A6854DAF8509AA451207AD040D71966A3453D
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204Soft
      Message to process: 200006001F00
      Current nonce: 694B1F7903CB8A6854DAF8509AA451207AD040D71966A3453DAAAAAAAAAAAAAA
      HMAC: 6013C5AA4FDD7E2F61EAA2C3F2716BCEEFB56292BA66BC98A43517E458EF235B
      Signature in message: 0113C5AA4FDD7E2F61EAA2C3F2716BCEEFB56292BA66BC98A4
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=0,c=0,t=31,pt=0,l=0,sg=1,st=ok:
      Init complete, id=32, parent=0, distance=1
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:13F0B25E5D9A117DA1146AFA7494C90FA33FA03B128B0CE3E1
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204Soft
      Message to process: 2000060301FF
      Current nonce: 13F0B25E5D9A117DA1146AFA7494C90FA33FA03B128B0CE3E1AAAAAAAAAAAAAA
      HMAC: 5F71BF42F9C80CC00B5319226D836566CD4F95123E96258FF8E2E3400863547E
      Signature in message: 0171BF42F9C80CC00B5319226D836566CD4F95123E96258FF8
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      ------------- End request time ------------
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:8FBD6C07C7957826D2BAF13CDD7A82D8082180FD4F0796F6B4
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204Soft
      Message to process: 2000060301FF
      Current nonce: 8FBD6C07C7957826D2BAF13CDD7A82D8082180FD4F0796F6B4AAAAAAAAAAAAAA
      HMAC: 6FAC958E93696F29B508B534322FC0237EB1740405F2A7AA2A518FBF4883896D
      Signature in message: 01AC958E93696F29B508B534322FC0237EB1740405F2A7AA2A
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      ------------- End request time ------------
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:6BB69A71C65A24D7077B9B2A2E65D51B3861A56CF777BBD6B6
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204Soft
      Message to process: 2000060301FF
      Current nonce: 6BB69A71C65A24D7077B9B2A2E65D51B3861A56CF777BBD6B6AAAAAAAAAAAAAA
      HMAC: 3E2DE76DD7349510C9CAE6F072875D7D7C380BBDD00C65339BF25898F44A180B
      Signature in message: 012DE76DD7349510C9CAE6F072875D7D7C380BBDD00C65339B
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      ------------- End request time ------------
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:B7CD5773148E8916C98B5BB16265F17811F8091A560A3535EB
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204Soft
      Message to process: 2000060301FF
      Current nonce: B7CD5773148E8916C98B5BB16265F17811F8091A560A3535EBAAAAAAAAAAAAAA
      HMAC: 46959641C93642F85E13499948DC33F1CE3B1B0DE5D8DEC8F5D04ECBA2A28552
      Signature in message: 01959641C93642F85E13499948DC33F1CE3B1B0DE5D8DEC8F5
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      ------------- End request time ------------
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:43AADEA58D5CC9AF0A58FE4A763CEE560CB751BCF31BAD7F4C
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204Soft
      Message to process: 2000060301FF
      Current nonce: 43AADEA58D5CC9AF0A58FE4A763CEE560CB751BCF31BAD7F4CAAAAAAAAAAAAAA
      HMAC: 1217705F14F7482ACEEC510ADD5EB2CBB329B3FA475486182644D5EC98DDB619
      Signature in message: 0117705F14F7482ACEEC510ADD5EB2CBB329B3FA4754861826
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      ------------- End request time ------------
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:90E1C960135A6C130C95D8DCDA63C583905F58BC0C0AC6734C
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204Soft
      Message to process: 2000060301FF
      Current nonce: 90E1C960135A6C130C95D8DCDA63C583905F58BC0C0AC6734CAAAAAAAAAAAAAA
      HMAC: 5DE257A17035F53D20CE18F57BF0E0E60142F56690BB8BB9F4184632241E2015
      Signature in message: 01E257A17035F53D20CE18F57BF0E0E60142F56690BB8BB9F4
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      ------------- End request time ------------
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:5FB2B52B80BA2BD2B7F657B3754594C84B14811B6067EEB626
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204Soft
      Message to process: 2000060301FF
      Current nonce: 5FB2B52B80BA2BD2B7F657B3754594C84B14811B6067EEB626AAAAAAAAAAAAAA
      HMAC: 00AE0409E50F471F7B4154A4492D72FA382EEA40257DD408D2EB9E1B012A35EF
      Signature in message: 01AE0409E50F471F7B4154A4492D72FA382EEA40257DD408D2
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      

      Log file from gateway:

      
      0;255;3;0;9;Starting gateway (RNNGAA, 2.0.0-beta)
      0;255;3;0;9;Radio init successful.
      0;255;3;0;9;Init complete, id=0, parent=0, distance=0
      0;255;3;0;9;Attempting MQTT connection...
      0;255;3;0;9;MQTT connected
      0;255;3;0;9;Skipping security for command 3 type 16
      0;255;3;0;9;read: 32-32-0 s=255,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;Signing backend: ATSHA204
      0;255;3;0;9;SHA256: B44451C64C562F11BDCF41F7F3EEF39816265188B34FD45E96216B85148A12AA
      0;255;3;0;9;Transmittng nonce
      0;255;3;0;9;Skipping security for command 3 type 17
      0;255;3;0;9;send: 0-0-32-32 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:B44451C64C562F11BDCF41F7F3EEF39816265188B34FD45E96
      0;255;3;0;9;Signature in message: 0191F99D82163BDAF73FFD91B6984D59A5F564BF45ECBBABCE
      0;255;3;0;9;Message to process: 2000060301FF
      0;255;3;0;9;Current nonce: B44451C64C562F11BDCF41F7F3EEF39816265188B34FD45E96AAAAAAAAAAAAAA
      0;255;3;0;9;HMAC: EB8162E2FCAD9359B19B383A711A5E64A964A25F965162BF74BBFB4EB59836E2
      0;255;3;0;9;Signature bad: 018162E2FCAD9359B19B383A711A5E64A964A25F965162BF74
      0;255;3;0;9;Signature verification failed!
      0;255;3;0;9;verify fail
      0;255;3;0;9;read: 27-27-0 s=2,c=1,t=1,pt=7,l=5,sg=0:62.49
      0;255;3;0;9;Sending message on topic: GW1_out/27/2/1/0/1
      0;255;3;0;9;read: 27-27-0 s=1,c=1,t=0,pt=7,l=5,sg=0:34.11
      0;255;3;0;9;Sending message on topic: GW1_out/27/1/1/0/0
      0;255;3;0;9;read: 27-27-0 s=0,c=1,t=4,pt=7,l=5,sg=0:1020.15
      0;255;3;0;9;Sending message on topic: GW1_out/27/0/1/0/4
      0;255;3;0;9;read: 27-27-0 s=0,c=1,t=5,pt=0,l=6,sg=0:stable
      0;255;3;0;9;Sending message on topic: GW1_out/27/0/1/0/5
      0;255;3;0;9;read: 27-27-0 s=10,c=1,t=38,pt=7,l=5,sg=0:4.123
      0;255;3;0;9;Sending message on topic: GW1_out/27/10/1/0/38
      0;255;3;0;9;read: 27-27-0 s=10,c=1,t=39,pt=7,l=5,sg=0:0.000000
      0;255;3;0;9;Sending message on topic: GW1_out/27/10/1/0/39
      0;255;3;0;9;read: 27-27-0 s=11,c=1,t=38,pt=7,l=5,sg=0:9.978
      0;255;3;0;9;Sending message on topic: GW1_out/27/11/1/0/38
      0;255;3;0;9;read: 27-27-0 s=255,c=3,t=0,pt=1,l=1,sg=0:88
      0;255;3;0;9;Sending message on topic: GW1_out/27/255/3/0/0
      0;255;3;0;9;read: 27-27-0 s=13,c=1,t=8,pt=7,l=5,sg=0:0.40
      0;255;3;0;9;Sending message on topic: GW1_out/27/13/1/0/8
      0;255;3;0;9;read: 27-27-0 s=13,c=1,t=9,pt=7,l=5,sg=0:0.60
      0;255;3;0;9;Sending message on topic: GW1_out/27/13/1/0/9
      0;255;3;0;9;read: 27-27-0 s=12,c=1,t=10,pt=7,l=5,sg=0:328.68
      0;255;3;0;9;Sending message on topic: GW1_out/27/12/1/0/10
      0;255;3;0;9;read: 27-27-0 s=12,c=1,t=24,pt=7,l=5,sg=0:36.80
      0;255;3;0;9;Sending message on topic: GW1_out/27/12/1/0/24
      0;255;3;0;9;read: 27-27-0 s=14,c=1,t=6,pt=7,l=5,sg=0:0.00
      0;255;3;0;9;Sending message on topic: GW1_out/27/14/1/0/6
      0;255;3;0;9;Skipping security for command 3 type 16
      0;255;3;0;9;read: 32-32-0 s=255,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;Signing backend: ATSHA204
      0;255;3;0;9;SHA256: 9BEBE9A04F339CE85808EBF1B5E8BC7BD611CC3B5C0A638DF2A548B398BF059E
      0;255;3;0;9;Transmittng nonce
      0;255;3;0;9;Skipping security for command 3 type 17
      0;255;3;0;9;send: 0-0-32-32 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:9BEBE9A04F339CE85808EBF1B5E8BC7BD611CC3B5C0A638DF2
      0;255;3;0;9;Signature in message: 012C3605DF4F03AD69833FCC101EA1BF0E5750483F4E2107F6
      0;255;3;0;9;Message to process: 2000060301FF
      0;255;3;0;9;Current nonce: 9BEBE9A04F339CE85808EBF1B5E8BC7BD611CC3B5C0A638DF2AAAAAAAAAAAAAA
      0;255;3;0;9;HMAC: 681C6D87947BC2574D48FFCAC370BECD30789EAEB7C2BFBAD562B2ED7DCAE10F
      0;255;3;0;9;Signature bad: 011C6D87947BC2574D48FFCAC370BECD30789EAEB7C2BFBAD5
      0;255;3;0;9;Signature verification failed!
      0;255;3;0;9;verify fail
      0;255;3;0;9;Skipping security for command 3 type 15
      0;255;3;0;9;read: 32-32-0 s=255,c=3,t=15,pt=0,l=2,sg=0:
      0;255;3;0;9;Mark node 32 as one that require signed messages
      0;255;3;0;9;Mark node 32 as one that do not require whitelisting
      0;255;3;0;9;Informing node 32 that we require signatures
      0;255;3;0;9;Informing node 32 that we do not require whitelisting
      0;255;3;0;9;Skipping security for command 3 type 15
      0;255;3;0;9;send: 0-0-32-32 s=255,c=3,t=15,pt=0,l=2,sg=0,st=ok:
      0;255;3;0;9;Skipping security for command 3 type 16
      0;255;3;0;9;read: 32-32-0 s=255,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;Signing backend: ATSHA204
      0;255;3;0;9;SHA256: F0E3953E5E27A57274D53B6F0B2C4098EBD0F6A84345DE7135D3A4AEC3E13960
      0;255;3;0;9;Transmittng nonce
      0;255;3;0;9;Skipping security for command 3 type 17
      0;255;3;0;9;send: 0-0-32-32 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:F0E3953E5E27A57274D53B6F0B2C4098EBD0F6A84345DE7135
      0;255;3;0;9;Signature in message: 0173D1128E9B00E6E0FFA12AE46CBB
      0;255;3;0;9;Message to process: 2000560011FF322E302E302D62657461
      0;255;3;0;9;Current nonce: F0E3953E5E27A57274D53B6F0B2C4098EBD0F6A84345DE7135AAAAAAAAAAAAAA
      0;255;3;0;9;HMAC: CBC7FC088614695AD92A5A4A32CA832C6D00041CF63D1AF78F353FD6E0D9D949
      0;255;3;0;9;Signature bad: 01C7FC088614695AD92A5A4A32CA83
      0;255;3;0;9;Signature verification failed!
      0;255;3;0;9;verify fail
      0;255;3;0;9;Skipping security for command 3 type 16
      0;255;3;0;9;read: 32-32-0 s=255,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;Signing backend: ATSHA204
      0;255;3;0;9;SHA256: E574F30C89052CFEA25ACB6D9B3B4E8CA0D462DF4770ECF72FB75DED8D5F68BC
      0;255;3;0;9;Transmittng nonce
      0;255;3;0;9;Skipping security for command 3 type 17
      0;255;3;0;9;send: 0-0-32-32 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:E574F30C89052CFEA25ACB6D9B3B4E8CA0D462DF4770ECF72F
      0;255;3;0;9;Signature in message: 016E870FC4662534A18B29FB7A48440B7C745E15FF82EA34
      0;255;3;0;9;Message to process: 20000E2306FF00
      0;255;3;0;9;Current nonce: E574F30C89052CFEA25ACB6D9B3B4E8CA0D462DF4770ECF72FAAAAAAAAAAAAAA
      0;255;3;0;9;HMAC: 5E2D30821345709074EB96B09CC0C7408E1291AC5C921432DD83A29919734767
      0;255;3;0;9;Signature bad: 012D30821345709074EB96B09CC0C7408E1291AC5C921432
      0;255;3;0;9;Signature verification failed!
      0;255;3;0;9;verify fail
      0;255;3;0;9;Skipping security for command 3 type 16
      0;255;3;0;9;read: 32-32-0 s=255,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;Signing backend: ATSHA204
      0;255;3;0;9;SHA256: 10C33355BD231F7BB5E53E7E39372DE1C3053161AE04D744948C093BFA5776C8
      0;255;3;0;9;Transmittng nonce
      0;255;3;0;9;Skipping security for command 3 type 17
      0;255;3;0;9;send: 0-0-32-32 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:10C33355BD231F7BB5E53E7E39372DE1C3053161AE04D74494
      0;255;3;0;9;Signature in message: 0172ECC9E1B27FF3
      0;255;3;0;9;Message to process: 20008E030BFF53656E736562656E646572204D6963726F
      0;255;3;0;9;Current nonce: 10C33355BD231F7BB5E53E7E39372DE1C3053161AE04D74494AAAAAAAAAAAAAA
      0;255;3;0;9;HMAC: 82CCF6912389FCE5896B4867B82879414D80FE3FBAC1C6365E0B6303F7DADB56
      0;255;3;0;9;Signature bad: 01CCF6912389FCE5
      0;255;3;0;9;Signature verification failed!
      0;255;3;0;9;verify fail
      0;255;3;0;9;Skipping security for command 3 type 16
      0;255;3;0;9;read: 32-32-0 s=255,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;Signing backend: ATSHA204
      0;255;3;0;9;SHA256: 3B91B8117E813E6F0E12221791A78309559E5052097A420E8A3AB9EDED6F5D56
      0;255;3;0;9;Transmittng nonce
      0;255;3;0;9;Skipping security for command 3 type 17
      0;255;3;0;9;send: 0-0-32-32 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:3B91B8117E813E6F0E12221791A78309559E5052097A420E8A
      0;255;3;0;9;Signature in message: 01E348148A34E8BE86788E5AA5F45F8F675089068DA5
      0;255;3;0;9;Message to process: 20001E030CFF312E35
      0;255;3;0;9;Current nonce: 3B91B8117E813E6F0E12221791A78309559E5052097A420E8AAAAAAAAAAAAAAA
      0;255;3;0;9;HMAC: ACFBD53ADA240C2FF69FF474887A750BEC719180D3A30B132AF241E94D8CF15B
      0;255;3;0;9;Signature bad: 01FBD53ADA240C2FF69FF474887A750BEC719180D3A3
      0;255;3;0;9;Signature verification failed!
      0;255;3;0;9;verify fail
      0;255;3;0;9;Skipping security for command 3 type 16
      0;255;3;0;9;read: 32-32-0 s=0,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;Signing backend: ATSHA204
      0;255;3;0;9;SHA256: 694B1F7903CB8A6854DAF8509AA451207AD040D71966A3453D7D5772649E35E9
      0;255;3;0;9;Transmittng nonce
      0;255;3;0;9;Skipping security for command 3 type 17
      0;255;3;0;9;send: 0-0-32-32 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:694B1F7903CB8A6854DAF8509AA451207AD040D71966A3453D
      0;255;3;0;9;Signature in message: 0113C5AA4FDD7E2F61EAA2C3F2716BCEEFB56292BA66BC98A4
      0;255;3;0;9;Message to process: 200006001F00
      0;255;3;0;9;Current nonce: 694B1F7903CB8A6854DAF8509AA451207AD040D71966A3453DAAAAAAAAAAAAAA
      0;255;3;0;9;HMAC: 786E3B4757AA9BA51BB69546A59AC2E07B4FD696E79A72BF4DBD14530CBDFB21
      0;255;3;0;9;Signature bad: 016E3B4757AA9BA51BB69546A59AC2E07B4FD696E79A72BF4D
      0;255;3;0;9;Signature verification failed!
      0;255;3;0;9;verify fail
      0;255;3;0;9;Skipping security for command 3 type 16
      0;255;3;0;9;read: 32-32-0 s=255,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;Signing backend: ATSHA204
      0;255;3;0;9;SHA256: 13F0B25E5D9A117DA1146AFA7494C90FA33FA03B128B0CE3E1ED939BDD46DD66
      0;255;3;0;9;Transmittng nonce
      0;255;3;0;9;Skipping security for command 3 type 17
      0;255;3;0;9;send: 0-0-32-32 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:13F0B25E5D9A117DA1146AFA7494C90FA33FA03B128B0CE3E1
      0;255;3;0;9;Signature in message: 0171BF42F9C80CC00B5319226D836566CD4F95123E96258FF8
      0;255;3;0;9;Message to process: 2000060301FF
      0;255;3;0;9;Current nonce: 13F0B25E5D9A117DA1146AFA7494C90FA33FA03B128B0CE3E1AAAAAAAAAAAAAA
      0;255;3;0;9;HMAC: 7C9BD8227613765CC0A7D20E5C76396F6B380BB4D6A4199CDAB76C4D5CFF5C43
      0;255;3;0;9;Signature bad: 019BD8227613765CC0A7D20E5C76396F6B380BB4D6A4199CDA
      0;255;3;0;9;Signature verification failed!
      0;255;3;0;9;verify fail
      0;255;3;0;9;read: 27-27-0 s=13,c=1,t=8,pt=7,l=5,sg=0:0.13
      0;255;3;0;9;Sending message on topic: GW1_out/27/13/1/0/8
      0;255;3;0;9;read: 27-27-0 s=13,c=1,t=9,pt=7,l=5,sg=0:0.40
      0;255;3;0;9;Sending message on topic: GW1_out/27/13/1/0/9
      0;255;3;0;9;read: 27-27-0 s=12,c=1,t=10,pt=7,l=5,sg=0:225.00
      0;255;3;0;9;Sending message on topic: GW1_out/27/12/1/0/10
      0;255;3;0;9;read: 27-27-0 s=12,c=1,t=24,pt=7,l=5,sg=0:0.02
      0;255;3;0;9;Sending message on topic: GW1_out/27/12/1/0/24
      0;255;3;0;9;Skipping security for command 3 type 16
      0;255;3;0;9;read: 32-32-0 s=255,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;Signing backend: ATSHA204
      0;255;3;0;9;SHA256: 8FBD6C07C7957826D2BAF13CDD7A82D8082180FD4F0796F6B4E49547312D56B7
      0;255;3;0;9;Transmittng nonce
      0;255;3;0;9;Skipping security for command 3 type 17
      0;255;3;0;9;send: 0-0-32-32 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:8FBD6C07C7957826D2BAF13CDD7A82D8082180FD4F0796F6B4
      0;255;3;0;9;Signature in message: 01AC958E93696F29B508B534322FC0237EB1740405F2A7AA2A
      0;255;3;0;9;Message to process: 2000060301FF
      0;255;3;0;9;Current nonce: 8FBD6C07C7957826D2BAF13CDD7A82D8082180FD4F0796F6B4AAAAAAAAAAAAAA
      0;255;3;0;9;HMAC: 2C52B5D52BDA0030F2BC63D2CE6EB6CF7ED83AB9F35DCEA61147FB3429B03170
      0;255;3;0;9;Signature bad: 0152B5D52BDA0030F2BC63D2CE6EB6CF7ED83AB9F35DCEA611
      0;255;3;0;9;Signature verification failed!
      0;255;3;0;9;verify fail
      0;255;3;0;9;Skipping security for command 3 type 16
      0;255;3;0;9;read: 26-26-0 s=1,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;Signing backend: ATSHA204
      0;255;3;0;9;SHA256: 53FB5496D3358338CE2D5082FAC5D043DE6D4E0D607275D2F3908F0F1AF8CB73
      0;255;3;0;9;Transmittng nonce
      0;255;3;0;9;Skipping security for command 3 type 17
      0;255;3;0;9;send: 0-0-26-26 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:53FB5496D3358338CE2D5082FAC5D043DE6D4E0D607275D2F3
      0;255;3;0;9;Signature in message: 012C20F0DC9CF89B84455FA90271B4823E60DF9D
      0;255;3;0;9;Message to process: 1A002EE100014879D04101
      0;255;3;0;9;Current nonce: 53FB5496D3358338CE2D5082FAC5D043DE6D4E0D607275D2F3AAAAAAAAAAAAAA
      0;255;3;0;9;HMAC: 1D593C273D7167F9756DCA5CE4AF8005D7E5B8D6B95CF2C3B0C10A839E057FC3
      0;255;3;0;9;Signature bad: 01593C273D7167F9756DCA5CE4AF8005D7E5B8D6
      0;255;3;0;9;Signature verification failed!
      0;255;3;0;9;verify fail
      0;255;3;0;9;Skipping security for command 3 type 16
      0;255;3;0;9;read: 26-26-0 s=2,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;Signing backend: ATSHA204
      0;255;3;0;9;SHA256: 3081C0AF2996E0041CC85171727DB5F96A8201CF0BCC0D92FE3CC33C2A7B9705
      0;255;3;0;9;Transmittng nonce
      0;255;3;0;9;Skipping security for command 3 type 17
      0;255;3;0;9;send: 0-0-26-26 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:3081C0AF2996E0041CC85171727DB5F96A8201CF0BCC0D92FE
      0;255;3;0;9;Signature in message: 01395A6873A0741CFD612BEC59D9E865888C6C29
      0;255;3;0;9;Message to process: 1A002EE10102905B3A4201
      0;255;3;0;9;Current nonce: 3081C0AF2996E0041CC85171727DB5F96A8201CF0BCC0D92FEAAAAAAAAAAAAAA
      0;255;3;0;9;HMAC: 137DD0BB67606DDBF1F16854BFE720BB29C6ED1BFDD421430688DFC08F0813AF
      0;255;3;0;9;Signature bad: 017DD0BB67606DDBF1F16854BFE720BB29C6ED1B
      0;255;3;0;9;Signature verification failed!
      0;255;3;0;9;verify fail
      0;255;3;0;9;Skipping security for command 3 type 16
      0;255;3;0;9;read: 32-32-0 s=255,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;Signing backend: ATSHA204
      0;255;3;0;9;SHA256: 6BB69A71C65A24D7077B9B2A2E65D51B3861A56CF777BBD6B6B626B2A3942FAF
      0;255;3;0;9;Transmittng nonce
      0;255;3;0;9;Skipping security for command 3 type 17
      0;255;3;0;9;send: 0-0-32-32 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:6BB69A71C65A24D7077B9B2A2E65D51B3861A56CF777BBD6B6
      0;255;3;0;9;Signature in message: 012DE76DD7349510C9CAE6F072875D7D7C380BBDD00C65339B
      0;255;3;0;9;Message to process: 2000060301FF
      0;255;3;0;9;Current nonce: 6BB69A71C65A24D7077B9B2A2E65D51B3861A56CF777BBD6B6AAAAAAAAAAAAAA
      0;255;3;0;9;HMAC: A7FC0A4823BBE2F65EFC0F872743D808BB3DE432CCDEED33353C46B6D50736DD
      0;255;3;0;9;Signature bad: 01FC0A4823BBE2F65EFC0F872743D808BB3DE432CCDEED3335
      0;255;3;0;9;Signature verification failed!
      0;255;3;0;9;verify fail
      0;255;3;0;9;read: 22-22-0 s=3,c=1,t=0,pt=7,l=5,sg=0:31.0
      0;255;3;0;9;Sending message on topic: GW1_out/22/3/1/0/0
      0;255;3;0;9;Skipping security for command 3 type 16
      0;255;3;0;9;read: 32-32-0 s=255,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;Signing backend: ATSHA204
      0;255;3;0;9;SHA256: B7CD5773148E8916C98B5BB16265F17811F8091A560A3535EB6113A76207EE59
      0;255;3;0;9;Transmittng nonce
      0;255;3;0;9;Skipping security for command 3 type 17
      0;255;3;0;9;send: 0-0-32-32 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:B7CD5773148E8916C98B5BB16265F17811F8091A560A3535EB
      0;255;3;0;9;Signature in message: 01959641C93642F85E13499948DC33F1CE3B1B0DE5D8DEC8F5
      0;255;3;0;9;Message to process: 2000060301FF
      0;255;3;0;9;Current nonce: B7CD5773148E8916C98B5BB16265F17811F8091A560A3535EBAAAAAAAAAAAAAA
      0;255;3;0;9;HMAC: 218006AFDB5D1A909B39808D0F79E620974D2B7A291A929FD4524C0D3E5BEF9E
      0;255;3;0;9;Signature bad: 018006AFDB5D1A909B39808D0F79E620974D2B7A291A929FD4
      0;255;3;0;9;Signature verification failed!
      0;255;3;0;9;verify fail
      0;255;3;0;9;Skipping security for command 3 type 16
      0;255;3;0;9;read: 32-32-0 s=255,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;Signing backend: ATSHA204
      0;255;3;0;9;SHA256: 43AADEA58D5CC9AF0A58FE4A763CEE560CB751BCF31BAD7F4CCAEEC0925C60AA
      0;255;3;0;9;Transmittng nonce
      0;255;3;0;9;Skipping security for command 3 type 17
      0;255;3;0;9;send: 0-0-32-32 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:43AADEA58D5CC9AF0A58FE4A763CEE560CB751BCF31BAD7F4C
      0;255;3;0;9;Signature in message: 0117705F14F7482ACEEC510ADD5EB2CBB329B3FA4754861826
      0;255;3;0;9;Message to process: 2000060301FF
      0;255;3;0;9;Current nonce: 43AADEA58D5CC9AF0A58FE4A763CEE560CB751BCF31BAD7F4CAAAAAAAAAAAAAA
      0;255;3;0;9;HMAC: DD7AADA9C207653FF0E5184E006CCB4707837275511EC2136773AEFE80C89AB9
      0;255;3;0;9;Signature bad: 017AADA9C207653FF0E5184E006CCB4707837275511EC21367
      0;255;3;0;9;Signature verification failed!
      0;255;3;0;9;verify fail
      
      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Signing: no active verification session?

      @Anticimex said:

      @tomkxy yes, just make sure it applies cleanly. I forced pushed some updates.

      I sent you a chat message

      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Signing: no active verification session?

      @Anticimex said:

      @tomkxy That's ok, No big rush on this. I suspect it is just a matter of the soft and atsha backends are not in agreement on the nonce data. I have not changed the algorithms so I would not expect them to be incompatible.

      Can I use the same pull request? I just fetched this one (https://github.com/mysensors/Arduino/pull/454)

      OK?

      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Signing: no active verification session?

      @Anticimex said:

      @tomkxy Hm. I have rewritten the code to be easier to read. Could you please clean out the changes from my PR (restore to "pristine" development) and then reapply the PR from github?
      If possible, also include the verbose logs from both ends so that we can confirm that they agree upon which nonce to use for a message.

      I cannot promise that I am able to do that today.

      posted in Troubleshooting
      tomkxy
      tomkxy
    • Conceptual security question

      During the latest test I performed with signing I realized that I overlooked one point and its consequences.

      I would like to get a clear picture of things are supposed to work and what is required to get some decent security in place.

      So far all my nodes are using signatures. What I fully understood now, is that the sensor node triggers whether he requires signatures or not.
      As a consequence, an attacker could re-use an existing node id, configure it to not using security and start a conversation with my gateway and since with my controller who is agnostic to signatures.

      I could imagine that with a proper inclusion process - which I am not using until now - could close that whole. Since I am not using inclusion so far, I do not know how it works. Will the use of inclusion ensure that everytime a node presents itself, the gateway needs to be in inclusion mode? Or is this something the controller needs to take care of?

      posted in Development
      tomkxy
      tomkxy
    • RE: Signing: no active verification session?

      @Anticimex said:

      @tomkxy I think I found the problem. Mistake by me.
      Try to change the following two lines (106 & 107) in MySigningAtsha204Soft.cpp:
      memset(_signing_current_inbound_nonce, 0x00, NONCE_NUMIN_SIZE_PASSTHROUGH);
      memset(_signing_current_outbound_nonce, 0x00, NONCE_NUMIN_SIZE_PASSTHROUGH);
      to
      memset(_signing_current_inbound_nonce, 0xAA, 32);
      memset(_signing_current_outbound_nonce, 0xAA, 32);

      I made the changes. Still not working.

      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Signing: no active verification session?

      @Anticimex said:

      @tomkxy Hm, ok, so with the updates from PR, soft and atsha signing are not compatible? I need to check into that.
      Out of curiosity, when you checked from development branch, was the ATSHA node using the code from the PR or was it also from development branch? Just so I know if the issue is in the soft signing implementation or both backends.

      I ran the test with node and gateway on PR code:
      One test both on soft signing -> ok
      One test node on soft signing, GW on ATSH204 -> failed

      Then I repeated with both node and GW on development branch:

      • node soft sign, GW on ATSHA204 -> OK
      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Signing: no active verification session?

      So, I repeated the test again, if GW and node are on soft sign it works. If I put either GW or node on soft sign, while the other is using ATSHA204, signing fails
      To verify my setup I switched to development branch. There I could run the node on soft signing while the GW is using ATSHA204.

      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Signing: no active verification session?

      @Anticimex Ok. I repeated the the soft signing tests: Both, gateway and node on soft signing works.
      Putting node on ATSHA204 signing while gateway is still on soft signing fails.

      Apart from that issue, the implementation seems to work and improves obviously on the timing issue I had.

      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Signing: no active verification session?

      @Anticimex said:

      @tomkxy When you use soft signing, have you personalized that node with the same HMAC key? Soft signing on development stores this in EEPROM. It has to match what the other node has in the ATSHA204.

      Yes, while I was writing this occurred to me. That's the reason why I will repeat that test.

      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Signing: no active verification session?

      Continuation of test details

      TEST 4

      • Node is using soft signing, GW ATSHA204 signing
      • Node and gateway on pull request code
      • Controller has time delays between time response send and state message

      RESULT:

      • Failed

      Note: I just realized that I have in the beginning a couple of transmission errors which is due to he fact that I needed to bring the node and gateway probably to close together in order to get the gateway logs.
      I will repeat this test!

      Log file form node

      Starting sensor (RNNNAS, 2.0.0-beta)
      Radio init successful.
      Signing required
      Skipping security for command 3 type 15
      send: 32-32-24-0 s=255,c=3,t=15,pt=0,l=2,sg=0,st=fail:
      Waiting for GW to send signing preferences...
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=fail:
      Failed to transmit nonce request!
      sign fail
      send: 32-32-24-0 s=255,c=0,t=17,pt=0,l=10,sg=0,st=fail:2.0.0-beta
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=fail:
      Failed to transmit nonce request!
      sign fail
      send: 32-32-24-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=fail:24
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=fail:
      find parent
      send: 32-32-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
      Skipping security for command 3 type 8
      read: 0-0-32 s=255,c=3,t=8,pt=1,l=1,sg=0:0
      parent=0, d=1
      Failed to transmit nonce request!
      sign fail
      send: 0-32-0-32 s=255,c=3,t=8,pt=1,l=1,sg=0,st=ok:0
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:9D0A6F87CD7824856F6C5F86135DF9C205A52172154E2ECAA8
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204Soft
      Message to process: 20001E030CFF312E35
      Current nonce: 9D0A6F87CD7824856F6C5F86135DF9C205A52172154E2ECAA8AAAAAAAAAAAAAA
      HMAC: 1B03C1339C72E52DE7ADA8312983CE2853E8E4CF7A88C262250900388FFDD1F8
      Signature in message: 0103C1339C72E52DE7ADA8312983CE2853E8E4CF7A88
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=12,pt=0,l=3,sg=1,st=ok:1.5
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=0,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:F6B9819CA822EECEE953357A43742393B952BB5C152C601208
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204Soft
      Message to process: 200006001F00
      Current nonce: F6B9819CA822EECEE953357A43742393B952BB5C152C601208AAAAAAAAAAAAAA
      HMAC: A74B8E7B71B7F614D6E4DA7E1817459E5F15C26D5A75CA57B1723E9EEC5FC248
      Signature in message: 014B8E7B71B7F614D6E4DA7E1817459E5F15C26D5A75CA57B1
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=0,c=0,t=31,pt=0,l=0,sg=1,st=ok:
      Init complete, id=32, parent=0, distance=1
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:D84804E29BF6B78CC1F7823E860D19378D399472D3D3A43D6F
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204Soft
      Message to process: 2000060301FF
      Current nonce: D84804E29BF6B78CC1F7823E860D19378D399472D3D3A43D6FAAAAAAAAAAAAAA
      HMAC: CE335FA0706A8C57678547FA4DD9528BDE7AA9401607B3920C79DB515C630B46
      Signature in message: 01335FA0706A8C57678547FA4DD9528BDE7AA9401607B3920C
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      
      

      Log file from gateway:

      0;255;3;0;9;Starting gateway (RNNGAA, 2.0.0-beta)
      0;255;3;0;9;Radio init successful.
      0;255;3;0;9;Init complete, id=0, parent=0, distance=0
      0;255;3;0;9;Attempting MQTT connection...
      0;255;3;0;9;MQTT connected
      0;255;3;0;9;Skipping security for command 3 type 16
      0;255;3;0;9;read: 32-32-0 s=255,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;Signing backend: ATSHA204
      0;255;3;0;9;SHA256: 1F0846076C5AD7D094CA224A960CF66CB67F5E6CB4BD0EEDD2EE290975E1CAAD
      0;255;3;0;9;Transmittng nonce
      0;255;3;0;9;Skipping security for command 3 type 17
      0;255;3;0;9;send: 0-0-32-32 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:1F0846076C5AD7D094CA224A960CF66CB67F5E6CB4BD0EEDD2
      0;255;3;0;9;Signature in message: 01E921AD315EFBDA944E6F9F1A7FB21BFD2FD798E2C212CB0E
      0;255;3;0;9;Message to process: 2000060301FF
      0;255;3;0;9;Current nonce: 1F0846076C5AD7D094CA224A960CF66CB67F5E6CB4BD0EEDD2AAAAAAAAAAAAAA
      0;255;3;0;9;HMAC: 7C952EBD4EE51B758DA5BFA19E14F01DA5CD375882CE6CAA316F5A5117BA8A54
      0;255;3;0;9;Signature bad: 01952EBD4EE51B758DA5BFA19E14F01DA5CD375882CE6CAA31
      0;255;3;0;9;Signature verification failed!
      0;255;3;0;9;verify fail
      

      TEST 5

      • ATSHA204 signing
      • Node and gateway on pull request code
      • Removed delays between send in controller

      RESULT:

      • OK
      Starting sensor (RNNNAA, 2.0.0-beta)
      Radio init successful.
      Signing required
      Skipping security for command 3 type 15
      send: 32-32-0-0 s=255,c=3,t=15,pt=0,l=2,sg=0,st=ok:
      Waiting for GW to send signing preferences...
      Skipping security for command 3 type 15
      read: 0-0-32 s=255,c=3,t=15,pt=0,l=2,sg=0:
      Mark node 0 as one that require signed messages
      Mark node 0 as one that do not require whitelisting
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:FE59BF15C57BFEE2694AC0808D7E9C1F92739CBD6188E1674E
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000560011FF322E302E302D62657461
      Current nonce: FE59BF15C57BFEE2694AC0808D7E9C1F92739CBD6188E1674EAAAAAAAAAAAAAA
      HMAC: D627F8CC1ED41A9CC0067FFCA8F2DE919BB51348B20748E8E2406BAF2C96BD76
      Signature in message: 0127F8CC1ED41A9CC0067FFCA8F2DE
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=0,t=17,pt=0,l=10,sg=1,st=ok:2.0.0-beta
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:A630B1C776C8759946C7F58EA263CA7683B59D828F8161B78F
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 20000E2306FF00
      Current nonce: A630B1C776C8759946C7F58EA263CA7683B59D828F8161B78FAAAAAAAAAAAAAA
      HMAC: F4D362400F33CCE581E3A97E40CF7F1AE74ACAB8ED2E97A21E10E4A43B9B619A
      Signature in message: 01D362400F33CCE581E3A97E40CF7F1AE74ACAB8ED2E97A2
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=6,pt=1,l=1,sg=1,st=ok:0
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:CA7A11B0F5EE59A28ADCA0AC74FEFCFD59F430893E548992A9
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 20008E030BFF53656E736562656E646572204D6963726F
      Current nonce: CA7A11B0F5EE59A28ADCA0AC74FEFCFD59F430893E548992A9AAAAAAAAAAAAAA
      HMAC: 50EBEE0FCE4DDE0CCF63294D4DD6D142D958B9763F206A42219D7B701D184C1D
      Signature in message: 01EBEE0FCE4DDE0C
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=11,pt=0,l=17,sg=1,st=ok:Sensebender Micro
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:C505BE34F06A7DF14012B6096C41268BF35B06A0C14D276F70
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 20001E030CFF312E35
      Current nonce: C505BE34F06A7DF14012B6096C41268BF35B06A0C14D276F70AAAAAAAAAAAAAA
      HMAC: 7DB23045C8B4AE6AE1D49263C36B204781530088F9D6D082B3C11F01C991573A
      Signature in message: 01B23045C8B4AE6AE1D49263C36B204781530088F9D6
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=12,pt=0,l=3,sg=1,st=ok:1.5
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=0,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:5F3E459CE02B989081990670A0EFC390FB800F5083B961806B
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 200006001F00
      Current nonce: 5F3E459CE02B989081990670A0EFC390FB800F5083B961806BAAAAAAAAAAAAAA
      HMAC: C233B208BCB7B838FD0E2643453510BA9D4B4CA507626C646569B4723508C7E6
      Signature in message: 0133B208BCB7B838FD0E2643453510BA9D4B4CA507626C6465
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=0,c=0,t=31,pt=0,l=0,sg=1,st=ok:
      Init complete, id=32, parent=0, distance=1
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:5284D3E4DDB1653B612D386C5639215EB2D586CD13F538E44C
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000060301FF
      Current nonce: 5284D3E4DDB1653B612D386C5639215EB2D586CD13F538E44CAAAAAAAAAAAAAA
      HMAC: 64324E13B3D277F3DAD2F213854702DDC1C56290462A44387C16B9B05C927EB3
      Signature in message: 01324E13B3D277F3DAD2F213854702DDC1C56290462A44387C
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      Skipping security for command 3 type 16
      read: 0-0-32 s=255,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: 051A42C2D547A6501D825592655382F46097B940CB2A9BC7862764640382A6F4
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-0-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:051A42C2D547A6501D825592655382F46097B940CB2A9BC786
      Signature in message: 013DA95E35B18396C1610C640882FC
      Message to process: 0020560301FF31343635323836313037
      Current nonce: 051A42C2D547A6501D825592655382F46097B940CB2A9BC786AAAAAAAAAAAAAA
      HMAC: 083DA95E35B18396C1610C640882FC8F7A73BB2F36C4CCB622978F14F8DCF88E
      Signature OK
      read: 0-0-32 s=255,c=3,t=1,pt=0,l=10,sg=0:1465286107
      Time value received and updated...
      Skipping security for command 3 type 16
      read: 0-0-32 s=0,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: 064A0459AAB0F53006E4E0648F9F547E24E39CDEF29299DE10FB759CD49CD6AE
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-0-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:064A0459AAB0F53006E4E0648F9F547E24E39CDEF29299DE10
      Signature in message: 01E1A03B9429A6DBFF20E6D19D1E68C07E7CC238E3EC7893
      Message to process: 00200E01020030
      Current nonce: 064A0459AAB0F53006E4E0648F9F547E24E39CDEF29299DE10AAAAAAAAAAAAAA
      HMAC: C1E1A03B9429A6DBFF20E6D19D1E68C07E7CC238E3EC78930184BD18F0823FF6
      Signature OK
      read: 0-0-32 s=0,c=1,t=2,pt=0,l=1,sg=0:0
      Skipping security for command 3 type 16
      read: 0-0-32 s=0,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: 0D27D0A1761710382B1527AB510AAFBDF7E965AD4453E1451085252F4C422575
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-0-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:0D27D0A1761710382B1527AB510AAFBDF7E965AD4453E14510
      Signature in message: 01BB1C2ABEF5EDB609FC783D2D4068632EA4CFFB49AE2C06
      Message to process: 00200E01180038
      Current nonce: 0D27D0A1761710382B1527AB510AAFBDF7E965AD4453E14510AAAAAAAAAAAAAA
      HMAC: 00BB1C2ABEF5EDB609FC783D2D4068632EA4CFFB49AE2C06F614377BE7576BEC
      Signature OK
      read: 0-0-32 s=0,c=1,t=24,pt=0,l=1,sg=0:8
      
      

      TEST 6

      • Node is using soft signing, GW ATSHA204 signing
      • Node and gateway on development branch
      • Controller has time delays between time response send and state message

      RESULT:

      • As expected from the tests I did yesterday this test failed

      Log from node

      Starting sensor (RNNNAA, 2.0.0-beta)
      Radio init successful.
      Signing required
      Skipping security for command 3 type 15
      send: 32-32-0-0 s=255,c=3,t=15,pt=0,l=2,sg=0,st=ok:
      Waiting for GW to send signing preferences...
      Skipping security for command 3 type 15
      read: 0-0-32 s=255,c=3,t=15,pt=0,l=2,sg=0:
      Mark node 0 as one that require signed messages
      Mark node 0 as one that do not require whitelisting
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:21F62EF9ADA09F07E5AB18EFA404E54CB1504EE3DA5FF1516E
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000560011FF322E302E302D62657461
      Current nonce: 21F62EF9ADA09F07E5AB18EFA404E54CB1504EE3DA5FF1516EAAAAAAAAAAAAAA
      HMAC: 1F7E4DF2B93FF4A998032FB88764F4027068F54496697E385F7E1278F3BD7BC8
      Signature in message: 017E4DF2B93FF4A998032FB88764F4
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=0,t=17,pt=0,l=10,sg=1,st=ok:2.0.0-beta
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:42C03767A6A847595911A4ABADCE7129FEC4AC76952DDAEAD5
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 20000E2306FF00
      Current nonce: 42C03767A6A847595911A4ABADCE7129FEC4AC76952DDAEAD5AAAAAAAAAAAAAA
      HMAC: 4067930A19F2FF7ECDFB2442F8F9475BA30AF732AA5469A49F18D32ABF89D341
      Signature in message: 0167930A19F2FF7ECDFB2442F8F9475BA30AF732AA5469A4
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=6,pt=1,l=1,sg=1,st=ok:0
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:BB9F341EBAD0551B8541AF7A7274CBE08EAE92E6914D64CF21
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 20008E030BFF53656E736562656E646572204D6963726F
      Current nonce: BB9F341EBAD0551B8541AF7A7274CBE08EAE92E6914D64CF21AAAAAAAAAAAAAA
      HMAC: 32623A195B988A45DD84948CD3D037D5F1A2C30570FC0667DEAE2C1A5F6E3870
      Signature in message: 01623A195B988A45
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=11,pt=0,l=17,sg=1,st=ok:Sensebender Micro
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:797BDE0D89EE433BD1105F135F7BC4117889EC9164CC7440B6
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 20001E030CFF312E35
      Current nonce: 797BDE0D89EE433BD1105F135F7BC4117889EC9164CC7440B6AAAAAAAAAAAAAA
      HMAC: 4014EF97E0847D1320268E43F84DD28DE1B30700DBCC2F3D73E55BE76C86A865
      Signature in message: 0114EF97E0847D1320268E43F84DD28DE1B30700DBCC
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=12,pt=0,l=3,sg=1,st=ok:1.5
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=0,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:6928BF0F14662D30151049D54DC559D9980BDC58D05E4FCC11
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 200006001F00
      Current nonce: 6928BF0F14662D30151049D54DC559D9980BDC58D05E4FCC11AAAAAAAAAAAAAA
      HMAC: FB7B393036440F4EE838209F596F20A779319E4EA41E775D7B49A118AD405B61
      Signature in message: 017B393036440F4EE838209F596F20A779319E4EA41E775D7B
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=0,c=0,t=31,pt=0,l=0,sg=1,st=ok:
      Init complete, id=32, parent=0, distance=1
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:F1F6E026C9E12A1482F9E0629B219C299702775062CAE96EFC
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000060301FF
      Current nonce: F1F6E026C9E12A1482F9E0629B219C299702775062CAE96EFCAAAAAAAAAAAAAA
      HMAC: B3F8B969384698B445CC9B94A3F9D632B2BC00282376066306277239A8781164
      Signature in message: 01F8B969384698B445CC9B94A3F9D632B2BC00282376066306
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      Skipping security for command 3 type 16
      read: 0-0-32 s=255,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: BEA0F900BC32AC08474C32CE30CF7FD09424EE6FD7F56493DE6A79995E23E3F3
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-0-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:BEA0F900BC32AC08474C32CE30CF7FD09424EE6FD7F56493DE
      Skipping security for command 3 type 16
      read: 0-0-32 s=0,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: 93D42A3EB88FECBA7026EA0CA7B96D4CEEF9CC84238EF7628AC1C6133C3657F5
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-0-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=fail:93D42A3EB88FECBA7026EA0CA7B96D4CEEF9CC84238EF7628A
      Skipping security for command 3 type 16
      read: 0-0-32 s=0,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: C8C7D4569B16DD09FB5BAFB89FB78FA51E5BF8FEF98ED1F9764E547AE3B8B4BF
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-0-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:C8C7D4569B16DD09FB5BAFB89FB78FA51E5BF8FEF98ED1F976
      Signature in message: 0126AF027E257738CFD55BE17BEDEAA3E525ED70ABB279D8
      Message to process: 00200E01180038
      Current nonce: C8C7D4569B16DD09FB5BAFB89FB78FA51E5BF8FEF98ED1F976AAAAAAAAAAAAAA
      HMAC: 3F7E76453D012BADF96D39903092EB63E39B4C6A9DB91307F18E79BB50D58446
      Signature bad: 017E76453D012BADF96D39903092EB63E39B4C6A9DB91307
      Signature verification failed!
      verify fail
      No active verification session
      Signature verification failed!
      
      
      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Signing: no active verification session?

      Continuation of test details:

      TEST 2

      • Node is using ATSHA204 signing
      • Controller has time delays between time response send and state message
      • Node and gateway on current development branch

      RESULT:

      • As already confirmed yesterday time responses received back from controller

      Log file from node

      Starting sensor (RNNNAA, 2.0.0-beta)
      Radio init successful.
      Signing required
      Skipping security for command 3 type 15
      send: 32-32-24-0 s=255,c=3,t=15,pt=0,l=2,sg=0,st=ok:
      Waiting for GW to send signing preferences...
      Skipping security for command 3 type 15
      read: 0-24-32 s=255,c=3,t=15,pt=0,l=2,sg=0:
      Mark node 0 as one that require signed messages
      Mark node 0 as one that do not require whitelisting
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:E6FA71F94B26770A2F95CA73CE0AD5BAF5E20FBE47DCD15009
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000560011FF322E302E302D62657461
      Current nonce: E6FA71F94B26770A2F95CA73CE0AD5BAF5E20FBE47DCD15009AAAAAAAAAAAAAA
      HMAC: 35D8295F4A9EFEA36A8B1127EE44374F7778E6960F1F4FCAE5DA2E2ACF66BDF3
      Signature in message: 01D8295F4A9EFEA36A8B1127EE4437
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=0,t=17,pt=0,l=10,sg=1,st=ok:2.0.0-beta
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:5B94347F2300D7469FA9450BABBD441CA0B6A794E9F6EF4A19
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 20000E2306FF18
      Current nonce: 5B94347F2300D7469FA9450BABBD441CA0B6A794E9F6EF4A19AAAAAAAAAAAAAA
      HMAC: 7C724399F2861D355FC195EEFB19BCA69045B6316065DCA698866C3DB0DD2D30
      Signature in message: 01724399F2861D355FC195EEFB19BCA69045B6316065DCA6
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=6,pt=1,l=1,sg=1,st=ok:24
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:EA257A1C0F67F106E0D689CB816EE42309368549BF801263EB
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 20008E030BFF53656E736562656E646572204D6963726F
      Current nonce: EA257A1C0F67F106E0D689CB816EE42309368549BF801263EBAAAAAAAAAAAAAA
      HMAC: 1B730087D4F021A92E687301D293893EEF26C59A1DC76783D137A098C0F3BC8A
      Signature in message: 01730087D4F021A9
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=11,pt=0,l=17,sg=1,st=ok:Sensebender Micro
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:9E3CB2E54C67294BA2FDE0D8581ED4657FAC24C8193898C432
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 20001E030CFF312E35
      Current nonce: 9E3CB2E54C67294BA2FDE0D8581ED4657FAC24C8193898C432AAAAAAAAAAAAAA
      HMAC: 4044546C809C92399B8695C6065EEB614E694B8A99ECEB9604D529E3932E515D
      Signature in message: 0144546C809C92399B8695C6065EEB614E694B8A99EC
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=12,pt=0,l=3,sg=1,st=ok:1.5
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=0,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:BE44D9741A571A265776618132F4C67D297170489FE1A5DE49
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 200006001F00
      Current nonce: BE44D9741A571A265776618132F4C67D297170489FE1A5DE49AAAAAAAAAAAAAA
      HMAC: 9146A18E9CFF81636145160052F05583773C17F3CD652323EDED7C8450A3B375
      Signature in message: 0146A18E9CFF81636145160052F05583773C17F3CD652323ED
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=0,c=0,t=31,pt=0,l=0,sg=1,st=ok:
      Init complete, id=32, parent=24, distance=2
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:1DE6CEC94F13A3620D3E8A158E57D9383678CD139DA8B886FC
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000060301FF
      Current nonce: 1DE6CEC94F13A3620D3E8A158E57D9383678CD139DA8B886FCAAAAAAAAAAAAAA
      HMAC: 377976A6BAC3CD3D095B7E327F83FA8536BC0BF49ADF91F58D7A2FAD6C8B18B7
      Signature in message: 017976A6BAC3CD3D095B7E327F83FA8536BC0BF49ADF91F58D
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      Skipping security for command 3 type 16
      read: 0-24-32 s=255,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: F08C3C1E3DA5AB87B604B516A44D243622A4C14EBA8EDF79EF46DFF2A40040A6
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-24-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:F08C3C1E3DA5AB87B604B516A44D243622A4C14EBA8EDF79EF
      Signature in message: 01B251AE4BE20816354DE00A0FA2B6
      Message to process: 0020560301FF31343635323833343332
      Current nonce: F08C3C1E3DA5AB87B604B516A44D243622A4C14EBA8EDF79EFAAAAAAAAAAAAAA
      HMAC: C4B251AE4BE20816354DE00A0FA2B6410F3EDCF014E9D7D85776384A1175F56A
      Signature OK
      read: 0-24-32 s=255,c=3,t=1,pt=0,l=10,sg=0:1465283432
      Time value received and updated...
      Skipping security for command 3 type 16
      read: 0-24-32 s=0,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: 9FC72D6C543D8F4B63D4D3D000A3FFB94CCC89FB7A446D5177699E115CA56A95
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-24-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:9FC72D6C543D8F4B63D4D3D000A3FFB94CCC89FB7A446D5177
      Signature in message: 010A2ACC376944024575A028BC722E7C8602F182B9F82794
      Message to process: 00200E01020030
      Current nonce: 9FC72D6C543D8F4B63D4D3D000A3FFB94CCC89FB7A446D5177AAAAAAAAAAAAAA
      HMAC: 820A2ACC376944024575A028BC722E7C8602F182B9F82794C912D83A19E1CC33
      Signature OK
      read: 0-24-32 s=0,c=1,t=2,pt=0,l=1,sg=0:0
      Skipping security for command 3 type 16
      read: 0-24-32 s=0,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: 7D55FD16CF971E9702AA53D575A406123F64FBA233C904C40748B2535A26A548
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-24-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:7D55FD16CF971E9702AA53D575A406123F64FBA233C904C407
      Signature in message: 01971DE8FC789C9C773C89261EE7C7E06A646C4479B53844
      Message to process: 00200E01180038
      Current nonce: 7D55FD16CF971E9702AA53D575A406123F64FBA233C904C407AAAAAAAAAAAAAA
      HMAC: FF971DE8FC789C9C773C89261EE7C7E06A646C4479B538444A52BF2C7285EF87
      Signature OK
      read: 0-24-32 s=0,c=1,t=24,pt=0,l=1,sg=0:8
      ------------- End request time ------------
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:A0334E2B3A18F6C64907210670EBEDCC48B089713E321CD8AC
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000060301FF
      Current nonce: A0334E2B3A18F6C64907210670EBEDCC48B089713E321CD8ACAAAAAAAAAAAAAA
      HMAC: 9D86902DC3D6F353A34805DB53C4D23E525A2A6563E2D0715B0AF8857C2490B2
      Signature in message: 0186902DC3D6F353A34805DB53C4D23E525A2A6563E2D0715B
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      Skipping security for command 3 type 16
      read: 0-24-32 s=255,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: FFDDC014EDB87ECF5EC8AB75688B5C2C64B96A01C717491D0C108FF81049EB73
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-24-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:FFDDC014EDB87ECF5EC8AB75688B5C2C64B96A01C717491D0C
      Signature in message: 0176C6F293A06DE6ED24828FE89FF7
      Message to process: 0020560301FF31343635323833343635
      Current nonce: FFDDC014EDB87ECF5EC8AB75688B5C2C64B96A01C717491D0CAAAAAAAAAAAAAA
      HMAC: B876C6F293A06DE6ED24828FE89FF728E34B135B52E48615A22C6F76CF3C4A99
      Signature OK
      read: 0-24-32 s=255,c=3,t=1,pt=0,l=10,sg=0:1465283465
      Time value received and updated...
      Skipping security for command 3 type 16
      read: 0-24-32 s=0,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: 8DBF6695277390951AD9DF479264D55207682E6CD178BC06CA31ECB596904B4A
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-24-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:8DBF6695277390951AD9DF479264D55207682E6CD178BC06CA
      Signature in message: 01409B6BF1B3B666DAB81D1845A04A98C4D111779492F2E0
      Message to process: 00200E01020030
      Current nonce: 8DBF6695277390951AD9DF479264D55207682E6CD178BC06CAAAAAAAAAAAAAAA
      HMAC: D3409B6BF1B3B666DAB81D1845A04A98C4D111779492F2E0EE294358EC49179B
      Signature OK
      read: 0-24-32 s=0,c=1,t=2,pt=0,l=1,sg=0:0
      ------------- End request time ------------
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:3A6C12FD7546268F0D41B0D329AE91D21077965C09045B5A1A
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000060301FF
      Current nonce: 3A6C12FD7546268F0D41B0D329AE91D21077965C09045B5A1AAAAAAAAAAAAAAA
      HMAC: 90168F16ECBE84D86D9D029F9FB8B2FEA7B23017BC17DFD794B74FBFE30367AC
      Signature in message: 01168F16ECBE84D86D9D029F9FB8B2FEA7B23017BC17DFD794
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      Skipping security for command 3 type 16
      read: 0-24-32 s=255,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: 1AF497E7C0AF46E1E9CE4606052BA4D6EB40B9509E2F08ADFDA855C348197072
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-24-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:1AF497E7C0AF46E1E9CE4606052BA4D6EB40B9509E2F08ADFD
      Signature in message: 0119794623B47138C025DF9F233ECD
      Message to process: 0020560301FF31343635323833343937
      Current nonce: 1AF497E7C0AF46E1E9CE4606052BA4D6EB40B9509E2F08ADFDAAAAAAAAAAAAAA
      HMAC: 9F19794623B47138C025DF9F233ECDBAF4A9894997361464CFCCA972AE4989A8
      Signature OK
      read: 0-24-32 s=255,c=3,t=1,pt=0,l=10,sg=0:1465283497
      Time value received and updated...
      Skipping security for command 3 type 16
      read: 0-24-32 s=0,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: 58F999A6FC7F4688CC738CD2BC8B959844C8E71A0E9DC4FC0AAE473224D1C0B5
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-24-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:58F999A6FC7F4688CC738CD2BC8B959844C8E71A0E9DC4FC0A
      Signature in message: 01CC16B0D5685A602160700EF75089F6073C80F21534F93E
      Message to process: 00200E01020030
      Current nonce: 58F999A6FC7F4688CC738CD2BC8B959844C8E71A0E9DC4FC0AAAAAAAAAAAAAAA
      HMAC: 69CC16B0D5685A602160700EF75089F6073C80F21534F93E2000948D7E8BC997
      Signature OK
      read: 0-24-32 s=0,c=1,t=2,pt=0,l=1,sg=0:0
      ------------- End request time ------------
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:E75AE3FF33609B318F5189128FA4244BFA8B1E70359812C2C0
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000060301FF
      Current nonce: E75AE3FF33609B318F5189128FA4244BFA8B1E70359812C2C0AAAAAAAAAAAAAA
      HMAC: B6FB768F1A2BB917329A5BE007BAF736AAB801FBD7AAF5E797DA258B335844D2
      Signature in message: 01FB768F1A2BB917329A5BE007BAF736AAB801FBD7AAF5E797
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      Skipping security for command 3 type 16
      read: 0-24-32 s=255,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: 741733AB092E579BEBBFC59DC028F867F81D96CBC7E5C252D1C92A4F695C64E9
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-24-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:741733AB092E579BEBBFC59DC028F867F81D96CBC7E5C252D1
      Signature in message: 0147B776D9FE233CCD972679DF861A
      Message to process: 0020560301FF31343635323833353335
      Current nonce: 741733AB092E579BEBBFC59DC028F867F81D96CBC7E5C252D1AAAAAAAAAAAAAA
      HMAC: 3047B776D9FE233CCD972679DF861A18DBF50268777FAAABC8B57D9AD4E0FDD6
      Signature OK
      read: 0-24-32 s=255,c=3,t=1,pt=0,l=10,sg=0:1465283535
      Time value received and updated...
      Skipping security for command 3 type 16
      read: 0-24-32 s=0,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: D84DC5731286B20B4E7A145AD56E6CC01D4F4BC50D2CF1F15EF2C61031B3ADB4
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-24-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:D84DC5731286B20B4E7A145AD56E6CC01D4F4BC50D2CF1F15E
      Signature in message: 0165AC479F9655E4A5AA8BBCEEFBADFD8A5A82098F785DA8
      Message to process: 00200E01020030
      Current nonce: D84DC5731286B20B4E7A145AD56E6CC01D4F4BC50D2CF1F15EAAAAAAAAAAAAAA
      HMAC: 6265AC479F9655E4A5AA8BBCEEFBADFD8A5A82098F785DA83869EDCF9A3C9AE5
      Signature OK
      read: 0-24-32 s=0,c=1,t=2,pt=0,l=1,sg=0:0
      ------------- End request time ------------
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:2B043E5A9822F872642044D993996C219D7387ADED3FCBEAAC
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000060301FF
      Current nonce: 2B043E5A9822F872642044D993996C219D7387ADED3FCBEAACAAAAAAAAAAAAAA
      HMAC: 232BC7F7C4BDBA0D41559AF67DD47FA212AC12EB8B06401C2C23A7AF0172436D
      Signature in message: 012BC7F7C4BDBA0D41559AF67DD47FA212AC12EB8B06401C2C
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      Skipping security for command 3 type 16
      read: 0-24-32 s=255,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: BE203E8DCB145A7AEA98A3E7BA43D8D4837A9FD9572D54B220C4DCE37C9CC8B8
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-24-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:BE203E8DCB145A7AEA98A3E7BA43D8D4837A9FD9572D54B220
      Signature in message: 010DB59D0F3452D2785F69172BB6D9
      Message to process: 0020560301FF31343635323833353638
      Current nonce: BE203E8DCB145A7AEA98A3E7BA43D8D4837A9FD9572D54B220AAAAAAAAAAAAAA
      HMAC: BC0DB59D0F3452D2785F69172BB6D931F071F8599B4B1685E921800ED64A2ED5
      Signature OK
      read: 0-24-32 s=255,c=3,t=1,pt=0,l=10,sg=0:1465283568
      Time value received and updated...
      Skipping security for command 3 type 16
      read: 0-24-32 s=0,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: 466900BD4216412DF7B918A01726A585D404BF70647DAABA7C43A272142381CE
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-24-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:466900BD4216412DF7B918A01726A585D404BF70647DAABA7C
      Signature in message: 011633DF1C1E5CE5BC498D0713D4375337AB1686E6930D72
      Message to process: 00200E01020030
      Current nonce: 466900BD4216412DF7B918A01726A585D404BF70647DAABA7CAAAAAAAAAAAAAA
      HMAC: 301633DF1C1E5CE5BC498D0713D4375337AB1686E6930D729761FA1833B50550
      Signature OK
      read: 0-24-32 s=0,c=1,t=2,pt=0,l=1,sg=0:0
      
      

      TEST 3

      • Node is using ATSHA204 signing
      • Controller has time delays between time response send and state message
      • Gateway and Node on pull request node
      • By accident repeater is being used by node (repeater on mid march version of development branch)

      RESULT:

      • OK

      Log file form node

      Starting sensor (RNNNAA, 2.0.0-beta)
      Radio init successful.
      Signing required
      Skipping security for command 3 type 15
      send: 32-32-24-0 s=255,c=3,t=15,pt=0,l=2,sg=0,st=ok:
      Waiting for GW to send signing preferences...
      Skipping security for command 3 type 15
      read: 0-24-32 s=255,c=3,t=15,pt=0,l=2,sg=0:
      Mark node 0 as one that require signed messages
      Mark node 0 as one that do not require whitelisting
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:7FFE40154EF5EDC50456162DDF2DDE74267E32EC275FBD7EAB
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000560011FF322E302E302D62657461
      Current nonce: 7FFE40154EF5EDC50456162DDF2DDE74267E32EC275FBD7EABAAAAAAAAAAAAAA
      HMAC: 6A3AA858C7AEFC6C4BE07D05196BE89BE52C70C4799E42B73B8CDF83C0A57B92
      Signature in message: 013AA858C7AEFC6C4BE07D05196BE8
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=0,t=17,pt=0,l=10,sg=1,st=ok:2.0.0-beta
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:19C213A19C060D9AF53333025D95CC0D47E102D7534F6853C2
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 20000E2306FF18
      Current nonce: 19C213A19C060D9AF53333025D95CC0D47E102D7534F6853C2AAAAAAAAAAAAAA
      HMAC: 3748905CBC38DCEA925EB2919C91D1C62C10766F1FAC36B3278246D5B71F3699
      Signature in message: 0148905CBC38DCEA925EB2919C91D1C62C10766F1FAC36B3
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=6,pt=1,l=1,sg=1,st=ok:24
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:C4F140A7704F93F1ADDD92E353B52F64262D51F18C0E31E984
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 20008E030BFF53656E736562656E646572204D6963726F
      Current nonce: C4F140A7704F93F1ADDD92E353B52F64262D51F18C0E31E984AAAAAAAAAAAAAA
      HMAC: 438D4A7A4DC4F81D813B776C408D28D330712BDFF9D6918CA5F5D399A39DCC62
      Signature in message: 018D4A7A4DC4F81D
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=11,pt=0,l=17,sg=1,st=ok:Sensebender Micro
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:6F36BDDE3BFC831A66DD1401932B313456C23E3E43A1043ED2
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 20001E030CFF312E35
      Current nonce: 6F36BDDE3BFC831A66DD1401932B313456C23E3E43A1043ED2AAAAAAAAAAAAAA
      HMAC: 539E7375EDC9460D6C1CB93108B7AF3D8681F8DBBA12FF7D4F8EBD789674C526
      Signature in message: 019E7375EDC9460D6C1CB93108B7AF3D8681F8DBBA12
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=12,pt=0,l=3,sg=1,st=ok:1.5
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=0,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:FF294B857B47AE22B3A8FDCB6C8900057722A43EAB7C76FEB1
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 200006001F00
      Current nonce: FF294B857B47AE22B3A8FDCB6C8900057722A43EAB7C76FEB1AAAAAAAAAAAAAA
      HMAC: 1984DB5AA5D62F10664670E558ED2127B3076B8E53594970FCB19090D4114346
      Signature in message: 0184DB5AA5D62F10664670E558ED2127B3076B8E53594970FC
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=0,c=0,t=31,pt=0,l=0,sg=1,st=ok:
      Init complete, id=32, parent=24, distance=2
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:346DB0580D3B78948D4642890DEE3BF8B713278F9035F1010E
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000060301FF
      Current nonce: 346DB0580D3B78948D4642890DEE3BF8B713278F9035F1010EAAAAAAAAAAAAAA
      HMAC: 7D563A98EB3A82BD356405D848810D80E85B41B13BD5EF160EDC28D0D8410A3B
      Signature in message: 01563A98EB3A82BD356405D848810D80E85B41B13BD5EF160E
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      Skipping security for command 3 type 16
      read: 0-24-32 s=255,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: F8D84FE5212ADCDAA5DE824AAEC0D1D4EBA27A873C7A27FD6573312A0120144D
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-24-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:F8D84FE5212ADCDAA5DE824AAEC0D1D4EBA27A873C7A27FD65
      Signature in message: 01061F649DC8230A23A693B2BD13EF
      Message to process: 0020560301FF31343635323834333532
      Current nonce: F8D84FE5212ADCDAA5DE824AAEC0D1D4EBA27A873C7A27FD65AAAAAAAAAAAAAA
      HMAC: 9B061F649DC8230A23A693B2BD13EF482A0FD3D935AC12CAB83BAEE20AF7AFA6
      Signature OK
      read: 0-24-32 s=255,c=3,t=1,pt=0,l=10,sg=0:1465284352
      Time value received and updated...
      Skipping security for command 3 type 16
      read: 0-24-32 s=0,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: C8D54FA98921070C459C82FA52F15F4588E6B8C7CBFA98E4ABCD41C842152E8E
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-24-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:C8D54FA98921070C459C82FA52F15F4588E6B8C7CBFA98E4AB
      Signature in message: 014449082B9AD2C9C678F3CAB3EF978885420D7F5DFC872F
      Message to process: 00200E01180038
      Current nonce: C8D54FA98921070C459C82FA52F15F4588E6B8C7CBFA98E4ABAAAAAAAAAAAAAA
      HMAC: 0B4449082B9AD2C9C678F3CAB3EF978885420D7F5DFC872F934FD46509728350
      Signature OK
      read: 0-24-32 s=0,c=1,t=24,pt=0,l=1,sg=0:8
      ------------- End request time ------------
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:ADE703FCA7389B894F9C6967C8556AE9332EC8819CC1403F4B
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000060301FF
      Current nonce: ADE703FCA7389B894F9C6967C8556AE9332EC8819CC1403F4BAAAAAAAAAAAAAA
      HMAC: 85FCF9EB6F02220B9C7C541F0E4A39F96E0763ED8EC4B513D608B022A5FD743F
      Signature in message: 01FCF9EB6F02220B9C7C541F0E4A39F96E0763ED8EC4B513D6
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      Skipping security for command 3 type 16
      read: 0-24-32 s=255,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: 160BFFD15040AAB68A664D1E717A13F713EB4427DF9D5BB85F69BEDCDE371A10
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-24-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:160BFFD15040AAB68A664D1E717A13F713EB4427DF9D5BB85F
      Signature in message: 016D402871BF2F0955767FF9BD4D04
      Message to process: 0020560301FF31343635323834333832
      Current nonce: 160BFFD15040AAB68A664D1E717A13F713EB4427DF9D5BB85FAAAAAAAAAAAAAA
      HMAC: B16D402871BF2F0955767FF9BD4D043224B3161ABD93A483898CBE5B034DB929
      Signature OK
      read: 0-24-32 s=255,c=3,t=1,pt=0,l=10,sg=0:1465284382
      Time value received and updated...
      ------------- End request time ------------
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:20FE53ECF79ADB4E40AAEFC7822710105C7273500280542C6C
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000060301FF
      Current nonce: 20FE53ECF79ADB4E40AAEFC7822710105C7273500280542C6CAAAAAAAAAAAAAA
      HMAC: C206D0F84D4BD17A4F91FEEC96A68FC08809FB764657A78B30BAA156811CAB35
      Signature in message: 0106D0F84D4BD17A4F91FEEC96A68FC08809FB764657A78B30
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      Skipping security for command 3 type 16
      read: 0-24-32 s=255,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: 26C55258CC012D74F2C67E21D8EEBDD1E360F39E6F15C0C84603D5AE48CF0441
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-24-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:26C55258CC012D74F2C67E21D8EEBDD1E360F39E6F15C0C846
      Signature in message: 019BDFBD6FB58C08DC10D5CFF9F809
      Message to process: 0020560301FF31343635323834343133
      Current nonce: 26C55258CC012D74F2C67E21D8EEBDD1E360F39E6F15C0C846AAAAAAAAAAAAAA
      HMAC: A99BDFBD6FB58C08DC10D5CFF9F8097420DEE280B27A9CE5ACA2EC0D1120FF98
      Signature OK
      read: 0-24-32 s=255,c=3,t=1,pt=0,l=10,sg=0:1465284413
      Time value received and updated...
      
      
      

      verify fail

      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Signing: no active verification session?

      Ok, I concluded my tests.

      The setup I used was as follows:

      • One node running the sketch as listed above. The sketch just send a time request to the controller. The controller send a time response back and depending on the controller state an additional message carrying the new state.

      • A MQTTClientGateway using ATSHA204 signing

      • Gateway and node were either on current deveopment branch (clone from yesterday) or on pull request branch

      Summary:

      • ATSHA204 signing work
      • Signing in pull request code and current development branch seems not to be compatible
      • Signing through repeater worked (repeater on old dev branch version)
      • Possible issue with soft signing and ATSHA204 signing (will re-run test)
      • Signing Code in pull request made by wait statements between sends in controller code obsolete

      I need to split the Test Details over several posts due to size restrictions,

      Test Details:

      TEST 1

      • Node is using ATSHA204 signing
      • Controller has time delays between time response send and state message
      • Only node upgraded - gateway on current development branch

      RESULT:

      • Message from node did not went through gateway (I would reason that probably signing not compatible between pull request and development branch ?)

      Log file from node (Note: that no message "Time value received and updated" occurs)

      β€”β€”β€” LOG file
      
      Starting sensor (RNNNAA, 2.0.0-beta)
      Radio init successful.
      Signing required
      Skipping security for command 3 type 15
      send: 32-32-24-0 s=255,c=3,t=15,pt=0,l=2,sg=0,st=ok:
      Waiting for GW to send signing preferences...
      Skipping security for command 3 type 15
      read: 0-24-32 s=255,c=3,t=15,pt=0,l=2,sg=0:
      Mark node 0 as one that require signed messages
      Mark node 0 as one that do not require whitelisting
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:5C6D5380AA71742E8676754178E292A5EF45D9AF4AC1DFBDAF
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000560011FF322E302E302D62657461
      Current nonce: 5C6D5380AA71742E8676754178E292A5EF45D9AF4AC1DFBDAFAAAAAAAAAAAAAA
      HMAC: 88E620D12206F54747A0913982E7B536D2FA54B23365E938944D79A7785FA653
      Signature in message: 01E620D12206F54747A0913982E7B5
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=0,t=17,pt=0,l=10,sg=1,st=ok:2.0.0-beta
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:E9823769510CC4E9DB319047430608FC46E072E1C85DC1729C
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 20000E2306FF18
      Current nonce: E9823769510CC4E9DB319047430608FC46E072E1C85DC1729CAAAAAAAAAAAAAA
      HMAC: 3AFE900842CA69B839436A9417E03B7A1B9F56C86947503DA8211384BD380BA8
      Signature in message: 01FE900842CA69B839436A9417E03B7A1B9F56C86947503D
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=6,pt=1,l=1,sg=1,st=ok:24
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:62A476471D816BD32D881C6F0F93EECC6F3D10C30FE36C4034
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 20008E030BFF53656E736562656E646572204D6963726F
      Current nonce: 62A476471D816BD32D881C6F0F93EECC6F3D10C30FE36C4034AAAAAAAAAAAAAA
      HMAC: DD2922863F989B9FA66A9DCC91C6C68693976C111246A758F2A9D3B35DE4C6C8
      Signature in message: 012922863F989B9F
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=11,pt=0,l=17,sg=1,st=ok:Sensebender Micro
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:E5EB28E56178B7A9EA9C6CF6ED4942C7CFCBE36CE8F770E9CD
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 20001E030CFF312E35
      Current nonce: E5EB28E56178B7A9EA9C6CF6ED4942C7CFCBE36CE8F770E9CDAAAAAAAAAAAAAA
      HMAC: EE80E376A9134A53E582798BE1B82D0626B749A0B3AB40B146ECBD046A704FE7
      Signature in message: 0180E376A9134A53E582798BE1B82D0626B749A0B3AB
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=12,pt=0,l=3,sg=1,st=ok:1.5
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=0,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:086BCF8D9E1FCE7E31DBC460DBBDA3F192423DEB1D7AED29B4
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 200006001F00
      Current nonce: 086BCF8D9E1FCE7E31DBC460DBBDA3F192423DEB1D7AED29B4AAAAAAAAAAAAAA
      HMAC: B304BBD4ED2EFC5EEE8345711D1FA7D4ED7DDCB433B93902B35E408732F52CE6
      Signature in message: 0104BBD4ED2EFC5EEE8345711D1FA7D4ED7DDCB433B93902B3
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=0,c=0,t=31,pt=0,l=0,sg=1,st=ok:
      Init complete, id=32, parent=24, distance=2
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:05804055A92D47DDECE52E060847E918F2D259E02E53B239DF
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000060301FF
      Current nonce: 05804055A92D47DDECE52E060847E918F2D259E02E53B239DFAAAAAAAAAAAAAA
      HMAC: 860F685BD22C9A93712755D7536E6B1192BA7B5F3BA19B36DA4B18EE80A83912
      Signature in message: 010F685BD22C9A93712755D7536E6B1192BA7B5F3BA19B36DA
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      ------------- End request time ------------
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Message to send could not be signed!
      sign fail
      send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      ------------- End request time ------------
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:13F748758F5F525808686913EB32CB1301A347DA71BCEC0E24
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000060301FF
      Current nonce: 13F748758F5F525808686913EB32CB1301A347DA71BCEC0E24AAAAAAAAAAAAAA
      HMAC: DCE1C3919B3F1438EA00F8736994F5BE4EE8FCE197782A006C313B0053B1F4AC
      Signature in message: 01E1C3919B3F1438EA00F8736994F5BE4EE8FCE197782A006C
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      ------------- End request time ------------
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:0E77297DB0F5BB24C127F55A7722A26F2B9F5D82CD3527B2C4
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000060301FF
      Current nonce: 0E77297DB0F5BB24C127F55A7722A26F2B9F5D82CD3527B2C4AAAAAAAAAAAAAA
      HMAC: A07FE5FAD14B49598D4D000B1496AFB1B745140C095C7CDB2041B51C3BAF166A
      Signature in message: 017FE5FAD14B49598D4D000B1496AFB1B745140C095C7CDB20
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      ------------- End request time ------------
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:CC2B7F584284438EE577F13911AA5BD6B13F11CF19C072C280
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000060301FF
      Current nonce: CC2B7F584284438EE577F13911AA5BD6B13F11CF19C072C280AAAAAAAAAAAAAA
      HMAC: 1EE99C23EAF302945390304E8DDF21EFEB1509D482E729E94129DDB14DBEFF72
      Signature in message: 01E99C23EAF302945390304E8DDF21EFEB1509D482E729E941
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      ------------- End request time ------------
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:B3B1641F1EFA3E6AC55BCDD8762BBA30684E2E95B5D360534A
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000060301FF
      Current nonce: B3B1641F1EFA3E6AC55BCDD8762BBA30684E2E95B5D360534AAAAAAAAAAAAAAA
      HMAC: 2FBF0526DA75A1730B06B42A114A51D0844A7F5D708ED88CD0BF205367D6436E
      Signature in message: 01BF0526DA75A1730B06B42A114A51D0844A7F5D708ED88CD0
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      ------------- End request time ------------
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:F2F1E9F252998B73BB5ACDFCB5EABD1CCE80FC922B02AD2708
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000060301FF
      Current nonce: F2F1E9F252998B73BB5ACDFCB5EABD1CCE80FC922B02AD2708AAAAAAAAAAAAAA
      HMAC: AF64B1BBCCBA140CC7D888379C5AB5AEEE32A7EF53DCF8E5D381D8BBF10C0EB8
      Signature in message: 0164B1BBCCBA140CC7D888379C5AB5AEEE32A7EF53DCF8E5D3
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      ------------- End request time ------------
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-24-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-24-32 s=255,c=3,t=17,pt=6,l=25,sg=0:70EEB8AB6758247D2BDE15C3E3ECF736A26896507A578451B5
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000060301FF
      Current nonce: 70EEB8AB6758247D2BDE15C3E3ECF736A26896507A578451B5AAAAAAAAAAAAAA
      HMAC: 0188F0C5B3E33EA5F367AC3C8A5147000EEAFBC632221B0A2C68A6E912E6502F
      Signature in message: 0188F0C5B3E33EA5F367AC3C8A5147000EEAFBC632221B0A2C
      Message signed
      Message to send has been signed
      send: 32-32-24-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      
      
      
      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Signing: no active verification session?

      @Anticimex Will do it tomorrow and let you know.

      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Signing: no active verification session?

      @Anticimex Inserting a wait in between consecutive sends at the controller seem to fix it.

      I merged your pull request into my local copy. Are there specific cases you want me to test?

      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Signing: no active verification session?

      @Anticimex How can I merge the commits of your pull requests into my clone of the development branch?
      If I install the code at my gateway and node. Are "older nodes" (mid march state of dev branch" supposed to work?
      Do you have any particular tests in mind?

      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Sensebender Micro

      @hek

      D -Uflash:w:/var/folders/3s/rjbksrj96nv0hqfqjlpfw8bm0000gn/T/build8699526819198040594.tmp/SecurityPersonalizer.cpp.hex:i 
      
      avrdude: Version 6.0.1, compiled on Apr 14 2015 at 16:30:25
               Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
               Copyright (c) 2007-2009 Joerg Wunsch
      
               System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
               User configuration file is "/Users/tom/.avrduderc"
               User configuration file does not exist or is not a regular file, skipping
      
               Using Port                    : /dev/cu.usbserial-DA01IGTO
               Using Programmer              : arduino
               Overriding Baud Rate          : 57600
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
      avrdude: ser_recv(): read error: Device not configured
      Probleme beim Hochladen auf die Platine. Hilfestellung dazu unter http://www.arduino.cc/en/Guide/Troubleshooting#upload
      

      I have Sensebender selected as board.

      Btw, where is the hardware folder? It is not present anymore in the development branch?

      posted in Announcements
      tomkxy
      tomkxy
    • RE: Sensebender Micro

      I have bought another couple of sensebenders.
      I am not able to upload sketches to one of them.
      When I connect the programmer the status led goes to solid red. From another one, I realized that it is not solid red.

      What is the meaning of a solid red status LED?

      posted in Announcements
      tomkxy
      tomkxy
    • RE: Signing: no active verification session?

      @Anticimex Thanks for your reply. Highly appreciated!
      My use case is that the controller sends upon reception of a time request a time response and pending state changes. There is no wait in between. If I understood you correctly this could be reason.
      I will change the controller to have a wait in between both messages. I will report results back.

      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Signing: no active verification session?

      @Anduril I just upgraded to the latest version. I am rather hesitant with upgrades - although I know this is a dev branch - because you never know what kind of other issues you get.

      Same behavior after the upgrade (Gateway and node upgraded.)

      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Battery powered PIR and temp/humid sensor

      Around 4 meters. However, this puppy is sitting in my entrance which is rather narrow.

      posted in Development
      tomkxy
      tomkxy
    • RE: Battery powered PIR and temp/humid sensor

      @LastSamurai I powered it through 3.3v step up with one AA battery. I cannot confirm that I get false positives.

      posted in Development
      tomkxy
      tomkxy
    • RE: Signing: no active verification session?

      I am able now to reproduce it with a stripped down sketch. Corresponding log below.
      I have to admit I am still on a mid march version of the development branch.

      /**
       * The MySensors Arduino library handles the wireless radio link and protocol
       * between your home built sensors/actuators and HA controller of choice.
       * The sensors forms a self healing radio network with optional repeaters. Each
       * repeater and gateway builds a routing tables in EEPROM which keeps track of the
       * network topology allowing messages to be routed to nodes.
       *
       * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
       * Copyright (C) 2013-2015 Sensnology AB
       * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
       *
       * Documentation: http://www.mysensors.org
       * Support Forum: http://forum.mysensors.org
       *
       * This program is free software; you can redistribute it and/or
       * modify it under the terms of the GNU General Public License
       * version 2 as published by the Free Software Foundation.
       *
       *******************************
       *
       * REVISION HISTORY
       * Version 1.0 - Thomas Bowman MΓΈrch
       * 
       * DESCRIPTION
       * Default sensor sketch for Sensebender Micro module
       * Act as a temperature / humidity sensor by default.
       *
       * If A0 is held low while powering on, it will enter testmode, which verifies all on-board peripherals
       *  
       * Battery voltage is as battery percentage (Internal message), and optionally as a sensor value (See defines below)
       *
       *
       * Version 1.3 - Thomas Bowman MΓΈrch
       * Improved transmission logic, eliminating spurious transmissions (when temperatuere / humidity fluctuates 1 up and down between measurements) 
       * Added OTA boot mode, need to hold A1 low while applying power. (uses slightly more power as it's waiting for bootloader messages)
       * 
       * Version 1.4 - Thomas Bowman MΓΈrch
       * 
       * Corrected division in the code deciding whether to transmit or not, that resulted in generating an integer. Now it's generating floats as expected.
       * Simplified detection for OTA bootloader, now detecting if MY_OTA_FIRMWARE_FEATURE is defined. If this is defined sensebender automaticly waits 300mS after each transmission
       * Moved Battery status messages, so they are transmitted together with normal sensor updates (but only every 60th minute)
       * 
       */
       
      #define MY_DEBUG_VERBOSE_SIGNING
      // Enable debug prints to serial monitor
      #define MY_DEBUG 
      //#define MY_DEBUG_VERBOSE_RF24
       
      #define MY_SIGNING_FEATURE
      #define MY_SIGNING_ATSHA204
      //#define MY_SIGNING_SOFT
      #define MY_SIGNING_ATSHA204_PIN A3
      #define MY_SIGNING_REQUEST_SIGNATURES
      #define MY_VERIFICATION_TIMEOUT_MS 3000
      
      // Enable debug prints to serial monitor
      #define MY_DEBUG 
      
      // Define a static node address, remove if you want auto address assignment
      #define MY_NODE_ID 32
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      //#define MY_RADIO_RFM69
      
      // Enable to support OTA for this node (needs DualOptiBoot boot-loader to fully work)
      //#define MY_OTA_FIRMWARE_FEATURE
      
      #include <SPI.h>
      #include <MySensor.h>
      #include <Wire.h>
      #include <Time.h> 
      #ifndef MY_OTA_FIRMWARE_FEATURE
      #include "drivers/SPIFlash/SPIFlash.cpp"
      #endif
      #include <EEPROM.h>  
      #include <sha204_lib_return_codes.h>
      #include <sha204_library.h>
      
      bool           timeReceived = false;
      
      void receiveTime(time_t newTime)
      {
        Serial.println(F("Time value received and updated..."));
      }
      
      
      /****************************************************
       *
       * Setup code 
       *
       ****************************************************/
      void setup() {
        
        Serial.begin(115200);
      }
      
      
      
      void presentation()  {
        sendSketchInfo("Sensebender Micro", "1.5");
        present(0, S_SPRINKLER);
      }
      
      
      /***********************************************
       *
       *  Main loop function
       *
       ***********************************************/
      void loop() {
         timeReceived = false;
         int cnt = 0;
         while ( (cnt++ < 3) && (!timeReceived)) {
           Serial.println(F("------------- Start request time ------------"));
            requestTime();
            wait(30000);
            Serial.println(F("------------- End request time ------------"));
          }     
        sleep(5000);
      }  
      
      
      
      Starting sensor (RNNNAA, 2.0.0-beta)
      Radio init successful.
      Signing required
      Skipping security for command 3 type 15
      send: 32-32-0-0 s=255,c=3,t=15,pt=0,l=2,sg=0,st=ok:
      Waiting for GW to send signing preferences...
      Skipping security for command 3 type 15
      read: 0-0-32 s=255,c=3,t=15,pt=0,l=2,sg=0:
      Mark node 0 as one that require signed messages
      Mark node 0 as one that do not require whitelisting
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:C93DE1DDE5B0920941AEC959B56806F9DB5760CE28378D850D
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000560011FF322E302E302D62657461
      Current nonce: C93DE1DDE5B0920941AEC959B56806F9DB5760CE28378D850DAAAAAAAAAAAAAA
      HMAC: 52CD5A75EBB5ACE46978B44CB11C071777918812FB85AFECB5EBC5783EF42AF3
      Signature in message: 01CD5A75EBB5ACE46978B44CB11C07
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=0,t=17,pt=0,l=10,sg=1,st=ok:2.0.0-beta
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:D390179DFC9905FBA5C73E059DCF77C61BE6A4E4AD35007F25
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 20000E2306FF00
      Current nonce: D390179DFC9905FBA5C73E059DCF77C61BE6A4E4AD35007F25AAAAAAAAAAAAAA
      HMAC: C6378D8AC74E7958BACAF95DF52E6F1BCE4D5314CFB6B90A657005CC6BB08151
      Signature in message: 01378D8AC74E7958BACAF95DF52E6F1BCE4D5314CFB6B90A
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=6,pt=1,l=1,sg=1,st=ok:0
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:A8A2545D212BD482C0594E7B920E3038D52F5DD1FCB58BCDCB
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 20008E030BFF53656E736562656E646572204D6963726F
      Current nonce: A8A2545D212BD482C0594E7B920E3038D52F5DD1FCB58BCDCBAAAAAAAAAAAAAA
      HMAC: 83AD73B79B57D6595E7A090CA9DBDA2AFE0A97458A55AD30690680918D6791CE
      Signature in message: 01AD73B79B57D659
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=11,pt=0,l=17,sg=1,st=ok:Sensebender Micro
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:A1B246219385A0349910D612ABD02EB2026EAB4D6600EBE514
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 20001E030CFF312E35
      Current nonce: A1B246219385A0349910D612ABD02EB2026EAB4D6600EBE514AAAAAAAAAAAAAA
      HMAC: 021DBEA454ACA67617AAD08A5EAA2DB9946C291FD78C30389DE56FB9E3A97B87
      Signature in message: 011DBEA454ACA67617AAD08A5EAA2DB9946C291FD78C
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=12,pt=0,l=3,sg=1,st=ok:1.5
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=0,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:971D30F276321AF56AFD2CEB4465E5C28EBD9CB59E624713CD
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 200006001F00
      Current nonce: 971D30F276321AF56AFD2CEB4465E5C28EBD9CB59E624713CDAAAAAAAAAAAAAA
      HMAC: 94C8DD65A1208C2D4C21BF5D9F58DA01C2DB05C18F91AE448913AFA6727B78E3
      Signature in message: 01C8DD65A1208C2D4C21BF5D9F58DA01C2DB05C18F91AE4489
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=0,c=0,t=31,pt=0,l=0,sg=1,st=ok:
      Init complete, id=32, parent=0, distance=1
      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:FCDA9EE51C911344D49467AEB096FFB8A9DF13AE012688ADBA
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000060301FF
      Current nonce: FCDA9EE51C911344D49467AEB096FFB8A9DF13AE012688ADBAAAAAAAAAAAAAAA
      HMAC: B6670E3B04096492ABC6C15713814E0E07376E8F94BBB180160CEA25B0A62F11
      Signature in message: 01670E3B04096492ABC6C15713814E0E07376E8F94BBB18016
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      Skipping security for command 3 type 16
      read: 0-0-32 s=255,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: F61319A4255AB3948ADB0B4B5B77349562760D497710D1A19C4A30A4279686C4
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-0-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:F61319A4255AB3948ADB0B4B5B77349562760D497710D1A19C
      Skipping security for command 3 type 16
      read: 0-0-32 s=0,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: B675E5E4870FC6BC6E9F34177C08517F4800678E2BDE81B69C386C20D24CF76C
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-0-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:B675E5E4870FC6BC6E9F34177C08517F4800678E2BDE81B69C
      Signature in message: 016E70FB42D1089C83D06371BCD9B977F0D1E4D9C6B32DB2
      Message to process: 00200E01020030
      Current nonce: B675E5E4870FC6BC6E9F34177C08517F4800678E2BDE81B69CAAAAAAAAAAAAAA
      HMAC: 0CCB84B1D3B5324B12BEDC7DF4066BDF531A3372DD505E87B1178F02E65D7092
      Signature bad: 01CB84B1D3B5324B12BEDC7DF4066BDF531A3372DD505E87
      Signature verification failed!
      verify fail
      No active verification session
      Signature verification failed!
      verify fail
      
      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Signing: no active verification session?

      I investigated a bit further and somehow I think it is really strange.
      Below are excerpts from the sketch

      void receiveTime(time_t newTime)
      {
        DEBUG_PRINTLN(F("Time value received and updated..."));
        setTime(newTime);
        RTC.set(newTime);
        DEBUG_PRINT(F("Time set to: "));
        printTime(now());  
        timeReceived = true;
      }
      
      void loop() {
          .....
      
           Serial.println(F("------------- Start request time ------------"));
            requestTime();
            wait(LISTEN_TIME);
           Serial.println(F("------------- End request time ------------"));
      
      ...
      }
      

      Corresponding log

      ------------- Start request time ------------
      Skipping security for command 3 type 16
      send: 32-32-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for ACK on command 1 type 2
      read: 0-0-32 s=0,c=1,t=2,pt=2,l=2,sg=0:1
      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:B49BE88B3491B3BAFB7766016E5EB7F64517EBC26A46DE39D2
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000060301FF
      Current nonce: B49BE88B3491B3BAFB7766016E5EB7F64517EBC26A46DE39D2AAAAAAAAAAAAAA
      HMAC: 009218BA7BE0554C08B5E1A1C12CC48696C69C4875F538271D07A8236668C3B1
      Signature in message: 019218BA7BE0554C08B5E1A1C12CC48696C69C4875F538271D
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      Skipping security for command 3 type 16
      read: 0-0-32 s=255,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: 434C82D79B6968444017921515AF3ECD0713FAEDD028C7134A2D8504A37477E2
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-0-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:434C82D79B6968444017921515AF3ECD0713FAEDD028C7134A
      Skipping security for command 3 type 16
      read: 0-0-32 s=0,c=3,t=16,pt=0,l=0,sg=0:
      Signing backend: ATSHA204
      SHA256: 7A1D8F10E0768C3F3D2856ADC86EEE086285312C3532300104A2D81F79D6A20F
      Transmittng nonce
      Skipping security for command 3 type 17
      send: 32-32-0-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:7A1D8F10E0768C3F3D2856ADC86EEE086285312C3532300104
      Signature in message: 0109B52E8590A8DA9BFEFC7C3C6A29BF7C0EF8B6D1E686DB
      Message to process: 00200E01020030
      Current nonce: 7A1D8F10E0768C3F3D2856ADC86EEE086285312C3532300104AAAAAAAAAAAAAA
      HMAC: 73C7B30C578D19518A4244D729B8D0554885B354413DAF41ABE16AEAE535021A
      Signature bad: 01C7B30C578D19518A4244D729B8D0554885B354413DAF41
      Signature verification failed!
      verify fail
      No active verification session
      Signature verification failed!
      verify fail
      ------------- End request time ------------
      

      At the beginning of the loop I have a transmission of a status to the controller which arrives at my controller and is processed there correctly. So it is not an issue with the key. Also transmissions as such seems to ok. I see no fails.

      What is puzzling me are the skipping security log outputs in combination with asking for the nonce anyway.

      I already looked into the MySensors code and set the MY_VERIFICATION_TIMEOUT_MS to 60000 which should is more than enough.

      @Anticimex May be you can have a look?

      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Battery powered PIR and temp/humid sensor

      @Haakon Regarding the PIRs: There are a couple of postings in the Internet or I think even in this forum. For example, have a look here: http://randomnerdtutorials.com/modifying-cheap-pir-motion-sensor-to-work-at-3-3v/

      posted in Development
      tomkxy
      tomkxy
    • RE: Battery powered PIR and temp/humid sensor

      @Haakon I have one of these sensor in place since about half a year and it is working well. Last battery change is about 4 month ago.

      Please find the sketch below which requires some cleanup.

      /*
      Multisensor Sketch
      
      Author: Thomas Krebs, thkrebs@gmx.de
      
      This sketch reads temperature, humidity, light and presence.
      It is based on the various examples sketches from SparkFun and MySensors 
      
      It uses the following sensors:
      Light           - TSL2561
      Temp&Humidity   - HTU21D
      Presence 
      
      HTU21D and TLS2561 need to connect the I2C pins (SCL and SDA) to your Arduino.
      The pins are different on different Arduinos:
      
                          SDA    SCL
      Any Arduino         "SDA"  "SCL"
      Uno, Redboard, Pro  A4     A5
      Mega2560, Due       20     21
      Leonardo            2      3
      
      */
      #define MY_DEBUG_VERBOSE_SIGNING //!< Enable signing related debug prints to serial monitor
      
      #define MY_SIGNING_FEATURE
      #define MY_SIGNING_ATSHA204
      #define MY_SIGNING_REQUEST_SIGNATURES
      
      #define MY_DEBUG
      #define MY_NODE_ID              26
      #define MY_RADIO_NRF24
      #define BATT_SENSOR
      
      #include <MySensor.h>
      #include <TSL2561.h>
      #include <SparkFunHTU21D.h>
      
      #include <SPI.h>
      #include <Wire.h>
      #include <avr/power.h>
      
      #define VERSION           "1.4"
      #define SKETCH_NAME       "Multisensor A"
      
      #define TEMP_CHILD_ID   1
      #define HUM_CHILD_ID    2
      #define LIGHT_CHILD_ID  3
      #define MOTION_CHILD_ID 4
      
      // Uncomment the line below, to transmit battery voltage as a normal sensor value
      #define BATT_SENSOR    199
      #define MAX_VOLTAGE    1316
      #define MIN_VOLTAGE    890     // it seems that about 0.89 V the sensor stops working
      
      // How many milli seconds between each measurement
      #define MEASURE_INTERVAL 120000
      
      // FORCE_TRANSMIT_INTERVAL, this number of times of wakeup, the sensor is forced to report all values to the controller
      #define FORCE_TRANSMIT_INTERVAL 30 
      
      // When MEASURE_INTERVAL is 60000 and FORCE_TRANSMIT_INTERVAL is 30, we force a transmission every 30 minutes.
      // Between the forced transmissions a tranmission will only occur if the measured value differs from the previous measurement
      
      // HUMI_TRANSMIT_THRESHOLD tells how much the humidity should have changed since last time it was transmitted. Likewise with
      // TEMP_TRANSMIT_THRESHOLD for temperature threshold.
      #define HUMI_TRANSMIT_THRESHOLD   0.5
      #define TEMP_TRANSMIT_THRESHOLD   0.5
      #define LIGHT_TRANSMIT_THRESHOLD  0.3    // relative change
      
      
      // Pin definitions
      #define LED_PIN            13            // TODO: need to check that
      #define BATTERY_SENSE_PIN  A0            // select the input pin for the battery sense point
      #define MOTION_SENSOR      3             // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
      #define INTERRUPT          1             // Usually the interrupt = pin -2 (on uno/nano anyway)
      
      // Global settings
      int tempMeasureCount = 0;
      int lightMeasureCount = 0;
      
      int sendBattery = 0;
      boolean isMetric = true;
      boolean highfreq = true;
      boolean motionDetected = false;
      int repeats = 2;
      
      // Storage of old measurements
      float lastTemperature = -100;
      float lastHumidity = -100;
      long  lastBattery = -100;
      long  lastLight = -5000;
      int   lastTripped = -1; 
      
      int   motionTrips = 0;  // count the number of cont. motion trips
      
      HTU21D myHumidity;
      TSL2561 myLight(TSL2561_ADDR_FLOAT); 
      
      // Sensor messages
      MyMessage msgTemp(TEMP_CHILD_ID,V_TEMP);
      MyMessage msgHum(HUM_CHILD_ID,V_HUM);
      MyMessage msgLight(LIGHT_CHILD_ID,V_LEVEL);
      MyMessage msg(MOTION_CHILD_ID, V_TRIPPED);
      
      
      #ifdef BATT_SENSOR
      MyMessage msgBatt(BATT_SENSOR, V_VOLTAGE);
      #endif
      
      
      /****************************************************
       *
       * Setup code 
       *
       ****************************************************/
      void setup()  
      { 
        pinMode(LED_PIN, OUTPUT);
        Serial.print(F(SKETCH_NAME));
        Serial.println(VERSION);
        Serial.flush();
        
        
      #ifdef MY_SIGNING_ATSHA204_PIN
        // Make sure that ATSHA204 is not floating
        pinMode(MY_SIGNING_ATSHA204_PIN, INPUT);
        digitalWrite(MY_SIGNING_ATSHA204_PIN, HIGH);
      #endif  
        
        // use the 1.1 V internal reference
        analogReference(INTERNAL);
      
        // setup sensors
        setup_htu21d();
        
        delay(100);
        setup_tls2561(); 
        delay(500);
        
        // setup motion sensor 
        pinMode(MOTION_SENSOR, INPUT);    
        Serial.println(F("Setup complete..."));
      }
      
      
      void presentation()  {
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo(SKETCH_NAME, VERSION);
      
        // Present all sensors to controller
        present(TEMP_CHILD_ID, S_TEMP);
        present(HUM_CHILD_ID, S_HUM);
      //  present(LIGHT_CHILD_ID,S_LIGHT_LEVEL);
        present(MOTION_CHILD_ID, S_MOTION);
      
      
      #ifdef BATT_SENSOR
        present(BATT_SENSOR, S_POWER);
      #endif
      
        isMetric = getConfig().isMetric;
      #ifdef MY_DEBUG
        Serial.print(F("isMetric: ")); Serial.println(isMetric);
      #endif
      
        Serial.flush();
        Serial.println(F(" - Online!"));
      }
      
      
      /***********************************************
      /* Setup HTU21d
       ***********************************************/
      void setup_htu21d() {
        myHumidity.begin();
      #ifdef MY_DEBUG  
        Serial.println("Setup temp/humid sensor completed");
      #endif
      }
      
      
      /***********************************************
      /* Setup TLS2561
       ***********************************************/
      void setup_tls2561() {
       
        if (myLight.begin()) {
          Serial.println(F("Found light sensor"));
        } else {
          Serial.println(F("Light Sensor not found - cont. anyway"));
        }
        myLight.setGain(TSL2561_GAIN_0X);          // set 16x gain (for dim situations)
        
        // Changing the integration time gives you a longer time over which to sense light
        // longer timelines are slower, but are good in very low light situtations!
        //tsl.setTiming(TSL2561_INTEGRATIONTIME_13MS);  // shortest integration time (bright light)
        myLight.setTiming(TSL2561_INTEGRATIONTIME_101MS);  // medium integration time (medium light)
        //tsl.setTiming(TSL2561_INTEGRATIONTIME_402MS);  // longest integration time (dim light)
        
      }
      
      /***********************************************
       *
       *  Main loop function
       *
       ***********************************************/
      void loop()     
      { 
        tempMeasureCount++;
        lightMeasureCount++;
        sendBattery++;
        bool forceTransmit = false;
      
        if (motionDetected) {
          sendMotion(false);  // do not force transmission unless motion status has changed
          motionDetected = false;
        }
        
        // do not enter into sensor data gathering on each motion tripped
        if ((!motionDetected) || (motionTrips > 3)) {
          motionTrips = 0; // avoid starvation of temp measure in case we have a lot of motion
          
          // I do the battery check at the beginning
          if (sendBattery > 60) {
             sendBattLevel(forceTransmit); // Not needed to send battery info that often
             sendBattery = 0;
          }
          
          if ((lightMeasureCount > FORCE_TRANSMIT_INTERVAL) || (tempMeasureCount > FORCE_TRANSMIT_INTERVAL) ) { // force a transmission
            forceTransmit = true; 
            tempMeasureCount = 0;
            lightMeasureCount = 0;
          }
        
          // Get & send sensor data
          wait(200);
          sendTempHumidityMeasurement(forceTransmit);
          wait(200);
          sendLightLevelMeasurement(forceTransmit);
          wait(200);
          sendMotion(forceTransmit);
        } 
        wait(100);  // I don't know whether that is really required; however I have the impression that shutting down the radio leads to
                       // problems in the communication when using signatures
        Serial.println("going to sleep");
        if (sleep(INTERRUPT,RISING, MEASURE_INTERVAL)) {
          motionDetected = true;
          motionTrips++;
        }
        Serial.print("Motion detected="); Serial.println(motionDetected);
      }
      
      /*********************************************
       *
       * Sends state of motion sensor
       *
       * Parameters
       * - force : Forces transmission of a value (even if it's the same as previous measurement)
       *
       *********************************************/
      void sendMotion(bool force) {
       
        bool tx = force;
        
        // Read digital motion value
        bool tripped = digitalRead(MOTION_SENSOR) == HIGH; 
        Serial.print(F("Tripped: ")); Serial.println(tripped);
        
        if (lastTripped != tripped) tx = true;
        if (tx) {
          resend(msg.set(tripped?"1":"0"),repeats);  // Send tripped value to gw 
          lastTripped = tripped;
        }
      }
      
      /*********************************************
       *
       * Sends temperature and humidity from HTU21D sensor
       *
       * Parameters
       * - force : Forces transmission of a value (even if it's the same as previous measurement)
       *
       *********************************************/
      void sendTempHumidityMeasurement(bool force) 
      {
          bool tx = force;
          
          float hum = myHumidity.readHumidity();
          float temp = myHumidity.readTemperature();
          
          Serial.print(F("lastTemperature: ")); Serial.println(lastTemperature);
          Serial.print(F("lastHumidity: ")); Serial.println(lastHumidity);
          
          float diffTemp = abs(lastTemperature - temp);
          float diffHum = abs(lastHumidity - hum);
      
      #ifdef MY_DEBUG
          Serial.print(F("TempDiff :"));Serial.println(diffTemp);
          Serial.print(F("HumDiff  :"));Serial.println(diffHum); 
      #endif
      
          if (isnan(diffHum)) tx = true; 
          if (diffTemp > TEMP_TRANSMIT_THRESHOLD) tx = true;
          if (diffHum >= HUMI_TRANSMIT_THRESHOLD) tx = true;
      
          if (tx) {
            tempMeasureCount = 0;
            resend(msgTemp.setSensor(TEMP_CHILD_ID).set(temp,1),repeats); 
            wait(20);
            resend(msgHum.setSensor(HUM_CHILD_ID).set(hum,1),repeats); 
            lastTemperature = temp;
            lastHumidity = hum;   
          }
      }
      
      
      /*********************************************
       *
       * Sends light level from TLS6512 sensor
       *
       * Parameters
       * - force : Forces transmission of a value (even if it's the same as previous measurement)
       *
       *********************************************/
      void sendLightLevelMeasurement(bool force) {
        bool tx = force;
        
        uint32_t lum = myLight.getFullLuminosity();
        uint16_t ir, full;
        ir = lum >> 16;
        full = lum & 0xFFFF;
        
        Serial.print(F("IR: ")); Serial.print(ir);   Serial.print(F("\t\t"));
        Serial.print(F("Full: ")); Serial.print(full);   Serial.print(F("\t"));
        Serial.print(F("Visible: ")); Serial.print(full - ir);   Serial.print(F("\t"));
        
        double lux = myLight.calculateLux(full, ir);
        Serial.print(F("Lux: ")); Serial.println(lux);
        float diffLux = abs(lastLight - lux);
      #ifdef MY_DEBUG
          Serial.print(F("Lux difference since last measurement: ")); Serial.println((float)diffLux/abs(lastLight));    
      #endif
          if (isnan(diffLux)) tx = true; 
          if (diffLux/abs(lastLight)  >= LIGHT_TRANSMIT_THRESHOLD) tx = true;
      
          if (tx) {
            lightMeasureCount = 0;
            resend(msgLight.setSensor(LIGHT_CHILD_ID).set(lux,1),repeats);
            lastLight = lux;
          }
      }
      
      
      /*********************************************
       * Prints error on I2C comm bus
       *********************************************/
      void printError(byte error)
        // If there's an I2C error, this function will
        // print out an explanation.
      {
        Serial.print(F("I2C error: "));
        Serial.print(error,DEC);
        Serial.print(F(", "));
        
        switch(error)
        {
          case 0:
            Serial.println(F("success"));
            break;
          case 1:
            Serial.println(F("data too long for transmit buffer"));
            break;
          case 2:
            Serial.println(F("received NACK on address (disconnected?)"));
            break;
          case 3:
            Serial.println(F("received NACK on data"));
            break;
          case 4:
            Serial.println(F("other error"));
            break;
          default:
            Serial.println(F("unknown error"));
        }
      }
      
      
      /********************************************
       *
       * Sends battery information (battery percentage)
       *
       * Parameters
       * - force : Forces transmission of a value
       *
       *******************************************/
      void sendBattLevel(bool force)
      {
        if (force) lastBattery = -1;
        long batteryV =  analogRead(BATTERY_SENSE_PIN);  
        for (int i = 1; i<5; i++) {
          long newSample = analogRead(BATTERY_SENSE_PIN); //readVcc();
          batteryV -= batteryV / (i+1);
          batteryV += newSample / (i+1);   
        }
         
         // 10M, 2,86M divider across battery and using internal ADC ref of 1.1V
         // Sense point is bypassed with 0.1 uF cap to reduce noise at that point
         // ((10+4,7)/4,7)*1.1 = 3.4404255
         // 3.4404255/1023 = Volts per bit = 0.003630748
      
        long vcc  = batteryV * 3.3630748;
        if (vcc != lastBattery) {
          lastBattery = vcc;
      
      #ifdef BATT_SENSOR
          resend(msgBatt.set(vcc),repeats);
      #endif
          // Calculate on the fully charged cell. Since I have a step-up in place I go as low as possible no offset for minimum
         sendBatteryLevel(  ((vcc-MIN_VOLTAGE)*10.0)/((MAX_VOLTAGE-MIN_VOLTAGE)*10.0) *100.0);
        }
      }
      
      
      /********************************************
       *
       * Send message, resend on error
       *
       * Parameters
       * - msg : message to send
       * - repeats: number of repetitions
       *
       *******************************************/
      void resend(MyMessage &msg, int repeats)
      {
        int repeat = 0;
        int repeatdelay = 0;
        boolean sendOK = false;
      
        while ((sendOK == false) and (repeat < repeats)) {
          if (send(msg)) {
            sendOK = true;
          } else {
            sendOK = false;
            Serial.print(F("Send ERROR "));
            Serial.println(repeat);
            repeatdelay += random(50,200);
          } 
          repeat++; 
          delay(repeatdelay);
        }
      }
      
      
      /*******************************************
       *
       * Internal battery ADC measuring 
       *
       *******************************************/
      long readVcc() {
        // Read 1.1V reference against AVcc
        // set the reference to Vcc and the measurement to the internal 1.1V reference
        #if defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
          ADMUX = _BV(REFS0) | _BV(MUX4) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
        #elif defined (__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__)
          ADMUX = _BV(MUX5) | _BV(MUX0);
        #elif defined (__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__)
          ADcdMUX = _BV(MUX3) | _BV(MUX2);
        #else
          ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
        #endif  
       
        delay(2); // Wait for Vref to settle
        ADCSRA |= _BV(ADSC); // Start conversion
        while (bit_is_set(ADCSRA,ADSC)); // measuring
       
        uint8_t low  = ADCL; // must read ADCL first - it then locks ADCH  
        uint8_t high = ADCH; // unlocks both
       
        long result = (high<<8) | low;
       
        result = 1125300L / result; // Calculate Vcc (in mV); 1125300 = 1.1*1023*1000
        return result; // Vcc in millivolts
      }
      
      posted in Development
      tomkxy
      tomkxy
    • Signing: no active verification session?

      I have a node who is supposed to work as an irrigation controller running on batteries. Every 10 minutes it wakes up and sends a time request to the GW which is routed through to my controller. The nodes stays awake for some seconds.
      Whenever the controller sees a time request from that node it will send the actual time and any required status changes to the actuator. I switch on now signatures which I have for all my nodes.

      For the time request I see the following output, no active verification session and verify fail.

      Skipping security for command 3 type 17
      read: 0-0-32 s=255,c=3,t=17,pt=6,l=25,sg=0:250CBDC35C4580E545FD62FF251E4965AC05F25190E60179D4
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 2000060301FF
      Current nonce: 250CBDC35C4580E545FD62FF251E4965AC05F25190E60179D4AAAAAAAAAAAAAA
      HMAC: 036B39C46890F5068DE6FECE4D80612DD0BEA3710BA8B08E635B49AC34BF43A4
      Signature in message: 016B39C46890F5068DE6FECE4D80612DD0BEA3710BA8B08E63
      Message signed
      Message to send has been signed
      send: 32-32-0-0 s=255,c=3,t=1,pt=0,l=0,sg=1,st=ok:
      Requesting time from Gateway:
      No active verification session
      Signature verification failed!
      verify fail
      

      What does no active verification session mean?

      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Debug findParent

      @hek: Thanks! It's working now. I was confused by another issue, a call to requestTime in the setup routine which seems not going out.

      posted in Troubleshooting
      tomkxy
      tomkxy
    • Debug findParent

      I have a gateway which already has 6 nodes hooked up. One of the nodes is a repeater.
      I am trying to hook up a new node which does not find its parent.

      Starting sensor (RNNNAA, 2.0.0-beta)
      write register, reg=0, value=6
      write register, reg=3, value=3
      write register, reg=4, value=95
      write register, reg=5, value=124
      write register, reg=6, value=39
      read register, reg=6, value=39
      write register, reg=16, value=115
      write register, reg=29, value=6
      write register, reg=2, value=2
      write register, reg=1, value=0
      write register, reg=28, value=3
      flushRX
      flushTX
      write register, reg=7, value=112
      Radio init successful.
      find parent
      stop listening
      write register, reg=0, value=6
      open writing pipe, recipient=255
      write register, reg=10, value=255
      write register, reg=16, value=255
      send message to 255, len=7
      flushTX
      write register, reg=7, value=48
      start listening
      write register, reg=0, value=7
      send: 32-32-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
      find parent
      stop listening
      write register, reg=0, value=6
      open writing pipe, recipient=255
      write register, reg=10, value=255
      write register, reg=16, value=255
      send message to 255, len=7
      flushTX
      write register, reg=7, value=48
      start listening
      write register, reg=0, value=7
      send: 32-32-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
      

      From the log above you can see that it does not find its parent.
      How can I debug that?

      In particular, I am interested whether I should see that the gateway receives the "broadcast" message although it is already serving six nodes? From the log I do not see any message being received at the gateway.

      posted in Troubleshooting
      tomkxy
      tomkxy
    • RE: Can it be done? (Countdown timer that survives wait or sleep)

      You can use in addition a real time clock like the DS1307.

      posted in Development
      tomkxy
      tomkxy
    • RE: openHAB 2.0 binding

      @TimO Do you think it would be hard to add MQTT support to the binding? I had a brief look to your code and it looks like the protocols are nicely isolated.

      posted in OpenHAB
      tomkxy
      tomkxy
    • RE: MySensors Contest Winners 2016

      Congratulations to all winners.

      posted in Announcements
      tomkxy
      tomkxy
    • RE: Is MQTT Necessary? or, Use Case for MQTT?

      I am using MQTT mostly because of the reasons @mfalkvidd has given. It is a industry standard protocol and it "opens up" my home automation project. For instance, I am using MqttWarn to publish messages to Instapush independently from the controller I am using. Furthermore, I am going to experiment with OwnTracks or other 3rd party components.

      posted in Controllers
      tomkxy
      tomkxy
    • RE: [security] Introducing signing support to MySensors

      @calierd I cannot comment on RFM69 since I have non in operation. Sorry, try to place the nodes further apart and look whether it changes.

      posted in Development
      tomkxy
      tomkxy
    • RE: MQTT Client gateway

      I am using Openhab. I also did not investigate into a lot of controllers. What I like about Openhab is the powerful rules engine and the tons of bindings it support.
      If you are able to program possibilities seem to endless.

      posted in Development
      tomkxy
      tomkxy
    • RE: MQTT Client gateway

      @cowen71 The whole library has been completely refactored. Yes, the sketch looks sparse. You get all the necessary functionality by the define

      #define MY_GATEWAY_MQTT_CLIENT
      

      which is as far as I remember already in the sketch.

      posted in Development
      tomkxy
      tomkxy
    • RE: [security] Introducing signing support to MySensors

      @calierd You can have a look here at the discussion I had with a similar problem which I was able to resolve finally. See the last reply in the aforementioned thread where I summarized how I resolved it, eventually.

      posted in Development
      tomkxy
      tomkxy
    • RE: MQTT Client gateway

      The link mentioned by @cowen71 was put into a pull request which went into the development branch. However, the MQTTClientGateway has been reworked significantly in the development branch. The message structure is now similar to the serial gateway. I just completed a "migration" from that old version to the latest development branch version which worked perfectly, apart from RF issues I had.

      Thus, I suggest to use the latest version of the development branch.

      posted in Development
      tomkxy
      tomkxy
    • RE: MQTTClientGateway broken after upgrade - signature failure

      Finally, I have everything working again. Again a big thanks to @hek and @Anticimex .

      As lessons learnt, I did the following:

      • Solder 4.7uf directly on the radio
      • Changed to the 5v power rail from the Mega, utilizing a regulator
      • Put a 100 uf between 5v and gnd on the Mega
      • Moved both nodes farer away (when I was testing I had same lying side by side which obviously created interferences)
      • Switched the RF24 channel utilizing a channel which was not so polluted by all the Wifis around me
      posted in Development
      tomkxy
      tomkxy
    • RE: MQTTClientGateway broken after upgrade - signature failure

      @Anticimex @Hek thanks a lot for your support. This is very much appreciated.

      I did now the following:

      • solder a 4.7uf directly on the radio
      • changed to the 5v power rail from the Mega, utilizing a regulator
      • moved both nodes farer away

      Results are much better but still not as reliable as I would need. One node acting as repeater does not get any response to its "parent" broadcasts (need to investigate this).

      After some research I read that the Mega is probably not the best combination due to its current supply.
      What would be a suitable alternative to the Mega (>32kb memory) which provides more reliably power?

      posted in Development
      tomkxy
      tomkxy
    • RE: MQTTClientGateway broken after upgrade - signature failure

      @Anticimex I expanded on my previous experiment. I do not require full payload. If I just transmit one byte, most of the transmissions fail.

      So I need to investigate the sending node which is a Arduino Mega with an Ethernet shield...

      posted in Development
      tomkxy
      tomkxy
    • RE: MQTTClientGateway broken after upgrade - signature failure

      @Anticimex @Hek I hacked now my sketches and tested the following scenarios:

      1. sending a full payload from the sensor to the gateway in form of a nonce response
        -> it was received by the gateway and dropped -> ok
      2. doing the same as above but from the gateway to a node (the node was in a _process() loop) -> transmission failure

      So it seems that the sending side from the gateway to the sensor makes trouble, or the other way round receiving on the sensor node. I have not enough know regarding RF communication but this kind of asymetry seems to be strange.
      Any idea what I can try or who might be able to help?

      posted in Development
      tomkxy
      tomkxy
    • RE: MQTTClientGateway broken after upgrade - signature failure

      @Anticimex I am still digging.... Now I figured the following:

      The moment I disable MY_SIGNING_REQUEST_SIGNATURES on the sensor node while still having it on the gateway enabled sensor data is received and properly processed on gateway.

      I am now a bit puzzled. Am I right assuming that if MY_SIGNING_REQUEST_SIGNATURES is enabled on gateway that sensors nodes need to sign messages to the gateway?

      posted in Development
      tomkxy
      tomkxy
    • RE: MQTTClientGateway broken after upgrade - signature failure

      @hek Thanks!

      After uploading to the Mega I receive intermittent the following error during initialization:

      0;255;3;0;9;read register, reg=6, value=0
      0;255;3;0;9;Sanity check failed: RF_SETUP register=0 instead of 39, check wiring, replace module or non-P version
      0;255;3;0;9;Radio init failed. Check wiring.
      

      Most of the time unplugging the Mega from power it goes away. This happens with two different modulesm one with external antenna and one without. Any idea?

      posted in Development
      tomkxy
      tomkxy
    • RE: MQTTClientGateway broken after upgrade - signature failure

      @hek @Anticimex Ok. I switched to hardware signing. HMACs are being generated. So that is ok. When I yesterday saw the issue with the nonce and the comment in the header I switched to soft signing assuming unsupported hardware signing could have caused that.

      @hek what is exactly the define

      / W5100 Ethernet module SPI enable (optional if using a shield/module that manages SPI_EN signal)
      #define MY_W5100_SPI_EN 4  ```
      
      for. I am using an Arduino Mega and I remember that with my old sketch I did not need to use Soft SPI. Is this define on a Mega necessary and if yes pin 4 correct?
      posted in Development
      tomkxy
      tomkxy
    • RE: MQTTClientGateway broken after upgrade - signature failure

      @Anticimex I did not want to suggest that it is a bug in signing, I just referred to the comment in the W5100MQTTClientGateway sketch saying "Hardware SHA204 signing is currently not supported" and was wondering whether you know why.
      Sorry for bothering you on that. As I said I agree that the problem must somehow be related to transmission.

      posted in Development
      tomkxy
      tomkxy
    • RE: MQTTClientGateway broken after upgrade - signature failure

      @Anticimex I fully agree to your judgement that the problem is not due to the signing as such. However, I also do not believe in the RF24 issue. I tried with a CUSTOM child and using the max payload size available which without signing went through.

      I think there might be an issue related to the changed code pathes which is caused by "injecting" signing or a define or whatsoever in my sketch is wrong after the upgrade.

      I tried @tekka pull request with the result that nothing arrived at the gateway at all.

      Do you know why hardware signing is not supported in the MQTTClientGateway?

      posted in Development
      tomkxy
      tomkxy
    • RE: MQTTClientGateway broken after upgrade - signature failure

      @Anticimex thanks for your support. Don't get me wrong I think MySensors and the whole signing concept is great. It is just somehow frustrating to see how a whole installation - even small until now - which worked for more than half a year is just breaking down while not having a glue what I can do about it.

      What in particular are you referring to with reference to rf decoupling?

      Just wondering how does your config look like?
      What radios? What configs?

      posted in Development
      tomkxy
      tomkxy
    • RE: MQTTClientGateway broken after upgrade - signature failure

      @Anticimex I just tried to disable signing on the gateway and on the sensor and it works like a charme.
      So I still hope there is some issue either in my sketch (defines etc.) or a bug. Without signing I do not consider MySensors for me as an option. 😞

      posted in Development
      tomkxy
      tomkxy
    • RE: MQTTClientGateway broken after upgrade - signature failure

      @Anticimex I will try it further apart. But I have other nodes having the same problem and they are sitting exactly where they were before the upgrade. The only thing I changed for the sensors is to re-compile with the latest development branch for the sensor nodes.

      Only the MQTTClientGateway was running a sketch based on a rather "old" version. So that upgrade is significant.

      posted in Development
      tomkxy
      tomkxy
    • RE: MQTTClientGateway broken after upgrade - signature failure

      @Anticimex Both node were lying side by side. And I had my small network working perfectly on an older dev branch. So I don't think it can be due to coverage or distance.
      Arghhh: I an only post once within 2 minutes...

      posted in Development
      tomkxy
      tomkxy
    • RE: MQTTClientGateway broken after upgrade - signature failure

      @Anticimex Isn't node 0 the gateway node id? If not that might be something to follow up on.

      posted in Development
      tomkxy
      tomkxy
    • RE: MQTTClientGateway broken after upgrade - signature failure

      @Anticimex I increased MY_VERIFICATION_TIMEOUT_MS to 15s. Isn't that the nonce timeout?

      posted in Development
      tomkxy
      tomkxy
    • RE: MQTTClientGateway broken after upgrade - signature failure

      I have just collected the log from the sensor node. I also removed a repeater node which I had out of the communication chain.

      From the log it seems that the node requests a nonce but does not receive it, although the gateway seems to send one...

      Increasing MY_VERIFICATION_TIMEOUT_MS to 15000 did change anything.

      Starting sensor (RNNNAA, 2.0.0-beta)
      Radio init successful.
      Multisensor Sketch Type A - Battery Powered Temp/Humid/Light/Presence1.3
      Setup temp/humid sensor completed
      Found light sensor
       - Online!
      Skipping security for command 3 type 16
      send: 26-26-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Timeout waiting for nonce!
      sign fail
      send: 26-26-0-0 s=255,c=3,t=11,pt=0,l=25,sg=0,st=ok:Multisensor Sketch Type A
      Skipping security for command 3 type 16
      send: 26-26-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Timeout waiting for nonce!
      sign fail
      send: 26-26-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,st=ok:1.3
      Skipping security for command 3 type 16
      send: 26-26-0-0 s=1,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Timeout waiting for nonce!
      sign fail
      send: 26-26-0-0 s=1,c=0,t=6,pt=0,l=0,sg=0,st=ok:
      Skipping security for command 3 type 16
      send: 26-26-0-0 s=2,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Timeout waiting for nonce!
      sign fail
      send: 26-26-0-0 s=2,c=0,t=7,pt=0,l=0,sg=0,st=ok:
      Skipping security for command 3 type 16
      send: 26-26-0-0 s=3,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Message to send could not be signed!
      sign fail
      send: 26-26-0-0 s=3,c=0,t=16,pt=0,l=0,sg=0,st=ok:
      Skipping security for command 3 type 16
      send: 26-26-0-0 s=4,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Message to send could not be signed!
      sign fail
      send: 26-26-0-0 s=4,c=0,t=1,pt=0,l=0,sg=0,st=ok:
      Skipping security for command 3 type 16
      send: 26-26-0-0 s=199,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Timeout waiting for nonce!
      sign fail
      send: 26-26-0-0 s=199,c=0,t=13,pt=0,l=0,sg=0,st=ok:
      isMetric: 1
      lastTemperature: -100.00
      lastHumidity: -100.00
      TempDiff :127.42
      HumDiff  :120.93
      Skipping security for command 3 type 16
      send: 26-26-0-0 s=1,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Timeout waiting for nonce!
      sign fail
      send: 26-26-0-0 s=1,c=1,t=0,pt=7,l=5,sg=0,st=ok:27.4
      Skipping security for command 3 type 16
      send: 26-26-0-0 s=2,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Timeout waiting for nonce!
      sign fail
      send: 26-26-0-0 s=2,c=1,t=1,pt=7,l=5,sg=0,st=ok:20.9
      IR: 1		Full: 2	Visible: 1	Lux: 1.00
      Lux difference since last measurement: 1.00
      Skipping security for command 3 type 16
      send: 26-26-0-0 s=3,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-26 s=255,c=3,t=17,pt=6,l=25,sg=0:5333F4601AD619250DDA35ADEBB1E46F78EB96A1D769F33114
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 1A002EE125030000803F01
      Current nonce: 5333F4601AD619250DDA35ADEBB1E46F78EB96A1D769F33114AAAAAAAAAAAAAA
      HMAC: 51A6B54EB9C0BAF3A4F982216BC4764F2DD2810D74392BC952DDAA976C78A051
      Signature in message: 01A6B54EB9C0BAF3A4F982216BC4764F2DD2810D
      Message signed
      Message to send has been signed
      send: 26-26-0-0 s=3,c=1,t=37,pt=7,l=5,sg=1,st=ok:1.0
      Skipping security for command 3 type 16
      send: 26-26-0-0 s=199,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Message to send could not be signed!
      sign fail
      send: 26-26-0-0 s=199,c=1,t=38,pt=4,l=4,sg=0,st=ok:1274
      Skipping security for command 3 type 16
      send: 26-26-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Message to send could not be signed!
      sign fail
      send: 26-26-0-0 s=255,c=3,t=0,pt=1,l=1,sg=0,st=ok:90
      Signing required
      Skipping security for command 3 type 15
      send: 26-26-0-0 s=255,c=3,t=15,pt=0,l=2,sg=0,st=ok:
      Waiting for GW to send signing preferences...
      Skipping security for command 3 type 15
      read: 0-0-26 s=255,c=3,t=15,pt=0,l=2,sg=0:
      Mark node 0 as one that require signed messages
      Mark node 0 as one that do not require whitelisting
      Skipping security for command 3 type 16
      send: 26-26-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Timeout waiting for nonce!
      sign fail
      send: 26-26-0-0 s=255,c=0,t=17,pt=0,l=10,sg=0,st=ok:2.0.0-beta
      Skipping security for command 3 type 16
      send: 26-26-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Skipping security for command 3 type 17
      read: 0-0-26 s=255,c=3,t=17,pt=6,l=25,sg=0:BDFF3B5B9BC735ADF4C3375DE3B98A0BD45BCB30469DC8D4F3
      Nonce received from 0. Proceeding with signing...
      Signing backend: ATSHA204
      Message to process: 1A000E2306FF00
      Current nonce: BDFF3B5B9BC735ADF4C3375DE3B98A0BD45BCB30469DC8D4F3AAAAAAAAAAAAAA
      HMAC: 6B2DE4B7DCB4F5D4691AD3979CEA4D6DD80D8E1D0D8A659906D9F0B0B9497C66
      Signature in message: 012DE4B7DCB4F5D4691AD3979CEA4D6DD80D8E1D0D8A6599
      Message signed
      Message to send has been signed
      send: 26-26-0-0 s=255,c=3,t=6,pt=1,l=1,sg=1,st=ok:0
      Init complete, id=26, parent=0, distance=1
      lastTemperature: 27.42
      lastHumidity: 20.93
      TempDiff :0.04
      HumDiff  :0.43
      IR: 1		Full: 2	Visible: 1	Lux: 1.00
      Lux difference since last measurement: 0.00
      Tripped: 1
      Skipping security for command 3 type 16
      send: 26-26-0-0 s=4,c=3,t=16,pt=0,l=0,sg=0,st=ok:
      Nonce requested from 0. Waiting...
      Message to send could not be signed!
      sign fail
      send: 26-26-0-0 s=4,c=1,t=16,pt=0,l=1,sg=0,st=ok:1
      
      posted in Development
      tomkxy
      tomkxy
    • MQTTClientGateway broken after upgrade - signature failure

      I just upgraded my MQTTClientGateway to the most current version of development branch.
      In parallel, I uploaded re-compiled sketches to my sensors.

      It seems that there is an issue now with respect to signature handling. I used to have ATASHA204 on all my sensors and the gateway.

      I already realized that the current version does not seem to support hardware signing so I change to soft signing including uploading the HMAC Key to EEPROM.

      I appended the log and the sketches. It seems that the gateway expects a signed message which it does not receive. However, I have signing enabled in the sensor.

      I am absolutely stuck and have no glue what the reason is. Any help is highly appreciated.
      Interesting enough and just more confusing, after I first uploaded the new sketch to the MQTT Gateway, I saw in the beginning some messages appear in the MQTT broker.

      Gateway log:

      ;255;3;0;9;Starting gateway (RNNGAS, 2.0.0-beta)
      0;255;3;0;9;Radio init successful.
      0;255;3;0;9;Init complete, id=0, parent=0, distance=0
      0;255;3;0;9;Skipping security for command 3 type 16
      0;255;3;0;9;read: 26-26-0 s=4,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;Signing backend: ATSHA204Soft
      0;255;3;0;9;SHA256: 6420A6958C538FE9A8076F1F48ACDE828A4A7886859393A20200000000000000
      0;255;3;0;9;Transmittng nonce
      0;255;3;0;9;Skipping security for command 3 type 17
      0;255;3;0;9;send: 0-0-26-26 s=255,c=3,t=17,pt=6,l=25,sg=0,st=fail:6420A6958C538FE9A8076F1F48ACDE828A4A7886859393A202
      0;255;3;0;9;Attempting MQTT connection...
      0;255;3;0;9;MQTT connected
      0;255;3;0;9;Message is not signed, but it should have been!
      0;255;3;0;9;verify fail
      0;255;3;0;9;Verification timeout
      0;255;3;0;9;Skipping security for command 3 type 16
      0;255;3;0;9;read: 27-24-0 s=0,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;Signing backend: ATSHA204Soft
      0;255;3;0;9;SHA256: D916CCAA20E05C5533CD2919E2B5286C0559C1552A7F55922CAAAAAAAAAAAAAA
      0;255;3;0;9;Transmittng nonce
      0;255;3;0;9;Skipping security for command 3 type 17
      0;255;3;0;9;send: 0-0-24-27 s=255,c=3,t=17,pt=6,l=25,sg=0,st=fail:D916CCAA20E05C5533CD2919E2B5286C0559C1552A7F55922C
      0;255;3;0;9;Message is not signed, but it should have been!
      0;255;3;0;9;verify fail
      0;255;3;0;9;Verification timeout
      0;255;3;0;9;Skipping security for command 3 type 16
      0;255;3;0;9;read: 27-24-0 s=0,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;Signing backend: ATSHA204Soft
      0;255;3;0;9;SHA256: 9394294CFBA825C26112C731879AEC90CF0AA0AA2E1338A01EAAAAAAAAAAAAAA
      0;255;3;0;9;Transmittng nonce
      0;255;3;0;9;Skipping security for command 3 type 17
      0;255;3;0;9;send: 0-0-24-27 s=255,c=3,t=17,pt=6,l=25,sg=0,st=fail:9394294CFBA825C26112C731879AEC90CF0AA0AA2E1338A01E
      0;255;3;0;9;Verification timeout
      0;255;3;0;9;Message is not signed, but it should have been!
      0;255;3;0;9;verify fail
      0;255;3;0;9;Skipping security for command 3 type 16
      0;255;3;0;9;read: 26-26-0 s=255,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;Signing backend: ATSHA204Soft
      0;255;3;0;9;SHA256: 2ECD2A1584FBBB9E269C4DAF8714FA393D6BA2CBD403BF71D1AAAAAAAAAAAAAA
      0;255;3;0;9;Transmittng nonce
      0;255;3;0;9;Skipping security for command 3 type 17
      0;255;3;0;9;send: 0-0-26-26 s=255,c=3,t=17,pt=6,l=25,sg=0,st=fail:2ECD2A1584FBBB9E269C4DAF8714FA393D6BA2CBD403BF71D1
      0;255;3;0;9;Message is not signed, but it should have been!
      0;255;3;0;9;verify fail
      0;255;3;0;9;Verification timeout
      0;255;3;0;9;Skipping security for command 3 type 16
      0;255;3;0;9;read: 26-26-0 s=255,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;Signing backend: ATSHA204Soft
      0;255;3;0;9;SHA256: 49B80D12C8ED30598B0E4119D1C2F828EE38FD6B035EF520ABAAAAAAAAAAAAAA
      0;255;3;0;9;Transmittng nonce
      0;255;3;0;9;Skipping security for command 3 type 17
      0;255;3;0;9;send: 0-0-26-26 s=255,c=3,t=17,pt=6,l=25,sg=0,st=fail:49B80D12C8ED30598B0E4119D1C2F828EE38FD6B035EF520AB
      0;255;3;0;9;Skipping security for command 3 type 16
      0;255;3;0;9;read: 27-24-0 s=2,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;Signing backend: ATSHA204Soft
      0;255;3;0;9;SHA256: 261B252BA8FFFB20085C9B493EDA9CCC9F6293095009C5F306AAAAAAAAAAAAAA
      0;255;3;0;9;Transmittng nonce
      0;255;3;0;9;Skipping security for command 3 type 17
      0;255;3;0;9;send: 0-0-24-27 s=255,c=3,t=17,pt=6,l=25,sg=0,st=fail:261B252BA8FFFB20085C9B493EDA9CCC9F6293095009C5F306
      0;255;3;0;9;Message is not signed, but it should have been!
      0;255;3;0;9;verify fail
      0;255;3;0;9;Skipping security for command 3 type 16
      0;255;3;0;9;read: 26-26-0 s=1,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;Signing backend: ATSHA204Soft
      0;255;3;0;9;SHA256: 74F626A70BC176FE2D2B1E0EDD64DE4110A6E210551B7E32BEAAAAAAAAAAAAAA
      0;255;3;0;9;Transmittng nonce
      0;255;3;0;9;Skipping security for command 3 type 17
      0;255;3;0;9;send: 0-0-26-26 s=255,c=3,t=17,pt=6,l=25,sg=0,st=fail:74F626A70BC176FE2D2B1E0EDD64DE4110A6E210551B7E32BE
      0;255;3;0;9;Message is not signed, but it should have been!
      0;255;3;0;9;verify fail
      0;255;3;0;9;Skipping security for command 3 type 16
      0;255;3;0;9;read: 27-24-0 s=2,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;Signing backend: ATSHA204Soft
      0;255;3;0;9;SHA256: D6F7E817BF30213995EDF2B5709EC24687583DEF1BA2B7DFD3AAAAAAAAAAAAAA
      0;255;3;0;9;Transmittng nonce
      0;255;3;0;9;Skipping security for command 3 type 17
      0;255;3;0;9;send: 0-0-24-27 s=255,c=3,t=17,pt=6,l=25,sg=0,st=fail:D6F7E817BF30213995EDF2B5709EC24687583DEF1BA2B7DFD3
      

      MQTTClientGateway sketch (using ethernet shield W5100)

      /**
       * The MySensors Arduino library handles the wireless radio link and protocol
       * between your home built sensors/actuators and HA controller of choice.
       * The sensors forms a self healing radio network with optional repeaters. Each
       * repeater and gateway builds a routing tables in EEPROM which keeps track of the
       * network topology allowing messages to be routed to nodes.
       *
       * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
       * Copyright (C) 2013-2015 Sensnology AB
       * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
       *
       * Documentation: http://www.mysensors.org
       * Support Forum: http://forum.mysensors.org
       *
       * This program is free software; you can redistribute it and/or
       * modify it under the terms of the GNU General Public License
       * version 2 as published by the Free Software Foundation.
       *
       *******************************
       *
       * REVISION HISTORY
       * Version 1.0 - Henrik Ekblad
       * 
       * DESCRIPTION
       * The W5100 MQTT gateway sends radio network (or locally attached sensors) data to your MQTT broker.
       * The node also listens to MY_MQTT_TOPIC_PREFIX and sends out those messages to the radio network
       *
       * LED purposes:
       * - To use the feature, uncomment WITH_LEDS_BLINKING in MyConfig.h
       * - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved
       * - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
       * - ERR (red) - fast blink on error during transmission error or recieve crc error  
       * 
       * See http://www.mysensors.org/build/esp8266_gateway for wiring instructions.
       * nRF24L01+  ESP8266
       * VCC        VCC
       * CE         GPIO4          
       * CSN/CS     GPIO15
       * SCK        GPIO14
       * MISO       GPIO12
       * MOSI       GPIO13
       *            
       * Not all ESP8266 modules have all pins available on their external interface.
       * This code has been tested on an ESP-12 module.
       * The ESP8266 requires a certain pin configuration to download code, and another one to run code:
       * - Connect REST (reset) via 10K pullup resistor to VCC, and via switch to GND ('reset switch')
       * - Connect GPIO15 via 10K pulldown resistor to GND
       * - Connect CH_PD via 10K resistor to VCC
       * - Connect GPIO2 via 10K resistor to VCC
       * - Connect GPIO0 via 10K resistor to VCC, and via switch to GND ('bootload switch')
       * 
        * Inclusion mode button:
       * - Connect GPIO5 via switch to GND ('inclusion switch')
       * 
       * Hardware SHA204 signing is currently not supported!
       *
       * Make sure to fill in your ssid and WiFi password below for ssid & pass.
       */
      
      #include <SPI.h>
      
      #define MY_DEBUG_VERBOSE_SIGNING //!< Enable signing related debug prints to serial monitor
      
      
      // Hardware signing not yet supported
      #define MY_SIGNING_FEATURE
      #define MY_SIGNING_SOFT
      //#define MY_SIGNING_ATSHA204
      //#define MY_SIGNING_ATSHA204_PIN A3
      #define MY_SIGNING_REQUEST_SIGNATURES
      
      // Enable debug prints to serial monitor
      #define MY_DEBUG 
      
      // Enables and select radio type (if attached)
      #define MY_RADIO_NRF24
      //#define MY_RADIO_RFM69
      
      #define MY_GATEWAY_MQTT_CLIENT
      
      // Set this nodes subscripe and publish topic prefix
      #define MY_MQTT_PUBLISH_TOPIC_PREFIX "GW1_out"
      #define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "GW1_in"
      
      // Set MQTT client id
      #define MY_MQTT_CLIENT_ID "mysensors-1"
      
      // W5100 Ethernet module SPI enable (optional if using a shield/module that manages SPI_EN signal)
      #define MY_W5100_SPI_EN 4  
      
      
      // Enable Soft SPI for NRF radio (note different radio wiring is required)
      // The W5100 ethernet module seems to have a hard time co-operate with 
      // radio on the same spi bus.
      #if !defined(MY_W5100_SPI_EN) && !defined(ARDUINO_ARCH_SAMD)
        #define MY_SOFTSPI
        #define MY_SOFT_SPI_SCK_PIN 14
        #define MY_SOFT_SPI_MISO_PIN 16
        #define MY_SOFT_SPI_MOSI_PIN 15
      #endif  
      
      
      // When W5100 is connected we have to move CE/CSN pins for NRF radio
      //#define MY_RF24_CE_PIN 5
      //#define MY_RF24_CS_PIN 6
      
      // CE_PIN and SPI_SS_PIN for Mega
      #define MY_RF24_CE_PIN    48			// radio chip enable
      #define MY_RF24_CS_PIN    49			// radio SPI serial select
      
      // Enable these if your MQTT broker requires usenrame/password
      #define MY_MQTT_USER "gw"
      #define MY_MQTT_PASSWORD "wL6g401gUIUa3xwQ"
      
      // Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
      #define MY_IP_ADDRESS 192,168,178,11
      
      // If using static ip you need to define Gateway and Subnet address as well
      #define MY_IP_GATEWAY_ADDRESS 192,168,178,1
      #define MY_IP_SUBNET_ADDRESS 255,255,255,0
      
      // MQTT broker ip address or url. Define one or the other. 
      //#define MY_CONTROLLER_URL_ADDRESS "m20.cloudmqtt.com"
      #define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 74
      
      // The MQTT broker port to to open 
      #define MY_PORT 1883      
      
       /*
      // Flash leds on rx/tx/err
      #define MY_LEDS_BLINKING_FEATURE
      // Set blinking period
      #define MY_DEFAULT_LED_BLINK_PERIOD 300
      
      // Enable inclusion mode
      #define MY_INCLUSION_MODE_FEATURE
      // Enable Inclusion mode button on gateway
      #define MY_INCLUSION_BUTTON_FEATURE
      // Set inclusion mode duration (in seconds)
      #define MY_INCLUSION_MODE_DURATION 60 
      // Digital pin used for inclusion mode button
      #define MY_INCLUSION_MODE_BUTTON_PIN  3 
      
      // Uncomment to override default HW configurations
      //#define MY_DEFAULT_ERR_LED_PIN 16  // Error led pin
      //#define MY_DEFAULT_RX_LED_PIN  16  // Receive led pin
      //#define MY_DEFAULT_TX_LED_PIN  16  // the PCB, on board LED
      */
      
      #include <Ethernet.h>
      #include <MySensor.h>
      
      
      void setup() { 
      }
      
      void presentation() {
        // Present locally attached sensors here    
      }
      
      
      void loop() {
        // Send locally attech sensors data here
      }
      
      
      

      Sensor Sketch:

      /*
      Multisensor Sketch
      
      Author: Thomas Krebs, thkrebs@gmx.de
      
      This sketch reads temperature, humidity, light and presence.
      It is based on the various examples sketches from SparkFun and MySensors 
      
      It uses the following sensors:
      Light           - TSL2561
      Temp&Humidity   - HTU21D
      Presence 
      
      HTU21D and TLS2561 need to connect the I2C pins (SCL and SDA) to your Arduino.
      The pins are different on different Arduinos:
      
                          SDA    SCL
      Any Arduino         "SDA"  "SCL"
      Uno, Redboard, Pro  A4     A5
      Mega2560, Due       20     21
      Leonardo            2      3
      
      */
      #define MY_DEBUG_VERBOSE_SIGNING //!< Enable signing related debug prints to serial monitor
      
      #define MY_SIGNING_FEATURE
      #define MY_RADIO_NRF24
      #define MY_SIGNING_ATSHA204
      #define MY_DEBUG
      #define MY_NODE_ID              26
      #define MY_SIGNING_ATSHA204_PIN 17
      #define MY_SIGNING_REQUEST_SIGNATURES
      
      #define BATT_SENSOR
      
      #include <MySensor.h>
      #include <TSL2561.h>
      #include <SparkFunHTU21D.h>
      
      #include <SPI.h>
      #include <Wire.h>
      #include <avr/power.h>
      
      #define VERSION           "1.3"
      #define SKETCH_NAME       "Multisensor Sketch Type A - Battery Powered Temp/Humid/Light/Presence"
      
      #define TEMP_CHILD_ID   1
      #define HUM_CHILD_ID    2
      #define LIGHT_CHILD_ID  3
      #define MOTION_CHILD_ID 4
      
      // Uncomment the line below, to transmit battery voltage as a normal sensor value
      #define BATT_SENSOR    199
      #define MAX_VOLTAGE    1316
      #define MIN_VOLTAGE    890     // it seems that about 0.89 V the sensor stops working
      
      // How many milli seconds between each measurement
      #define MEASURE_INTERVAL 120000
      
      unsigned long SLEEP_TIME = 30000;  // Sleep time between reads (in milliseconds)
      
      // FORCE_TRANSMIT_INTERVAL, this number of times of wakeup, the sensor is forced to report all values to the controller
      #define FORCE_TRANSMIT_INTERVAL 30 
      
      // When MEASURE_INTERVAL is 60000 and FORCE_TRANSMIT_INTERVAL is 30, we force a transmission every 30 minutes.
      // Between the forced transmissions a tranmission will only occur if the measured value differs from the previous measurement
      
      // HUMI_TRANSMIT_THRESHOLD tells how much the humidity should have changed since last time it was transmitted. Likewise with
      // TEMP_TRANSMIT_THRESHOLD for temperature threshold.
      #define HUMI_TRANSMIT_THRESHOLD   0.5
      #define TEMP_TRANSMIT_THRESHOLD   0.5
      #define LIGHT_TRANSMIT_THRESHOLD  0.3    // relative change
      
      
      // Pin definitions
      #define LED_PIN            13            // TODO: need to check that
      #define BATTERY_SENSE_PIN  A0            // select the input pin for the battery sense point
      #define MOTION_SENSOR      3             // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
      #define INTERRUPT          1             // Usually the interrupt = pin -2 (on uno/nano anyway)
      
      // Global settings
      int tempMeasureCount = 0;
      int lightMeasureCount = 0;
      
      int sendBattery = 0;
      boolean isMetric = true;
      boolean highfreq = true;
      boolean motionDetected = false;
      int repeats = 3;
      
      // Storage of old measurements
      float lastTemperature = -100;
      float lastHumidity = -100;
      long  lastBattery = -100;
      long  lastLight = -5000;
      int   lastTripped = -1; 
      
      HTU21D myHumidity;
      TSL2561 myLight(TSL2561_ADDR_FLOAT); 
      
      // Sensor messages
      MyMessage msgTemp(TEMP_CHILD_ID,V_TEMP);
      MyMessage msgHum(HUM_CHILD_ID,V_HUM);
      MyMessage msgLight(LIGHT_CHILD_ID,V_LEVEL);
      MyMessage msg(MOTION_CHILD_ID, V_TRIPPED);
      
      #ifdef BATT_SENSOR
      MyMessage msgBatt(BATT_SENSOR, V_VOLTAGE);
      #endif
      
      
      /****************************************************
       *
       * Setup code 
       *
       ****************************************************/
      void setup()  
      { 
        pinMode(LED_PIN, OUTPUT);
        Serial.print(F(SKETCH_NAME));
        Serial.println(VERSION);
        Serial.flush();
        
        
      #ifdef MY_SIGNING_ATSHA204_PIN
        // Make sure that ATSHA204 is not floating
        pinMode(MY_SIGNING_ATSHA204_PIN, INPUT);
        digitalWrite(MY_SIGNING_ATSHA204_PIN, HIGH);
      #endif  
        
        // use the 1.1 V internal reference
        analogReference(INTERNAL);
      
        // setup sensors
        setup_htu21d();
        
        delay(100);
        setup_tls2561(); 
        delay(500);
        
        // setup motion sensor 
        pinMode(MOTION_SENSOR, INPUT);    
      
        Serial.flush();
        Serial.println(F(" - Online!"));
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo(SKETCH_NAME, VERSION);
      
        // Present all sensors to controller
        present(TEMP_CHILD_ID, S_TEMP);
        present(HUM_CHILD_ID, S_HUM);
        present(LIGHT_CHILD_ID,S_LIGHT_LEVEL);
        present(MOTION_CHILD_ID, S_MOTION);
      
      #ifdef BATT_SENSOR
        present(BATT_SENSOR, S_POWER);
      #endif
      
        isMetric = getConfig().isMetric;
      #ifdef MY_DEBUG
        Serial.print(F("isMetric: ")); Serial.println(isMetric);
      #endif
        sendTempHumidityMeasurement(false);
        sendLightLevelMeasurement(false);
        sendBattLevel(false);
      }
      
      /***********************************************
      /* Setup HTU21d
       ***********************************************/
      void setup_htu21d() {
        myHumidity.begin();
      #ifdef MY_DEBUG  
        Serial.println("Setup temp/humid sensor completed");
      #endif
      }
      
      
      /***********************************************
      /* Setup TLS2561
       ***********************************************/
      void setup_tls2561() {
       
        if (myLight.begin()) {
          Serial.println(F("Found light sensor"));
        } else {
          Serial.println(F("Light Sensor not found - cont. anyway"));
        }
        myLight.setGain(TSL2561_GAIN_0X);          // set 16x gain (for dim situations)
        
        // Changing the integration time gives you a longer time over which to sense light
        // longer timelines are slower, but are good in very low light situtations!
        //tsl.setTiming(TSL2561_INTEGRATIONTIME_13MS);  // shortest integration time (bright light)
        myLight.setTiming(TSL2561_INTEGRATIONTIME_101MS);  // medium integration time (medium light)
        //tsl.setTiming(TSL2561_INTEGRATIONTIME_402MS);  // longest integration time (dim light)
        
      }
      
      /***********************************************
       *
       *  Main loop function
       *
       ***********************************************/
      void loop()     
      {     
        tempMeasureCount++;
        lightMeasureCount++;
        sendBattery++;
        bool forceTransmit = false;
      
        if (motionDetected) {
          sendMotion(false);  // do not force transmission unless it motion status has changed
          motionDetected = false;
        }
        else {
          
          // I do the battery check at the beginning
          if (sendBattery > 60) {
             sendBattLevel(forceTransmit); // Not needed to send battery info that often
             sendBattery = 0;
          }
          
          if ((lightMeasureCount > FORCE_TRANSMIT_INTERVAL) || (tempMeasureCount > FORCE_TRANSMIT_INTERVAL) ) { // force a transmission
            forceTransmit = true; 
            tempMeasureCount = 0;
            lightMeasureCount = 0;
          }
        
          // Get & send sensor data
          sendTempHumidityMeasurement(forceTransmit);
          sendLightLevelMeasurement(forceTransmit);
          sendMotion(forceTransmit);
        } 
        wait(100);  // I don't know whether that is really required; however I have the impression that shutting down the radio leads to
                       // problems in the communication when using signatures
        
        if (sleep(INTERRUPT,RISING, MEASURE_INTERVAL)) {
          motionDetected = true;
        }
      }
      
      /*********************************************
       *
       * Sends state of motion sensor
       *
       * Parameters
       * - force : Forces transmission of a value (even if it's the same as previous measurement)
       *
       *********************************************/
      void sendMotion(bool force) {
       
        bool tx = force;
        
        // Read digital motion value
        bool tripped = digitalRead(MOTION_SENSOR) == HIGH; 
        Serial.print(F("Tripped: ")); Serial.println(tripped);
        
        if (lastTripped != tripped) tx = true;
        if (tx) {
          resend(msg.set(tripped?"1":"0"),repeats);  // Send tripped value to gw 
          lastTripped = tripped;
        }
      }
      
      /*********************************************
       *
       * Sends temperature and humidity from HTU21D sensor
       *
       * Parameters
       * - force : Forces transmission of a value (even if it's the same as previous measurement)
       *
       *********************************************/
      void sendTempHumidityMeasurement(bool force) 
      {
          bool tx = force;
          
          float hum = myHumidity.readHumidity();
          float temp = myHumidity.readTemperature();
          
          Serial.print(F("lastTemperature: ")); Serial.println(lastTemperature);
          Serial.print(F("lastHumidity: ")); Serial.println(lastHumidity);
          
          float diffTemp = abs(lastTemperature - temp);
          float diffHum = abs(lastHumidity - hum);
      
      #ifdef MY_DEBUG
          Serial.print(F("TempDiff :"));Serial.println(diffTemp);
          Serial.print(F("HumDiff  :"));Serial.println(diffHum); 
      #endif
      
          if (isnan(diffHum)) tx = true; 
          if (diffTemp > TEMP_TRANSMIT_THRESHOLD) tx = true;
          if (diffHum >= HUMI_TRANSMIT_THRESHOLD) tx = true;
      
          if (tx) {
            tempMeasureCount = 0;
            resend(msgTemp.setSensor(TEMP_CHILD_ID).set(temp,1),repeats); 
            resend(msgHum.setSensor(HUM_CHILD_ID).set(hum,1),repeats); 
            lastTemperature = temp;
            lastHumidity = hum;   
          }
      }
      
      
      /*********************************************
       *
       * Sends light level from TLS6512 sensor
       *
       * Parameters
       * - force : Forces transmission of a value (even if it's the same as previous measurement)
       *
       *********************************************/
      void sendLightLevelMeasurement(bool force) {
        bool tx = force;
        
        uint32_t lum = myLight.getFullLuminosity();
        uint16_t ir, full;
        ir = lum >> 16;
        full = lum & 0xFFFF;
        
        Serial.print(F("IR: ")); Serial.print(ir);   Serial.print(F("\t\t"));
        Serial.print(F("Full: ")); Serial.print(full);   Serial.print(F("\t"));
        Serial.print(F("Visible: ")); Serial.print(full - ir);   Serial.print(F("\t"));
        
        double lux = myLight.calculateLux(full, ir);
        Serial.print(F("Lux: ")); Serial.println(lux);
        float diffLux = abs(lastLight - lux);
      #ifdef MY_DEBUG
          Serial.print(F("Lux difference since last measurement: ")); Serial.println((float)diffLux/abs(lastLight));    
      #endif
          if (isnan(diffLux)) tx = true; 
          if (diffLux/abs(lastLight)  >= LIGHT_TRANSMIT_THRESHOLD) tx = true;
      
          if (tx) {
            lightMeasureCount = 0;
            resend(msgLight.setSensor(LIGHT_CHILD_ID).set(lux,1),repeats);
            lastLight = lux;
          }
      }
      
      
      /*********************************************
       * Prints error on I2C comm bus
       *********************************************/
      void printError(byte error)
        // If there's an I2C error, this function will
        // print out an explanation.
      {
        Serial.print(F("I2C error: "));
        Serial.print(error,DEC);
        Serial.print(F(", "));
        
        switch(error)
        {
          case 0:
            Serial.println(F("success"));
            break;
          case 1:
            Serial.println(F("data too long for transmit buffer"));
            break;
          case 2:
            Serial.println(F("received NACK on address (disconnected?)"));
            break;
          case 3:
            Serial.println(F("received NACK on data"));
            break;
          case 4:
            Serial.println(F("other error"));
            break;
          default:
            Serial.println(F("unknown error"));
        }
      }
      
      
      /********************************************
       *
       * Sends battery information (battery percentage)
       *
       * Parameters
       * - force : Forces transmission of a value
       *
       *******************************************/
      void sendBattLevel(bool force)
      {
        if (force) lastBattery = -1;
        long batteryV =  analogRead(BATTERY_SENSE_PIN);  
        for (int i = 1; i<5; i++) {
          long newSample = analogRead(BATTERY_SENSE_PIN); //readVcc();
          batteryV -= batteryV / (i+1);
          batteryV += newSample / (i+1);   
        }
         
         // 10M, 2,86M divider across battery and using internal ADC ref of 1.1V
         // Sense point is bypassed with 0.1 uF cap to reduce noise at that point
         // ((10+4,7)/4,7)*1.1 = 3.4404255
         // 3.4404255/1023 = Volts per bit = 0.003630748
      
        long vcc  = batteryV * 3.3630748;
        if (vcc != lastBattery) {
          lastBattery = vcc;
      
      #ifdef BATT_SENSOR
          resend(msgBatt.set(vcc),repeats);
      #endif
          // Calculate on the fully charged cell. Since I have a step-up in place I go as low as possible no offset for minimum
         sendBatteryLevel(  ((vcc-MIN_VOLTAGE)*10.0)/((MAX_VOLTAGE-MIN_VOLTAGE)*10.0) *100.0);
        }
      }
      
      
      /********************************************
       *
       * Send message, resend on error
       *
       * Parameters
       * - msg : message to send
       * - repeats: number of repetitions
       *
       *******************************************/
      void resend(MyMessage &msg, int repeats)
      {
        int repeat = 1;
        int repeatdelay = 0;
        boolean sendOK = false;
      
        while ((sendOK == false) and (repeat < repeats)) {
          if (send(msg)) {
            sendOK = true;
          } else {
            sendOK = false;
            Serial.print(F("Send ERROR "));
            Serial.println(repeat);
            repeatdelay += random(50,200);
          } 
          repeat++; 
          delay(repeatdelay);
        }
      }
      
      
      /*******************************************
       *
       * Internal battery ADC measuring 
       *
       *******************************************/
      long readVcc() {
        // Read 1.1V reference against AVcc
        // set the reference to Vcc and the measurement to the internal 1.1V reference
        #if defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
          ADMUX = _BV(REFS0) | _BV(MUX4) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
        #elif defined (__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__)
          ADMUX = _BV(MUX5) | _BV(MUX0);
        #elif defined (__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__)
          ADcdMUX = _BV(MUX3) | _BV(MUX2);
        #else
          ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
        #endif  
       
        delay(2); // Wait for Vref to settle
        ADCSRA |= _BV(ADSC); // Start conversion
        while (bit_is_set(ADCSRA,ADSC)); // measuring
       
        uint8_t low  = ADCL; // must read ADCL first - it then locks ADCH  
        uint8_t high = ADCH; // unlocks both
       
        long result = (high<<8) | low;
       
        result = 1125300L / result; // Calculate Vcc (in mV); 1125300 = 1.1*1023*1000
        return result; // Vcc in millivolts
      }
      
      posted in Development
      tomkxy
      tomkxy
    • Change in signature protocol?

      Was there a change in the signature protocol recently?

      I am getting a "Unsupported signing presentation version (0)!" message. I am still running a gateway from 1.5 master branch which used to work with an older version of the development branch.

      Before I going the effort now to upgrade my old MQTTClientGateway including updating all the Openhab bindings I just want to make sure this is necessary.

      posted in Development
      tomkxy
      tomkxy
    • RE: 110v-230v AC to Mysensors PCB board

      How can I check whether the solid state relay works at all. My assembled board receives messages and sets state properly, I have 5V on the pin, however the relay does not seem to switch. Should I hear it? Any other ideas for "debugging"?

      posted in Hardware
      tomkxy
      tomkxy
    • RE: 110v-230v AC to Mysensors PCB board

      @icebob said:

      @tomkxy I'm using this one: http://hu.farnell.com/multicomp/mcvz1206m050agt/varistor-multilayer-4vac-0402/dp/2462756

      Thanks! It's a pity that the chinese "varistors" seem to be jumpers. I even saw in some offers on AliExpress that they are referred to as jumpers.

      posted in Hardware
      tomkxy
      tomkxy
    • RE: 110v-230v AC to Mysensors PCB board

      Anyone has an idea where to source the 5.5V varistor? I received a bunch from AliExpress following which seem to be broken.
      I found this link http://www.farnell.com/datasheets/575651.pdf. However, there seem to be a bunch of 5.5 V varistor. Can anybody help me figuring out the right ones?

      posted in Hardware
      tomkxy
      tomkxy
    • RE: 110v-230v AC to Mysensors PCB board

      Since the 5.5V varistor is not available from the linked AliExpress shop I wonder whether this varistor would work as well?
      https://www.conrad.de/de/smd-varistor-we-vs-82537040-4-v-wuerth-elektronik-we-vs-82537040-1-st-1086820.html

      posted in Hardware
      tomkxy
      tomkxy
    • RE: Merry Christmas and a Happy New 2016

      Merry christmas from Germany.

      posted in Announcements
      tomkxy
      tomkxy
    • RE: sleep & interrupts

      @mfalkvidd @martinhjelmare : Thanks a lot for your answers.

      How would you implement a rain gauge or anemometer measuring wind speed. Both devices are being triggered by "external" events, thus cannot be polled. I think there is no way around to count those events in interrupts.
      If I enable interrupts only during sleep, I guess I will loose events or am I wrong on that?

      posted in Development
      tomkxy
      tomkxy