Author Topic: RPi + 433Mhrz Moteino RSSI issues  (Read 2891 times)

jgilbert

  • Newbie
  • *
  • Posts: 18
RPi + 433Mhrz Moteino RSSI issues
« on: November 07, 2013, 02:54:11 PM »
Just a heads up on something I've recently observed in the hopes that it helps someone else out or maybe triggers a solution to come forward. In the photo below, you can see I've mounted a motetino directly onto a Raspberry Pi using a Adafruit prototyping shield and powered it via the 3.3V rail from the RPi. I recently started noticing very long timeouts when sending ACKs, and discovered that while the RPi is on, the RSSI actually increases to -80 - -90 db -- enough to make the RFM69H code pause waiting for the channel to clear. This results in lost packets since the sending node gives up waiting for an ack and moves on to the next message while the receiver is still waiting for the channel to clear to send the ACK.

You can see in the attached trace that the background RSSI is measured around -100db while the RPi is halted (powered but in a halt state) and increases 15-20 db when the Raspberry Pi is brought back online. (In this trace, the Motetino is being powered directly from an FTDI cable while mounted to the top of the RPi.)

I'm not enough of a RF wizard to know if this is due to the power supply or interference. The solution I'm using currently is to alter CSMA_LIMIT in RFM69.h. I also plan to try moving the Motetino further away from the Raspberry Pi.

Would love to hear if anyone has found a way around this.

john k2ox

  • Full Member
  • ***
  • Posts: 110
Re: RPi + 433Mhrz Moteino RSSI issues
« Reply #1 on: November 07, 2013, 03:24:31 PM »
I'm guessing that it is RFI from the pie.

A couple things you can do to figure it out.  If it is conducted from the PS or the Pi you can remove the antenna and if the RSSI doesn't go back down you can do some filtering on the connections.

I think it is most likely radiated. In that case removing the antenna will result in a decrease in RSSI.  If it is radiated you might have to used a higher freq radio or move the antenna away from the Pi.

As far as the CSMA_LIMIT limit is concerned, my vote is that Felix change it from a fixed value to one that is relative to the RSSI threshold.  When the background noise goes up you have to increase both the RSSI Threshold as well as the CSMA_LIMIT.

I would like to see.  CSMA_LIMIT = RSSI Thres + CSMA_Offset   Where :  CSMA_Offset =  10 db (default)

This way you set it for the RX and the TX is taken care of.



Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6464
  • Country: us
    • LowPowerLab
Re: RPi + 433Mhrz Moteino RSSI issues
« Reply #2 on: November 07, 2013, 03:35:58 PM »
Keep the antenna straight and perpendicular to the GND plane if possible.
Also I've made some changes in regards to the RSSI readings, see this post: http://lowpowerlab.com/forum/index.php/topic,191.msg786.html#msg786

jgilbert

  • Newbie
  • *
  • Posts: 18
Re: RPi + 433Mhrz Moteino RSSI issues
« Reply #3 on: November 07, 2013, 05:21:19 PM »
Thank you both for the info. I rearranged the antenna to be normal to the PCB (I assume that is the ground plane.?? Forgive me, I only have 1/3 of an EE degree) The RSSI as returned by getRSSI are still in the -70s when the radio is quiet.

The only connections are GND->GND, TXD->RXD, RXD->TXD, 3.3->3.3. Should I throw a decoupling cap across the 3.3 and the GND?

I would love to actually make a small permanent shield that accepts a moteino and lets it sit on the RPI along with a small OLED display so would be nice to deal with the problem in hardware.

Just to clarify, the RSSIs reported in that screencap are in fact from the readRSSI() call as of a git pull from a few weeks ago, and at the time I ran the test, I had previously read the code from that checkout to confirm that the function call was in fact returning RSSI values newly requested from the RFM. The code was:

Code: [Select]
if( millis()  - lastUpdate > 1000 )
  {
    Serial.print( "D: Moteino Gateway Up millis:[" );
    Serial.print( millis() );
    Serial.print( "] RSSI:[" );
    Serial.print( radio.readRSSI() );
    Serial.print( "]" );
    Serial.print( "filename [" );
    Serial.print( __FILE__  );
    Serial.println("]");

    lastUpdate = millis();
}

I have done a fresh git checkout and will try a modification that allows for RSSI thresholds to be overridden.
« Last Edit: November 07, 2013, 07:16:32 PM by Felix »

Mazzic31

  • Newbie
  • *
  • Posts: 2
Re: RPi + 433Mhrz Moteino RSSI issues
« Reply #4 on: December 13, 2015, 12:40:46 PM »
Hi,
I know the question was raised a long time ago, but maybe my comment can help other who have a low RSSI issue.
In my case it was a (very) silly mistake : my nodes are RFM69W but on my Gateway node I had forgotten to remove the #define IS_RFM69HW.
Took me a few minutes to find out.

Paul