When we measured the RSSI value, the value received from the RF_cmdPropCs and RF_getRssi () statements, it had a small different.
When measuring RSSI at (-30 + 7) dBm, (-70 + 8) dBm, (-95 +8) dBm, (-115 + 9) dBm:
(in the circuit we have mounted an amplifier circuit about 7-8dB)
Carrier cmd: -28.1dBm, -68.2dBm, -93.2dBm, -115.4dBm
Get RSSI cmd: -27.3dBm, 67.4dBm, -92.1dBm, -108.0dBm
Test method: let LED light when RSSI value read > test threshold.
Our code:
1. RF_cmdPropCs:
1.1. void API_RF_Carrier (int8_t RSSI_level)
{
// Carrier
RF_cmdPropCs.status = IDLE;
RF_cmdPropCs.condition.rule = 0x1; // run next command
RF_cmdPropCs.condition.nSkip = 0x0; // same
RF_cmdPropCs.csConf.busyOp = 0x1; // end cs if busy
RF_cmdPropCs.csConf.idleOp = 0x0; // continue if idle
RF_cmdPropCs.rssiThr = RSSI_level;
RF_cmdPropCs.csEndTrigger.triggerType = TRIG_REL_START;
RF_cmdPropCs.csEndTime = RF_convertUsToRatTicks (CS_TIMEOUT_5MS);
RF_runCmd (rfHandle, (RF_Op *) & RF_cmdPropCs, RF_PriorityNormal, NULL, 0);
if (RF_cmdPropCs.status == PROP_DONE_IDLE)
{
LED_CA_OFF;
}
else if ((RF_cmdPropCs.status == PROP_DONE_BUSY) || (RF_cmdPropCs.status == PROP_DONE_BUSYTIMEOUT))
{
LED_CA_ON;
}
else
{
RF_resetRF ((uint32_t) RF_cmdPropCs.status);
}
}
1.2. in main function
while (1)
{
API_RF_Carrier (RSSI_level);
Delay (100);
}
2. RF_getRssi:
2.1. void API_RF_CarrierKanDo (int8_t RSSI_level)
{
static int8_t rssiValue;
rssiValue = RF_getRssi (rfHandle);
if (rssiValue == RF_GET_RSSI_ERROR_VAL) // Error
{
// LED_CA_OFF;
}
else
{
if (rssiValue> = RSSI_level)
{
LED_CA_ON;
}
else
{
LED_CA_OFF;
}
}
}
2.2. in main function
Start_RX ();
while (1)
{
API_RF_CarrierKanDo (RSSI_level);
Delay (100);
}
1. We want to confirm that the difference in RSSI value when received in these two ways is normal, or unusual?
2. What is the cause?
3. Which of the two methods in which method will give the RSSI value closer to the actual value? (And how to read the RSSI value more precisely?)