[Solved] Nodes having trouble reconnecting to gateway



  • If I restart my gateway (tested with serial and ethernet gateways) some nodes connect straight away, but others can take minutes or hours to connect.
    I am thinking this is the root of all my connection issues.
    NRF24 modules of various types tried.
    One day certain nodes will be problematic, another day other nodes. I have them all very near to the gateway.
    I use breakout boards for the NRFs on the gateways without any extra capacitors/ Could that be it?
    I cant get the log parser to work in any browser so not sure how to decode.
    The node produces the following debug when it cannot connect:

    4130 TSM:ID
    4132 TSM:ID:OK
    4134 TSM:UPL
    4171 !TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1
    6180 TSM:UPL
    6217 !TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=1,st=NACK:1
    8224 TSM:UPL
    8261 !TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=2,st=NACK:1
    10268 TSM:UPL
    10305 !TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=3,st=NACK:1
    12314 !TSM:UPL:FAIL```


  • @grumpazoid said in Nodes having trouble reconnecting to gateway:

    4171 !TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1

    This is the result from the log parser (from Chrome/Windows10):

    Sent Message
    Sender: 2
    Last Node: 2
    Next Node: 0
    Destination: 0
    Sensor Id: 255
    Command: INTERNAL
    Message Type:I_PING
    Payload Type: P_BYTE
    Payload Length: 1
    Signing: 0
    Failed uplink counter: 0
    Status: NACK (OK=success, NACK=no radio ACK received)
    Payload: 1

    The NACK can be caused by the missing capacitor. But you should also see those after it has connected.



  • @grumpazoid: I had recently the same issue with a 2560 node and a Nano gateway. I fixed it putting a delayMicroseconds(1500) at (very) top of RF24stopListening function.

    LOCAL void RF24_stopListening(void)
    {
    	// The following delay will allow this node to send an ACK to the last received message
    	//	Value should be at least equal to ACR (1500 ms for 250 Kb/s transmission with 15 retries
    	delayMicroseconds(1500);			//// *** FF_CHANGE *** //// 
    	RF24_DEBUG(PSTR("RF24:SPL\n"));	// stop listening
    	RF24_ce(LOW);
    	// timing
    	delayMicroseconds(130);
    	RF24_setRFConfiguration(RF24_CONFIGURATION | _BV(RF24_PWR_UP) );
    	// timing
    	delayMicroseconds(100);
    }
    

    Don't know if your trouble is the same as mine, but hope this helps!



  • @electrik Thanks for this.
    I am on Windows 7. I will try another PC. EDIT HAve tried another windows 7 machine No output on IE Firefox Chrome or Opera?
    As far as i know the breakout boards I am using have capacitors included on the. So I just apply a good 5V and plug in a radio.

    @FlyingDomotic Thanks. So would I put that code at the top of the sketch for both node and gateway? Before the loop?


  • Mod

    @grumpazoid Strange. The log parser works for me in Chrome, IE, FF on Win7 and Safari on ios.

    Could you check if the browser console says anything about why it doesn't work? (F12 in chrome and FF)

    0_1552736186806_10faf41e-c731-48ed-8925-4fb6f2ea8c2d-image.png



  • @flyingdomotic Ok So I have modified \Arduino\libraries\MySensors\hal\transport\RF24\driver\RF24.cpp and reuploaded my sketches to the gateway and a couple of nodes.

    Unfortunately one of those nodes is still reluctant to connect. You can see the tx LED coming on for a long time while it tries.

    There must be something in the underlying code not quite right?



  • @mfalkvidd Thanks for that.

    F11 showed that the page was failing to resolve cdnjs.cloudflare.com
    I run a pihole so just needed to add to my whitelist.

    Fixed. Thanks.

    Now back to the node/gateway communication problem!



  • The parser says that no radio ACK has been received when the node tries to ping the gateway.
    I have today built a replacement radio breakout board from scratch. The problem is still the same.
    Some nodes connect, some randomly do not.
    I have replaced every piece of gateway hardware, so this my be something within the Mysensors code.
    Any suggestions please?


  • Mod

    @grumpazoid what hardware are you running your gateways and sensors on? Please provide a thorough description.



  • @yveaux I have a serial gateway built on Arduino Uno connected to Pi. This is now just spare as I have W5100 / arduino nano ethernet gateway. Nodes are mostly 3.3V pro minis. One is 5V nano. All arduinos are clones.
    Radios on nodes are NRF24L01+. On gateways I can use NRF24L01+ or amplified version (doesn't make a difference to this behaviour).

    As an example I switched off the gateway 2 hours ago. 2 nodes are came in straight away, the other 3 have no communication. Chances are the same 2 will connect again if I power cycle the gateway but the nodes that work straight away changes randomly. It seems like the gateway does not want to acknowledge certain nodes.

    Behaviour is the same if I revert to stock motion sketch.


  • Mod

    @grumpazoid are you saying you have two gateways using the same frequency (the serial gw and the ethernet gw) running? If that't the case, the problems have a simple solution - turn off one of the gateways.



  • @mfalkvidd No I only use one at any time.
    I started with serial and then built the ethernet gateway. To eliminate the ethernet gateway hardware I just reverted back to serial to test.



  • @flyingdomotic thank you. I also had some problems with some nodes which worked very nice on 2.1.1. When I worked on some of the nodes and updated to 2.3.1 I noticed, that communication wasn't so great anymore.
    On first glance this fix works on my plant sensor node. Hope it stays that way now.

    Some people are saying with debug on it works and without it, it doesn't maybe the Debug line before the ce(low) does the same thing as your delay.



  • I think I have fixed the issue. I changed to the cap on the ethernet gateway from 47uF to 1uF. I have power cycled the gateway 4 times now and all the nodes came in. Looks like less is more! For whatever reason the breakout boards obviously don't work well for me.
    I will keep testing for a few days.




Log in to reply
 

Suggested Topics

  • 3
  • 5
  • 1
  • 2
  • 1

49
Online

11.4k
Users

11.1k
Topics

112.7k
Posts