Node can't reconnect after reset



  • So,

    I have an NRF24L01 (the one with the PA and SMA antenna) gateway. After much frustration, I got it working with a pool temp sensor works fine, no issue at all.

    Now I want to add a simple node with an LED out, this is on a pro micro running on 3.3v at 8MHz.
    I tried a lot of things and I could not add it to the network, then I amongst a lot of troubleshooting I wiped the EEPROM.
    After re-flashing the original sketch, the sensor presented itself and I could communicate with it, success. Except that if I power it down (or reset it) it doesn't reconnect (fails to find a parent, gateway receive the request and send a response tho).

    The thing is that I have no clue where this is coming from, the node can clearly communicate after an EEPROM wipe (I can send a V_STATUS message, and it turns on/off the LED with no issues ) , so in my view it's ruling out power and range issues

    I've also tried to set a static node id and parent node id with

    #define MY_PARENT_NODE_ID 0
    #define MY_NODE_ID 5
    

    These have no effect, like absolutely none the node stills searches for a parent (the node id itself seems to work tho)

    I'm at a complete lost so if you want to dive in here are my logs:
    Gateway: https://hastebin.com/ehimahunum.txt
    Node: https://hastebin.com/kiguyojuxi.txt
    Node with RF24 verbose: https://hastebin.com/isiliyuzow.txt
    Thanks in advance for you help



  • @TheStaticTurtle, did you try this several times? Wiping out the EEPROM and reflashing the sketch?
    Did the node connects correctly each time after this wiping cycle?

    If yes, I would suspect the pro mini to have a problem with his EEPROM...
    Do you have a spare pro mini? Try with another pro mini.
    If not, you can post your sketch here so we can look at it. Try also to minimize the sketch content to debug this problem.

    Your logs are indicating that the pro mini is sending a parent request, the gateways responds to it, but the node doesn't see the gateway response...



  • Yes, I tried it several times, unfortunately I don't have another Arduino to test. But it seems to be a power issue after all, when running on a different PSU with more current and more stability it works just fine.

    It's very weird that it consistently did that tho, you might be right and something is wrong with the EEPROM.

    Thanks for the help anyway



  • I am using the TMRh20 libraries (not the MySensors library) and have the same problem. I'm pretty sure that there are interrupts that are not being reset. One of my other symptoms is that when I try to load or reload a program, the program doesn't start.

    I have a program program that I run that works most of the time and gets me to the point of being able to reprogram the Arduino
    //cli(); // disable all interrupts
    WDTCSR = B00011000; // set watchdog timer into configuration mode
    WDTCSR = 0; // turn off watchdog time interrupt.
    //sei(); // allow interupts

    I use this technique to load the program:

    1. write program
    2. use Tool-->port and set the port
    3. on the device, press and hold reset button
    4. <ctl>+u or click on upload icon
    5. when compiling gas gauge is almost complete, release the reset button.

    You may have to do 3)-5) several times. You could put:
    Serial.begin(9600);
    Serial.println("WDT reset");
    at the end of the program to know that the device got reset.

    I hope this helps you. I, too, would like something a little more controllable.

    OSD


Log in to reply
 

Suggested Topics

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts