How to use get_properties to get RSSI in RF24? As picture below, how to use get_properties ? I fail to understand AN625, how to use get_properties to get RSSI ?


Adding source code based on RH_RF24 functions.

#include &lt;SPI.h&gt;
#include &lt;RH_RF24.h&gt;

// Singleton instance of the radio driver
RH_RF24 rf24;


uint8_t Recieve_Data[20];

uint8_t receive_buffer[RH_RF24_MAX_MESSAGE_LEN];
uint8_t receive_buffer_length = sizeof(receive_buffer);

uint8_t Rssi;

unsigned long Micro_Time;

uint8_t status[8];
uint8_t buf[RH_RF24_MAX_MESSAGE_LEN];
uint8_t len = sizeof(buf);

void setup()
{
  Serial.begin(115200);
  if (!rf24.init())
    Serial.println(&quot;init failed&quot;);
  // Defaults after init are 434.0MHz, modulation GFSK_Rb5Fd10, power 0x10
   while(!rf24.setFrequency(443));
  rf24.setModemConfig(rf24.GFSK_Rb50Fd100);  //设置成GFSK_Rb50Fd100
}


void loop()
{
  rf24.setModeRx();
  delay(100);
  rf24.setModeIdle();
  rf24.command(RH_RF24_CMD_GET_INT_STATUS, NULL, 0, status, sizeof(status));
  Serial.print(&quot;Id   &quot;);
  for (int i = 0; i &lt;= 8; i++)
  {
    Serial.print((uint8_t)status[i]);
    Serial.print(&quot;   &quot;);
  }
  Serial.println();
  /*
    if (status[2])
    {
      uint8_t modem_status[6];
      rf24.command(RH_RF24_CMD_GET_MODEM_STATUS, NULL, 0, modem_status, sizeof(modem_status));
      delay(100);
      for (int i = 0; i &lt;= 6; i++)
      {
        Serial.print(modem_status[i]);
        Serial.print(&quot;   &quot;);
      }
      Serial.println();
    }
  */
  delay(400);
}
By using the RH_RF24 rf24;(Singleton instance of the radio driver), read a series of properties is really simple.


The properties shall be in the same GROUP,
Up to 16 properties could be read in the same request,



  Hereafter is a example to read from SYNC_CONFIG to SYNC_BITS_7_0 (5
  properties).


Step 1 - Declare your own uint8_t sync_stat[5]; or use the still declared uint8_t status[8];.

 uint8_t sync_stat[5];


Step 2 - The firstProperty is in fact the first property to be read and count is the number successive properties to be read (from SYNC_CONFIG = 0x1100 to SYNC_BITS_7_0 = 0x1104.

// And check the returned code
if (rf24.get_properties(SYNC_CONFIG,sync_stat,5)) {
    // sync_stat[0]= SYNC_CONFIG
    // ...
    // sync_stat[4]= SYNC_BITS_7_0
}



  Then, the equivalent command() is:


uint8_t buf[3];
buf[0] = SYNC_CONFIG &gt;&gt; 8;
buf[1] = 5;
buf[2] = SYNC_CONFIG &amp; 0xff;
if (rf24.command(RH_RF24_CMD_GET_PROPERTY, buf, sizeof(buf),sync_stat,5)) {
    // Same array
}