- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello CYPRESS Community!
So I have been trying to read the RSSI value from the peripheral device using a central device.
Once the connection is established between the two devices:
PS: I am using CYBLE-416045-02 module PSoC 6 prototyping kit.
i have included the following statements in my code:
apiResultRssi = Cy_BLE_GetRssiPeer(conn_handle.bdHandle);
printf("The RSSI value is %X\r\n", rssipara.rssi);
if(apiResultRssi != CY_BLE_SUCCESS)
{
DEBUG_BLE("Cy_BLE_GetRssiPeer API Error: %xd \r\n", apiResultRssi);
}
case CY_BLE_EVT_GET_RSSI_COMPLETE:
{
rssi_param = (cy_stc_ble_rssi_info_t*)(((cy_stc_ble_events_param_generic_t*) eventParam)->eventParams);
printf("RSSI value is %02x \r\n",rssi_param->rssi);
}
and declared the variables as follows:
cy_en_ble_api_result_t apiResultRssi = CY_BLE_SUCCESS;
cy_stc_ble_rssi_info_t *rssi_param;
Results obtained it is giving an constant outpuyt of
The RSSI value is FFFFFFFC
RSSI value is ffffffc9
Questions:
Am i reading the right rssi value? and why is that i am getting in hex how do I print the right decimal equivalent value?
WangS_81MeenakshiR_71PSoC SoftwarePSoC 6 MCU Community
Solved! Go to Solution.
- Tags:
- psoc6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I could find out that %d would give the value