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

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Feature Requests
  3. Option non blocking registration at gateway

Option non blocking registration at gateway

Scheduled Pinned Locked Moved Feature Requests
26 Posts 10 Posters 7.2k Views 8 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • tekkaT tekka

    @Heizelmann Thanks for your testing. I couldn't reproduce this behavior, can you post your sketch for further analysis?

    H Offline
    H Offline
    Heizelmann
    wrote on last edited by Heizelmann
    #21

    @tekka May be it is the kind of my testing. For getting quick results I simply plug and un-plug the radio module (NRF24L01+) from the socket in my sensor node. I know, this is not a real use case but it was easy and I didn't thought there is adifference in behaviour. How do you you switch off and on the network connection in your test?

    tekkaT 1 Reply Last reply
    0
    • H Heizelmann

      @tekka May be it is the kind of my testing. For getting quick results I simply plug and un-plug the radio module (NRF24L01+) from the socket in my sensor node. I know, this is not a real use case but it was easy and I didn't thought there is adifference in behaviour. How do you you switch off and on the network connection in your test?

      tekkaT Offline
      tekkaT Offline
      tekka
      Admin
      wrote on last edited by
      #22

      @Heizelmann yes, unplugging the radio results in what you observed. Simply unplug the GW (and repeaters)...

      H 1 Reply Last reply
      0
      • tekkaT tekka

        @Heizelmann yes, unplugging the radio results in what you observed. Simply unplug the GW (and repeaters)...

        H Offline
        H Offline
        Heizelmann
        wrote on last edited by Heizelmann
        #23

        @tekka OK unplugging the GW leads to a different behaviour.
        First the node didn't detect the failure as long it is not trying to send.
        When it tries to send it fails

        131268 !TSF:MSG:SEND,42-42-0-0,s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=NACK:1
        

        and after some more failure this

        238494 !TSM:READY:UPL FAIL,SNP
        238497 TSM:FPAR
        238534 TSF:MSG:SEND,42-42-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=6,st=OK:
        238995 !TSF:SND:TNR
        240002 !TSF:SND:TNR
        240542 !TSM:FPAR:NO REPLY
        240544 TSM:FPAR
        240581 TSF:MSG:SEND,42-42-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
        246683 !TSM:FPAR:FAIL
        246685 TSM:FAIL:CNT=1
        246687 TSM:FAIL:PDT
        

        and after a while mostly only

        609748 !TSF:SND:TNR
        

        When gateway comes back a proper reinitialization takes place:

        620572 TSM:FAIL:RE-INIT
        620574 TSM:INIT
        620581 TSM:INIT:TSP OK
        620583 TSM:INIT:STATID=42
        620587 TSF:SID:OK,ID=42
        620589 TSM:FPAR
        620625 TSF:MSG:SEND,42-42-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
        Current: 0.00
        0:0:0
        Current: 0.00
        0:0:0
        621443 TSF:MSG:READ,0-0-42,s=255,c=3,t=8,pt=1,l=1,sg=0:0
        621448 TSF:MSG:FPAR OK,ID=0,D=1
        Current: 0.00
        0:0:0
        Current: 0.00
        0:0:0
        622633 TSM:FPAR:OK
        622635 TSM:ID
        622637 TSM:ID:OK
        622638 TSM:UPL
        622642 TSF:MSG:SEND,42-42-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
        622652 TSF:MSG:READ,0-0-42,s=255,c=3,t=25,pt=1,l=1,sg=0:1
        622657 TSF:MSG:PONG RECV,HP=1
        622660 TSM:UPL:OK
        622662 TSM:READY:ID=42,PAR=0,DIS=1
        

        From now the sensor can send again without errors. :smiley:
        So far my tests.
        Except the case where the radio of the sensor went off and causes a lot of logging all test cases where satisfactorily.
        I think this is really an edge case and not so serious.
        From this point of view I would welcome that this beta development version will be published.

        1 Reply Last reply
        3
        • tekkaT tekka

          @hek correct :+1:
          @Heizelmann Would be good to get some feedback on this feature, please let us know how it works in your hands.

          eric_smidE Offline
          eric_smidE Offline
          eric_smid
          wrote on last edited by
          #24

          I tested my node with the "#define MY_TRANSPORT_WAIT_READY_MS 1" feature.
          It seems to work fine!
          Tnx for the work.

          1 Reply Last reply
          2
          • H Offline
            H Offline
            Heizelmann
            wrote on last edited by
            #25

            I detected another problem. From debug log it looks like the loop() function starts before initialization is finished. This can cause problems when trying to send data in loop() very early.

            Here a log example:

            0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.0-beta
            4 MCO:BGN:BFR
            
            5 before() begin
            5 before() end
            
            5 TSM:INIT
            9 TSF:WUR:MS=1000
            16 TSM:INIT:TSP OK
            17 TSM:INIT:STATID=42
            20 TSF:SID:OK,ID=42
            21 TSM:FPAR
            58 TSF:MSG:SEND,42-42-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
            651 TSF:MSG:READ,0-0-42,s=255,c=3,t=8,pt=1,l=1,sg=0:0
            656 TSF:MSG:FPAR OK,ID=0,D=1
            1010 MCO:BGN:STP
            
            1011 Setup() begin
            1512 Setup() end
            
            1512 MCO:BGN:INIT OK,TSP=0
            
            1516 loop() begin
            2017 loop() end
            
            2017 loop() begin
            
            2065 TSM:FPAR:OK
            2066 TSM:ID
            2067 TSM:ID:OK
            2069 TSM:UPL
            2072 TSF:MSG:SEND,42-42-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
            2078 TSF:MSG:READ,0-0-42,s=255,c=3,t=25,pt=1,l=1,sg=0:1
            2083 TSF:MSG:PONG RECV,HP=1
            2086 TSM:UPL:OK
            2087 TSM:READY:ID=42,PAR=0,DIS=1
            2093 TSF:MSG:SEND,42-42-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
            2100 TSF:MSG:READ,0-0-42,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
            2107 TSF:MSG:SEND,42-42-0-0,s=255,c=0,t=17,pt=0,l=10,sg=0,ft=0,st=OK:2.1.0-beta
            2116 TSF:MSG:SEND,42-42-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
            2126 TSF:MSG:READ,0-0-42,s=255,c=3,t=6,pt=0,l=1,sg=0:M
            
            2131 Presentation() begin
            2135 TSF:MSG:SEND,42-42-0-0,s=255,c=3,t=11,pt=0,l=22,sg=0,ft=0,st=OK:Sink Pump Control Node
            2145 TSF:MSG:SEND,42-42-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.2
            2153 TSF:MSG:SEND,42-42-0-0,s=1,c=0,t=1,pt=0,l=0,sg=0,ft=0,st=OK:
            2161 TSF:MSG:SEND,42-42-0-0,s=2,c=0,t=1,pt=0,l=0,sg=0,ft=0,st=OK:
            2168 TSF:MSG:SEND,42-42-0-0,s=3,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
            2174 Presentation() end
            
            2176 MCO:REG:REQ
            2181 TSF:MSG:SEND,42-42-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
            2187 TSF:MSG:READ,0-0-42,s=255,c=3,t=27,pt=1,l=1,sg=0:1
            2192 MCO:PIM:NODE REG=1
            
            2518 loop() end
            
            2518 loop() begin
             ...
            
            tekkaT 1 Reply Last reply
            0
            • H Heizelmann

              I detected another problem. From debug log it looks like the loop() function starts before initialization is finished. This can cause problems when trying to send data in loop() very early.

              Here a log example:

              0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.0-beta
              4 MCO:BGN:BFR
              
              5 before() begin
              5 before() end
              
              5 TSM:INIT
              9 TSF:WUR:MS=1000
              16 TSM:INIT:TSP OK
              17 TSM:INIT:STATID=42
              20 TSF:SID:OK,ID=42
              21 TSM:FPAR
              58 TSF:MSG:SEND,42-42-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
              651 TSF:MSG:READ,0-0-42,s=255,c=3,t=8,pt=1,l=1,sg=0:0
              656 TSF:MSG:FPAR OK,ID=0,D=1
              1010 MCO:BGN:STP
              
              1011 Setup() begin
              1512 Setup() end
              
              1512 MCO:BGN:INIT OK,TSP=0
              
              1516 loop() begin
              2017 loop() end
              
              2017 loop() begin
              
              2065 TSM:FPAR:OK
              2066 TSM:ID
              2067 TSM:ID:OK
              2069 TSM:UPL
              2072 TSF:MSG:SEND,42-42-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
              2078 TSF:MSG:READ,0-0-42,s=255,c=3,t=25,pt=1,l=1,sg=0:1
              2083 TSF:MSG:PONG RECV,HP=1
              2086 TSM:UPL:OK
              2087 TSM:READY:ID=42,PAR=0,DIS=1
              2093 TSF:MSG:SEND,42-42-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
              2100 TSF:MSG:READ,0-0-42,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
              2107 TSF:MSG:SEND,42-42-0-0,s=255,c=0,t=17,pt=0,l=10,sg=0,ft=0,st=OK:2.1.0-beta
              2116 TSF:MSG:SEND,42-42-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
              2126 TSF:MSG:READ,0-0-42,s=255,c=3,t=6,pt=0,l=1,sg=0:M
              
              2131 Presentation() begin
              2135 TSF:MSG:SEND,42-42-0-0,s=255,c=3,t=11,pt=0,l=22,sg=0,ft=0,st=OK:Sink Pump Control Node
              2145 TSF:MSG:SEND,42-42-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.2
              2153 TSF:MSG:SEND,42-42-0-0,s=1,c=0,t=1,pt=0,l=0,sg=0,ft=0,st=OK:
              2161 TSF:MSG:SEND,42-42-0-0,s=2,c=0,t=1,pt=0,l=0,sg=0,ft=0,st=OK:
              2168 TSF:MSG:SEND,42-42-0-0,s=3,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
              2174 Presentation() end
              
              2176 MCO:REG:REQ
              2181 TSF:MSG:SEND,42-42-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
              2187 TSF:MSG:READ,0-0-42,s=255,c=3,t=27,pt=1,l=1,sg=0:1
              2192 MCO:PIM:NODE REG=1
              
              2518 loop() end
              
              2518 loop() begin
               ...
              
              tekkaT Offline
              tekkaT Offline
              tekka
              Admin
              wrote on last edited by
              #26

              @Heizelmann I'm not sure I understood your concern.

              Initialization is finished here, right before the main loop is entered:

              1512 MCO:BGN:INIT OK,TSP=0
              

              Since your timeout is set to 1sec (which obviously is too short to fully establish the transport link) the node will enter the main loop() after the timeout. However, since the link is not established, only init messages are sent at that point (i.e. library init, signing preferences, presentation). Sensor data will not be sent until the node is registered.

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


              17

              Online

              11.7k

              Users

              11.2k

              Topics

              113.1k

              Posts


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

              • Don't have an account? Register

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