Navigation

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

    Best posts made by Henrik Nielsen

    • RE: Make node look for new/better parent without restarting

      It sort of works, I get a ping and a missing pong:

      (254 is button node, 252 is repeater I turned off after the button node was started up)

      64442 TSF:PNG:SEND,TO=252
      64479 !TSF:MSG:SEND,254-254-252-252,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1
      66488 TSF:CKU:FAIL
      

      But no looking for a new parent.

      I tried calling some functions I thought sounded like they would help me, without really knowing. I guess it is not functions that a user like me really should use?:

      if ( !transportCheckUplink() ) {
        stParentTransition();
        while ( isTransportSearchingParent() ) {
          stParentUpdate();
        }
      }
      

      This starts what appears to be a new parent search, but it never completes:

      151171 TSF:MSG:SEND,254-254-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      153180 !TSM:FPAR:NO REPLY
      153182 TSM:FPAR
      153219 TSF:MSG:SEND,254-254-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      155228 !TSM:FPAR:NO REPLY
      155230 TSM:FPAR
      155267 TSF:MSG:SEND,254-254-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      157276 !TSM:FPAR:NO REPLY
      157278 TSM:FPAR
      157315 TSF:MSG:SEND,254-254-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      159324 !TSM:FPAR:FAIL
      159326 TSM:FAIL:CNT=7
      159328 TSM:FAIL:DIS
      159330 TSF:TDI:TSL
      161333 !TSM:FPAR:NO REPLY
      161335 TSM:FPAR
      

      At this point I have started my repeater again, and I think it should also find either the gateway or another node.

      posted in Development
      Henrik Nielsen
      Henrik Nielsen
    • RE: Make node look for new/better parent without restarting

      I guess another way would be like this:

      if ( !transportCheckUplink() ) {
         asm volatile ("  jmp 0"); // CRASH, BURN AND RESET
       }
      

      It does the trick ... though it really bothers my developer-heart 😉

      posted in Development
      Henrik Nielsen
      Henrik Nielsen
    • RE: Make node look for new/better parent without restarting

      Sorry I haven't gotten back to you, been a busy week.

      The MY_TRANSPORT_MAX_TX_FAILURES seems to do the job perfectly, I adjusted it down to 1 for the node, and resend the message a couple of times if it fails.

      Thank you for your support 🙂

      Also thanks to berkseo, your code also works for me, but I do prefer the built in way now that I know of it. Less code for me to write and maintain 🙂

      posted in Development
      Henrik Nielsen
      Henrik Nielsen
    • RE: SmartSleep wake up message always get NACK

      @berkseo Great 🙂 I am currently trying to figure out what my employers policy for open source contributions made in their employees spare time is, so I could make the pull request myself, but you beat me to it 😞

      posted in Development
      Henrik Nielsen
      Henrik Nielsen