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. Infinite loop

Infinite loop

Scheduled Pinned Locked Moved Troubleshooting
8 Posts 3 Posters 91 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.
  • Fumée BleueF Offline
    Fumée BleueF Offline
    Fumée Bleue
    wrote on last edited by
    #1

    Hello,
    I implemented a node with Arduino pro mini 3.3v with a RFM95w module. I used Mysensors PASSIVE node exemple.

    My problem is i have an infinite loop/reboot in my serial log. Do you have an idea why i'm having this issue ?

    __  __       ____
    |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
    | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
    | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
    |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
            |___/                      2.3.2
    
    16 MCO:BGN:INIT NODE,CP=RLNPA---,FQ=8,REL=255,VER=2.3.2
    28 TSM:INIT
    28 TSF:WUR:MS=0
    30 RFM95:INIT
    32 RFM95:INIT:PIN,CS=10,IQP=2,IQN=0
    47 RFM95:PTX:LEVEL=13
    49 TSM:INIT:TSP OK
    51 TSM:INIT:TSP PSM
    53 TSM:INIT:STATID=100
    55 TSF:SID:OK,ID=100
    57 TSM:FPAR
    59 TSM:FPAR:STATP=255
    61 TSM:ID
    61 TSM:ID:OK
    63 TSM:UPL:DISABLED
    65 TSM:READY:ID=100,PAR=255,DIS=1
    69 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
    
    __  __       ____
    |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
    | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
    | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
    |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
            |___/                      2.3.2
    
    16 MCO:BGN:INIT NODE,CP=RLNPA---,FQ=8,REL=255,VER=2.3.2
    28 TSM:INIT
    28 TSF:WUR:MS=0
    30 RFM95:INIT
    32 RFM95:INIT:PIN,CS=10,IQP=2,IQN=0
    47 RFM95:PTX:LEVEL=13
    49 TSM:INIT:TSP OK
    51 TSM:INIT:TSP PSM
    53 TSM:INIT:STATID=100
    55 TSF:SID:OK,ID=100
    57 TSM:FPAR
    59 TSM:FPAR:STATP=255
    61 TSM:ID
    61 TSM:ID:OK
    63 TSM:UPL:DISABLED
    65 TSM:READY:ID=100,PAR=255,DIS=1
    69 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
    
    __  __       ____
    |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
    | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
    | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
    |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
            |___/                      2.3.2
    
    16 MCO:BGN:INIT NODE,CP=RLNPA---,FQ=8,REL=255,VER=2.3.2
    28 TSM:INIT
    28 TSF:WUR:MS=0
    30 RFM95:INIT
    32 RFM95:INIT:PIN,CS=10,IQP=2,IQN=0
    47 RFM95:PTX:LEVEL=13
    49 TSM:INIT:TSP OK
    51 TSM:INIT:TSP PSM
    53 TSM:INIT:STATID=100
    55 TSF:SID:OK,ID=100
    57 TSM:FPAR
    59 TSM:FPAR:STATP=255
    61 TSM:ID
    61 TSM:ID:OK
    63 TSM:UPL:DISABLED
    65 TSM:READY:ID=100,PAR=255,DIS=1
    69 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
    
    /*
     * 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-2019 Sensnology AB
     * Full contributor list: https://github.com/mysensors/MySensors/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 - tekka
     *
     * DESCRIPTION
     * Passive node example: This is a passive & independent reporting node
     *
     */
    
    // Enable debug prints
    #define MY_DEBUG
    
    // Enable passive mode
    #define MY_PASSIVE_NODE
    
    // Passive mode requires static node ID
    #define MY_NODE_ID 100
    
    // Enable and select radio type attached
    //#define MY_RADIO_RF24
    //#define MY_RADIO_NRF5_ESB
    //#define MY_RADIO_RFM69
    #define MY_RADIO_RFM95
    
    #define   MY_DEBUG_VERBOSE_RFM95
    #define MY_RFM95_FREQUENCY  (RFM95_868MHZ)
    
    #include <MySensors.h>
    
    #define CHILD_ID 0   // Id of the sensor child
    
    // Initialize general message
    MyMessage msg(CHILD_ID, V_TEMP);
    
    void setup()
    {
    }
    
    void presentation()
    {
    	// Send the sketch version information to the gateway and controller
    	sendSketchInfo("Passive node", "1.0");
    
    	// Register all sensors to gw (they will be created as child devices)
    	present(CHILD_ID, S_TEMP);
    }
    
    void loop()
    {
    	// generate some random data
    	send(msg.set(25.0+random(0,30)/10.0,2));
    	sleep(2000);
    }
    
    YveauxY 1 Reply Last reply
    0
    • Fumée BleueF Fumée Bleue

      Hello,
      I implemented a node with Arduino pro mini 3.3v with a RFM95w module. I used Mysensors PASSIVE node exemple.

      My problem is i have an infinite loop/reboot in my serial log. Do you have an idea why i'm having this issue ?

      __  __       ____
      |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
      | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
      | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
      |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
              |___/                      2.3.2
      
      16 MCO:BGN:INIT NODE,CP=RLNPA---,FQ=8,REL=255,VER=2.3.2
      28 TSM:INIT
      28 TSF:WUR:MS=0
      30 RFM95:INIT
      32 RFM95:INIT:PIN,CS=10,IQP=2,IQN=0
      47 RFM95:PTX:LEVEL=13
      49 TSM:INIT:TSP OK
      51 TSM:INIT:TSP PSM
      53 TSM:INIT:STATID=100
      55 TSF:SID:OK,ID=100
      57 TSM:FPAR
      59 TSM:FPAR:STATP=255
      61 TSM:ID
      61 TSM:ID:OK
      63 TSM:UPL:DISABLED
      65 TSM:READY:ID=100,PAR=255,DIS=1
      69 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
      
      __  __       ____
      |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
      | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
      | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
      |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
              |___/                      2.3.2
      
      16 MCO:BGN:INIT NODE,CP=RLNPA---,FQ=8,REL=255,VER=2.3.2
      28 TSM:INIT
      28 TSF:WUR:MS=0
      30 RFM95:INIT
      32 RFM95:INIT:PIN,CS=10,IQP=2,IQN=0
      47 RFM95:PTX:LEVEL=13
      49 TSM:INIT:TSP OK
      51 TSM:INIT:TSP PSM
      53 TSM:INIT:STATID=100
      55 TSF:SID:OK,ID=100
      57 TSM:FPAR
      59 TSM:FPAR:STATP=255
      61 TSM:ID
      61 TSM:ID:OK
      63 TSM:UPL:DISABLED
      65 TSM:READY:ID=100,PAR=255,DIS=1
      69 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
      
      __  __       ____
      |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
      | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
      | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
      |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
              |___/                      2.3.2
      
      16 MCO:BGN:INIT NODE,CP=RLNPA---,FQ=8,REL=255,VER=2.3.2
      28 TSM:INIT
      28 TSF:WUR:MS=0
      30 RFM95:INIT
      32 RFM95:INIT:PIN,CS=10,IQP=2,IQN=0
      47 RFM95:PTX:LEVEL=13
      49 TSM:INIT:TSP OK
      51 TSM:INIT:TSP PSM
      53 TSM:INIT:STATID=100
      55 TSF:SID:OK,ID=100
      57 TSM:FPAR
      59 TSM:FPAR:STATP=255
      61 TSM:ID
      61 TSM:ID:OK
      63 TSM:UPL:DISABLED
      65 TSM:READY:ID=100,PAR=255,DIS=1
      69 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
      
      /*
       * 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-2019 Sensnology AB
       * Full contributor list: https://github.com/mysensors/MySensors/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 - tekka
       *
       * DESCRIPTION
       * Passive node example: This is a passive & independent reporting node
       *
       */
      
      // Enable debug prints
      #define MY_DEBUG
      
      // Enable passive mode
      #define MY_PASSIVE_NODE
      
      // Passive mode requires static node ID
      #define MY_NODE_ID 100
      
      // Enable and select radio type attached
      //#define MY_RADIO_RF24
      //#define MY_RADIO_NRF5_ESB
      //#define MY_RADIO_RFM69
      #define MY_RADIO_RFM95
      
      #define   MY_DEBUG_VERBOSE_RFM95
      #define MY_RFM95_FREQUENCY  (RFM95_868MHZ)
      
      #include <MySensors.h>
      
      #define CHILD_ID 0   // Id of the sensor child
      
      // Initialize general message
      MyMessage msg(CHILD_ID, V_TEMP);
      
      void setup()
      {
      }
      
      void presentation()
      {
      	// Send the sketch version information to the gateway and controller
      	sendSketchInfo("Passive node", "1.0");
      
      	// Register all sensors to gw (they will be created as child devices)
      	present(CHILD_ID, S_TEMP);
      }
      
      void loop()
      {
      	// generate some random data
      	send(msg.set(25.0+random(0,30)/10.0,2));
      	sleep(2000);
      }
      
      YveauxY Offline
      YveauxY Offline
      Yveaux
      Mod
      wrote on last edited by Yveaux
      #2

      @Fumée-Bleue could very well be a power issue, because as soon as you try to send the node seems to restart. How do you power everything?

      http://yveaux.blogspot.nl

      1 Reply Last reply
      0
      • Fumée BleueF Offline
        Fumée BleueF Offline
        Fumée Bleue
        wrote on last edited by Fumée Bleue
        #3

        @Yveaux. good idea, yes the power supply is a bit special. It's une AC power 6v limited at 130mW. I used a Graetz rectifier and LDO 3,3v regulator. In fact, i have a similar project with NRF24L01 without issue. I think rfm95w consumes more energy than nrf241L01.
        2.png
        For you, what is the best way to solve my problem ? Perhaps a super capacitor ?

        YveauxY 1 Reply Last reply
        0
        • Fumée BleueF Fumée Bleue

          @Yveaux. good idea, yes the power supply is a bit special. It's une AC power 6v limited at 130mW. I used a Graetz rectifier and LDO 3,3v regulator. In fact, i have a similar project with NRF24L01 without issue. I think rfm95w consumes more energy than nrf241L01.
          2.png
          For you, what is the best way to solve my problem ? Perhaps a super capacitor ?

          YveauxY Offline
          YveauxY Offline
          Yveaux
          Mod
          wrote on last edited by
          #4

          @Fumée-Bleue I would start by running your exact same software powered by a different power supply, preferably a lab supply supplying suffient current (look up the power requirements of RFM95 in Tx mode). That way you can rule out software.
          Next, just adding a large capacitor to your current supply might suffice, when you only incidentally send using the RFM95. A super cap can also work, but requires more components/is more expensive. Either do the calculation (always better), or experiment with some caps.

          http://yveaux.blogspot.nl

          Fumée BleueF 1 Reply Last reply
          0
          • YveauxY Yveaux

            @Fumée-Bleue I would start by running your exact same software powered by a different power supply, preferably a lab supply supplying suffient current (look up the power requirements of RFM95 in Tx mode). That way you can rule out software.
            Next, just adding a large capacitor to your current supply might suffice, when you only incidentally send using the RFM95. A super cap can also work, but requires more components/is more expensive. Either do the calculation (always better), or experiment with some caps.

            Fumée BleueF Offline
            Fumée BleueF Offline
            Fumée Bleue
            wrote on last edited by
            #5

            @Yveaux, I tried with an laboratoy power supply with the RMF95w and NRF24L01, and the same code.

            Test with RMF95w :

            • laboratery power supply : OK
            • 130mW power supply : KO

            Test with NRF24L01+ :

            • laboratery power supply : OK
            • 130mW power supply : OK

            The consumption is the same in the two tests : 38mA max, 10mA mean, 4mA min.
            In fact I would like to understand why the arduino restarts, is there a watchdog in the Mysensors library to monitor the supply voltage?

            PS : I also tried with a larger capacitor without success.

            mfalkviddM YveauxY 2 Replies Last reply
            0
            • Fumée BleueF Fumée Bleue

              @Yveaux, I tried with an laboratoy power supply with the RMF95w and NRF24L01, and the same code.

              Test with RMF95w :

              • laboratery power supply : OK
              • 130mW power supply : KO

              Test with NRF24L01+ :

              • laboratery power supply : OK
              • 130mW power supply : OK

              The consumption is the same in the two tests : 38mA max, 10mA mean, 4mA min.
              In fact I would like to understand why the arduino restarts, is there a watchdog in the Mysensors library to monitor the supply voltage?

              PS : I also tried with a larger capacitor without success.

              mfalkviddM Online
              mfalkviddM Online
              mfalkvidd
              Mod
              wrote on last edited by mfalkvidd
              #6

              @Fumée-Bleue there is no watchdag. Giving the components power outside the specifications will result in undefined behavior for that component. Underined can in some cases mean restart. In some cases we've seen continuous radio brodcast (blocking all other nodes). Undefined means anything can happen.

              1 Reply Last reply
              0
              • Fumée BleueF Fumée Bleue

                @Yveaux, I tried with an laboratoy power supply with the RMF95w and NRF24L01, and the same code.

                Test with RMF95w :

                • laboratery power supply : OK
                • 130mW power supply : KO

                Test with NRF24L01+ :

                • laboratery power supply : OK
                • 130mW power supply : OK

                The consumption is the same in the two tests : 38mA max, 10mA mean, 4mA min.
                In fact I would like to understand why the arduino restarts, is there a watchdog in the Mysensors library to monitor the supply voltage?

                PS : I also tried with a larger capacitor without success.

                YveauxY Offline
                YveauxY Offline
                Yveaux
                Mod
                wrote on last edited by
                #7

                @Fumée-Bleue likely the brown-out detector from the atmega detects a low voltage. This mechanism protects the atmega from undefined behavior by resetting it.

                http://yveaux.blogspot.nl

                1 Reply Last reply
                0
                • Fumée BleueF Offline
                  Fumée BleueF Offline
                  Fumée Bleue
                  wrote on last edited by
                  #8

                  thank you for this additional information.

                  Tristan

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


                  35

                  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