Poor RSSI on RFM69 with RaspberryPi SPI



  • I have a Raspberry pi 3 with a RFM69HW connected directly to GPIO pins as MySensors gateway. 868Mhz.
    For months the gateway was placed behind the TV with an antenna dangling 30 cm below the TV. With this setup the average RSSI value for messages form nodes was around -100. Mounting the antenna just behind the TV stopped all communications so I attributed the low RSSI to TV's proximity.
    Recently I prepared a new location for the gateway and moved the Pi. RSSI value improved considerably and was very stable at around -80 for most nodes in the house, some higher than this.
    A day after the move, I had to reboot the Pi and the RSSI value dropped back to an average of -100. No hardware change.
    I tried multiple reboots and got some inconsistent results as seen in the first image.
    I made a new HAT with a brand new radio with a bigger ground plane. Same results.
    This node is a floor up with a reinforced concrete slab in between, opposite sides of the house.
    RSSI1.png
    This is a relay node 2 m from the GW. It is rarely actuated (very low message rate) and usually only responds to discovery messages. After the GW move the tx power was very high and ATC adjusted it from -40 to -60.
    RSSI3.png

    I made a signal strength node. It goes to full power because RSSI is so low. If I set the lowest power, signal strength does not drop and all messages are received OK. The RSSI value for messages from GW have an RSSI of -60. If I take the signal strength node closer to the GW (a meter away), still no change. only node's RxRSSI increases.

    I've been trying to understand this for days. The problem is that all nodes max out on power because of this value.

    Another test I did:
    I made 1 node and 1 gw based on Lowpowerlab's library (LPL) (atmega328 + rfm69hw + Ft232), connected the LPL_GW to the Pi and measured the received signal strength. -60 when LPL signal strength node is on a different floor, and increases to -30 when moved in the same location.
    I will try to use this hw for a usb connected mys gateway, but other than this I am out of ideas.



  • With serial gateway attached to the Pi, RSSI varies based on distance, the right way. The node very close has a -45 value, and the rest from -65 to -80.



  • It's a known bug (or feature) of the Rspberry Gateway + RFM69. RSSI values are wrong, so you cannot use ATC
    What I do, is i use

    #define MY_RFM69_ATC_MODE_DISABLED
    #define MY_RFM69_TX_POWER_DBM 0
    

    and set the TX_POWER_DBM to the lowest value I can, by trial & error...



  • @kted, thank you for your answer, is this documented somewhere? I searched a lot but only found partial info about rssi problems.

    I was trying to use a Python library and found a note about RFM69 H version that it should not be powered from the 3.3V pin. This should only matter for transmitting not for receiving, and without anything else connected to the Pi the 3.3V power pin should be able to provide a few hundred mA of current.
    I changed the board and powered it from 5V with a dedicated 3.3V regulator and RSSI increased a bit. 😕
    RSSI2.png
    at around 10 pm I implemented the mod. But it is nowhere near what I got a few days ago when it worked only from 3.3V.

    https://rpi-rfm69.readthedocs.io/en/latest/hookup.html
    This pin can only support low power mode. Use different supply if you want to use the RFM69HCW in high power mode.



  • @alexelite said in RSSI value variations on RPi 3 Gateway with RFM69:

    I was trying to use a Python library and found a note about RFM69 H version that it should not be powered from the 3.3V pin. This should only matter for transmitting not for receiving,

    Finding a warning in the library and then ignoring it is asking for trouble - that note is there for a reason! - What makes you think it only has an effect on Tx and not Rx? It ay well be due to noise on the 3.3V power pin.
    Have you any capacitors on the 3.3V near or on the rfm? It might have a positive effect.

    I changed the board and powered it from 5V with a dedicated 3.3V regulator and RSSI increased a bit. 😕

    This would also point to noise on the pi 3.3V having a detrimental effect.

    This pin can only support low power mode. Use different supply if you want to use the RFM69HCW in high power mode.

    Another important hint!



  • @skywatch where did I say I ignore the note? A library is not the holy truth, it was written by a human being, with more or less accurate info.
    I have to check all info found on the net and also do my own testing.
    In this case the note should be true only for old Pi boards, Pi3 should be able to supply at least a few hundred mA on the 3v3 header pins. But for testing I checked if this makes a difference.
    RFM69HW datasheet makes me think power requirements only affect TX, 16mA in Rx mode, and up to 130mA in Tx.
    Noise can be a big factor to consider. I have decupling capacitor right next to the radio module, with thick traces to 3.3 and GND pins. The power supply is a RPi wall adaptor.
    The main idea is that it worked once and after a reboot with no hardware change, it stopped working as expected. This does not sound like a power problem or hardware one as a mater of fact, but a software one. kted inspired me to read more carefully some topics and it turns out other libraries are "plagued" with this problem. So it might have nothing to do with mysensors library but something in the Pi? Mabey a timing issue influenced by other service running? Can we solve it? Maybe if we try.



  • I found the proximate cause for this problem and posted it in an already opened issue.
    https://github.com/mysensors/MySensors/issues/1077#issuecomment-832228721


Log in to reply
 

Suggested Topics

  • 3
  • 2
  • 2
  • 2
  • 3
  • 4

1
Online

11.2k
Users

11.1k
Topics

112.5k
Posts