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. Troubleshooting
  3. How avoid endless loop when radio init fails?

How avoid endless loop when radio init fails?

Scheduled Pinned Locked Moved Troubleshooting
5 Posts 4 Posters 1.5k Views 3 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.
  • H Offline
    H Offline
    Heizelmann
    wrote on last edited by
    #1

    I would like to build a actuator/sensor node with mySensors 2.0 which have an autonoumous feature. This means when the connection to the gateway fails during operation as well as on booting the node should go on working in a stand-alone mode until connection comes back. Currently I am trying to achive that the node boots without radio connection but it hangs somewehre in an endless loop trying to connect. What I would like to have is a quick connection trial at boot time and if this fails going quickly to he loop() function.

    mfalkviddM 1 Reply Last reply
    0
    • tonnerre33T Offline
      tonnerre33T Offline
      tonnerre33
      Hardware Contributor
      wrote on last edited by tonnerre33
      #2

      Hello,

      It seems to me that this function is only in the developed branch with the parameter

      MY_TRANSPORT_WAIT_READY_MS
      

      More information at https://github.com/mysensors/MySensors/search?utf8=✓&q=MY_TRANSPORT_WAIT_READY_MS&type=Code

      tekkaT 1 Reply Last reply
      1
      • H Heizelmann

        I would like to build a actuator/sensor node with mySensors 2.0 which have an autonoumous feature. This means when the connection to the gateway fails during operation as well as on booting the node should go on working in a stand-alone mode until connection comes back. Currently I am trying to achive that the node boots without radio connection but it hangs somewehre in an endless loop trying to connect. What I would like to have is a quick connection trial at boot time and if this fails going quickly to he loop() function.

        mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by
        #3

        and in this thread https://forum.mysensors.org/topic/5094/option-non-blocking-registration-at-gateway/

        H 1 Reply Last reply
        0
        • tonnerre33T tonnerre33

          Hello,

          It seems to me that this function is only in the developed branch with the parameter

          MY_TRANSPORT_WAIT_READY_MS
          

          More information at https://github.com/mysensors/MySensors/search?utf8=✓&q=MY_TRANSPORT_WAIT_READY_MS&type=Code

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

          @tonnerre33 @Heizelmann This is a fairly new feature in the development branch (upcoming 2.1.0 release). Essentially, you can set a timeout (in MS) after which the node will enter the main loop in case of unsuccessful transport initialisation. Set to 0 if the node should establish the GW uplink before entering loop().

          For example, set

          #define MY_TRANSPORT_WAIT_READY_MS 15000
          

          for a 15s timeout.

          1 Reply Last reply
          0
          • mfalkviddM mfalkvidd

            and in this thread https://forum.mysensors.org/topic/5094/option-non-blocking-registration-at-gateway/

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

            @mfalkvidd Thanks for the link to this thread. I didn't found this before. It is exactly my problem, so we can close this thread and continue discussing in thisone.

            @tekka Thank you for this outlook.

            For me this feature is essential and I am wondering if it is not implemented from the beginning. So I hope that it will be published soon.
            Anyway I like MySensors and the great developer community. Many thanks to all.

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


            22

            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