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.

CC2640R2F: HCI_ReadRSSI command description when it works

Part Number: CC2640R2F


HI,

I am using SDK 1.50.00.71 and testing feature of connection mode with mobile app. I use host test example in testing. I want to know that there is command "HCI_ReadRSSI" is this command will work in connection mode only ? 

What i observed is that in connection mode when i fire this command it gives RSSI value but when i fire this command in non connection mode it gives RSSI value always as 0.

Kindly let me know when connection is established and no data convey then this gives RSSI of which packet ?

Regards,

Bhavin

  • Hello Bhavin,
    HCI_ReadRssiCmd needs a valid connection handle ( and connection) to return any real RSSI value. The returned RSSI value will be from the last connection event packet. This is described in the TI BLE5-Stack API Documentation:
    file:///C:/ti/simplelink_cc2640r2_sdk_1_50_00_71/docs/ble5stack/ble_user_guide/doxygen/ble/html/group___h_c_i.html#ga19d1f14a0fde7b049a92f46e96671b40
  • Hi Eirik,

    Sorry but still didn't get it... if connection already established and data is not exchanging in between then if i fire Read RSSI command then what RSSI value it will return ?

    The connection event packet is frequently exchanging between two connected BLE modules ?

    Regards,
    Bhavin
  • Hello Bhavin,
    The HCI_ReadRSSI command will immediately return success (HCI_SUCCESS = 0x00). The RSSI data will be returned in a later event. This is explained in hci.h:

    * @par Corresponding Events
    * @ref hciEvt_CmdComplete_t with cmdOpcode @ref HCI_READ_RSSI

    If there is no RSSI data available the data in this event (*pReturnParam) will be HCI_RSSI_NOT_AVAILABLE (0x7F).
  • Hi Eirik,

    I think you didn't get my query.

    My query is that when i send ReadRSSI command in connection mode and i am able to read RSSI value, so i want to confirm that from where this RSSI value has been received without any data exchange between two BLE modules ?

    Regards,
    Bhavin
  • Then there should be no valid value. The RSSI of the last received data packet (connection event packet) will be returned if there has been any.