ESP8266 MQTT gateway radio problem


  • Hero Member

    Hello,
    I created an MQTT gateway a few days ago and a node to check communication.
    I'm on 2.1.1 and everything seems to work fine most of the time.

    But sometimes, when powering up the node, I get lots of fail massages.

    The gateway receives messages from the node, but for some reason the don't understand each other.

    Here is the log from the node:

    0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.1
    3 TSM:INIT
    4 TSF:WUR:MS=0
    11 TSM:INIT:TSP OK
    12 TSM:INIT:STATID=50
    15 TSF:SID:OK,ID=50
    16 TSM:FPAR
    53 TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    2060 !TSM:FPAR:NO REPLY
    2062 TSM:FPAR
    2098 TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    4106 !TSM:FPAR:NO REPLY
    4108 TSM:FPAR
    4144 TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    6152 !TSM:FPAR:NO REPLY
    6154 TSM:FPAR
    6190 TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    8198 !TSM:FPAR:FAIL
    8199 TSM:FAIL:CNT=1
    8201 TSM:FAIL:PDT
    18204 TSM:FAIL:RE-INIT
    18206 TSM:INIT
    18213 TSM:INIT:TSP OK
    18215 TSM:INIT:STATID=50
    18217 TSF:SID:OK,ID=50
    18220 TSM:FPAR
    18256 TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    20264 !TSM:FPAR:NO REPLY
    20267 TSM:FPAR
    20303 TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    22311 !TSM:FPAR:NO REPLY
    22313 TSM:FPAR
    22350 TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    24357 !TSM:FPAR:NO REPLY
    24359 TSM:FPAR
    24396 TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    26403 !TSM:FPAR:FAIL
    26404 TSM:FAIL:CNT=2
    26406 TSM:FAIL:PDT
    

    And here is the log from the gateway:

    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGE--,VER=2.1.1
    0;255;3;0;9;TSF:LRT:OK
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    scandone
    state: 0 -> 2 (b0)
    state: 2 -> 3 (0)
    state: 3 -> 5 (10)
    add 0
    aid 2
    cnt 
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;MCO:REG:NOT NEEDED
    f r0, scandone
    ..
    connected with setol, channel 6
    ip:192.168.1.135,mask:255.255.255.0,gw:192.168.1.1
    .IP: 192.168.1.135
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    IP: 192.168.1.135
    0;255;3;0;9;Attempting MQTT connection...
    0;255;3;0;9;MQTT connected
    0;255;3;0;9;Sending message on topic: mygateway1-out/0/255/0/0/18
    0;255;3;0;9;Message arrived on topic: mygateway1-in/50/1/1/0/19
    0;255;3;0;9;!TSF:MSG:SEND,0-0-50-50,s=1,c=1,t=19,pt=0,l=1,sg=0,ft=0,st=NACK:0
    pm open,type:2 0
    0;255;3;0;9;TSF:MSG:READ,50-50-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:BC
    0;255;3;0;9;TSF:MSG:FPAR REQ,ID=50
    0;255;3;0;9;TSF:PNG:SEND,TO=0
    0;255;3;0;9;TSF:CKU:OK
    0;255;3;0;9;TSF:MSG:GWL OK
    0;255;3;0;9;!TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    0;255;3;0;9;TSF:MSG:READ,50-50-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:BC
    0;255;3;0;9;TSF:MSG:FPAR REQ,ID=50
    0;255;3;0;9;TSF:CKU:OK,FCTRL
    0;255;3;0;9;TSF:MSG:GWL OK
    0;255;3;0;9;!TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    0;255;3;0;9;TSF:MSG:READ,50-50-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:BC
    0;255;3;0;9;TSF:MSG:FPAR REQ,ID=50
    0;255;3;0;9;TSF:CKU:OK,FCTRL
    0;255;3;0;9;TSF:MSG:GWL OK
    0;255;3;0;9;!TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    0;255;3;0;9;TSF:MSG:READ,50-50-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:BC
    0;255;3;0;9;TSF:MSG:FPAR REQ,ID=50
    0;255;3;0;9;TSF:CKU:OK,FCTRL
    0;255;3;0;9;TSF:MSG:GWL OK
    0;255;3;0;9;!TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    0;255;3;0;9;TSF:MSG:READ,50-50-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:BC
    0;255;3;0;9;TSF:MSG:FPAR REQ,ID=50
    0;255;3;0;9;TSF:PNG:SEND,TO=0
    0;255;3;0;9;TSF:CKU:OK
    0;255;3;0;9;TSF:MSG:GWL OK
    0;255;3;0;9;!TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    0;255;3;0;9;TSF:MSG:READ,50-50-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    

    I tried the log parser but I don't see where is the problem.

    I'd appreciate any help.
    Thanks in advance


  • Mod

    Try a bigger capacitor on the gateway radio or try to move the node closer to the gateway to see if you see any change


  • Hero Member

    Tried all sorts of things.
    Also tried the module with antenna and the one without..
    The problem is random.

    When it happens, I see the node sending data, and I see the gateway receiving it realtime, but the do not connect.
    That's what I don't understand.


  • Mod

    if you swap radio modules, do you still have the exact same problem?


  • Hero Member

    yes.. more or less the same


  • Mod

    I had similar problem with rfm69 radios. I am waiting for other modules to arrive


  • Hero Member

    Thank you.
    I'll keep trying some other things..


  • Hardware Contributor

    Hello, it looks like a "classic" radio link quality problem.
    What antenna version of the radio module did you try ? Did you use it with RF24_PA_MAX define to have maximum power ? And in that case did it have a sufficient power supply ?

    I just tried a PA LNA module from CDEByte with an external antenna and even in the worst locations at the two ends of my appartment it's not losing any packet, while before I sometimes had lost packets and sensors not reporting for some time. I also had poor results with the "classic" version of the PA LNA module with antenna. So my suggestion is to try with a better pa lna module on your gateway. For example this one: https://www.aliexpress.com/store/product/E01-ML01DP5-Ebyte-2-4GHz-20dBm-2100m-nRF24L01-SPI-Wireless-transceiver-module/2077046_32638720689.html


  • Hero Member

    Thank you.
    I'll make some tests if I can find one


Log in to reply
 

377
Online

6.9k
Users

7.8k
Topics

82.9k
Posts

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.