This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC1310: Get RSSI of Last Received Message

Part Number: CC1310

Hi,

Is there a way to get the RSSI of the last received radio message? The RF_getRssi function is just returning -128.

  • Hi Matthew,

    It is possible to append the RSSI to each of your received radio packets by setting the bAppendRssi bit of the rxConf field of the CMD_PROP_RX command (cf. SWCU117I, section 23.5.3.1).


    You can actually test that feature in SmartRF Studio, as seen here:

    Regards,

    Arthur

  • Hi, this seems to be exactly what I need, thanks! But when enabling the bAppendRssi by setting it to 1 on Smart RF Studio and restarting the Packet RX procedure, I'm not seeing any additional byte in the received packet. I've set the Length Config to Variable and am now expecting an additional byte to be displayed, correct? 

  • Hi Matthew,

    You are right, I have checked and the RSSI is indeed not being displayed in SmartRFStudio 7 because the bAppendRssi bit is actually hardcoded there, and not displayed in the console. However, the bits are set in the radio settings exported from SmartRF Studio 7.

    However, you will be able to see it in your application. rfPacketRx/RfPacketTx are good starting points to have a simple example showing this.

    Regards,


    Arthur

  • So, I'm trying out the code for the rfPacketRx and reading an extra byte after the data packet, but still can't get the RSSI. Am I correct in thinking that the last byte being read should be the RSSI (divided by 2, since it's in 0.5dB resolution)?

    if (e & RF_EventRxEntryDone)
    {
    /* Get current unhandled data entry */
    currentDataEntry = RFQueue_getDataEntry();

    /* Handle the packet data, located at &currentDataEntry->data:
    * - Length is the first byte with the current configuration
    * - Data starts from the second byte */
    packetLength = *(uint8_t*)(&currentDataEntry->data) ;
    packetDataPointer = (uint8_t*)(&currentDataEntry->data + 1);

    /* Copy the payload + the status byte to the packet variable */
    memcpy(_uart_tx_packet, packetDataPointer, (packetLength + 1));

  • Hi Matthew,

    You are correct, please look here at the difference rxConf.bAppendRssi makes to the received packet (_uart_tx_packet in your case) :

    _ rxConf.bAppendRssi = 0

    _rxConf.bAppendRssi = 1


    We can see that "0xF2" at the end of the packet data, which is, according to the 23.3.3.2.3 section of the CC1310 technical reference manual, the RSSI in dBm in an unsigned byte format (0xF2 = -14 in that case). Thus, you don't need to divide that value by two.

    By the way, that -14 dBm value is given away in SmartRF Studio as well in my case, and it corresponds to a "saturation" value of the receiver, as the boards I am testing with are very close together.



    Regards,

    Arthur

  • Perfect, that seems to have done it! Thanks for your patience and support Arthur, it is much appreciated.