Infinite loop



  • 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);
    }
    

  • Mod

    @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?



  • @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 ?


  • Mod

    @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.


Log in to reply
 

Suggested Topics

  • 23
  • 7
  • 11
  • 9
  • 14
  • 2
  • 5
  • 9

147
Online

9.8k
Users

10.3k
Topics

106.7k
Posts