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.

Programming cc2541 keyfob for RSSI

Other Parts Discussed in Thread: CC2541

Hello,

I am new to BLE programming and this forum. I have cc2541 mini development kit and I want to edit the keyfobdemo.c program such that I can get RSSI value for the connected device/s. What changes do I have to make in the code?

Best Regards,

Muhammad 

  • Don't understand you question well. Keyfobdemo acts as client mode and it should connect to a central role. A BLE device cannot connect to it.
  • Hi Muhammad,

    Welcome to BLE & E2E! You can use the HCI_ReadRssiCmd() to read the RSSI of the last received packet or set the GAPROLE_RSSI_READ_RATE to the desired RSSI report interval. See the description in hci.h.
    The RSSI report will come in an HCI_GAP_EVENT_EVENT which will be forwarded to the app if the app has installed an gapRolesCBs_t->pfnRssiRead callback.

    Best wishes
  • Thank you for your reply

    In my project , I want to transfer the data (bi-directional) between the USB dongle and the keyfob board. The data include the RSSI value (between the USB and keyfob) and some other measurements.

    So is it not possible to do this by editing keyfobdemo.c? Should I rather edit simpleBLECentral and/or SimpleBLEPeripheral in order to conduct this data exchange?
  • Thank you so much for the reply

    I have one more question. After the changes, the RSSI value can be accessed through the BTool UI (like Transmission Power Level, Battery level etc.)? If yes then which register do I have to access?
  • For BTool + HostTest firmware, you will get the CommandCompleteEvent with the RSSI value. The HCI_ReadRSSI cmd is accessible on the "Adv. Commands" tab under HCI.

    Best wishes