Found my cause of gateway <-> RF24 connection issues (sign fail / NACK issues)



  • Hi,

    Just connecting to report something I found yesterday. I did not find this in the troubleshooting guide here :
    https://forum.mysensors.org/topic/666/read-this-first-it-could-save-you-a-lot-of-time

    My issue was the following :

    • everything working correctly on my desk
    • but getting lots of "holes" in received data from my temp sensor if I placed it in my garage about 5 meters away from the Raspberry RF24 gateway.
    • After plugging my nano+rf24 on a laptop to see the serial output, I saw tons of "SIGN FAIL" and "NACK" issues.

    Typical errors were like this :

    !TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=NACK:
    !SGN:SGN:NCE REQ,TO=1 FAIL
    !TSF:MSG:SIGN FAIL
    

    At first, I thought this was because I placed the sensor in with my DSL box, in a small 10' rack enclosure : this is is a metal box, I thought this could act as a Faraday bog cage... but no. Since I fixed the issue, the sensor is back there.

    The real cause was the wifi (mine ?) : my GW is placed next to a tp-link wifi access point, which was configured for choosing the best channel...
    So what must have happened is that when some neighboors started to heavily use their 2.4GHz wifi (spanning over channels 7 THROUGH 13 and probably even 14), I started getting holes. Either because of the neigbour, or because my AP was switching to a channel interfering with the mysensor RF24 configured channel.

    Surprisingly, setting mysensors RF24 channel to 100, or even 123... did not help at all even if as I understand it, these should be outside of the wifi channels used in France (??)

    How I fixed this :

    • used a "wifi analyser app" to choose wisely
    • configured my AP to use a fixed 2.4GHz channel (I'm trying to only use 5GHz anyways)(I chose wifi channel 4)
    • configured mysensors to use RF24 channel #1 (#define MY_RF24_CHANNEL 1)

    Since then, I got absolutely no hole in my data !

    Last thought : how is it possible that a consumer wifi AP (my neighbor's "FREEwifi" DSL box) is spanning over more than half the 2.4GHz spectrum ? isn't that extremely selfish ??


  • Mod

    @Frederic-Schaer said in Found my cause of gateway <-> RF24 connection issues (sign fail / NACK issues):

    Surprisingly, setting mysensors RF24 channel to 100, or even 123... did not help at all even if as I understand it, these should be outside of the wifi channels used in France (??)

    I found in the past that channels 100 and above are hardly usable with most nrf24 modules. Might be caused by bad antenna tuning, or fake chips, I'm not sure...

    Last thought : how is it possible that a consumer wifi AP (my neighbor's "FREEwifi" DSL box) is spanning over more than half the 2.4GHz spectrum ? isn't that extremely selfish ??

    Yes, it seems to depend a lot on the hardware. I'm using ubiquity access points only nowadays which are very narrowbanded. Neighbouring access points delivered by internet hosters transmit a much broader spectrum. Worst of all seems to be my kids' Nintendo switch console which distorts the complete 2.4 wifi spectrum...

    Here you see the output of a channel scanner I'm currently working on, over the course of some 5 days:

    b91330dc-4350-4024-be3b-8192fee96c61-image.png
    The vertical axis is nRF24 channels.
    My AP close to the scanner occupies channels 55..68, while e.g. there's also the much broader signal at channels 23..50.
    From channel 85 and above it's relatively quiet.


Log in to reply
 

Suggested Topics

  • 10
  • 2
  • 6
  • 3
  • 6
  • 6

194
Online

9.7k
Users

10.3k
Topics

106.5k
Posts