Help: Some explanation requested regarding NACK



  • Hello,

    I'm a bit confused.

    I got the following scenarios inside my network.

    First thing I found: NACK:50.6 (aswell as 2 mssg with OK) on my node, but my gateway tells me: "sure, I see it, cool bananas!"

    Node:

    TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=3,st=OK:88
    TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:20.5
    !TSF:MSG:SEND,1-1-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=NACK:50.6
    

    Gateway:

    0;255;3;0;9;TSP:MSG:READ 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:88
    0;255;3;0;9;TSP:MSG:READ 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:20.5
    0;255;3;0;9;TSP:MSG:READ 1-1-0 s=0,c=1,t=1,pt=7,l=5,sg=0:50.6
    

    A minute later I get the following:
    The Node tells me NACK:100 , NACK:50.3 and OK:20.5
    But my gateway now says, well srry buddy, the OK:20.5 didnt arrive.

    So only the OK mssg didnt come through.

    Node:

    !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=1,st=NACK:100
    TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=2,st=OK:20.5
    !TSF:MSG:SEND,1-1-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=NACK:50.3
    

    Gateway:

    0;255;3;0;9;TSP:MSG:READ 1-1-0 s=255,c=3,t=0,pt=1,l=1,sg=0:100
    0;255;3;0;9;TSP:MSG:READ 1-1-0 s=0,c=1,t=1,pt=7,l=5,sg=0:50.3
    

    Both have a RFM69.
    Gateway on ESP8266 -> 2.0.0 (2.1.0/2.1.1 made it reboot)
    node -> ms 2.1.0

    What should be my best guess? The gateway got trouble receiving or the node messes up the sending/receiving part?

    Thnx!


  • Mod

    Did you try to put them just a couple of meters away from each other? Just to exclude any range problem.



  • @gohan said in Help: Some explanation requested regarding NACK:

    d you try to put them just a couple of meters away from each other? Just to exclud

    how much should you advice? atm, its 3 meters.


  • Mod

    1-2 meters is the right distance to exclude range problem. Then also power issues could cause messages to be lost.



  • oke,
    well will look into the lost mssg.
    But my biggest question might be, why the node thinks they are NACK, but my gate tells me their fine?



  • @Omemanti said in Help: Some explanation requested regarding NACK:

    but my

    Could you post part of the code where you send those messages? do you send the node to sleep?


  • Mod

    @Omemanti Because the node can't receive the ack message so it assumes it's lost: could the the gateway didn't receive it or the node itself couldn't receive the ack from gateway. It could me many reasons, so you need to address it one by one until you find it 😀



  • @gohan said in Help: Some explanation requested regarding NACK:

    the node can't receive the ack message so it assumes it's lost: could the the gateway did

    mjah, ofcourse,
    Well I'll build me some more of these, see If the same things happen with some other nodes.

    thnx for the help so far!



  • After some time off I made more nodes. but somehow they all give me NACK's. (also changed the gateway, antennas and added more caps.)

    The strange thing still is that even if I get NACK's the gateway seems the handle them..

    Should I just accept this? Or am I missing something?

    MYSController :

    291	27/07/2017 22:46:03	RX	15 - Zolder	0 - S_HUM	C_SET	NO	V_HUM	49.1
    292	27/07/2017 22:46:09	RX	15 - Zolder	1 - S_TEMP	C_SET	NO	V_TEMP	25.5
    293	27/07/2017 22:46:09	RX	15 - Zolder	0 - S_HUM	C_SET	NO	V_HUM	49.2
    294	27/07/2017 22:46:16	RX	15 - Zolder	1 - S_TEMP	C_SET	NO	V_TEMP	25.5
    295	27/07/2017 22:46:16	RX	15 - Zolder	0 - S_HUM	C_SET	NO	V_HUM	49.2
    296	27/07/2017 22:46:23	RX	15 - Zolder	1 - S_TEMP	C_SET	NO	V_TEMP	25.5
    297	27/07/2017 22:46:23	RX	15 - Zolder	0 - S_HUM	C_SET	NO	V_HUM	49.2
    

    Serial Monitor

    227573 !TSF:MSG:SEND,15-15-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=5,st=NACK:49.1
    227655 !TSM:READY:UPL FAIL,STATP
    227885 MCO:SLP:MS=5000,SMS=0,I1=255,M1=255,I2=255,M2=255
    227950 MCO:SLP:TPD
    227966 MCO:SLP:WUP=-1
    227999
    Loop
    228524 !TSF:MSG:SEND,15-15-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=NACK:25.5
    228982 !TSF:MSG:SEND,15-15-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=1,st=NACK:49.2
    229294 MCO:SLP:MS=5000,SMS=0,I1=255,M1=255,I2=255,M2=255
    229359 MCO:SLP:TPD
    229376 MCO:SLP:WUP=-1
    229408
    Loop
    229933 !TSF:MSG:SEND,15-15-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=2,st=NACK:25.5
    230391 !TSF:MSG:SEND,15-15-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=3,st=NACK:49.2
    230703 MCO:SLP:MS=5000,SMS=0,I1=255,M1=255,I2=255,M2=255
    230768 MCO:SLP:TPD
    230785 MCO:SLP:WUP=-1
    230817
    Loop
    231342 !TSF:MSG:SEND,15-15-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=4,st=NACK:25.5
    231800 !TSF:MSG:SEND,15-15-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=5,st=NACK:49.2
    231882 !TSM:READY:UPL FAIL,STATP
    232112 MCO:SLP:MS=5000,SMS=0,I1=255,M1=255,I2=255,M2=255
    232177 MCO:SLP:TPD
    

    I should add that booting up takes a couple of tries, but after a minute of the folling it pulls through and starts the previous shenanigans.

    32 TSM:INIT
    49 TSF:WUR:MS=0
    81 TSM:INIT:TSP OK
    98 TSM:INIT:STATID=15
    131 TSF:SID:OK,ID=15
    147 TSM:FPAR
    163 TSM:FPAR:STATP=0
    196 TSM:ID
    212 TSM:ID:OK
    229 TSM:UPL
    393 !TSF:MSG:SEND,15-15-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1
    2490 TSM:UPL
    2654 !TSF:MSG:SEND,15-15-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=1,st=NACK:1
    4751 TSM:UPL
    4915 !TSF:MSG:SEND,15-15-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=2,st=NACK:1
    7012 TSM:UPL
    7176 !TSF:MSG:SEND,15-15-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=3,st=NACK:1
    9273 !TSM:UPL:FAIL
    9289 TSM:FPAR
    9306 TSM:FPAR:STATP=0
    9338 TSM:ID
    9338 TSM:ID:OK
    9371 TSM:UPL
    
    
    64274 TSM:ID
    64290 TSM:ID:OK
    64307 TSM:UPL
    64487 !TSF:MSG:SEND,15-15-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=12,st=NACK:1
    66584 TSM:UPL
    66748 !TSF:MSG:SEND,15-15-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=13,st=NACK:1
    66846 TSF:MSG:READ,0-0-15,s=255,c=3,t=25,pt=1,l=1,sg=0:1
    66912 TSF:MSG:PONG RECV,HP=1
    66945 TSM:UPL:OK
    66961 TSM:READY:ID=15,PAR=0,DIS=1
    67158 !TSF:MSG:SEND,15-15-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=NACK:0100
    69402 !TSF:MSG:SEND,15-15-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=1,st=NACK:2.1.1
    69648 !TSF:MSG:SEND,15-15-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=2,st=NACK:0
    69746 TSF:MSG:READ,0-0-15,s=255,c=3,t=6,pt=0,l=1,sg=0:M
    70172 !TSF:MSG:SEND,15-15-0-0,s=255,c=3,t=11,pt=0,l=6,sg=0,ft=3,st=NACK:Zolder
    70418 !TSF:MSG:SEND,15-15-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=4,st=NACK:1.0
    70860 !TSF:MSG:SEND,15-15-0-0,s=0,c=0,t=7,pt=0,l=0,sg=0,ft=5,st=NACK:
    70942 !TSM:READY:UPL FAIL,STATP
    71286 !TSF:MSG:SEND,15-15-0-0,s=1,c=0,t=6,pt=0,l=0,sg=0,ft=0,st=NACK:
    71712 !TSF:MSG:SEND,15-15-0-0,s=2,c=0,t=4,pt=0,l=0,sg=0,ft=1,st=NACK:
    71811 MCO:REG:REQ
    71974 !TSF:MSG:SEND,15-15-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=2,st=NACK:2
    74219 !TSF:MSG:SEND,15-15-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=3,st=NACK:2
    76464 !TSF:MSG:SEND,15-15-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=4,st=NACK:2
    78708 !TSF:MSG:SEND,15-15-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=5,st=NACK:2
    78790 !TSM:READY:UPL FAIL,STATP
    80805 MCO:BGN:STP
    Si7021 Found
    Setup compleet
    80969 MCO:BGN:INIT OK,TSP=1
    
    
    

  • Mod

    it seems as the node can't receive correctly or the gw is not sending correctly. How far are they? If you put them a couple of meters apart do you see any change?



  • @gohan said in Help: Some explanation requested regarding NACK:

    f meters apart do you see any change?

    The node gateway is in the room below me (wooden floors) about 2 to 3 meters from my node.



  • Funny Part still is, that once the connection is made, everything also if produced with a NACK is received by the controller. thats what im curious about. If I get errors, why does the controllers receive them without bottering.


  • Mod

    As I said, the GW is receiving the packet correctly but then the node doesn't get a good response so it throws a NACK. You could try and put them in same room and see if gets better or change channel just to avoid a possible interference



  • How can I change the channel? Can you point me in the right direction.?


  • Mod

    Go in myconfig.h and search for "channel", you should find it in the nrf24 section, change the default channel there and recompile all your nodes and gateway



  • Stupid question.. because I use the rfm69. Will the also comply?


  • Mod

    Of course not. What version of rfm69 and frequency are you using? Are you sure you got the antenna of the right size?



  • Rfm69w 868mhz , springcoil antenna from ebay.
    will test a long single wire right away.



  • Springcoil on the gw, straight line on the node, still the same



  • Thnx for the help so far, Ill let it rest for a while, Im thinking of rebuilding the whole thing..



  • @Omemanti
    Where you able to solve this? I am also experiencing a lot of NACKs in my rfm69 network (868mhz)



  • @kiesel said in Help: Some explanation requested regarding NACK:

    e you able to solve this? I am also experiencing a lot of NACKs in my rfm69 network (868mhz)

    Nope, not that I can remember.
    BTW: I ditched the rfm69 and moved over to the NRF52.



  • @Omemanti
    I had exactly the same issue with Rfm69 and latest version of mysensors. The only solution I found is to use the 2.2.0 version. With this everything works perfectly.

    I don't know why with latest releases the messages are NACK even if they actually reach the gateway.



  • @ricmail85 I solved my problem by soldering a cable to the reset pin of the chip and the (in my case) raspberry pi. This or the dupont wires I used were glitchy 😄



  • @kiesel thanks for reporting! I've also a Raspberry gateway but I left the Rfm69 reset pin unconnected. How did you connect it?



  • @ricmail85 sorry for the late reply. I soldered it to a free pin on the pi and reconfigured the gateway.

    Use this as part of your configure

    --extra-cxxflags="-DMY_RFM69_RST_PIN=29"
    

    If you connected to pi pin 29.


Log in to reply
 

Suggested Topics

  • 3
  • 1
  • 2
  • 24
  • 4
  • 10

27
Online

11.2k
Users

11.1k
Topics

112.5k
Posts