Gateway ESP8266



  • Hello !

    I have a small problem with a new gateway in ESP8266 over wifi.

    My gateway won't connect to the nodes :
    Node code:

    16 MCO:BGN:INIT NODE,CP=RNNNA---,FQ=16,REL=255,VER=2.3.2
    26 TSM:INIT
    28 TSF:WUR:MS=0
    34 TSM:INIT:TSP OK
    36 TSF:SID:OK,ID=2
    37 TSM:FPAR
    41 ?TSF:MSG:SEND,2-2-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    2050 !TSM:FPAR:NO REPLY
    2052 TSM:FPAR
    2056 ?TSF:MSG:SEND,2-2-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    4063 !TSM:FPAR:NO REPLY
    4065 TSM:FPAR
    4069 ?TSF:MSG:SEND,2-2-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    6076 !TSM:FPAR:NO REPLY
    6078 TSM:FPAR
    6082 ?TSF:MSG:SEND,2-2-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    8089 !TSM:FPAR:FAIL
    8090 TSM:FAIL:CNT=1
    8092 TSM:FAIL:DIS
    8094 TSF:TDI:TSL
    

    Gateway code :

    134 TSF:LRT:OK
    150 TSM:INIT
    164 TSF:WUR:MS=0
    187 TSM:INIT:TSP OK
    410 TSM:INIT:GW MODE
    432 TSM:READY:ID=0,PAR=0,DIS=0
    464 MCO:REG:NOT NEEDED
    ip:192.168.1.100,mask:255.255.255.0,gw:192.168.1.1
    1576 GWT:TIN:CONNECTING...
    2604 GWT:TIN:CONNECTING...
    scandone
    3633 GWT:TIN:CONNECTING...
    3661 GWT:TIN:IP: 192.168.1.100
    3694 MCO:BGN:STP
    3712 MCO:BGN:INIT OK,TSP=1
    3740 TSM:READY:NWD REQ
    3767 ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
    T: 20.10
    H: 55.50
    6118 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
    6197 !MCO:SLP:REP
    pm open,type:2 0
    

    The weird part is that both transports are well initialized.
    Have you had troubles with ESP8266 and NRF24L01 ?

    Thanks



  • @ryolaxe

    I've added the gateway part when adding a node :

    44945 TSF:MSG:FPAR REQ,ID=2
    44974 TSF:PNG:SEND,TO=0
    44999 TSF:CKU:OK
    45017 TSF:MSG:GWL OK
    46082 !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    46881 TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    46940 TSF:MSG:BC
    46957 TSF:MSG:FPAR REQ,ID=2
    46987 TSF:CKU:OK,FCTRL
    47011 TSF:MSG:GWL OK
    48022 !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    50905 TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    50963 TSF:MSG:BC
    50981 TSF:MSG:FPAR REQ,ID=2
    51010 TSF:CKU:OK,FCTRL
    51034 TSF:MSG:GWL OK
    51972 !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    54361 GWT:RFC:C=0,MSG=0;255;3;0;2;
    62928 TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    62986 TSF:MSG:BC
    63004 TSF:MSG:FPAR REQ,ID=2
    63033 TSF:PNG:SEND,TO=0
    63058 TSF:CKU:OK
    63076 TSF:MSG:GWL OK
    63768 !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    64495 GWT:RFC:C=0,MSG=0;255;3;0;2;
    64940 TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    64999 TSF:MSG:BC
    65017 TSF:MSG:FPAR REQ,ID=2
    65046 TSF:CKU:OK,FCTRL
    65070 TSF:MSG:GWL OK
    65708 !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    66953 TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    67012 TSF:MSG:BC
    67030 TSF:MSG:FPAR REQ,ID=2
    67059 TSF:CKU:OK,FCTRL
    67083 TSF:MSG:GWL OK
    67686 !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    

  • Mod

    @ryolaxe this indicates that the gateway is trying to sleep

    6118 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
    6197 !MCO:SLP:REP

    A sleeping gateway will not work. Remove the sleep and try again.



  • @mfalkvidd

    Indeed I've added a

        #ifdef MY_DEBUG
        Serial.print("T: ");
        Serial.println(t);
        Serial.print("H: ");
        Serial.println(h);
        #endif
    
    
      // Sleep for a while to save energy
      sleep(5*60000);
    

    because I have a DHT22 attached. What would be the interval then ?

    Thanks!


  • Mod

    @ryolaxe change

    sleep(5*60000)
    

    to

    wait(5*60000)
    


  • @mfalkvidd Thanks, it stopped the sleeping error.

    Now I receive

    172651 TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    172711 TSF:MSG:BC
    172730 TSF:MSG:FPAR REQ,ID=2
    172760 TSF:PNG:SEND,TO=0
    172786 TSF:CKU:OK
    172805 TSF:MSG:GWL OK
    173660 !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    174664 TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    174723 TSF:MSG:BC
    174742 TSF:MSG:FPAR REQ,ID=2
    174772 TSF:CKU:OK,FCTRL
    174797 TSF:MSG:GWL OK
    175596 !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    175672 GWT:RFC:C=0,MSG=0;255;3;0;2;
    176676 TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    176735 TSF:MSG:BC
    176754 TSF:MSG:FPAR REQ,ID=2
    176784 TSF:CKU:OK,FCTRL
    176809 TSF:MSG:GWL OK
    177572 !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    178687 TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    178747 TSF:MSG:BC
    178766 TSF:MSG:FPAR REQ,ID=2
    178796 TSF:CKU:OK,FCTRL
    178821 TSF:MSG:GWL OK
    179548 !TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    185317 GWT:RFC:C=0,MSG=0;255;3;0;2;
    

    but the node is still not recognized although it seems to ping now...

    NB : same log from the nod with the

    41 ?TSF:MSG:SEND,2-2-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    2050 !TSM:FPAR:NO REPLY
    2052 TSM:FPAR
    2056 ?TSF:MSG:SEND,2-2-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    4063 !TSM:FPAR:NO REPLY
    4065 TSM:FPAR
    

  • Mod

    @ryolaxe this indicates that the gateway sends a response to the node, but the gateway does not receive an acknowledgement from the next hop

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

    This indicates that the node does not receive the message from the gateway:

    4063 !TSM:FPAR:NO REPLY

    The most common problem (by a very large majority) is insufficiently stable power supply to the nrf24. What capacitors are you using and how are they soldered to the gateway and the node? If you haven't already, see https://forum.mysensors.org/topic/666/debug-faq-and-how-ask-for-help/ for the most common problems and how to efficiently troubleshoot them.



  • @mfalkvidd

    Thanks, I had not seen this page.

    Added a 10uF to the gateway and 4.7 uF to the node and everything works now !


  • Mod

    Nice work @ryolaxe thanks for reporting back.


Log in to reply
 

Suggested Topics

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts