Other Parts Discussed in Thread: BLE-STACK
Tool/software:
I have installed latest SDK (simplelink_lowpower_f3_sdk_9_11_00_18) for CC2745. How to read the RSSI in this SDK.
Also please share all api details for this SDK.
Tool/software:
I have installed latest SDK (simplelink_lowpower_f3_sdk_9_11_00_18) for CC2745. How to read the RSSI in this SDK.
Also please share all api details for this SDK.
Hello Anto,
In order to read the RSSI value in the new SDK, you need to parse the incoming message packets in your peripheral/central event handlers. If reading the RSSI value as a peripheral device, you can use the BLEAPPUTIL_SCAN_REQ_RECEIVED event mask. This will make the rssi information accessible each time the advertising device gets a scan request. Below is an example of how to access the RSSI value inside the case statement where pMsgData is a pointer to the general message struct.
case BLEAPPUTIL_SCAN_REQ_RECEIVED: { int rssi_value; BLEAppUtil_AdvEventData_t* lpts_scanReqReceived = (BLEAppUtil_AdvEventData_t*)pMsgData; rssi_value = lpts_scanReqReceived->pBuf->pScanReqRcv.rssi; break; }
If reading the RSSI value as a central device, you can use the BLEAPPUTIL_ADV_REPORT event mask. This will allow you to read the RSSI value of every device that is advertising around you every time an advertisement is sent.
case BLEAPPUTIL_ADV_REPORT: { int rssi_value; BLEAppUtil_ScanEventData_t *scanMsg = (BLEAppUtil_ScanEventData_t *)pMsgData; rssi_value = scanMsg->pBuf->pAdvReport.rssi; break; }
More information can be found here (Get RSSI from Scan Request section): Generic Access Profile (GAP) — SimpleLink Low Power F3 SDK BLE5-Stack User's Guide 9.11.00 documentation
General BLE-Stack API Documentation: TI BLE5-Stack API Documentation: BLE-Stack API Reference
Thanks,
Eshaan Tibrewala